1

I am currently working on a LATEX template to convert markdown/yaml documents into pdf resume through Latex and pandoc, via xetex. However the bold and emphasis commands are not translating through to pdf. An example script within the latex template (template.tex) is:

$if(education)$
\section*{Education}
\noindent
 $for(education)$
\note{$education.year$}\textbf{$education.subject$}$if(education.degree)$,$education.degree$$endif$\\
\emph{$education.institute$}$if(education.city)$, $education.city$$endif$\\[.2cm]
$endfor$
$endif$

The YAML source is:

education:
- year: 1867
  subject: Philology
  institute: Leipzig Universität
  city: Leipzig
- year: 1864
  subject: Abitur
  institute: Schulpforta
  city: Naumburg

However within the output pdf no text is bold or italic.

Any help would be greatly appreciated

2
  • 1
    Which pandoc build command are you using? You have to specify your template explicitly when you are using custom template. Also, for debugging you should not output pdf right away, but you can write only tex file itself and inspect that. Nov 2, 2020 at 6:50
  • I have nor problems with your template, please give some more details on what *exactly * you are doing
    – DG'
    Nov 2, 2020 at 8:23

1 Answer 1

3

If you haven a file input.md

---
education:
- year: 1867
  subject: Philology
  institute: Leipzig Universität
  city: Leipzig
- year: 1864
  subject: Abitur
  institute: Schulpforta
  city: Naumburg
---

and a template file template.latex

$if(education)$
\section*{Education}
\noindent
  $for(education)$
  \note{$education.year$}\textbf{$education.subject$}$if(education.degree)$,$education.degree$$endif$\\
    \emph{$education.institute$}$if(education.city)$, $education.city$$endif$\\[.2cm]
  $endfor$
$endif$

and you call pandoc like this

pandoc input.md --template template.latex --to latex

then the output will look like this

\section*{Education}
\noindent
    \note{1867}\textbf{Philology}\\
    \emph{Leipzig Universität}, Leipzig\\[.2cm]
    \note{1864}\textbf{Abitur}\\
    \emph{Schulpforta}, Naumburg\\[.2cm]

You can see \emph and \textbf are there

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.