Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Title page not parsing TeX #152

Open
laboon opened this issue Mar 21, 2019 · 2 comments
Open

Title page not parsing TeX #152

laboon opened this issue Mar 21, 2019 · 2 comments

Comments

@laboon
Copy link
Owner

laboon commented Mar 21, 2019

Title page is showing raw TeX instead of formatting.

@GeeF
Copy link

GeeF commented May 15, 2019

Poked a bit at this and the -M parameters are escaped by pandoc. It seems the easiest way is to just write some custom tex for the title page.

@Ichimonji10
Copy link

Ichimonji10 commented Oct 1, 2019

To expand on what @GeeF said, here's a snippet from the manual:

-M KEY[=VAL], --metadata=KEY[:VAL]

Set the metadata field KEY to the value VAL. [...] unlike --variable, --metadata affects the metadata of the underlying document (which is accessible from filters and may be printed in some output formats) and metadata values will be escaped when inserted into the template.

This can be resolved by setting an option that's not escaped, like --variable. Here's a diff that does the trick:

diff --git a/Makefile b/Makefile
index c2fb292..d20a2a9 100644
--- a/Makefile
+++ b/Makefile
@@ -19,9 +19,9 @@ pdf:	main.tex tex_files
 		-M classoption="twoside" \
 		-M classoption="letterpaper" \
 		-M geometry="margin=1.25in" \
-		-M title="\Huge{\textbf{${TITLE}}}" \
-		-M author="\LARGE{${AUTHOR}}" \
-		-M date="{\Large\textcopyright~\textbf{$(shell git log -1 --date=iso --format='%ai' | cut -c-10 )}}\\\\Compiled in PDF\LaTeX{}\endgraf\textit{${DEDICATION}}"
+		-V title="\Huge{\textbf{${TITLE}}}" \
+		-V author="\LARGE{${AUTHOR}}" \
+		-V date="{\Large\textcopyright~\textbf{$(shell git log -1 --date=iso --format='%ai' | cut -c-10 )}}\\\\Compiled in PDF\LaTeX{}\endgraf\textit{${DEDICATION}}"
 
 tex_files:	compiled_tex/ $(patsubst text/%.md,compiled_tex/%.tex,$(MD_FILES))
 compiled_tex/:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants