Results 1 to 10 of 10

Thread: collapsing sections in Kile (looking for solution or other program)

  1. #1
    Join Date
    May 2008
    Beans
    74

    collapsing sections in Kile (looking for solution or other program)

    I've been using Kile for a while, and overall I'm very satisfied, but I'm having one big problem with it.

    If I'm writing a big document, with several chapters and sections, I want to be able to collapse several chapters and sections, so that I have a reasonable view on just the current section I'm working in.

    Just using
    Code:
    \chapter A
      \section A.a
        text
      \section A.b
        text
    \chapter B
        text
    doesn't work (Kile shows no collapse butten), so I use the less standard syntax
    Code:
    \begin{chapter}{A}
      \begin{section}{A.a}
        text
      \end{section}
      \begin{section}{A.b}
        text
      \end{section}
    \end{chapter}
    \begin{chapter}{B}
        text
    \end{chapter}
    but somehow this seems buggy: sometimes it collapses too much, sometimes scrolling goes crazy (showing some lines twice, for exaple), etc.

    So I assume I'm doing something wrong. What's the proper way to make chapters and sections collapsible in Kile, and if it's not possible, what other programs can do this (preferrably also having environment autocompletion and multiline indentation)?
    Last edited by P3t3r; May 9th, 2010 at 03:47 PM.

  2. #2
    Join Date
    May 2008
    Beans
    74

    Re: collapsing sections in Kile (looking for solution or other program)

    I guess that's a no? Which programs do you use for writing larger documents in one file (like a MSc thesis)?

  3. #3
    Join Date
    Jul 2005
    Location
    Seattle, WA
    Beans
    279
    Distro
    Kubuntu 5.10

    Re: collapsing sections in Kile (looking for solution or other program)

    i'm not exactly sure what you mean by collapse to have a reasonable view- are you using the structure view in kile? it will show all the sections/chapters etc and is customizable as to what you want/don't want it to show, and any chapter or section can be minimized with the minus sign... clicking takes you wherever you want to go.

    or is it in the structure view that you are referring to? my sections have always been collapsible, i make them using
    \chapter{chapter name here}
    \section{section name here}
    \subsection{subsection name here}

    hope this helps
    My Blog.

  4. #4
    Join Date
    May 2008
    Beans
    74

    Re: collapsing sections in Kile (looking for solution or other program)

    Well it's very interesting to hear that this is actually possible in Kile. However I still fail to find how it works. Could you detail a bit more?

    I have the "structure view", but I don't get how it can make sections collapse in the text window, in a similar way as Kile does collapse environments? Yes, you can jump to a section of your choice, but that doesn't collapse the other sections (in the text view)?

    And when I write
    \chapter{chapter name here}
    \section{section name here}
    \subsection{subsection name here}
    then Kile does not see it as a collapsible environment. What am I doing wrong?

  5. #5
    Join Date
    Mar 2009
    Location
    Göteborg
    Beans
    52
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: collapsing sections in Kile (looking for solution or other program)

    Hi, out of the box kile does not do this. But perhaps it is possible to fix it in the latex.xml file in the /usr/share/kde4/apps/katepart/syntax folder (on my system). I did a quick test, adding a beginblock to the sectioning item, and it did enable folding. Minor issue, it folded everything below the section I tried to fold. Perhaps with some fiddling it is possible to set it up properly. Make sure to back up the original before playing.

    TexmakerX and vim-latex both support code folding out of the box, I have no experience with texmakerx though.

    To make long documents more easy to navigate I usually make a master document with several input files. Setting up a project in Kile allows you to always compile the master, even when editing one of the sub documents. It would be nice to have proper folding as well though.

  6. #6
    Join Date
    May 2008
    Beans
    74

    Re: collapsing sections in Kile (looking for solution or other program)

    Well, the syntax I proposed
    Code:
    \begin{chapter}{A}
      \begin{section}{A.a}
        text
      \end{section}
      \begin{section}{A.b}
        text
      \end{section}
    \end{chapter}
    \begin{chapter}{B}
        text
    \end{chapter}
    allows folding, even without the minor bug you mention. Problem is, it is a bit buggy, and I suspect it is just buggy for all environments. So I wondered if there was a cleaner way. (Next to that it also breaks the structure view.)

    For "normal" use you won't see the bug as you'll never fold such large blocks of text normally, but you clearly notice bugs when folding such large amounts of text.
    Last edited by P3t3r; May 22nd, 2010 at 01:03 AM.

  7. #7
    Join Date
    Nov 2008
    Location
    Melbourne
    Beans
    165

    Re: collapsing sections in Kile (looking for solution or other program)

    I'm having the same problem. I can't collapse blocks of text and structure view is working. How do you hide the blocks?? does structure view have to be turned on since beginning. It works but not on chapters,sections, and subsections. It does work if I use deprecated format of \begin{subsection}{Title} \end{subsection}

    Any help appreciated because it doesn't autocomplete the above but i will type like this if necessary.

    Cheers,
    Jeff

  8. #8
    Join Date
    Feb 2008
    Location
    Western Canada
    Beans
    10

    Re: collapsing sections in Kile (looking for solution or other program)

    I know this is an old thread, but I haven't noticed many other people mention this problem.

    Quote Originally Posted by P3t3r View Post
    sometimes it collapses too much
    Yes, this is my problem. It gets some of the begin/end tags right but many of end tags get missed so it often folds the entire rest of the document.

    I tried it out in Kate as well and the same behaviour is there, so it seems to be an underlying issue with the editor part. However, most people using straight Kate will not be doing Latex so it probably goes unnoticed...

    Not sure if anyone has more insight?

  9. #9
    Join Date
    May 2008
    Beans
    74

    Re: collapsing sections in Kile (looking for solution or other program)

    Quote Originally Posted by euclidean View Post
    I know this is an old thread, but I haven't noticed many other people mention this problem.



    Yes, this is my problem. It gets some of the begin/end tags right but many of end tags get missed so it often folds the entire rest of the document.

    I tried it out in Kate as well and the same behaviour is there, so it seems to be an underlying issue with the editor part. However, most people using straight Kate will not be doing Latex so it probably goes unnoticed...

    Not sure if anyone has more insight?
    Bumping this again, is anyone aware of any progress being made on this? I know it's old as stone but it seems to be still as relevant as 2 years ago.

  10. #10
    Join Date
    Jun 2011
    Beans
    7

    Re: collapsing sections in Kile (looking for solution or other program)

    The year is 2012 and the collapsing problem still exists. Wow.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •