mitchelloharawild / vitae

R Markdown Résumés and CVs

Home Page:https://pkg.mitchelloharawild.com/vitae/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lack of Twitter or Github for latexCV creates a compile error

jgwall opened this issue · comments

When using the latexcv template, compilation fails if either twitter or github YAML arguments are not supplied. The error code is

! Paragraph ended before \text@command was complete.
<to be read again> 
                   \par 
l.369  - }}}

Which basically means there is a double-return in the middle of a \text command. It's in the section ARTIFICIAL FOOTER in the .tex file, and seems to be because when either the twitter or github arguments (but only these) is omitted, the template inserts a blank line. Minimal examples:

Works:

---
twitter: mariecurie
github: mariecurie
output: 
  vitae::latexcv:
    theme: classic
---

Fails:

---
#twitter: mariecurie  # Can comment out either twitter or github
github: mariecurie
output: 
  vitae::latexcv:
    theme: classic
---

And here is the problem section in the .tex file:

%--------------------------------------------------------------------------------------------------
%	ARTIFICIAL FOOTER (fancy footer cannot exceed linewidth)
%--------------------------------------------------------------------------------------------------

\null
\vspace*{\fill}
\hspace{-0.25\linewidth}\colorbox{white}{\makebox[1.5\linewidth][c]{\mystrut  \textnormal{

 - \textcolor{sectcol}{\href{https://github.com/mariecurie}{\faicon{github} mariecurie}}
 - }}}

The blank line in the middle is the culprit. I'm not familiar enough with pandoc to know where/why it's getting inserted, but since it only occurs with these two specific arguments, I assume it's a bug.

Downloaded and checked, and confirmed it worked on my machine. Thanks!