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.
commentpackage 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