<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../../assets/xml/rss.xsl" media="all"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><title>Josh Bialkowski (Articles sur LaTeX)</title><link>https://www.joshbialkowski.com/</link><description></description><atom:link href="https://www.joshbialkowski.com/fr/categories/latex.xml" rel="self" type="application/rss+xml"></atom:link><language>fr</language><copyright>Contents © 2018 &lt;a href="mailto:josh.bialkowski@gmail.com"&gt;Josh Bialkowski&lt;/a&gt; 
&lt;a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"&gt;
&lt;img alt="Creative Commons License" style="border-width:0"
 src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /&gt;
&lt;/a&gt;&lt;br /&gt;
This work is licensed under a
&lt;a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"&gt;
Creative Commons Attribution-ShareAlike 4.0 International License&lt;/a&gt;.
</copyright><lastBuildDate>Tue, 20 Mar 2018 01:48:03 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>svg2pdf and svg2eps (convert svg to pdf or eps from the command line)</title><link>https://www.joshbialkowski.com/fr/posts/2011/svg2pdf-and-svg2eps-convert-svg-to-pdf-or-eps-from-the-command-line.html</link><dc:creator>Josh Bialkowski</dc:creator><description>&lt;div&gt;&lt;p&gt;I've been working on a new makefile for my latex projects. The goal is to have
single-source builds of dvi, pdf, and xhtml documents. I ran into a problem of
generating figures. latex expects eps graphics, pdflatex expects pdf figures,
and latexml expects png figures (or will try to generate them). In order to
generate documents with make, I need a way to generate eps and pdf figures
from svg sources (I usually use inkscape to make my figures). Inkscape can be
run from the command line, but I dont want to install inkscape on my server
because that will require installing a ton of libraries that don't make sense
to have on a server with no graphical interface.&lt;/p&gt;
&lt;p&gt;As it turns out, writing such a command line tool is very easy with librsvg
and cairo. Carl Worth of redhat has produced a nice demo of svg2pdf which can
be found at &lt;a href="http://cgit.freedesktop.org/~cworth/svg2pdf/"&gt;freedesktop.org&lt;/a&gt;. I
cloned his project, create a cmake project out of it, and made a trivial
modification to turn it into svg2eps as well.&lt;/p&gt;
&lt;p&gt;You can find my code at &lt;a href="https://github.com/cheshirekow/svg2x"&gt;https://github.com/cheshirekow/svg2x&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><guid>https://www.joshbialkowski.com/fr/posts/2011/svg2pdf-and-svg2eps-convert-svg-to-pdf-or-eps-from-the-command-line.html</guid><pubDate>Thu, 11 Aug 2011 16:26:08 GMT</pubDate></item><item><title>Generating HTML pages from Latex</title><link>https://www.joshbialkowski.com/fr/posts/2011/generating-html-pages-from-latex.html</link><dc:creator>Josh Bialkowski</dc:creator><description>&lt;div&gt;&lt;p&gt;While latex is pretty much "not designed" for web content, it is very useful
to generate a web-version of a latex document. The purpose of latex is clearly
for typesetting layouts on a pre-defined page, but when you want to share the
information with others, it's generally a lot easier for them to go to a
webpage then it is to download and open a PDF. In addition, it's generally
easier to view a webpage than a PDF because the content is continuous, and one
can scroll around and click hyperlinks in a way that is far more fluid than on
a PDF.&lt;/p&gt;
&lt;p&gt;Now that MathML and SVG are becoming more supported by web browsers, there is
a strong case for sharing mathy documents on the web in addition to paper
documents (or PDFs, which are only slightly more readable than paper).&lt;/p&gt;
&lt;p&gt;To this end, I've been evaluating various different Latex to HTML converters.
I've tried the following on Linux (Ubuntu):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="http://hutchinson.belmont.ma.us/tth/"&gt;TTH&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.latex2html.org/"&gt;LaTeX2HTML&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.tug.org/applications/tex4ht/"&gt;text4ht&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dlmf.nist.gov/LaTeXML/"&gt;LaTeXML&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;By far my favorite is LaTeXML. It generates crisp, simple pages using MathML
and CSS, making it easy to customize the style. It doesn't support a whole lot
of packages that I generally would like to use (like algorithm2e), but then
again none of them do. Also, the ArXiV project is working on a branch of
LaTeXML so there is promise that it will grow quickly to support a lot of the
best packages.&lt;/p&gt;
&lt;h3&gt;Document Setup&lt;/h3&gt;
&lt;p&gt;My current approach to generating both PDFs and HTMLs from latex source is to
use separate top-level documents for both. The directory structure looks
something like this:&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;document
 |- document_html.tex
 |- document_pdf.tex
 |- document.tex
 |- preamble_common.tex
 |- preamble_html.tex
 |- preamble_pdf.tex
 \- references.bib
&lt;/pre&gt;


&lt;p&gt;The two versions of &lt;code&gt;document_[output].tex&lt;/code&gt; are the top-level files. They look
like this:&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c"&gt;%document_html.tex&lt;/span&gt;

&lt;span class="k"&gt;\documentclass&lt;/span&gt;&lt;span class="na"&gt;[10pt]&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;article&lt;span class="nb"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\input&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;preamble&lt;span class="nb"&gt;_&lt;/span&gt;common&lt;span class="nb"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\input&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;preamble&lt;span class="nb"&gt;_&lt;/span&gt;html&lt;span class="nb"&gt;}&lt;/span&gt; 
&lt;span class="k"&gt;\begin&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;document&lt;span class="nb"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\input&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;document&lt;span class="nb"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\end&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;document&lt;span class="nb"&gt;}&lt;/span&gt; 
&lt;/pre&gt;


&lt;p&gt;The pdf version is the same but it uses &lt;code&gt;preamble_pdf&lt;/code&gt; as an input. Note that
in latex you cannot nest &lt;code&gt;\include&lt;/code&gt; directives, but you can nest &lt;code&gt;\input&lt;/code&gt;
directives. Also, &lt;code&gt;\include&lt;/code&gt; inserts a page-break so there is no need to use
them here. Rather &lt;code&gt;document.tex&lt;/code&gt; may &lt;code&gt;\include&lt;/code&gt; it's chapters as tex files or
the like.&lt;/p&gt;
&lt;h3&gt;Makefile&lt;/h3&gt;
&lt;p&gt;To ease the process of generating the different types, I'm using a makefile.&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c"&gt;# The following definitions are the specifics of this project&lt;/span&gt;
&lt;span class="nv"&gt;PDF_OUTPUT&lt;/span&gt;  &lt;span class="o"&gt;:=&lt;/span&gt;  document.pdf
&lt;span class="nv"&gt;HTML_OUTPUT&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt;  document.html

&lt;span class="nv"&gt;PDF_MAIN&lt;/span&gt;    &lt;span class="o"&gt;:=&lt;/span&gt;  document_pdf.tex
&lt;span class="nv"&gt;HTML_MAIN&lt;/span&gt;   &lt;span class="o"&gt;:=&lt;/span&gt;  document_html.tex

&lt;span class="nv"&gt;COMMON_TEX&lt;/span&gt;  &lt;span class="o"&gt;:=&lt;/span&gt;  document.tex &lt;span class="se"&gt;\&lt;/span&gt;
                preamble_common.tex

&lt;span class="nv"&gt;PDF_TEX&lt;/span&gt;     &lt;span class="o"&gt;:=&lt;/span&gt;  &lt;span class="k"&gt;$(&lt;/span&gt;COMMON_SRC&lt;span class="k"&gt;)&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
                document_pdf.tex &lt;span class="se"&gt;\&lt;/span&gt;
                preamble_pdf.tex

&lt;span class="nv"&gt;HTML_TEX&lt;/span&gt;    &lt;span class="o"&gt;:=&lt;/span&gt;  &lt;span class="k"&gt;$(&lt;/span&gt;COMMON_SRC&lt;span class="k"&gt;)&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
                document_html.tex &lt;span class="se"&gt;\&lt;/span&gt;
                preamble_html.tex 

&lt;span class="nv"&gt;BIB&lt;/span&gt;         &lt;span class="o"&gt;:=&lt;/span&gt;  references.bib



&lt;span class="c"&gt;# these variables are the dependencies for the outputs&lt;/span&gt;
&lt;span class="nv"&gt;PDF_SRC&lt;/span&gt;     &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="k"&gt;$(&lt;/span&gt;PDF_TEX&lt;span class="k"&gt;)&lt;/span&gt; &lt;span class="k"&gt;$(&lt;/span&gt;BIB&lt;span class="k"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;HTML_SRC&lt;/span&gt;    &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="k"&gt;$(&lt;/span&gt;HTML_TEX&lt;span class="k"&gt;)&lt;/span&gt; &lt;span class="k"&gt;$(&lt;/span&gt;BIB&lt;span class="k"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;# the 'all' target will make both the pdf and html outputs&lt;/span&gt;
&lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;pdf&lt;/span&gt; &lt;span class="n"&gt;html&lt;/span&gt;

&lt;span class="c"&gt;# the 'pdf' target will make the pdf output&lt;/span&gt;
&lt;span class="nf"&gt;pdf&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="k"&gt;$(&lt;/span&gt;&lt;span class="nv"&gt;PDF_OUTPUT&lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;# the 'html' target will make the html output&lt;/span&gt;
&lt;span class="nf"&gt;html&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="k"&gt;$(&lt;/span&gt;&lt;span class="nv"&gt;HTML_OUTPUT&lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;# the pdf output depends on the pdf tex files&lt;/span&gt;
&lt;span class="c"&gt;# we use a shell script to optionally run pdflatex multiple times until the&lt;/span&gt;
&lt;span class="c"&gt;# output does not suggest that we rerun latex&lt;/span&gt;
&lt;span class="nf"&gt;$(PDF_OUTPUT)&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="k"&gt;$(&lt;/span&gt;&lt;span class="nv"&gt;PDF_TEX&lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt; 
    @echo &lt;span class="s2"&gt;"Running pdflatex on &lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;PDF_MAIN&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
    @pdflatex &lt;span class="k"&gt;$(&lt;/span&gt;basename &lt;span class="k"&gt;$(&lt;/span&gt;PDF_MAIN&lt;span class="k"&gt;))&lt;/span&gt; &amp;gt; &lt;span class="k"&gt;$(&lt;/span&gt;basename &lt;span class="k"&gt;$(&lt;/span&gt;PDF_MAIN&lt;span class="k"&gt;))&lt;/span&gt;_0.log
    @echo &lt;span class="s2"&gt;"Running bibtex"&lt;/span&gt;
    @-bibtex   &lt;span class="k"&gt;$(&lt;/span&gt;basename &lt;span class="k"&gt;$(&lt;/span&gt;PDF_MAIN&lt;span class="k"&gt;))&lt;/span&gt; &amp;gt; bibtex_pdf.log 
    @echo &lt;span class="s2"&gt;"Checking for rerun suggestion"&lt;/span&gt;
    @for ITER in &lt;span class="m"&gt;1&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt; &lt;span class="m"&gt;4&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
        &lt;span class="nv"&gt;STABELIZED&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;cat &lt;span class="k"&gt;$(&lt;/span&gt;basename &lt;span class="k"&gt;$(&lt;/span&gt;PDF_MAIN&lt;span class="k"&gt;))&lt;/span&gt;.log &lt;span class="p"&gt;|&lt;/span&gt; grep &lt;span class="s2"&gt;"Rerun"&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="cp"&gt;        if [ -z "$$STABELIZED" ]; then \&lt;/span&gt;
&lt;span class="cp"&gt;            echo "Document stabelized after $$ITER iterations"; \&lt;/span&gt;
&lt;span class="cp"&gt;            break; \&lt;/span&gt;
&lt;span class="cp"&gt;        fi; \&lt;/span&gt;
&lt;span class="cp"&gt;        echo "Document not stabelized, rerunning pdflatex"; \&lt;/span&gt;
&lt;span class="cp"&gt;        pdflatex $(basename $(PDF_MAIN)) &amp;gt; $(basename $(PDF_MAIN))_$$ITER.log; \&lt;/span&gt;
&lt;span class="cp"&gt;    done&lt;/span&gt;
    @echo &lt;span class="s2"&gt;"Copying pdf to target file"&lt;/span&gt;
    @cp &lt;span class="k"&gt;$(&lt;/span&gt;basename &lt;span class="k"&gt;$(&lt;/span&gt;PDF_MAIN&lt;span class="k"&gt;))&lt;/span&gt;.pdf &lt;span class="k"&gt;$(&lt;/span&gt;PDF_OUTPUT&lt;span class="k"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;# the html output depends on the html tex files&lt;/span&gt;
&lt;span class="c"&gt;# we have to process all of the bibliography files separately into xml files, &lt;/span&gt;
&lt;span class="c"&gt;# and then include them all in the call to the postprocessor&lt;/span&gt;
&lt;span class="nf"&gt;$(HTML_OUTPUT)&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="k"&gt;$(&lt;/span&gt;&lt;span class="nv"&gt;HTML_TEX&lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt; 
    @echo &lt;span class="s2"&gt;"Running latexml on &lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;HTML_MAIN&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
    @latexml &lt;span class="k"&gt;$(&lt;/span&gt;HTML_MAIN&lt;span class="k"&gt;)&lt;/span&gt; -dest&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;basename &lt;span class="k"&gt;$(&lt;/span&gt;HTML_OUTPUT&lt;span class="k"&gt;))&lt;/span&gt;.xml &amp;gt; &lt;span class="k"&gt;$(&lt;/span&gt;basename &lt;span class="k"&gt;$(&lt;/span&gt;HTML_MAIN&lt;span class="k"&gt;))&lt;/span&gt;.log &lt;span class="m"&gt;2&lt;/span&gt;&amp;gt;&lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
    @BIBSTRING&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; BIBFILE in &lt;span class="k"&gt;$(&lt;/span&gt;BIB&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
        &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Running latexml on &lt;/span&gt;&lt;span class="nv"&gt;$$&lt;/span&gt;&lt;span class="s2"&gt;BIBFILE"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
        &lt;span class="nv"&gt;XMLFILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;basename &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$$&lt;/span&gt;&lt;span class="s2"&gt;BIBFILE"&lt;/span&gt; .bib&lt;span class="sb"&gt;`&lt;/span&gt;.xml&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
        &lt;span class="nv"&gt;LOGFILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;basename &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$$&lt;/span&gt;&lt;span class="s2"&gt;BIBFILE"&lt;/span&gt; .bib&lt;span class="sb"&gt;`&lt;/span&gt;_html.log&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
        latexml &lt;span class="nv"&gt;$$&lt;/span&gt;BIBFILE -dest&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$$&lt;/span&gt;XMLFILE &amp;gt; &lt;span class="nv"&gt;$$&lt;/span&gt;LOGFILE &lt;span class="m"&gt;2&lt;/span&gt;&amp;gt;&lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
        &lt;span class="nv"&gt;BIBSTRING&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$$&lt;/span&gt;&lt;span class="s2"&gt;BIBSTRING -bibliography=&lt;/span&gt;&lt;span class="nv"&gt;$$&lt;/span&gt;&lt;span class="s2"&gt;XMLFILE"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="k"&gt;done&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$$&lt;/span&gt;BIBSTRING &amp;gt; bibstring.txt
    @echo &lt;span class="s2"&gt;"postprocessing with `cat bibstring.txt`"&lt;/span&gt;
    @latexmlpost &lt;span class="k"&gt;$(&lt;/span&gt;basename &lt;span class="k"&gt;$(&lt;/span&gt;HTML_OUTPUT&lt;span class="k"&gt;))&lt;/span&gt;.xml &lt;span class="sb"&gt;`&lt;/span&gt;cat bibstring.txt&lt;span class="sb"&gt;`&lt;/span&gt; -dest&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;HTML_OUTPUT&lt;span class="k"&gt;)&lt;/span&gt; -css&lt;span class="o"&gt;=&lt;/span&gt;navbar-left.css

&lt;span class="c"&gt;# the 2&amp;gt;/dev/null redirects stderr to the null device so that we don't get error&lt;/span&gt;
&lt;span class="c"&gt;# messages in the console when rm has nothing to remove&lt;/span&gt;
&lt;span class="nf"&gt;clean&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
    @-rm -v *.log &lt;span class="m"&gt;2&lt;/span&gt;&amp;gt;/dev/null
    @-rm -v *.out &lt;span class="m"&gt;2&lt;/span&gt;&amp;gt;/dev/null
    @-rm -v *.aux &lt;span class="m"&gt;2&lt;/span&gt;&amp;gt;/dev/null
    @-rm -v *.xml &lt;span class="m"&gt;2&lt;/span&gt;&amp;gt;/dev/null
    @-rm -v *.pdf &lt;span class="m"&gt;2&lt;/span&gt;&amp;gt;/dev/null
    @-rm -v *.html &lt;span class="m"&gt;2&lt;/span&gt;&amp;gt;/dev/null
    @-rm -v bibstring.txt &lt;span class="m"&gt;2&lt;/span&gt;&amp;gt;/dev/null
&lt;/pre&gt;


&lt;p&gt;Some notes on the makefile. I execute bibtex ignoring errors (the dash symbol
before 'bibtex') because bibtex will exit with an error if it doesn't find any
citations, or if there is no bibliography. Each iteration of pdflatex is
output to a logfile named "document_pdf_&amp;lt;i&amp;gt;.log" where "&amp;lt;i&amp;gt;" is
the iteration number. The output of pdflatex and bibtex is supressed by
dumping it to the logfile (I the verbosity useless to have in the console).&lt;/p&gt;
&lt;p&gt;The shell script in the PDF recipe iterates up to four times. The first thing
it does is greps the output of the most recent run pdf latex looking for the
line where latex recommends that we "Rerun" latex. If it finds such a line it
sets the shell variable &lt;code&gt;STABELIZED&lt;/code&gt; to that string. Otherwise it gets the
empty string. Then we test to see if the string is empty. If it's empty, we're
done so we break the loop. If it's not, then we rerun pdflatex.&lt;/p&gt;
&lt;p&gt;The shell script in the HTML recipe iterates over each of the (potentially
multiple, potentially zero) bibliography files, processing each of them with
latexml. It then appends the string "-bibliography=&amp;lt;filename&amp;gt;.xml" to
the &lt;code&gt;BIBSTRING&lt;/code&gt; shell variable. The last thing it does is echos the contents
of that shell variable to the file "bibstring.txt". This so so that subsequent
commands by make can find it.&lt;/p&gt;&lt;/div&gt;</description><guid>https://www.joshbialkowski.com/fr/posts/2011/generating-html-pages-from-latex.html</guid><pubDate>Wed, 29 Jun 2011 15:39:14 GMT</pubDate></item><item><title>Getting Inkscape to Use Latex Fonts (in Windows)</title><link>https://www.joshbialkowski.com/fr/posts/2010/getting-inkscape-to-use-latex-fonts-in-windows.html</link><dc:creator>Josh Bialkowski</dc:creator><description>&lt;div&gt;&lt;h4&gt;Introduction&lt;/h4&gt;
&lt;p&gt;Creating graphics for latex can be a real pain. There are a number of
different options for doing this, though none of them is completely &lt;em&gt;ideal&lt;/em&gt;.
If you're comfortable using regular latex and generating DVI's, then the
&lt;a href="http://tug.org/PSTricks/main.cgi/"&gt;pstricks&lt;/a&gt; package is a very powerful tool.
If you prefer generating PDF (now an open standard) files (as I do) then the
&lt;a href="http://ctan.tug.org/tex-archive/help/Catalogue/entries/pgf.html"&gt;PGF/TikZ&lt;/a&gt;
latex packages are a very powerful and can do just about everything… except
that you have to &lt;em&gt;code&lt;/em&gt; your graphics… which is a very slow iterative process.
The GNU Diagramming tool &lt;a href="http://projects.gnome.org/dia/"&gt;Dia&lt;/a&gt; can create
block diagrams and flow charts and can export either &lt;code&gt;pstricks&lt;/code&gt; or &lt;code&gt;tikz&lt;/code&gt;
code. Inkscape is a much nicer user-oriented graphical vector drawing tool,
but doesn't have native support for for LaTex, and creating graphics including
LaTeX math-mode is a real pain. In any case, I've found a number of situations
where a figure like the following was pretty easy to do create in Inkscape.&lt;/p&gt;
&lt;p&gt;[caption id="attachment_373" align="aligncenter" width="351" caption="Inkscape
Figure for LaTeX"]&lt;a href="http://128.31.5.103/wordpress%0A/wp-content/uploads/2010/04/vortexElement.png"&gt;![Inkscape Figure for LaTeX](http://128.31.5.103/wordpress
/wp-content/uploads/2010/04/vortexElement.png)&lt;/a&gt;[/caption]&lt;/p&gt;
&lt;h4&gt;Getting the Fonts&lt;/h4&gt;
&lt;p&gt;In order to get the math font's to look like they do in LaTeX, though, you
need to have the font's installed where Inkscape can find them. Unfortunately,
LaTex uses &lt;code&gt;type1&lt;/code&gt; postscript fonts, while Inkscape can only find font's that
windows has installed in the system, which includes true-type or open-type
fonts. Fortunately you can &lt;a href="http://www.ctan.org/tex-%0Aarchive/fonts/cm/ps-type1/bakoma/otf/"&gt;get the fonts&lt;/a&gt; for "Computer Modern" (Knuth's Font
uses as the default in LaTeX) from the TeX archives in these formats. Simply
download these fonts, and install them in windows (drag them to
C:/Windows/Fonts). The next time you run Inkscape, it will have these font's
available and you can use them in your pretty graphics.&lt;/p&gt;
&lt;h4&gt;Other Fonts&lt;/h4&gt;
&lt;p&gt;There are some other font's that you'll find used by latex that aren't in OTF
or TTF format though. The only (open-source) way I've found to convert type-1
font's to OTF is through an ancient tool called &lt;a href="http://fontforge.sourceforge.net/"&gt;Font-
Forge&lt;/a&gt;. It's an X-Windows program so you'll
have to install the &lt;a href="http://www.cygwin.com/"&gt;Cygwin&lt;/a&gt; x-server, or, luckily,
someone has &lt;a href="http://www.geocities.jp/meir000/fontforge/"&gt;ported&lt;/a&gt; it to MinGW
(native Win32).&lt;/p&gt;
&lt;h4&gt;Tex Text plugin&lt;/h4&gt;
&lt;p&gt;Lately, I've been using &lt;a href="http://pav.iki.fi/software/textext/"&gt;the Tex Text&lt;/a&gt;
plugin instead of using latex fonts with regular inkscape text. The interface
is a little tedious, but it works quite well (and it's a lot less tedious then
laying out the text by hand).&lt;/p&gt;&lt;/div&gt;</description><guid>https://www.joshbialkowski.com/fr/posts/2010/getting-inkscape-to-use-latex-fonts-in-windows.html</guid><pubDate>Thu, 22 Apr 2010 14:50:01 GMT</pubDate></item></channel></rss>