LaTeX Navigating Latex Documents: Tips and Frustrations

  • Thread starter Thread starter mrcleanhands
  • Start date Start date
  • Tags Tags
    Latex
AI Thread Summary
LaTeX is praised for producing high-quality documents, but users often struggle with navigating complex .tex files due to extensive markup, making it difficult to locate and edit content efficiently. Many users suggest splitting large documents into smaller, manageable files and utilizing features in editors like TeXmaker that allow for easier navigation and jumping between the output PDF and source code. Tools like SyncTeX can help link the PDF output back to the corresponding code, although they may not always work perfectly. Organizing content with comments and logical structuring is recommended to enhance readability and editing ease. Overall, while LaTeX offers powerful capabilities, effective navigation and editing require strategic organization and the right tools.
mrcleanhands
Latex produces some really good looking documents and because of this I tried to pick it up. I was hoping it would make typing up my maths assignment a much quicker process.

What I find insanely frustrating is that because of all the marks up in a .tex file it becomes impossible to navigate and find where things are. Consequently, I spend an enormous amount of time trying to figure out what I need to edit.

It's selling point is you can concentrate on the content but I have found this not to be the case since your so busy finding out where the content actually is when you need to edit. I keep recompiling documents so I can actually check what I've typed out. Then I need to use this as a reference to find the original text in the .tex

Am I missing something? Is there no way to have some kind of preview up? How do you guys navigate massive documents?
 
Physics news on Phys.org
Navigate to do what?

To read? I click on links in the table of contents.
Navigate to edit a chapter in general? I open the file for that chapter.
Navigate to edit something specific? I open the file for that chapter, and if there is no quicker way to reach it I search for 2-3 consecutive words via the search function.
 
hmmm maybe I should be splitting up my assignment question into different files then...

Is there an edit environment where I can have a main document and then click on the titled links to separate files?
 
I think the OP is talking about navigating around the "source" .tex file, not the output.

Use the same techniques as for any software large project. Put plenty of comments in the .tex files. Make the layout easy to read (you don't get extra credit for typing a math formula 5000 characters long all on one line and with no blanks). Split the input into logical manageable-sized pieces in separate files and use \include or \input to build the complete document.

You might like tools like http://mactex-wiki.tug.org/wiki/index.php/SyncTeX or similar, which let you click anywhere in the output PDF and take you to the corresponding place in the .tex file. (Well, that's the theory - but don't expect miracles).
 
mrcleanhands said:
How do you guys navigate massive documents?
Using mnemonics for labels systematically.
 
I use TeXMaker. I split chapters into separate Tex files, but this makes it a little tougher as you have to compile the whole thing for the preview.

But even without that, using chapter/section/subsection will make the structure appear in most good tex editors, and on the left you can just browse to it.

Also, when looking in the preview on the right, you can right click and "jump to tex" as well as the opposite in the code.

4jkpwj.png


http://i41.tinypic.com/e82xpe.png
 
That left window with document structure is great - exactly what I'm looking for. It didn't work with my custom homework templates though as I'm using some other structure ( "problem" instead of chapter/section).

Also that jump to tex isn't working very well.

I think it's a software issue and I could probably work it out on my own.

If I sort that out then the only issue would be editing really big equations.

When I look at a whole bunch of equations thrown into a \begin{align} environment my eyes glaze and I have no idea what's going on. If I'm trying to edit something small in there it's a real pain!

How do you handle that?
 
  • #10
This is what I do in TeXnicCenter: While, I'm writing the paper, I build the source as DVI. That way I can use the YAP viewer and double-click on something in the document that takes me to the source code (approximately) where I clicked. Buy DVI won't show embedded graphics. But that's ok. Every once in a while, I'll build it as PDF to see how it actually looks with all the plots it it. But PDF won't take me to the source when I double-click. That combination of DVI for working edit, and PDF for checking every so often works good for me.
 
  • #11
The jump to PDF etc is always off, it usually puts you a bit after.
For long equations, remember it compiles out spaces and carriage returns so you can hit enter to make a new line in the code and it won't actually do anything.

This makes organization easier.
Also either label or comment every eq, it'll help when you're scanning for something ans makes referencing easier later.
 
  • #12
mrcleanhands said:
It's selling point is you can concentrate on the content but I have found this not to be the case since your so busy finding out where the content actually is when you need to edit.
I was not aware that someone said "LaTeX let's you focus on content", but I've learned general IT-"rule":
The more forceful and often is is claimed that a solution is business- (content-, data-) centric, the lesser that is the case.

mrcleanhands said:
I keep recompiling documents so I can actually check what I've typed out. Then I need to use this as a reference to find the original text in the .tex
My workflow is not so far away from that...

mrcleanhands said:
Am I missing something? Is there no way to have some kind of preview up? How do you guys navigate massive documents?
It's a good idea using mnemonics for labels, using an editor with a search history like vi, emacs etc, and to switch off automatic long line wrap.

Regards, Solkar
 

Similar threads

Replies
4
Views
2K
Replies
9
Views
2K
Replies
23
Views
4K
Replies
2
Views
2K
Replies
4
Views
4K
Replies
1
Views
3K
Replies
4
Views
2K
Replies
16
Views
4K
Back
Top