Precise float placement
If you know LaTeX, you know that precise float placement (I want this
figure to positioned right here) is almost impossible. But what nobody
told you is that there exists a
float
package (only since 2001 - maybe even earlier). With this package you get a new placement modifier:
[H], which means: “Put this damn figure right here!”.
LateX users everywhere cheer.
Specifics are described in the pdf in the package. Using it
on Ubuntu/Debian
Go Book Building
I’m still “writing a Go Book” which boils down to playing with
, Go
and Vim.
Building the whole document might be a bit tricky, because of all the packages you may need.
Assuming you already installed TexLive on your system, you will
further need to apt-get install:
texlive-xetexttf-droidlatex-cjk-commonlatex-cjk-japanese-wadalablatex-cjk-xcjklatex-xft-fontslatex-fonts-recommendedttf-sazanami-gothicinkscape(for.svgto.pdfconversion)
Which should make it build. If not, please let me know.
Remember text in LaTeX
After reading the Android Book from O’Reilly I saw some nice use
of bullets alongside source code which allowed for extra explanation to
be given after the code. I thought only one thing: I want to use that
too, but then in
.
After fiddling around for an evening it finally looked like this:
There are two ways you can do this. The easy way is to write a few macros which create numbered bullets in the code and then use these numbers manually after the code to add your explanation. There are however problems with this approach; You need to manually keep the numbers in sync and thus it distracts you from focussing on the text.
LaTeX Nirvana
I’m no fan of Word or OpenOffice for that matter, all that WYSIWYG stuff is not for me. For years now I’m using LaTeX for my editing needs. An added bonus for using LaTeX is that the output is stunning.
But for really nice looking output I wanted the following:
- Fonts in images/graphics should match the font of the main document
- TrueType fonts, instead of the standard TeX fonts. To avoid the “Heeh, that looks like a LaTeX document”-reactions;
- UTF-8 support and international character support;
- Easy integration of images (SVG based);
- Automatic building.
I’m using the following tools for this:
Using LaTeX with a label writer
I wanted to pretty print my labels on my (new) Dymo 400 label writer. All the howtos I found were detailing how to use LaTeX to print a sheet of labels. But I needed some LaTeX-foo to print only one. So /me to the rescue…
My labels are 36mm X 89 mm (Dymo part #99012) after some trial and error and four misprinted labels I came to the following LaTeX code which fits the text on the labels:
My favorite LaTeX preamble
I’ve written quite a few LaTeX documents during the last few years, but
only recently I’m starting to discover very powerful new packages, like
memoir and xelatex.
So I just wanted to share my “new” way of writing LaTeX docs.
First read the memoir class documentation. And the fontspec doc.
preamble
This now looks like
\documentclass{memoir}
\usepackage{eurosym} %% for the EURO
\usepackage{fontspec}
\usepackage{xltrxta} %% \XeTeX if you need it
Usually this is hidden in one of my class files which implement a new look for a document. See the following articles for some examples
truetype fonts in LaTeX the easy way (on Debian/Unbuntu)
Steps:
-
Read: How to use nice fonts in LaTeX
-
Install the software:
sudo apt-get install texlive-xetexsudo apt-get install lcdf-typetools
The latter one is needed for otfinfo to determine the font family
name.
-
Read /usr/share/doc/texlive-doc/xetex/XeTeX-reference.pdf
-
Use
xelatexto create thepdfof your LaTeX documents
If you get the following error install the package lmodern
LaTeX Error: File `lmodern.sty' not found.
Finally I can use truetype fonts in my LaTeX documentation. Sweet!