Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I need some versions of my text without some specific sections but I don't want to delete them, because I will need them again later. In a plain latex editor I would use %. Is there something in Lyx that allows me to temporarily exclude those text from the pdf creation?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

I think branches can help you with this. I've never used them, so I'll just quote the LyX wiki:

Tricks with Branches

Branches are chunks of text that can be "activated" or "deactivated" -- turned on or off -- within document settings. Why would you want to do this? The official suggestion is to create problem sets: you might put the answers to problems in a branch that can be turned off when you print out problem sets for students, but turned on when you print out an answer key for yourself. How can this feature be used in the humanities? Below are some suggestions (followed by a sample file illustrating these tricks), but first instructions on creating branches.

To create a branch, go to Document→Settings→Branches. Type the name of a new branch into the "New" field, and click the Add button. (If you like, you can select a branch in the list of Available Branches and click on (De)activate to turn it on or off, or Alter color to change the background color for text in that branch as it appears in the LyX window.

Once a new branch is created, you can designate text as belonging to that branch by selecting that text and choosing Insert→Branch→[name of branch]. Alternatively, you can insert the branch first and then type your text.

Another option could be to add \usepackage{comment} to the preamble, add \begin{comment} in an ERT before the section, and \end{comment} in an ERT after the section.

share|improve this answer
    
Branches were exactly what I needed –  LostAvatar Sep 9 '13 at 7:59
    
There is also Insert > Note > Comment and Insert > Note > LyX Note. –  scottkosty Sep 10 '13 at 3:36

Your Answer

 
discard

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.