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 experimenting with dynamic citations.

I want four options:

  1. default no dynamics;
  2. a click on citation goes to bibliography;
  3. a click on the external citation goes to the internet;
  4. both 2 and 3.

Something like: if this, do something, else do another thing.

Edit I only want a method to include/exclude portions of the LaTeX. I already have a handle on the dynamics.

share|improve this question
2-4 seem like they would be taken care of by a bibliography such as biblatex with hyperref loaded. Assuming you mean bibliography citations. Or do you mean textual quotes (full passages ?). And what do you mean with include/exclude portions of the LaTeX ? – ach May 27 '13 at 7:48
up vote 3 down vote accepted

If I understand your question correctly, you want to enable/disable parts of your code programmatically. If so, you may want to create two toggles, each associated to one type of link. Here is a skeletal solution:


\newtoggle{citationlinks}   % false by default
\newtoggle{internetlinks}   % false by default

\toggletrue{citationlinks}  % <--- comment that in or out
\toggletrue{internetlinks}  % <--- comment that in or out

    % if true, do this
    % if false, do that

    % if true, do this
    % if false, do that

share|improve this answer
+1 This is exactly what I was looking for. – Fred Kline May 27 '13 at 10:09

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.