<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Latex on Miek Gieben</title>
    <link>https://miek.nl/tags/latex/</link>
    <description>Recent content in Latex on Miek Gieben</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <copyright>© Copyright 2007-2024 Miek Gieben</copyright>
    <lastBuildDate>Mon, 08 Oct 2018 10:23:00 +0000</lastBuildDate>
    <atom:link href="https://miek.nl/tags/latex/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>LaTeX cheat sheet</title>
      <link>https://miek.nl/2018/october/08/latex-cheat-sheet/</link>
      <pubDate>Mon, 08 Oct 2018 10:23:00 +0000</pubDate>
      <guid>https://miek.nl/2018/october/08/latex-cheat-sheet/</guid>
      <description>&lt;p&gt;This is a small LaTeX cheat sheet:&lt;/p&gt;&#xA;&lt;dl&gt;&#xA;&lt;dt&gt;Section:&lt;/dt&gt;&#xA;&lt;dd&gt;&#xA;&lt;p&gt;Use: &lt;code&gt;\section{name}&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/dd&gt;&#xA;&lt;dt&gt;Subsection:&lt;/dt&gt;&#xA;&lt;dd&gt;&#xA;&lt;p&gt;Use: &lt;code&gt;\subsection{name}&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/dd&gt;&#xA;&lt;dt&gt;List (unumered):&lt;/dt&gt;&#xA;&lt;dd&gt;&#xA;&lt;p&gt;Use:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;\begin{itemize}&#xA;\item{My first list item}&#xA;\item{My second list item}&#xA;\end{itemize}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/dd&gt;&#xA;&lt;dt&gt;List (numbered):&lt;/dt&gt;&#xA;&lt;dd&gt;Use:&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;\begin{enumerate}&#xA;\item{My first list item}&#xA;\item{My second list item}&#xA;\end{enumerate}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/dd&gt;&#xA;&lt;dt&gt;Emphesis:&lt;/dt&gt;&#xA;&lt;dd&gt;&#xA;&lt;p&gt;&lt;code&gt;\emph{text}&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/dd&gt;&#xA;&lt;dt&gt;Bold:&lt;/dt&gt;&#xA;&lt;dd&gt;&#xA;&lt;p&gt;&lt;code&gt;\textbf{text}&lt;/code&gt; Citation: &lt;code&gt;\cite{reference}&lt;/code&gt; (actually managing your bibliography is left out).&#xA;Citing with parens is done with &lt;code&gt;\citep{reference}&lt;/code&gt;, and with a page ref you need: &lt;code&gt;\cite[p. 145]{reference}&lt;/code&gt; (or &lt;code&gt;citep&lt;/code&gt;).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Precise float placement</title>
      <link>https://miek.nl/2010/october/22/precise-float-placement/</link>
      <pubDate>Fri, 22 Oct 2010 14:43:00 +0000</pubDate>
      <guid>https://miek.nl/2010/october/22/precise-float-placement/</guid>
      <description>&lt;p&gt;If you know LaTeX, you know that precise float placement (I want &lt;em&gt;this&lt;/em&gt;&#xA;figure to positioned &lt;em&gt;right here&lt;/em&gt;) is almost impossible. But what nobody&#xA;told you is that there exists a&#xA;&lt;a href=&#34;http://www.ctan.org/tex-archive/macros/latex/contrib/float/&#34;&gt;float&lt;/a&gt;&#xA;package (only since 2001 - maybe even earlier). With this package you get a new placement modifier:&#xA;&lt;code&gt;[H]&lt;/code&gt;, which means: &amp;ldquo;Put this damn figure right here!&amp;rdquo;.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;LateX users everywhere cheer.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Specifics are described in the &lt;code&gt;pdf&lt;/code&gt; in the package. Using it&#xA;on Ubuntu/Debian&lt;/p&gt;</description>
    </item>
    <item>
      <title>Go Book Building</title>
      <link>https://miek.nl/2010/june/12/go-book-building/</link>
      <pubDate>Sat, 12 Jun 2010 07:48:00 +0000</pubDate>
      <guid>https://miek.nl/2010/june/12/go-book-building/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m still &amp;ldquo;writing a Go Book&amp;rdquo; which boils down to playing with&#xA;&lt;img class=&#34;inline-math&#34; src=&#34;https://miek.nl/images/mathtex.png&#34; alt=&#34;LaTeX&#34;/&gt;, Go&#xA;and Vim.&lt;/p&gt;&#xA;&lt;p&gt;Building the whole&#xA;&lt;a href=&#34;https://miek.nl/cgi-bin/gitweb.cgi?p=gobook.git;a=summary&#34;&gt;document&lt;/a&gt;&#xA;might be a bit tricky, because of all the packages you may need.&lt;/p&gt;&#xA;&lt;p&gt;Assuming you already installed TexLive on your system, you will&#xA;further need to &lt;code&gt;apt-get install&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;texlive-xetex&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;ttf-droid&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;latex-cjk-common&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;latex-cjk-japanese-wadalab&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;latex-cjk-xcjk&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;latex-xft-fonts&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;latex-fonts-recommended&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;ttf-sazanami-gothic&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;inkscape&lt;/code&gt; (for &lt;code&gt;.svg&lt;/code&gt; to &lt;code&gt;.pdf&lt;/code&gt; conversion)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Which should make it build. If not, please let me know.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Remember text in LaTeX</title>
      <link>https://miek.nl/2010/june/02/remember-text-in-latex/</link>
      <pubDate>Wed, 02 Jun 2010 11:16:00 +0000</pubDate>
      <guid>https://miek.nl/2010/june/02/remember-text-in-latex/</guid>
      <description>&lt;p&gt;After reading the Android Book from O&amp;rsquo;Reilly I saw some nice use&#xA;of bullets alongside source code which allowed for extra explanation to&#xA;be given &lt;em&gt;after&lt;/em&gt; the code. I thought only one thing:  I want to use that&#xA;too, but then in &lt;img class=&#34;inline-math&#34; src=&#34;https://miek.nl/images/mathtex.png&#34;&#xA;alt=&#34;LaTeX&#34;/&gt;.&#xA;After fiddling around for an evening it finally looked like this:&lt;/p&gt;&#xA;&lt;img src=&#34;https://miek.nl/images/2010/bullets.png&#34; alt=&#34;Nice bullets in LaTeX&#34;/&gt;&#xA;&lt;p&gt;There are two ways you can do this. The easy way is to write a few&#xA;macros which create numbered bullets in the code and then use these&#xA;numbers &lt;em&gt;manually&lt;/em&gt; after the code to add your explanation. There are&#xA;however problems with this approach; You need to manually keep the&#xA;numbers in sync and thus it distracts you from focussing on the text.&lt;/p&gt;</description>
    </item>
    <item>
      <title>LaTeX Nirvana</title>
      <link>https://miek.nl/2010/february/05/latex-nirvana/</link>
      <pubDate>Fri, 05 Feb 2010 16:23:00 +0000</pubDate>
      <guid>https://miek.nl/2010/february/05/latex-nirvana/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m no fan of Word or OpenOffice for that matter, all that WYSIWYG stuff&#xA;is not for me. For years now I&amp;rsquo;m using&#xA;&lt;a href=&#34;http://www.latex-project.org/&#34;&gt;LaTeX&lt;/a&gt; for my editing&#xA;needs. An added bonus for using LaTeX is that the output is stunning.&lt;/p&gt;&#xA;&lt;p&gt;But for &lt;em&gt;really&lt;/em&gt; nice looking output I wanted the following:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Fonts in images/graphics should match the font of the main document&lt;/li&gt;&#xA;&lt;li&gt;TrueType fonts, instead of the standard TeX fonts. To avoid&#xA;the &amp;ldquo;Heeh, that looks like a LaTeX document&amp;rdquo;-reactions;&lt;/li&gt;&#xA;&lt;li&gt;UTF-8 support and international character support;&lt;/li&gt;&#xA;&lt;li&gt;Easy integration of images (SVG based);&lt;/li&gt;&#xA;&lt;li&gt;Automatic building.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I&amp;rsquo;m using the following tools for this:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using LaTeX with a label writer</title>
      <link>https://miek.nl/2009/july/07/using-latex-with-a-label-writer/</link>
      <pubDate>Tue, 07 Jul 2009 23:31:00 +0000</pubDate>
      <guid>https://miek.nl/2009/july/07/using-latex-with-a-label-writer/</guid>
      <description>&lt;p&gt;I wanted to pretty print my labels on my (new) Dymo 400 label writer. All the&#xA;howtos I found were detailing how to use LaTeX to print a sheet of&#xA;labels. But I needed some LaTeX-foo to print only one. So /me to the&#xA;rescue&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;My labels are 36mm X 89 mm (Dymo part #99012) after some trial and&#xA;error and four misprinted labels I came to the following LaTeX&#xA;code which fits the text on the labels:&lt;/p&gt;</description>
    </item>
    <item>
      <title>My favorite LaTeX preamble</title>
      <link>https://miek.nl/2008/august/02/my-favorite-latex-preamble/</link>
      <pubDate>Sat, 02 Aug 2008 19:56:00 +0000</pubDate>
      <guid>https://miek.nl/2008/august/02/my-favorite-latex-preamble/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve written quite a few LaTeX documents during the last few years, but&#xA;only recently I&amp;rsquo;m starting to discover very powerful new packages, like&#xA;&lt;code&gt;memoir&lt;/code&gt; and &lt;code&gt;xelatex&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;So I just wanted to share my &amp;ldquo;new&amp;rdquo; way of writing LaTeX docs.&lt;/p&gt;&#xA;&lt;p&gt;First read &lt;a href=&#34;http://downloads.miek.nl/2008/memman.pdf&#34;&gt;the memoir class&#xA;documentation&lt;/a&gt;.&#xA;And the &lt;a href=&#34;http://downloads.miek.nl/2008/fontspec.pdf&#34;&gt;fontspec doc&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h1 id=&#34;preamble&#34;&gt;preamble&lt;/h1&gt;&#xA;&lt;p&gt;This now looks like&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;\documentclass{memoir}&#xA;\usepackage{eurosym}&#x9;%% for the EURO&#xA;\usepackage{fontspec}&#x9;&#xA;\usepackage{xltrxta}&#x9;%% \XeTeX if you need it&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Usually this is hidden in one of my class files which implement&#xA;a new look for a document. See the following articles for some&#xA;examples&lt;/p&gt;</description>
    </item>
    <item>
      <title>truetype fonts in LaTeX the easy way (on Debian/Unbuntu)</title>
      <link>https://miek.nl/2008/july/29/truetype-fonts-in-latex-the-easy-way-on-debian/unbuntu/</link>
      <pubDate>Tue, 29 Jul 2008 19:04:00 +0000</pubDate>
      <guid>https://miek.nl/2008/july/29/truetype-fonts-in-latex-the-easy-way-on-debian/unbuntu/</guid>
      <description>&lt;p&gt;Steps:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Read:&#xA;How to use&#xA;&lt;a href=&#34;http://existentialtype.net/2008/07/12/fonts-in-latex-part-one-xelatex/&#34;&gt;nice fonts in LaTeX&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Install the software:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;sudo apt-get install texlive-xetex&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;sudo apt-get install lcdf-typetools&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The latter one is needed for &lt;code&gt;otfinfo&lt;/code&gt; to determine the font family&#xA;name.&lt;/p&gt;&#xA;&lt;ol start=&#34;3&#34;&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Read /usr/share/doc/texlive-doc/xetex/XeTeX-reference.pdf&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Use &lt;code&gt;xelatex&lt;/code&gt; to create the &lt;code&gt;pdf&lt;/code&gt; of your LaTeX documents&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;If you get the following error install the package &lt;code&gt;lmodern&lt;/code&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt; LaTeX Error: File `lmodern.sty&#39; not found.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Finally I can use truetype fonts in my LaTeX documentation. &lt;em&gt;Sweet&lt;/em&gt;!&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
