Recommended latex assembly system?

I am trying to figure out the best build system for latex.

I am currently using latex-makefile , editing in vim and watching changes in Okular or gv. The main problem is that sometimes I get errors and I have to start latex manually. The main advantages are that it does the whole iteration I need and offers both PDF and ps simply.

If you have experience with

  • latex tk
  • VIM latex
  • Kile
  • Lyx
  • MiKTeX
  • latex makefile
  • ultimate latex makeup
  • rubber
  • any others I have not encountered

Would you recommend them, and why / why not?

+52
makefile latex
Aug 6 '09 at 16:26
source share
15 answers

After considering all of these parameters for some time, I decided to use the following solution.

  • Set vim to write continuously as you type .
  • Run a script in the background to constantly create by updating pdf. latexmk is almost good enough, except that it builds on a place that restarts at a bad time in okular (my viewer).

The script is available at https://github.com/pbiggar/texbuild .

Use rubber-info to get errors and warnings from the log file. The script above saves the log file in t.log. In vim:

autocmd FileType tex set makeprg=rubber-info\ t.log autocmd FileType tex set errorformat=%f:%l:\ %m 
+10
Sep 08 '09 at 15:37
source share

I just tried latex. If you do

 latexmk -pvc file.tex 

Then it will automatically browse (by default DVI).

  • Dependency management
  • DVI, ps or pdf
  • The iterations are wonderful.
  • Very customizable, see man latexmk

Downsides:

  • It does not condense errors that are not very useful (workaround: use rubber information separately)
  • Error in the man file: "Sometimes the viewer (gv) tries to read the updated .ps or .pdf file after it is created, but before the file is completed. Work: manually refresh (or reopen) the display.". It would be better if he built it through a temporary .pdf file to avoid this.
  • Not very comfortable.
+20
Aug 14 '09 at 12:46
source share

I did not use it myself, but I heard about Rubber as a good alternative.

On its website:

Rubber is a program whose purpose is to handle all the tasks associated with compiling LaTeX documents. This includes compiling the document itself, of course, enough time to ensure that all references are defined, and launching BibTeX to manage bibliographic Recommendations. Automatic dvips execution for creating PostScript documents is also included, as well as using pdfLaTeX to create PDF documents.

+9
Aug 6 '09 at 16:30
source share

Okay, so this question is a bit outdated, but it appeared when I googled the "latex build system", so I thought I'd add my two cents. I tried Makefile-based solutions, but found the output a bit verbose and cumbersome. I thought that someone could build an extension cord for latex, but I was pleasantly surprised to find that we already have Latvian varnish! All you have to do is create the SConsctruct file as follows:

 env = Environment() env.PDF(target="report.pdf", source="report.tex") 

To build just run scons report.pdf . Scons will automatically create the .tex files included in report.tex, process the bibliographies, and reassemble to resolve all the links - easy!

You can create DVI and PS files in the same way. For more information about these builders, check out http://www.scons.org/doc/2.0.1/HTML/scons-user/a8524.html .

For more information about scons (change of replacement) see http://www.scons.org/

+7
Nov 28 '10 at 13:18
source share

I am using Eclipse with the TexEcplise add-in to edit my TeX files. It has syntax highlighting for LaTeX. When you request a preview of an unchanged and already compiled tex file, it opens the file in the viewer. When the tex file has been modified, it compiles the tex file before viewing it. It performs the necessary iterations, but only if necessary.

Another advantage is that all errors and warnings are summarized in the field, and they are highlighted in the tex file! This is a screenshot on the TexEclipse homepage .

+5
Aug 07 '09 at 14:20
source share

I have been trying rubber for a while. I will condense the results here:

  • Rubber automatically converts .eps files to .pdfs for pfdlatex. However, this seems to be done only for includegraphics macros. If you have your own macro, it will not.
  • rubber-info is great, it's magic. This is certainly better than anything else that I saw when I received the error message and lines. And in fact, you do not need to use rubber to use it.
  • He doesn't seem to know when to stop the iteration, often stopping earlier.
  • It overwrites your PDF as it builds, which is annoying (it lacks a good latex-makefile function where it is created in a temporary file).
+3
Aug 24 '09 at 11:46
source share

I posted a detailed answer using Scons on tex.stackexchange .

Basically you put this in a file called SConstruct :

 # make sure scons finds tex executables: import os env = Environment(ENV=os.environ) # target and source: pdf_output = env.PDF(target='main.pdf', source='main.tex') # make sure that the pdf is reloaded properly (eg, in Skim) env.Precious(pdf_output) 

You can create a pdf file simply by running

 scons 

Surprisingly, scons will detect changes in the \ files included in the main.tex file, as well as in the bibliographic file!

+3
Aug 26 '11 at 10:22
source share

I wanted to use the script that you sent in your final answer .

Unfortunately, it did not work with my setup (MacVim with vim-latexsuite, Skim as a viewer and XeTeX). I also use direct search (i.e. I use a function that pressing \ ls in Vim will jump to the corresponding point in the PDF document in the open viewer).

Also, my document is not called thesis.tex (big surprise, its not a thesis). Ive, therefore, did another tuning job that Id would like to share. Warning, my bash skills are terrible.

 #!/bin/bash set -x ulimit -t 10 # sometimes pdflatex gets stuck if [ "$1" = "" ]; then echo "No target name specified" exit 1 fi TARGET=$1 SOURCE=$1.tex TMPSOURCE=_$TARGET.tex TMPTARGET=_$TARGET while [ 1 ]; do # Compile a different file ($TMPSOURCE.pdf) so that it doesn't reload mid-compile cp $SOURCE $TMPSOURCE # better than running pdflatex manually, as this wont rebuild if there nothing there. latexmk -pdf -silent $TMPTARGET > /dev/null # For rubber-info cp $TMPTARGET.log $TARGET.log if [ -e $TMPTARGET.pdf ]; then # Check the compile succeeded first # No output file yet. [ ! -e $TARGET.pdf ] HASNOPDF=$? # ignore if it unchanged. # OS X diff doesn't consider binary files. Single-line output, return value 2 diff $TARGET.pdf $TMPTARGET.pdf OUTPUTDIFFERS=$? if [ $HASNOPDF -eq 0 -o $OUTPUTDIFFERS -ne 0 ]; then # Do NOT RM since Skim cannot deal with this. cp $TMPTARGET.pdf $TARGET.pdf fi fi sleep 1 # give it time to be killed by a CTRL-C done 

Compiles a temporary file and copies it back to any name (instead of using its script); script usage:

 ./scriptname project 

Where project is the TeX file name without the file extension.

Ive also changed the rubber-info :

 autocmd FileType tex exe "set makeprg=rubber-info\\ _" . expand("%:t:r") . ".log" 

And I needed to fix my latexmk in order to use XeTeX, since the name of the executable was hard-coded.

Unfortunately, this still destroys the output PDF when Ive saved my document before completing the instructions, since latexmk always seems to create a PDF, even if it latexmk - and its return code is always 0, which sucks.

(To clarify this, let's say that Ive just typed emph{ into my document and saved it. The background script will quickly compile the document and not work. But it will still produce a (mostly empty) output file).

In addition, direct search no longer works properly; it basically goes to the wrong point on the document. I suspect this has something to do with my copying the document before compiling.

So, this is still a completely unsatisfactory solution, although I have not even turned on continuous saving when entering MacVim yet.

+2
Nov 19 '09 at 22:29
source share

(This is a work in progress)

I'm currently trying to use vim-latexsuite. This basically turns vim into an latex IDE.

Learning curve:

  • Very unintuitive, but after the tutorial it looks fine.
  • It redefines some keys that I like, and I cannot fix them.

AutoFill:

  • Uses several built-in macros
  • Adding <+ lt for custom macros is very annoying.
  • Replacing c, etc. good until you want "for some reason, and then this exercise is upset.
  • Its autocompletion can also be annoying. I have to reprogram myself to work in latex.

Build system:

  • Horrible
  • quickfix doesn't work - it often puts me in the wrong file
  • When latex reports errors with a result divided into 2 lines, it does not detect it.
+1
Aug 14 '09 at 12:49
source share

AUCTEX and pre-latex with Emacs are another option.

You can also have emacs to open the resulting dvi or pdf file, and if you enable automatic recovery for this buffer, the changes will be displayed every time you recompile the document.

+1
Dec 09 '09 at 4:52
source share

"Better" is a very relative term ... what else do you want to do? It seems that this makefile processes quite a bit, and it makes me want me to run * nix at work instead of windows ... if there are more things that need to be handled with the makefile, why not add them?

To make it β€œbetter,” you will need to provide more detailed information about what exactly you are doing.

For example, you could parse the .log file with grep, find errors or warnings, upload them to another file, and then open a new file so you can read the errors.

It all depends on what you want to do ...

0
Aug 6 '09 at 16:35
source share

I used latex-makefile for a while. This is pretty good if you are trying to use the edit-compile-preview loop:

  • takes almost zero configuration.
  • Creates .ps or .pdf.
  • Handles all necessary iteration. I literally don't write anything else.
  • Pretty reliable, but sometimes errors and warnings get crippled.
  • It does not kill the old pdf until a new one is built.
  • It creates other files, for example, generates eps from gnuplot. I havent found this extremely useful, though.
  • The author responds very quickly to feature requests.
  • I can easily reproduce the benefits of latex quite easily:

     while [ 1 ]; do /usr/bin/make; done 

Some disadvantages:

  • This allows you to only create pdf files via dvi β†’ ps β†’ pdf, and not directly via pdftex.
  • Its error output does not match the standard latex, so vim does not move to the desired line.
  • It does not always recompile changes to bibtex and other non-tex files.
  • If I delete the file, it will not remove the dependency without make clean.
0
Aug 14 '09 at 12:29
source share

I use MikTeX in combination with TeXnicCenter . It works great for my purposes. I have never had a system to hide errors or warnings. Custom build scripts are easy to create and customize.

0
Aug 14 '09 at 12:51
source share

ltx claims to be a latex wrapper to speed up latex drafting. I could not get it to work (some problems with initex).

0
Aug 19 '09 at 13:39
source share

Check out TeXMaker . :-)

(from the wiki):

  • Spell check in line.
  • Unicode editor for writing LaTeX source files (syntax highlighting, undo-redo, search-replace, spell checker ...)
  • LaTeX tags and math symbols can be entered with the mouse
  • Document and Section Templates
  • LaTeX related programs can be launched
  • BibTeX Database Management
  • Outline or "structural view"
  • Log files during LaTeX compilation and the ability to "step over" the original errors detected by the compiler
  • Integrated LaTeX to HTML conversion tool

(from me):

  • useful wizards for inserting tables, links, links
  • bi-directional support
  • useful keyboard shortcuts
  • Auto Word Completion (especially useful with links)
  • define your own instructions
0
Mar 28 '10 at 20:07
source share



All Articles