Custom Shortcuts in Kile

posted in: LaTeX, Technicalities | 0

If you use Kile as LaTeX editor and if you find yourself typing the same code all over again – like a specific table environment, or a slide environment in beamer or whatever, why not create your own user tag and assign a custom shortcut?

Bibtex going openout_any = p

posted in: LaTeX, Technicalities | 4

Working with multibib, Bibtex started failing me after a recent reinstallation of texlive on xubuntu. On
bibtex <project-path>/src.aux
I got:

bibtex: Not writing to &lt;project-path&gt;/src.blg (openout_any = p). I couldn't open file name &lt;project-path&gt;/src.blg'

To get rid of the error, open texmf.cnf, which resides in /usr/share/texlive/texmf/web2c through
sudo

Strikethrough in LaTeX

posted in: LaTeX, Technicalities | 8

Today I found a second way to achieve a strikethrough in LaTeX (what is done by »line-through« in css: strike out text). If you want to put a line across text, your choices are »ulem« and »cancel«:

Strikethough in LaTeX using »ulem«

\usepackage{ulem} in the preamble

Fonts in LaTeX

posted in: LaTeX, Technicalities | 0

In short: To avoid the standard pixel bitmap fonts and go for smooth, scalable post script ones, use one of the following:

\usepackage{palatino}
\usepackage{times}
\usepackage{bookman}
\usepackage{newcent}

or, for standard post script fonts

\usepackage{pslatex}

Position:Absolute in LaTeX

posted in: LaTeX, Technicalities | 0

In css there is the handy absolute positioning. Today I found out how to do it in LaTeX:

In the preamble

\usepackage{textpos}

In the document

\begin{textblock}{2}[0,0](8,1.5)     Lorem ipsum dolor sit amet \end{textblock}

The arguments are as follows:

\begin{textpos}
{<width>}

Section Footnote in LaTeX

posted in: LaTeX, Technicalities | 1

I left biting marks in the table on this one. I don’t know if it’s a general issue or just my document. Anyway:

I wanted to have footnotes from inside sections, subsections, and subsubsections. They work similar to footnotes in tables, you

ΛαΤεΧ in Greek

posted in: LaTeX, Technicalities | 0

There are various possibilities to include Greek text in your LaTeX document. The three ones I found are these:

1. $\Gamma\rho\varepsilon\varepsilon\kappa$ gets you Γρεεκ allright, but it looks clumsy and lacks all the accents etc.
2. betababel. It does not work with my customised control sequences, and I am too lazy to change them and learn them all anew.
3. polutonikogreek. Neat, slim, worked straight away.

Nos. 2 & 3 use ngerman, so make sure they don’t start a fight with german.

update

I had a slight problem with polutonikogreek and titletoc. Whenever I used something like

\greek{p’olemos}

which referred to this entry in the preamble:

\newcommand*{\greek}[1]%    {\selectlanguage{polutonikogreek}{#1}%    \selectlanguage{german}}

the .toc-file looked like this at the corresponding place:

[…] \contentsline {section}{\numberline {1.1}KAPITEL-1.1}{14} \contentsline {subsection}{\numberline {1.1.1}UNTERKAPITEL-1.1.1}{14} \select@language {polutonikogreek} \select@language {german} \select@language {polutonikogreek} \select@language {german} \contentsline {subsection}{\numberline {1.1.2}UNTERKAPITEL-1.1.2}{20} […]

Wherever \select@language appeared in the toc, the styling of my toc entries of the subsection level was being messed up. I style subsection entries in the toc in a way that they all get written in a single line. It looks like this:

\titlecontents*{subsection}[3.5em]   {\vspace{-0.5mm}\itshape\footnotesize}{}%   {}{\dots\normalfont\footnotesize%   \thecontentspage.\enspace}%   [\itshape][\vspace{1mm}]

There are two solutions.

Ignore the problem, compile your document, open the .toc-file, delete all \select@language entries and compile again (but only once). Use the following specifications in your preamble:

\usepackage{ucs}\usepackage[utf8x]{inputenc}\usepackage[polutonikogreek,german]{babel}\newcommand{\gdir}%`

Custom Counter in LaTeX

posted in: LaTeX, Technicalities | 0

How it does work:

Here is what we do: We define the counter

\newcounter{MyCounter}

\renewcommand\theMyCounter{\roman{MyCounter}}

after it, and it works. Thanks to Axel for his help on this.

How it does not work:

When you define a new counter like this

\newcounter{MyCounter}

And later use it like this

\refstepcounter{MyCounter}\label{example} \roman{MyCounter}. Beispiel eins

And then reference it like this:

And now I reference an example \ref{example}. \end{document}

Then LaTeX still interprets it as