4

My LaTeX Editor (Kile) is deleting most of my root file "master.tex" with a single mouse click in the wrong area. This is when I aim my mouse poorly to get the cursor at the beginning of a line. It happens ONLY in the master.tex file, not in the input files like Preamble.tex or chapter11.tex or the any of the other tex files. The [!!DON'T!!] click zone is just outside of the Left Margin of the text area and below a triangle that marks the location of \begin{document} If clicked, Everything below suddenly highlights and deletes in a fraction of a second.

See the pictures I highlighted. It affects EVERYTHING in master.tex below the \begin{document} line.

BTW, The master.tex will contain links to everything, including a dozen chapter.tex files. "master.tex" is the root file of the project in Kile. Sometimes I can undo. Other times I can't undo (in which case I close the file without saving)

It must be a useful feature that folks depend on, so I'd like to empower myself with the purpose it's intended to help, or deactivate it somehow.

So, Explain why a click in that zone deletes everything, and the purpose folks use it for (or it a glitch and how do I deactivate it?)

[I'm using Kile 2.1.3 under Kubuntu 14.04.]

BEFORE I CLICK IN THE BLUE ZONE: enter image description here

AFTER I CLICK IN THE BLUE ZONE: enter image description here

  • 14
    click it again. – Sean Allred Jul 2 '15 at 17:30
  • 2
    I think the direction of the triangle to the left of the \begin has something to do with it. Is it a text "expand/collapse" feature? – jon Jul 2 '15 at 17:33
  • 1
    It's not deleting the content, this is called context folding. As @Sean tells you, click it again. – Paulo Cereda Jul 2 '15 at 17:34
  • 2
    BINGO -- Yes, it is a collapse zone. I click anywhere in the zone, including pages and pages below the triangle, and it collapses. But, to get it back I have to click on just the little triangle to bring it all back. So, it's easy to make the text disappear, but it took stackexchange to make me realize how to get it back. Lesson Learned. – user12711 Jul 2 '15 at 17:37
  • 1
    Recent versions of Kile have made it much easier to fold the code inadvertently. It is, indeed, rather annoying. – cfr Jul 2 '15 at 22:20
13

Kile doesn't delete it - it collapses everything between \begin and \end.

Kicking on the triangle will expand it again.

This works for every environment you open; for example:

\begin{itemize}
 \item Some item
 \item another item
\end{itemize}

expanded

collapsed

When you look at the rownumbers where the triangle thing is it skips row 76-78.

11

Kile (and many other editors for various languages) have something often referred to as 'code folding' or 'code collapse'. For LaTeX, Kile will offer to 'hide' entire environments from view to make it easier to get a handle on the overarching structure of your document. I don't use Kile, but I imagine it would offer the same blue area (and indicative triangle) for any environment -- {figure}, {table}, etc.

In all cases, the effect is toggle on/off.

  • FWIW I'll confirm that Kile does this for all LaTeX environments - or more precisely, all corresponding pairs of \begin{x} and \end{y}, even if they don't constitute a valid LaTeX environment. – David Z Jul 3 '15 at 6:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.