1

In c++ or java I can make sublime reindent the code without any problems. But in latex it doesn't work, it just removes all indentation. How can I fix this?

All I want is for this feature to work. I think that there is a package called latexindent but I am not sure how to install this. Is there an easy fix?

  • 1
    latexindent is a perl script. texdoc latexindent for the docs or look on CTAN. Unless sublime can somehow use this, though, it isn't going to help you while editing. You can indent the source and then open it for editing, but you want your editor to be helping while you are working. No package can do this. It is up to your editor. Or maybe there's a config file or plugin for LaTeX support. Otherwise, you need to choose an editor which supports the feature you want. – cfr Feb 13 '17 at 2:31
  • thanks, so far I have only found that emacs works. Although emacs confuses me a lot. – Jorge Fernández Feb 13 '17 at 2:32
  • Kile does indentation, vim. Most TeX-specific editors will do it. – cfr Feb 13 '17 at 2:45
  • There is the BeautifyLatex, which uses latexindent. You can also tweak around with the default indentation rules LaTeXTools#682, but that is less powerful. Which OS are you using? – r-stein Feb 13 '17 at 16:06
  • @r-stein Ubuntu – Jorge Fernández Feb 14 '17 at 3:58

Your Answer

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

Browse other questions tagged or ask your own question.