7

I built a CV using the kjh-vita LaTeX template (based on memoir and the template's custom stylings). I use(d) extensively end-notes via the enotez package. Then, I derive(d) a short version without the end-notes (all commented out, manually of course). Every now and then, I retouch various details either in the "full" version, or in the short one.

It'll be smart to keep one source from which to derive different versions (in the current case, the "full" and a short version, though I could make use of an option for a third version at some point).

The packages I use in the full version are:

\usepackage{org-preamble-xelatex} % as per the original template
\usepackage{fontawesome,marvosym,url} % \Mobilefone looks better than \faMobile
\usepackage{ebgaramond}
\usepackage{lastpage} % use in header for full version
\usepackage{xcolor}
\usepackage{csquotes}
\usepackage{enotez,fnpct,footmisc}
\usepackage{multicol} % end-notes in two-columns

Now, in the short version I'd like not to use some of the above, notably fnpct, enotez, multicol and footmisc. I'd like to silence all occurences of end-note markers (in-text and in the end). There are (and might be even) more changes (to come) that concern the content (text) itself (as asked/demonstrated in Multiple output pdfs with limited info in one).

Obviously, this is not a new question! Searching and reading the following related Q&As:

However, this information is a lot to read carefully. Any suggestions on where to start as a beginner?

Update

Just for the matter of completeness, I use http://www.scons.org/ and the following SConstruct for compiling the documents. It works straightforward (see also: https://tex.stackexchange.com/a/26573/8272).

# make sure scons finds tex executables:
import os
environment = Environment(ENV=os.environ)

# xelatex
environment['PDFLATEX'] = 'xelatex'

# target and source:
pdf_short_cv = environment.PDF(target='cv_nikalexandris_short.pdf', source='short_cv.tex')
pdf_full_cv = environment.PDF(target='cv_nikalexandris_full.pdf', source='full_cv.tex')

# make sure that the pdf is reloaded properly (e.g., in Skim)
environment.Precious(pdf_short_cv)
environment.Precious(pdf_full_cv)
Nikos Alexandris
  • 1,051
  • 1
  • 15
  • 43
  • 1
    Read the first one you can understand carefully. See what you can now do. If you need more, read the next one. Repeat. You will be able to skim increasing amounts of information as you proceed, because you will find similar strategies and ideas. – cfr Oct 10 '15 at 22:38
  • @cfr Thank you. I find this http://tex.stackexchange.com/a/245616/8272 somewhat interesting. It hasn't attracted the eyes of many, it seems. Why so? – Nikos Alexandris Oct 10 '15 at 23:51
  • I wouldn't read much into the vote count, if that's what you mean. The best answers and questions often get few votes, and poor questions and, sometimes, answers often get lots of votes. In this particular case, the answer is 'late' (i.e. a loooonnng time after the question was asked) and there were already several answers, including an accepted one, with significant numbers of votes. So to see that one, people have to scroll a long way. And would-be answerers are less likely to view a question with an accepted answer. And... Well, just how the site works, really ;(. – cfr Oct 10 '15 at 23:59
  • Plus it uses make which will put a lot of people off immediately because it is a tool from outside the TeX ecosystem. – cfr Oct 11 '15 at 00:01
  • Why not csquotes in the short version? I strongly recommend babel (unless everything is in English), csquotes, and biblatex for a CV. Programming around having access to csquotes commands is likely to be more trouble than it's worth. And I need to ask: endnotes in a CV?!?? What's up with that? – jon Oct 11 '15 at 00:33
  • @jon csquotes back-in, then. Yes, end-notes in a full-version CV, for those who want to know more... :-) – Nikos Alexandris Oct 11 '15 at 00:36
  • And org-preamble-xelatex? For org-mode conversion? Are you writing in org-mode and converting? And does this mean that the CV will only need to be compilable with xelatex? What's the situation with the fonts for the short version? What font will be used then? Is this a multilingual document (if I may judge based on your name). ... In fact, it'd be better if you started us off with a short, but compilable example of the "full" version, and then some comments about the paring down process. – jon Oct 11 '15 at 00:41
  • @jon an attempt for a quick reply: the only real difference, now, is that there are no end-notes in the short version, plus some content (==text) differences. Style, fonts (all free here, no commercial ones) are the same. I am not writing in org-mode, it's just how the template was and I haven't had the time to read, understand and decide what to do with it yet. Yes, XeLaTeX only. English only, currently. Planning for tri-lingual. I will try to provide some MWEs. – Nikos Alexandris Oct 11 '15 at 00:49

1 Answers1

5

Here's a schematic answer, since you seem as eager to learn the principles involved as you are in getting an answer.

For CVs, I like to break each section into discrete files, which you can then \input or not as needed. You could combine this with some boolean logic to determine if things get included or not. In the example below, you can see how to add the conditional clause into a macro definition and how to operate with \if-constructions directly.

So you need some "sections" in independ files:

% cv-associations.tex
\section{Associations}
\lipsum[1]

% cv-contact.tex
\section{Contact Info}
\lipsum[1]

% cv-education.tex
\section{Education}
\cvendnote{\lipsum[2]}%
\lipsum*[1]
\cvendnote{\lipsum[3]}%

% cv-outreach.tex
\section{Outreach}
\cvendnote{\lipsum[2]}%
\lipsum*[1]
\cvendnote{\lipsum[3]}%

% cv-presentation.tex
\section{Presentations}
\lipsum[1]

% cv-publications.tex
\section{Publications}
\lipsum[1]

% cv-teaching.tex
\section{Teaching}
\cvendnote{\lipsum[2]}%
\lipsum*[1]
\cvendnote{\lipsum[3]}%

Then you need the masterfile:

\RequirePackage{etoolbox}% etoolbox's \bool*-related commands work with normal \if-related commands
\providebool{fullCV}% default: false
%\booltrue{fullCV}
%
\documentclass{article}
\usepackage{fontspec}
\usepackage{fontawesome,url,marvosym}

% An example of how you might conditionally load packages
\iffullCV
\usepackage{ebgaramond}
\else
\usepackage{libertine}
\fi

\usepackage{lastpage}
\usepackage{xcolor}
\usepackage{fnpct}
\usepackage{enotez}
\usepackage{multicol}
\usepackage{footmisc}
\usepackage{csquotes}
\usepackage{lipsum}% just for dummy text

% for things you sometimes want to \input
\newcommand{\cvinput}[1]{%
  \iffullCV
  \input{#1}
  \else\fi}

% conditionally include \endnotes
\newcommand{\cvendnote}[1]{%
    \iffullCV
    \endnote{#1}%
    \else\fi}


\begin{document}

% regular \input files will always be included
\input{cv-contact}

\input{cv-education}

\input{cv-publications}

% \cvinput files will only be included if \fullCVtrue is active
\cvinput{cv-presentations}

\input{cv-teaching}

\cvinput{cv-outreach}

\input{cv-associations}

\iffullCV
\printendnotes
\else\fi

\end{document}

Now you can compile the file directly and simply uncomment the \booltrue line as needed. But the reason it's set up this way above the \documentclass line is so you can use the command line to compile both files with one command. Something like this, for example (assuming the filename is multioutputCV.tex):

xelatex -jobname=CVfull "\newif\iffullCV\fullCVtrue\input{multioutputCV.tex}" && xelatex -jobname=CVshort "\newif\iffullCV\fullCVfalse\input{multioutputCV.tex}"

(Compile twice, though, to get the endnotes in place for the full version.)

Should result in two files: CVshort.pdf and CVfull.pdf. You could now write a Makefile if you liked, but that is somewhat beyond the scope of this question.

jon
  • 22,325