Contents

This Page

LaTeX

DCS Group LaTeX classes

I have prepared a customized class for writing scientific articles, containing listings of programs, algorithms, etc. It consists of the following files:

dcsarticle.cls
An article. It loads dcslib.sty. The class has an option report used to produce a technical report. Requires at least version 2.6 of titlesec package.
dcsbook.cls
A book. It also loads dcslib.sty.
dcslib.sty
The main part of the class dcsarticle. I have put all these stuff in a separate package to make it possible to use the functionality of dcsarticle with other classes, e.g. beamer class. The package has an option theorems that defines a set of theorems as in Springer LNCS. Requires at least version 1.3 of listings package.
dcsalg.sty
An auxiliary class for typesetting algorithms. Uses algorithmicx package.
dcsarticle.layout
A layout for LyX 2.0.x to write articles using dcsarticle class in LyX.
dcsbook.layout
A layout for LyX 2.0.x to write books using dcsbook class in LyX.
dcs.module
A module for LyX 2.0.x with definitions of inline styles: Emph, Strong, Code, Path, Cmd, Kbd, Name, and a customized style LyX-Code.
logopp.png
A logo file used by some of the classes.

CSThesis class

And one more class for my PhD thesis:

csthesis.cls
The class is based on a standard book class. It uses both dcslib.sty and dcsalg.sty.
csthesis.layout
A layout for LyX to write books using csthesis class in LyX.

Generic Makefile for LyX and LaTeX documents

I have prepared a generic Makefile for LyX/LaTeX documents, called latex.mk. In order to use it prepare a simple Makefile containing just:

include latex.mk

Then type:

# make help

The Makefile can locate your source file (either LyX or LaTeX), export it if necessary and then compile:

# make final
# make finalps
# make export
# make figs
# make clean

You can even simplify usage of it by defining the following function in your shell (let it be Bash):

function mk() {
  if [ -f Makefile ]
  then
    make "$@"
  else
    make -f $HOME/path/to/latex.mk "$@"
  fi
}

Then you do not have to create Makefile, just type:

# mk final

LLS = LaTeX + LyX + Subversion/CVS

In this paper (in Polish) I have presented a set of tools that may be used to work on documents in a group of people in a heterogeneous environment (e.g. mixture of Linux and Windows systems).

Tips and Tricks

PDF documents manipulation

If you want to put multiple pages of an existing PDF document on a single sheet use the scripts from pdfjam package. For example, when producing a handout of my presentations I run:

# pdfnup --nup 2x2 --paper a4paper --frame true --scale 0.96 \
         --delta "2mm 2mm" doc.pdf

I use pdfnup also for scaling documents (e.g. LNCS papers):

# pdfnup --nup 1x1 --scale 1.2 doc.pdf

Strike-through text

Use package ulem, eg.:

\usepackage[normalem]{ulem}
...
Ala \sout{nie} ma kota

The option normalem saves the standard emphasizing command (by default it is changed to underline). The other commands are: uline for multiline underlining, uuline for double underlining, uwave for wavy underline.

Additional fonts

I recommend replacing replacing standard Computer Modern constant width font with for example: Bera Mono or Luxi Mono. These are very nice, scalable fonts. They have bold variants and contain complete set of polish characters. In order to install it in unix systems, run latex-font-inst.sh script.

Mirrored output

If you want to get a mirrored output use the crop package, and the command crop. Here is an example:

\usepackage[a4,center,cam,mirror]{crop}

Bibliography

Key generation algorithm:

  1. If there is only one author: take the first three letters out of his name and join it with the year number (two digits), e.g. Sch90.
  2. If there are more than one author but less than four: take first letters of their names and join it with the year number (two digits), AB90.
  3. If there are more than four authors: take first characters of the first three of them, a plus character, and two digits of the year, e.g. ABC+99.
  4. If there are conflicts: attach single letters a, b and so on to the keys generated, e.g. AB90a.