views:

521

answers:

13

What solutions are there for working on a LaTeX document on both Windows and Linux?

It's a large document, and I will be working daily on both platforms so compatibility is essential if it's two different pieces of software.

Bonus points for a solution that includes easy previewing.

+4  A: 

Try LyX – The Document Processor, a "What You See Is What You Mean" editor for LaTeX.

RichieHindle
IMHO, LyX is not a good tool for learning LaTeX.
Selinap
@Selinap: LyX does hide some of the details of LaTeX, so yes, it's not a good tool if you're just learning LaTeX. But pufferfish was asking about an editor, not about learning.
RichieHindle
IMHO, LyX is not a good tool for using LaTeX unless one does not know LaTeX itself.
Will Robertson
+1  A: 

I've used VIM, combined with the VIM-LaTeX plugin, with great success. It does have a bit of a learning curve though.

jqno
Do you mean VIM, or the plugin ? Or both ?
Brian Agnew
VIM, mostly. The plugin is easy when you're used to VIM.
jqno
+3  A: 

Eclipse with its TeXlipse plugin should solve the IDE problem. More important are, however, issues like using only fonts that are available or installable on both platforms.

For previewing I am using Emacs with its Preview Latex feature in the AucTeX package.

wr
+3  A: 

For windows, you can use the TeXnicCenter, that is one of the best IDE for windows.

For Linux, you can use simply use Kile (it is possible to use kile with KDE on CygWin, but it is not the perfect solution).

There is no problem to switch from one IDE to another one (since you just save the .tex file and nothing else)

It also exists some cross-platform IDE, but I do not know them:

ThibThib
+1  A: 

Get your work in some kind of version control system, then when you move from computer to computer you just update from a central server and its just like you left it.

It doesn't matter about the IDE, as you are saving just the .tex file, as noted above. If you want to use the same editor though, for the sake of coherency, use texmaker.

Mica
+1  A: 

I use version control, and just use MikTex/WinEDT on Windows and TexShop on the mac. IF your document doesn't compile on both, you're probably forgetting to keep the two directories synchronized or use funky commands, I like the sanity checks of knowing that it "compiles" cleanly on two platforms.

Uri
+1  A: 

I use some text editor, and then I have a cron job that does a compile hourly from my source control.

Paul Nathan
+8  A: 

Writing text is not very different from writing software. Similar management techniques apply when scaling up.

  • Modularity: Split the document to smaller pieces e.g. a separate .tex file for each chapter. I also like to keep the preamble and other LaTeX set-up separate from the body text. My chapter files themselves just have the body text with some markup but do not define any new commands.

  • Source control: Keep all the source files in a version control tool such as subversion. Transfer files between systems using the tool.

  • Builds: Have a Makefile or similar to control the build process: it should be consistent and repeatable. Build regularly and fix build problems as soon as possible. If you want easy previews, you can set up a Makefile rule to launch e.g. a PDF viewer after the target PDF has been compiled.

  • Editing: Use whatever you're compatible with. It does not matter that much, though some good advice has been given by other answerers.

  • Communication: If there's more than one person working on the same stuff, no tool is a substitute for interpersonal communication.

laalto
+4  A: 

TeXworks is a new cross-platform TeX editor with a built-in PDF preview that has source-output synchronisation. Click in the source to go to the matching part in the output, and vice versa. It's not the most feature-rich editor, by design, but the simplicity/power trade-off is just right, in my opinion.

Will Robertson
+1  A: 

Tex files are just text. I would recommend using a version control system (you should be using that anyway) to keep the source in sync. You can then use any (or different) editors on each system, e.g. Kile for linux and winEdt for windows. Both com with nice viewrs.

For a simple solution for the source control that just works with minimum knowledge and hassle, consider dropbox.

second
+3  A: 

Since you'll probably not want to change text editor from whatever you usually use just for editing LaTeX docs (unless you use an editor which can't do syntax highlighting for LaTeX as well as whatever else you code/write in it), I'd recommend the simple following set of tools:

  • Whatever text editor you are used to, as long as it can highlight LaTeX markup. If it can't, then find a better editor for using with everything you do!.

  • Install MikTeX or TeXLive and just use the DVI viewer which comes with them by double-clicking on your DVI file. This will automatically update whenever the dvi file is changed by your editing of the latex file and re-creating the output.

I use Emacs as my text editor of choice, on both Linux and Windows. Setting up some scripts or makefiles to build the latex document when I hit a key is pretty easy, and fits in with everything else I use Emacs for nicely.

Other cross-platform options (many of which have already been mentioned by others in this thread):

Legooolas
+4  A: 

I've used Emacs and its AucTeX mode, which is great for editing, as it has a set of very consistent shortcuts to insert many common commands and environments. There are also preview modes that display maths graphically in the Emacs window but I haven't used them.

As with VIM, there's a learning curve of course.

Unlike Legoolas, I'd advise for direct-to-PDF compilation using pdfTeX, but maybe Windows/Linux doesn't have a PDF viewer that automatically reloads the file? I'd be surprised if so (I use Skim on Mac). Check if your viewer supports synctex, as it's quite handy to navigate from PDF to source and back, without the cons of pdfsync.

To compile, my tool of choice is latexmk which is included in TeXlive. It completely automates the build, and can watch the .tex source to rebuild automatically.

Damien Pollet
+2  A: 

Gummi is the best LaTeX editor. It is a free, open source, program written in python, featuring a live preview pane.

http://gummi.midnightcoding.org/

e4

D W