2

I don’t really know how to phrase this question, so I am sorry if I am a bit meander-y. This question pertains to the formatting side of typesetting in LaTeX, not the compiling side.

I am currently self-studying a textbook on Information Theory. While reading I am taking notes in LaTeX, using TeXMaker. I am a big fan of using bullet-points/lists. To do so, I use the enumerate/itemize environments. I also like to keep my code tidy, using indentation. When I start a list environment, I like to have all my \items below my \begin{enumerate}, indented exactly once.

The problem with this is that whenever the text pertaining to a specific \item is longer than one line, it wraps around, and starts from the very left of the screen. See the image below to understand this better.

enter image description here

One solution I have tried to amend this, is to simply indent the text that has wrapped around.

However, this causes a problem whenever I find a typo in something I have previously typed. At that point, the extra text that I add sometimes causes the text to wrap at a different point, making the additional tabs to appear in the \item text, as shown below.

enter image description here

My question is, is there any way to force the text to align below the \begin{enumerate} tabbed in exactly once, so that I don’t have to deal with this every time I change something in my text. I know this might seem like minutia, but it’s the small things that really bother me.

I would have added more pictures to make this clearer, however due to my low reputation I can't.

Thank you in advance.

  • Just to be clear, your question is about how the text in your source document is formatted, right? You're not asking about how to format the output of a list in the PDF. – Alan Munn Jul 22 '16 at 17:44
  • Yes, exactly. I am happy with how the list appears in the PDF, but I would like my source text to be more orderly. – FraGrechi Jul 22 '16 at 17:46
  • as a comparison emacs wraps the source to look like this chat.stackexchange.com/transcript/message/31223080#31223080 – David Carlisle Jul 22 '16 at 18:00
2

TeXstudio is in may ways quite similar to TeXMaker, but it wraps its lines so that they are aliged to the item, regardless how far indented this is.

enter image description here

In case line wrapping is not enables, this can be done in the Preferences->Adv. Editor->Line Wrapping.

  • How easy is it to transfer text from TeXMaker to TeXstudio? I have a couple thousand lines of notes, and changing compiler could take a while. – FraGrechi Jul 22 '16 at 18:23
  • @GrancescoFrechi Simple. .tex files are just plain text files. You're changing the editor not the compiler. So get TeXStudio, and then make that the default application for opening .tex files. (How to do this will depend on your operating system.) – Alan Munn Jul 22 '16 at 19:28
  • I meant more with regards to the formatting. From what I gathered from samcarter's answer, the two compilers have different spacing rules. Will my text from TexMaker be properly transferred, or will it be oddly spaced? – FraGrechi Jul 22 '16 at 19:31
  • @GrancescoFrechi Depends. As TeXStudio once was a fork of TeXMaker, the overall look, feel and handling are very similar. I normally do not apply any formatting to my code besides indention and TeXStudio displays everything nice and clearly. But if you already added a lot of formatting to your code, I don't know how TeXStudio will react - just try out and see yourself. – user36296 Jul 22 '16 at 19:59
  • @GrancescoFrechi From your images, I guess you use a pretty big width for one tab, but things like this can all be adjusted in TeXStudio. Concerning your dark colour scheme, there are questions on this site: tex.stackexchange.com/a/126083/36296 – user36296 Jul 22 '16 at 20:03

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.