/
atom.xml
90 lines (73 loc) · 3.57 KB
/
atom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[Category: Latex | Pre-Released Ideas]]></title>
<link href="http://versionzero.github.io/blog/categories/latex/atom.xml" rel="self"/>
<link href="http://versionzero.github.io/"/>
<updated>2015-02-21T17:56:41-08:00</updated>
<id>http://versionzero.github.io/</id>
<author>
<name><![CDATA[Ben Burnett]]></name>
<email><![CDATA[yeah@right.com]]></email>
</author>
<generator uri="http://octopress.org/">Octopress</generator>
<entry>
<title type="html"><![CDATA[The Best Quality Latex Is Made With Rubber]]></title>
<link href="http://versionzero.github.io/blog/2011/08/09/the-best-quality-LaTeX-is-made-with-rubber/"/>
<updated>2011-08-09T01:14:00-07:00</updated>
<id>http://versionzero.github.io/blog/2011/08/09/the-best-quality-LaTeX-is-made-with-rubber</id>
<content type="html"><![CDATA[<p>Well, that may be overstating the point, but it makes for a good
title. I ran in to this tool today, just by chance. <a href="https://launchpad.net/rubber">Rubber</a> handles
everything for building <a href="http://en.wikipedia.org/wiki/LaTeX">LaTeX</a> documents.</p>
<!--more-->
<p>In the past, I have used Makefile or the following bash macros to
build my documents:</p>
<p><div class="highlight"><pre><code class="language-batch" data-lang="batch">function makepdf ()
{
NAME<span class="o">=</span>${<span class="m">1</span>%.*};
TOOL<span class="o">=</span>${<span class="m">2</span>:-pdflatex};
<span class="k">if</span> [[ -f ${NAME}.bib ]]; then
<span class="n">/bin/rm</span> -i -f ${NAME}.bbl;
${TOOL} ${NAME};
bibtex ${NAME};
${TOOL} ${NAME};
fi;
${TOOL} ${NAME};
<span class="k">if</span> [[ &ldquo;${TOOL}&rdquo; <span class="o">==</span> &ldquo;latex&rdquo; ]]; then
dvipdf ${NAME};
fi
}<<span class="n">/p></span>
<span class="p"><</span><span class="n">p</span><span class="p">></span><span class="n">function</span> openpdf ()
{
NAME<span class="o">=</span>${<span class="m">1</span>%.*};
<span class="k">if</span> makepdf ${NAME}; then
<span class="k">if</span> [[ -f ${NAME}.pdf ]]; then
open ${NAME}.pdf;
fi;
fi
}</code></pre></div></p>
<p>With Rubber, I will just need:</p>
<p><div class="highlight"><pre><code class="language-batch" data-lang="batch">function makepdf ()
{
NAME<span class="o">=</span>${<span class="m">1</span>%.*};
rubber &ndash;pdf ${NAME}.tex;
}<<span class="n">/p></span>
<span class="p"><</span><span class="n">p</span><span class="p">></span><span class="n">function</span> openpdf ()
{
NAME<span class="o">=</span>${<span class="m">1</span>%.*};
<span class="k">if</span> makepdf ${NAME}; then
<span class="k">if</span> [[ -f ${NAME}.pdf ]]; then
open ${NAME}.pdf;
fi;
fi
}</code></pre></div></p>
<p>Which mean I can still run:</p>
<p><div class="highlight"><pre><code class="language-batch" data-lang="batch">$ openpdf tensor.</code></pre></div></p>
<p>To build my document (note the trailing dot is a product of bash-completion, but is handled by makepdf). What’s more, I now get better error messages:</p>
<p><div class="highlight"><pre><code class="language-batch" data-lang="batch">$ makepdf tensors.tex
compiling tensors.tex&hellip;
There were errors compiling tensors.tex.
tensors.tex:105: Missing $ inserted.</code></pre></div></p>
<p>How’s that for concise? Much nicer than 3-4 screens of macro, font and style listings.</p>
]]></content>
</entry>
</feed>