From 5c0279a12ee00ecb04bd36ad72061a1160e9cb6d Mon Sep 17 00:00:00 2001 From: M Pacer Date: Fri, 8 Sep 2017 00:16:14 -0700 Subject: [PATCH] change logic to grab and place as title, unicode escaping isn't working though --- nbconvert/templates/latex/base.tplx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 *))