TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am making my resume using and for xelatex. Certain versions of my resume have my name and address, they others, those which are public do not. Is there an easy way to hide this information on the public versions. As of now I just run

xelatex file.tex

I really don't want to have to go in and edit the file every time. any ideas?

share|improve this question
up vote 7 down vote accepted

You can create your document using a template like the following (call this file.tex):

Here is some content that is always visible.

Here is some content that depends on a condition.

Here is some content that is always visible.

This defines a conditional \ifinclude that can either be true (\includetrue) or false (\includefalse, default). This condition is switched on/off by virtue of whether a macro \public is defined or not (using the e-TeX primitive \ifdefined). Wrapping the non-public details within your document/resume around a primitive \ifinclude...\fi conditional, you can selectively include this content or not, based on the existence of \public, which you then define at the command line. For example,

xelatex \def\public{}\input{file.tex}


enter image description here


xelatex file.tex


enter image description here

since \public is undefined.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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