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.

By "folding", I mean condense some part of the codes, and by one click , you can unfold them.

share|improve this question
    
This sort of thing is just outside the remit of what can be done with PDFs or similar formats. I doubt LaTeX or friends can help you. –  Seamus Nov 7 '10 at 0:56
4  
I don't think the question is about folding in the resulting pdf. I believe it is about folding in the editor. LyX does have some folding, you can for example fold notes, ERT, tables and other inserts. However, general folding is not, AFAIK, implemented at the moment. It is on the wishlist (wiki.lyx.org/LyX/FeaturePoll2), though. –  Jan Hlavacek Nov 7 '10 at 2:11
    
This is usually called a 'flexible outliner', and is something that a lot of TeX-friendly editors have on their wish-lists. I guess it's hard to do :-) –  Joseph Wright Nov 7 '10 at 7:52
1  
@JanHlavacek — you should write this as an actual answer :) –  Will Robertson Nov 7 '10 at 11:09
    
ORG mode in emacs effectively does this. So I'm sure you could modify the code there to work in LaTeX mode... But that's not very helpful if the question was about LyX –  Seamus Nov 7 '10 at 12:09
show 1 more comment

2 Answers

OK, since this have remained unanswered for a while, I will retype my comment here. LyX does have some folding, you can for example fold notes, ERT, tables and other inserts. However, general folding is not implemented at the moment. It is on the wishlist.

share|improve this answer
add comment

While LyX has not yet "traditional" functionality for general editor folding, it can relatively easy be simulated by using LyX branches. As branches are insets, they can be folded within LyX. (By activating/deactivating them, you could even fold them in the output, but that is another story.)

enter image description here

To fold some content, just select it and then choose Insert->Branch from the menu. If you do this the first time, you have to create the respective branch (e.g., "Folded"); afterwards, you can just put more content into the "Folded" branch. For quick access, it is possible and recommended to bind this function to a keyboard shortcut.

Note that a new branch is deactivated by default, which means that its content will not appear in the output. You can change this by right-clicking on the inset.

share|improve this answer
add comment

Your Answer

 
discard

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