4

I have a CV that I created using the moderncv package. I am trying to make it modular to make it easier to customize for specific job applications. For some job listings, a CV is more appropriate, in which case I have a list of my publications and presentations at the end and I have them linked to specific parts of my job history using \cite{}. This has suited me well, but now I'd like to be able to create a shorter resume version which does not include the citations. If I just comment out the \bibliography{CV} command, I get a lot of Citation 'craigim2014' on page 1 undefined type errors and a question mark in place of the citation number.

Is there an "empty" bibliography style that will hide the numbers and hide the bibliography without having to maintain two nearly identical files with my work history, one with \cite{} commands and one without?

For completeness, here is my MWE cv:

\documentclass[10pt,letterpaper]{moderncv}

\moderncvtheme{classic}
\usepackage[comma,super,sort&compress]{natbib}

\firstname{Dr.}
\familyname{Craigim}
\address{123 Any Street}{Springfield}
\phone{Cell: (888) 555-1212}

\renewcommand{\refname}{Publications \& Presentations}

\begin{document}
\makecvtitle
\section{Experience}
\cventry{Jan 2009\\to Dec 2012}{Researcher}{Craigim Corp}{Springfield}{}{Provided technical expertise and excellence to maximize the paradigm envelope in the following sector areas:}
\cvlistitem{Leveraged marketplace human assets\cite{craigim2009}}
\cvlistitem{Utilized force multiplication and deployed enterprise solutions\cite{craigim2010}}

\bibliographystyle{unsrturl}
\bibliography{CVrefs}
\end{document}

and here is the contents of CVrefs:

@Article{craigim2010,
  Title                    = {Deploying Enterprise Solutions},
  Author                   = {Craigim},
  Journal                  = {Journal of Force Multiplication and Utilization},
  Year                     = {2010},
}

@Article{craigim2009,
  Title                    = {Marketplace Leveraging},
  Author                   = {Craigim},
  Journal                  = {Journal of Human Assets},
  Year                     = {2009},
}

Just commenting out the \bibliography line does not work. Ideally, I'd like to be able to do something like comment out the \bibliographystyle line and uncomment another with some sort of empty style which would silently accept the \cite tags, use a zero-width space for the citation number/indicator, and then not print out the bibliography. Is this doable with bibtex? Is there another package that will take care of this? Is this something I could do instead with biblatex and if so, how much would I have to change my document and workflow? Also, if it matters, I'm using pdflatex with MiKTeX 2.9.

5

One option using a boolean switch \ifshortCV; if it is set to true, then the \cite and \bibliography commands are \let to \@gobble and no citations appear in the document and the references section is not typeset; if it is set to false, then you get both the citations and the references section. Simply comment-out (uncomment-out) the line \shortCVtrue to toggle the switch:

\documentclass[10pt,letterpaper]{moderncv}

\moderncvtheme{classic}
\usepackage[comma,super,sort&compress]{natbib}

\firstname{Dr.}
\familyname{Craigim}
\address{123 Any Street}{Springfield}
\phone{Cell: (888) 555-1212}

\renewcommand{\refname}{Publications \& Presentations}

\usepackage{filecontents}
\begin{filecontents*}{CVrefs.bib}
@Article{craigim2010,
  Title                    = {Deploying Enterprise Solutions},
  Author                   = {Craigim},
  Journal                  = {Journal of Force Multiplication and Utilization},
  Year                     = {2010},
}

@Article{craigim2009,
  Title                    = {Marketplace Leveraging},
  Author                   = {Craigim},
  Journal                  = {Journal of Human Assets},
  Year                     = {2009},
}
\end{filecontents*}

\newif\ifshortCV

\shortCVtrue% comment-out to have the citations in the text and the references section

\makeatletter
\ifshortCV
\let\cite\@gobble
\let\bibliography\@gobble
\fi
\makeatother


\begin{document}
\makecvtitle
\section{Experience}
\cventry{Jan 2009\\to Dec 2012}{Researcher}{Craigim Corp}{Springfield}{}{Provided technical expertise and excellence to maximize the paradigm envelope in the following sector areas:}
\cvlistitem{Leveraged marketplace human assets\cite{craigim2009}}
\cvlistitem{Utilized force multiplication and deployed enterprise solutions\cite{craigim2010}}

\bibliographystyle{unsrturl}
\bibliography{CVrefs}
\end{document}
3
  • I actually don't want to print the references section at all in the short version. I added the line \let\bibliography\@gobble to the \if \fi block and that takes care of everything with a single switch very nicely. – craigim Jan 16 '15 at 23:01
  • @craigim Ah, I see. I misunderstood that bit, but you found the solution. – Gonzalo Medina Jan 16 '15 at 23:02
  • 1
    @craigim Just to let you know that I edited my answer incorporating the suppression of the references section. – Gonzalo Medina Jan 17 '15 at 3:00
1

I successfully disabled the citations in my document with: \renewcommand\cite[2][]{} in the preamble. It might not work for all cases, though.

1
  • \cite takes an optional argument: \renewcommand\cite[2][]{} to make sure there aren't any artifacts. I feel like this would have unintended consequences, though. – Sean Allred May 9 '15 at 15:01

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.