LaTeX
Today I found a second way to achieve in LaTeX what is done by »line-through« in css (strike out text).
1. ulem
\usepackage{ulem} in the preamble and \sout{text to be striked out}
The problem is that ulem affects some bibliography styles where otherwise italicised text is then underlined.
2. cancel
\usepackage{cancel} in the preamble gives you four different modes of striking through
\cancel{text to cancel}draws a diagonal line (slash) through its argument\bcancel{text to cancel}uses the negative slope (a backslash)\xcancel{text to cancel}draws an X (actually \cancel plus \bcancel)\cancelto{〈value〉}{〈expression〉}draws a diagonal arrow through the 〈expression〉, pointing to the 〈value〉 (math-mode only)
You can get cancel at ctan.
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} or
\usepackage{ae,aecompl}
Be warned: the latter killed my Umlaute.
The more interesting stuff on fonts in LaTeX can be found here.
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
Lorem ipsum dolor sit amet
\end{textblock}
The arguments are as follows:
\begin{textpos}
{<width>}
[<left handle>,<top handle>]
(<leftmargin>,<topmargin>)
Width: width of the box. Height is determined automatically.
Handle: Where the box is being grabbed. Default is [0,0], which means left/top corner; [0.5,0.5] would be the center of the box and [1,1] the right bottom corner.
Margin: Where the box will be positioned on the page.
For more detailed instructions (on the units of measurement for instance), refer to Norman Gray's textpos doc. The textpos bundle can be found at tug.
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 need to address them similar to this:
\section{Some Section in my Document\footnotemark}
\footnotetext{My boring footnotetext.}
Only, when I did it like this, it worked on some occasions, but not on others (reason for me biting the wood).
I finally found out that it did not work on all occasions where I did it exactly like in above example, but always rendered
TeX capacity exceeded, sorry [input stack size=5000]
However, it did work on all the occasions where I specified the (optional) short title for section/subsection/&c:
\section[Section in Document]{Some Section in my Document\footnotemark}
\footnotetext{My boring footnotetext.}
The optional shorter title appears -- as far as I know -- in the table of contents and in left-/rightmark. Also, Kile uses it to display the document structure, too. So if you have rather long titles (like I do) it is a good idea specifying a short one anyway. If not, I guess you can just as well repeat the full title in the optional argument if you need a footnote.
When using the starred variant (\section*{My merry section}), don't provide a short title.
By default LaTeX starts the footnote counter at zero for each chapter when you use the class {book} or {scrbook}. If you want to avoid that and have a continuous enumeration, here is how it works:
Create a folder <remreset> in your local package repository. Save the file remreset.sty into this folder.
Open your preamble and add
\@removefromreset{footnote}{chapter}
Should you get an error message like this
or like this
embrace the stuff with \makeatletter and \makeatother:
\makeatletter
\@removefromreset{footnote}{chapter}
\makeatother
Voilà.
There are various possibilities to include Greek text in your LaTeX document. The three ones I found are these:
$\Gamma\rho\varepsilon\varepsilon\kappa$gets you Γρεεκ allright, but it looks clumsy and lacks all the accents etc.- betababel. It does not work with my customised control sequences, and I am too lazy to change them and learn them all anew.
- 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{\selectlanguage{polutonikogreek}{#1}%
\selectlanguage{german}}
\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} [...]
\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@languageentries and compile again (but only once). - Use the following specifications in your preamble:
and then put the greek text directly into your document like this:
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage[polutonikogreek,german]{babel}
\newcommand{\gdir}%
{\foreignlanguage{polutonikogreek}}\gdir{Πόλεμος}
How it does not work:
When you define a new counter like this
And later use it like this
\roman{MyCounter}. Beispiel eins
And then reference it like this:
Then LaTeX still interprets it as something like
So it results in an arabic number. This is not what we want. We want to reference the counter in lower roman (or upper roman or alph or what have you), too.
How it does work:
Here is what we do: We define the counter like above
but then we add
after it, and it works. Thanks to Axel for his help on this.
While working on a somewhat larger scale document I always end up with numerous prints, .dvis, .pdfs and so on and so forth. Once, I lost all my original .tex documents and thus had to copy everything from a pdf and reformat it. In a case like that, it sure is handy to know exactly with which version you are dealing and which one is the latest. So for my thesis I wanted to add a little automatic timestamp to each print. Sure enough I found timestamp.sty. Just go to your local package repository, create a folder called <timestamp> and save timestamp.sty into it. With
Now, I never liked this date format, so if you, too, prefer DD-MM-YYYY, open timestamp.sty and scroll to the very bottom. Replace
\ifnum\month<10 0\fi\the\month-%
\ifnum\day<10 0\fi\the\day\ \xxivtime}
\ifnum\month<10 0\fi\the\month.\,%
\the\year\ -- \xxivtime\,h}
\timestamp then produces
However, the version I use looks like this:
\ifnum\month<10 0\fi\the\month.\,%
\the\year\ at \xxivtime\,h}