diff --git a/nbconvert/templates/latex/base.tplx b/nbconvert/templates/latex/base.tplx index 5263a70bb..3c4e39475 100644 --- a/nbconvert/templates/latex/base.tplx +++ b/nbconvert/templates/latex/base.tplx @@ -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 *))