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

assorted updates to make building pdf docs work #76

Closed
wants to merge 1 commit into from

Conversation

@jlmitch5
Copy link
Contributor

@jlmitch5 jlmitch5 commented Jul 19, 2017

cc @samdoshi

Looks like latex_preamble.jinga2.md has some issues.

  1. Paths include refs to your local file system. Changing them to - Path={{fonts_dir}}roboto-hinted/ fixes the issue.

  2. including:

- \usepackage{titlesec}
- \titleformat{\chapter}{\normalfont\LARGE\bfseries}{\thechapter.}{1em}{}
- \titlespacing*{\chapter}{0pt}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}
...

causes build failure. RuntimeError: Pandoc died with exitcode "43" during conversion: b'! LaTeX Error: Can be used only in preamble.\n\nSee the LaTeX manual or LaTeX Companion for explanation.\nType H <return> for immediate help.\n ...

If I remove the header-includes list, the PDF is built successfully. I looked into pandoc's latex template, and the header-includes are definitely added in the preamble of the document, so I cannot figure out what's up.

There are a few other trivial things I realized and fixed:

  • typo in preamble Teletype Documenation
  • it's "jinja2" not "jinga2" I think
  • looks like latex_preamble.md (the non jinja-2 one) is not being used.
@@ -17,12 +17,4 @@ monofontoptions:
- BoldFont=RobotoMono-Bold.ttf
- ItalicFont=RobotoMono-Italic.ttf
- BoldItalicFont=RobotoMono-BoldItalic.ttf
header-includes:

This comment has been minimized.

@jlmitch5

jlmitch5 Jul 19, 2017
Author Contributor

removing these is obviously subpar. At a loss as to what would make things work though. Any ideas?

@samdoshi
Copy link
Collaborator

@samdoshi samdoshi commented Jul 19, 2017

Ha. So I had actually done the hard work of removing the local filenames, then forgot to commit it properly. Good spot. (latex_preamble.md had the fixed paths in it, I guess I meant to rename it, but copied it instead)

Can you split this PR into one that just fixes my fonts mistake (and typos)? Or I can do it if we can't get to the bottom of the Latex issue and you can't test the change!

My gut feeling on the Latex errors is that somehow there is a config mismatch, it might be that you're using a different version of TexLive/MacTex to me. I'll post some stuff on the lines thread.

@jmsole
Copy link

@jmsole jmsole commented Jul 19, 2017

Using - Path={{fonts_dir}}roboto-hinted/ doesn't fix it for me. I only managed to get it working if I set the path directly, - Path=../utils/fonts/roboto-hinted/. This also allows me to build even with the header-includes: stuff still there. No errors.

@samdoshi
Copy link
Collaborator

@samdoshi samdoshi commented Jul 19, 2017

Okay, I'm going to close this. If I can I will try and get the paths issue fixed using an absolute path and the {{fonts_dir}} substitution, otherwise I guess we'll have to go with relative.

Give me 24 hours or so.

@samdoshi samdoshi closed this Jul 19, 2017
@jlmitch5
Copy link
Contributor Author

@jlmitch5 jlmitch5 commented Jul 19, 2017

@samdoshi samdoshi mentioned this pull request Jul 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants