2

I am moving myself from using LyX to just coding in LaTeX. I've been able to research and figure out a lot of things on my own, but there's one feature in LyX that I'd like to be able to code in LaTeX that simply has me stumped: document branching.

What I'm trying to do is similar to writing an exam in LaTeX where you have the copy for the students and the answer key; however, I'd like to do this in an article, report, or book where I can suppress some text (sentences, paragraphs, sections, etc.) giving me the ability to create public and private versions of the document by changing a line of code the preamble.

If someone could put me on the trail of an article that explains how to do this I would be grateful. I'm just not turning anything up when I search.

Werner
  • 603,163
  • 1
    This has been asked before. See, for example, here, https://tex.stackexchange.com/questions/125840/create-fill-in-the-blank-version-of-a-document-with-ability-to-toggle-blanks-on, https://tex.stackexchange.com/questions/127851/create-two-pdf-versions-of-classroom-slides-from-single-latex-file-teacher-and and https://tex.stackexchange.com/questions/165248/an-underline-with-texts-one-both-ends-of-a-line – Steven B. Segletes Apr 25 '17 at 11:17
  • 2
    I'm sure searching will reveal others. – Steven B. Segletes Apr 25 '17 at 11:26
  • The comment package may have enough of the functionality you want. https://www.ctan.org/pkg/comment , https://tex.stackexchange.com/questions/11177/how-to-write-hidden-notes-in-a-latex-file – Ethan Bolker Apr 25 '17 at 13:25

0 Answers0