Menu

Indent levels in TeX?

2007-12-12
2012-11-13
  • Archaeomanda

    Archaeomanda - 2007-12-12

    Hi, I am a novice in all respects, so I apologize if the answer to this is really obvious.

    I am just starting to use Notepad++ to edit LaTeX documents (on Windows XP).  For the most part, this is fine, but I am wondering if there is a way to make subsequent levels indented in the display, so that it is easier to see where a chapter, section or subsection starts.  Or failing that, can I edit the way TeX behaves so that each level has a different color?

    Thanks for this great program, by the way.

     
    • Nobody/Anonymous

      Um, I just realized that my post didn't come out with the indents that I thought it would!  Imagine a few spaces before \subsection and \subsubsection. 

       
      • Nobody/Anonymous

        That's my advice to you, too. If you think indentation sucks, just imagine the correct indentation, et voilá, c'est bon!

        There are alternatives to show the indenation you intended. Check other messages about it on the forum.

         
    • Idris Samawi Hamid

      Hi,

      Try Settings=>Preference=>Global=>Auto Indent

      OTOH Npp will not auto-indent long lines when Wrap is enabled, so I tend to avoid trying to indent whole sections etc. while I'm composing them.

      Best
      Idris

       
    • Archaeomanda

      Archaeomanda - 2007-12-13

      Hi, thanks for your reply.

      I've already tried that, and it doesn't seem to work in TeX.  Is there something else I should try?  I'm just using bookmarks for navigation for now, but what I would really like to do is have it look something like the outline view in MS Word (about the only useful feature there, really). 

      Thanks for your help.

       
      • Nobody/Anonymous

        Hmm, I use Npp for TeX all the time... maybe I'm not understanding what you are asking for. Could you explain it in more detail?

        Since I don't use Word, and have little experience with it, I'm not sure what this "outline view" business is.

        If you are only using Npp for LaTeX have you tried WinEdt? There is no better editor for LaTeX; I switched to Npp because I use ConTeXt -- which benefits from code folding --, Npp is mostly utf-8 capable (though there are a few bugs in scintilla), NppExec is good for development, and a host of other utilities. I have set up ConTeXt in a way that code-folding replaces the need for indenting. Have you tried using code folding in Npp?

        But as far as its editing component is concerned, WinEdt is really the best I've seen for writers (as opposed to coders per~se).

        Best wishes
        Idris

         
    • Archaeomanda

      Archaeomanda - 2007-12-19

      I'd just like the different levels to be indented a bit, so that it is easier to see where a new level starts.  Like so:

      \section{Blah}
           \subsection{Blah blah}
                  \subsubsection{Yadda yadda yadda}

      The way Word's outline feature works, the various heading levels can be collapsed or expanded by clicking on the + or - sign, in the standard way.  This part works fine for me in Npp; the thing that makes it (slightly) easier to use in Word is that each subsequent level is indented when you expand a section.  Telling Npp to automatically make all subsections pink or something would also be fine; it's just that when you are scrolling through a huge document looking for something it can get a bit confusing.

      I've been trying out a number of different LaTeX editors and haven't hit on one that I really like yet.  As a long time Word user, there are some things that I am used to being able to do, but I was getting so sick and tired of all the other crap involved with Word that I switched.  I'll check out WinEdt again.

      Thanks for your help.