Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I was looking for this a while back for JavaScript, but I was wondering a general purpose one exists for all, or most languages.

For example for LaTeX I would put the following in a text box

$f_i^k+10=x$

and it spits out the better formatted version

%%%
%% Insert comment describing function here
%%%
$ f_{i}^{k} + 10 = x $

I can't be the only person on the planet that does not wish to go through a massive .tex file and fix these tedious problems.

share|improve this question
    
@dmckee this is too funny, on the linke bdares provided, someone has further complained "This should probably be community wiki". I imagine if I checked the community wiki it will claim that it should probably belong on a blog... –  puk Oct 5 '11 at 18:30
    
There is no guarantee that a question will find a good fit on the Stack Exchange network. In any case bdares link is not specifically about pretty printing now about literate programming/in-line documentation, so it may or may not be a duplicate. I'm not active enough on TeX.SE to be certain. –  dmckee Oct 5 '11 at 18:34
    
@puk You misunderstand the comment. It merely means that the answers should belong to the community, instead of to individual users (it’s a Stack Overflow feature). The question bdares links to is fine, and so is yours. –  Konrad Rudolph Oct 5 '11 at 18:34
2  
@puk: Are you interested in "correcting" your LaTeX code (in the .tex file) so that super-/subscripts are actually put in braces { }, thereby possibly avoiding formatting problems? –  Werner Oct 5 '11 at 19:17
    
@Werner I'm interested in an automatic code fixer upper which also aids in avoiding potential formatting problems. –  puk Feb 2 '12 at 6:27
show 1 more comment

migrated from stackoverflow.com Oct 5 '11 at 19:09

This question came from our site for professional and enthusiast programmers.

1 Answer

Take a look at TeXpretty. I have used it a couple of times for cleaning up messy code and it does a decent job.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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