Skip to content

Commit

Permalink
Merge pull request #672 from mpacer/title_meta
Browse files Browse the repository at this point in the history
if nb.metadata.title is set, default to that for notebook
  • Loading branch information
takluyver authored Sep 15, 2017
2 parents 7921a2e + 5c0279a commit 710548f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion nbconvert/templates/latex/base.tplx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,14 @@ This template does not define a docclass, the inheriting class must define this.
\def\gt{>}
\def\lt{<}
% Document parameters
((* block title *))\title{((( resources.metadata.name | ascii_only | escape_latex )))}((* endblock title *))
% Document title
((* block title -*))
((*- if "title" in nb.metadata *))
\title{((( nb.metadata.get("title", "") | ascii_only | escape_latex )))}
((*- else *))
\title{((( resources.metadata.name | ascii_only | escape_latex )))}
((*- endif -*))
((*- endblock title *))
((* block date *))((* endblock date *))
((* block author *))((* endblock author *))
((* endblock definitions *))
Expand Down

0 comments on commit 710548f

Please sign in to comment.