Git Product home page Git Product logo

Comments (2)

Ichimonji10 avatar Ichimonji10 commented on September 3, 2024 2

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/:

from ebook.

GeeF avatar GeeF commented on September 3, 2024

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.

from ebook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.