我正在尝试找出最好的乳胶构建系统。
目前,我使用 latex-makefile,在 vim 中编辑,并在 Okular 或 gv 中查看更改。 主要问题是它有时会隐藏错误,我必须手动运行乳胶。 主要优点是它可以完成我需要的所有迭代,并且简单地提供 pdf 和 ps。
如果您有使用
- Latex-mk
- vim-latex
- kile
- lyx
- miktex
- Latex-makefile 的
- 经验终极乳胶 makefile
- 橡胶
- 其他我没有遇到过
您会推荐它们吗?为什么/为什么不呢?
I'm trying to figure out the best build system for latex.
Currently, I use latex-makefile, editing in vim, and viewing changes in Okular or gv. The major problem is that it sometimes gets hides errors on me, and I have to run latex manually. The major advantages are that it does all the iteration I need, and offers both pdf and ps simply.
If you have experience with
- latex-mk
- vim-latex
- kile
- lyx
- miktex
- latex-makefile
- the ultimate latex makefile
- rubber
- any others I havent come across
Would you recommend them, and why/why not?
发布评论
评论(15)
我刚刚尝试了latexmk。 如果您
这样做,它将自动预览(默认为 DVI)。
man Latexmk
缺点:
I've just tried out latexmk. If you do
Then it will auto preview (DVI by default).
man latexmk
Downsides:
在考虑所有这些选项一段时间后,我决定采用以下解决方案。
该脚本位于 https://github.com/pbiggar/texbuild。
使用rubber-info 从日志文件中获取错误和警告。 上面的脚本将日志文件保存在 t.log 中。 在维姆中:
After considering all these options for some time, I have settled with the following solution.
The script is available at https://github.com/pbiggar/texbuild.
Use rubber-info to get the errors and warnings from the log file. The script above saves the log file in t.log. In vim:
我自己没有使用过它,但我听说 Rubber 是一个不错的选择。
从他们的网站:
I haven't used it myself, but I've heard of Rubber as a good alternative.
From their website:
好吧,这个问题有点老了,但是当我在谷歌上搜索“乳胶构建系统”时就出现了,所以我想我应该加两分钱。 我尝试了基于 Makefile 的解决方案,但发现输出有点冗长且难以处理。 我认为有人可能已经为 Latex 构建了 scons 扩展,但惊喜地发现 scons 已经原生支持 Latex! 您所需要做的就是创建一个 SConsctruct 文件,如下所示:
要构建,只需运行
scons report.pdf
。 Scons 将自动构建 report.tex 包含的 .tex 文件、处理参考书目并执行重复构建以解析所有引用 - 简单!您可以用相同的方式创建 DVI 和 PS 文件。 有关这些构建器的更多信息,请查看 http://www .scons.org/doc/2.0.1/HTML/scons-user/a8524.html 。
有关 scons(make 替换)的更多信息,请参阅 http://www.scons.org/
Ok, so this question is a bit old, but it came up when I googled "latex build system" so I thought I'd add my two cents. I tried the Makefile based solutions, but found the output a bit verbose and unwieldy. I figured someone might have built a scons extension for latex, but was pleasantly surprised to find that scons already natively supports latex! All you need to do is create a SConsctruct file like this:
To build just run
scons report.pdf
. Scons will automatically build .tex files included by report.tex, handle bibliographies and perform repeated builds in order to resolve all references - simple!You can create DVI and PS files in the same way. For more info on these builders check out http://www.scons.org/doc/2.0.1/HTML/scons-user/a8524.html .
For more info on scons (a make replacement), see http://www.scons.org/
我在 Scons 发布了详细答案questions/64/tools-for-automating-document-compilation/26573#26573">tex.stackexchange。
基本上,您将其放入名为
SConstruct
的文件中:您只需运行 Amazingly 即可构建 pdf
,scons 将检测
中包含的文件的更改main.tex
文件以及参考书目文件!I posted a detailed answer using Scons on tex.stackexchange.
Basically, you put this in a file called
SConstruct
:You can build the pdf simply by running
Amazingly, scons will detect the changes in the files \included in the
main.tex
file and also the bibliography file!我使用 Eclipse 和 TexEcplise 插件来编辑 TeX 文件。 它有 LaTeX 的语法高亮。 当您要求预览未更改且已编译的 tex 文件时,它会在查看器中打开该文件。 当 tex 文件被更改时,它会在查看 tex 文件之前对其进行编译。 它会进行必要的迭代,但仅在需要时进行。
另一个优点是所有错误和警告都汇总在一个框中,并在 tex 文件中突出显示! 这是来自 屏幕截图。 sourceforge.net/" rel="noreferrer">TexEclipse 主页。
I use Eclipse with the TexEcplise add-on for editing my TeX-files. It has syntax highlight for LaTeX. When you ask a preview of a non-altered and already compiled tex file, it open the file in the viewer. When the tex file was altered, then it compiles the tex file prior to viewing it. It does the necessary iterations, but only if needed.
Another advantage is that all errors and warnings are summarised in a box and they are highlighted in the tex file! This is a screenshot from the TexEclipse homepage.
我正在尝试橡胶一段时间。 我将在这里浓缩结果:
I'm trying rubber for a while. I'll condense the results here:
我想使用您在最终答案中发布的脚本。
不幸的是,它不适合我的设置(MacVim 与 vim-latexsuite、Skim 作为查看器和 XeTeX)。 我还使用向前搜索(即我使用在 Vim 中按 \ls 会跳转到打开的查看器中 PDF 文档中相应点的功能)。
此外,我的文档不名为
thesis.tex
(很惊讶;它不是论文)。 因此,我做了一些我想分享的配置工作。 注意,我的 bash 技能很糟糕。这会编译一个临时文件并将其复制回给定的任何名称(而不是像脚本那样相反); 脚本的用法:
其中
project
是 TeX 文件的名称,不带文件扩展名。我还更改了
rubber-info
行:并且我需要修补我的
latexmk
以使用 XeTeX,因为可执行文件的名称是硬编码的。不幸的是,当我在完成语句之前保存文档时,这仍然会破坏输出 PDF 文件,因为
latexmk
似乎总是生成 PDF 文件,即使出现错误 - 并且它的返回码总是 0,这很糟糕。(为了澄清这一点,假设我刚刚在文档中输入了
emph{
并保存了它。后台脚本将立即编译文档,然后失败。但它仍然会生成一个(大部分是空的)输出文件)。此外,向前搜索不再正常工作; 它基本上跳转到文档中的错误点。 我怀疑这和我编译前复制文档有关系。
所以,这仍然是一个完全不能令人满意的解决方案,尽管我什至还没有在 MacVim 中启用连续保存输入功能。
I wanted to use the script you posted in your final answer.
Unfortunately, it didn’t work with my setting (MacVim with vim-latexsuite, Skim as the viewer and XeTeX). I also use forward search (i.e. I use the feature that pressing \ls in Vim will jump to the corresponding point in the PDF document in the open viewer).
Furthermore, my document isn’t called
thesis.tex
(big surprise; it’s not a thesis). I’ve therefore done some more configuration work that I’d like to share. Attention, my bash skills are horrible.This compiles a temporary file and copies it back to whatever name was given (instead of the other way round as your script does); usage of the script:
Where
project
is the name of the TeX file, without file extension.I’ve also changed the
rubber-info
line:And I needed to patch my
latexmk
to use XeTeX since the name of the executable was hard-coded.Unfortunately, this still destroys the output PDF file when I’ve saved my document before completing a statement, since
latexmk
seems to always produce a PDF file, even on error – and its return code is always 0, which sucks.(To clarify this, say that I’ve just typed
emph{
into my document and save it. The background script will promptly compile the document, and fail. But it will still produce a (largely empty) output file).Additionally, forward search no longer works properly; it basically jumps to a wrong point in the document. I suspect that this has something to do with my copying the document before compilation.
So, this is still a completely unsatisfactory solution, even though I didn’t even enable continuous saving on typing in MacVim yet.
(这是一项正在进行的工作)
我现在正在尝试 vim-latexsuite。 它基本上将 vim 变成了 Latex 的 IDE。
学习曲线:
自动完成:
构建系统:
(This is a work in progress)
I'm trying vim-latexsuite at the moment. It basically turns vim into an IDE for latex.
Learning curve:
Autocomplete:
Build system:
奥克泰克斯 Preview-latex 是 Emacs 的另一个选择。
您还可以让 emacs 打开生成的 dvi 或 pdf 文件,如果您为该缓冲区打开自动恢复模式,则每次重新编译文档时都会呈现更改。
AUCTEX & preview-latex with Emacs another option.
You can also have emacs open up the resultant dvi, or pdf file, and if you turn auto-revert-mode on for that buffer, the changes will be rendered everytime you recompile the document.
“更好”是一个非常相对的术语...您还想做什么? 看起来这个 makefile 处理了相当多的事情,这让我希望我在工作中运行 *nix 而不是 Windows...如果您需要使用 makefile 处理更多事情,为什么不添加它们呢?
为了使其“更好”,您需要提供有关您正在做什么的更多详细信息。
例如,您可以让它使用 grep 解析 .log 文件,搜索错误或警告,将它们转储到另一个文件中,然后打开新文件,以便您可以阅读错误。
这完全取决于你想做什么......
"Better" is a very relative term... what else do you want to do? It seems like this makefile handles quite a bit, and it makes me wish I was running a *nix at work instead of windows... if there are more things you need to handle with the makefile, why not add them in?
To make it "better" you would need to provide more details on what exactly you're doing.
For instance, you could have it parse the .log file with grep, search for errors or warnings, dump them into another file, then open the new file so you can read through the errors.
It all depends on what you want to do...
我将 MikTeX 与 TeXnicCenter 结合使用。 对于我的目的来说它工作得很好。 我从来没有让系统隐藏错误或警告。 自定义构建脚本很容易创建和配置。
I'm using MikTeX in combination with TeXnicCenter. It works fine for my purposes. I've never ever had the system hiding errors or warnings. Custom build scripts are easy to create and configure.
ltx 声称是 Latex 的包装器,用于加速 Latex 文档的编译。 但我无法让它工作(initex 的一些问题)。
ltx claims to be a wrapper to latex to speed up the compilation of latex documents. I couldn't make it work though (some problems with initex).
我使用 latex-makefile 一段时间了。 如果您尝试使用编辑-编译-预览循环,那么它非常好:
我可以很容易地复制 Latexmk 的优点:
<前> <代码> while [ 1 ]; 执行/usr/bin/make; 完毕
一些缺点:
I've been using the latex-makefile for a while. Its pretty good if you're trying to use an edit-compile-preview cycle:
I can replicate the advantages of latexmk fairly easily with:
Some downsides:
看看 TeXMaker。 :-)
特点(来自维基):
功能(来自我):
Have a look at TeXMaker. :-)
features (from wiki):
features (from me):