# Crossing lines

Sometimes it’s not possible in diagrams or charts, that a line goes over another one. To not let this crossing look like a real connection of the two lines, we can let the top line go over a gap in the bottom line. It would require to calculate the intersection of the lines.

However, there’s an easy way: draw the firsts line normally, then draw the top line with a bit whitespace around. Or the top line first thicker and white (or background color), then again thin and black (foreground color).

The probably easiest way in TikZ is: draw a “double” line (TikZ manual, 15.3.4 Graphic Parameters: Double Lines and Bordered Lines). Originally, it gives two parallel lines with space in-between filled by a color. But we want to get a single line. Solution: a double line in white, the gap between them filled in black. This results in a black line with white space around.

Many words, short and simple code example:

This way, double distance is the width of the actual black line, while line width stands for the white space on each side.

Use it such as:

It can look like:

Or:

# Flipping images

When I defined an image as a TikZ node, I easily create and use a flipped version: I define a mirror style that does a reflection for me:

As my original style was defined this way

I simply override the image style by adding the mirror style:

This way I can get a diagram with a focus to its center:

# Images as TikZ nodes

In diagrams, I need to include images, such as symbolic icons or photos of actual hardware. I defined a generic TikZ style with two arguments: the name of the image, and the desired width. The height comes automatically with the same aspect ratio.

For the final node style, I apply this style plus adjustments such as actual node width and x or y separation:

All style definitions above go into a \tikzset command, separated by comma, plus many more global styles I need:

This way I get photos with annotations for larger physical diagrams:

# Event tip: DANTE TeX meeting

Next week, the university of Wuppertal will host a meeting of the German language TeX user group DANTE. A great opportunity for meeting TeX friends! Of course, also non-members are very welcome.

The program includes several talks about LaTeX in and for schools. Unknown features of CTAN will be presented, and we will see demonstrations of practical tasks, such as: converting a CEWE phot book to PDF using LaTeX, writing job aplications, and typesetting exams.

For detailed information about registering, travel, program and accomodation, see: http://www.dante.de/events/dante2016.html.

# Paragraphs – the right way

in LaTeX the only two regular ways to end a paragraph are an empty line or the \par macro. Thus

and

is basically the same.

Please do not use \\, \newline or anything else to “end” a paragraph; it is considered to be bad style and actually wrong: From LaTeX’s point of view this only ends the line but belongs to the same paragraph. Therefore the indention or skip between paragraphs can’t work properly.

# Prefer \emph over \textit

To highlight text don’t use \textit but \emph, because the latter also provides the right logical markup (“emphasize”) and takes care of nesting.

# Forget about \bf and the like

Did you know that \bf, \it, \rm, \sc etc. are deprecated and should not be used with LaTeX? They don’t allow to be combined and therefore it is recommended to use the new commands like \bfseries, \itshape etc. For short text to be formatted there are also the \textXX{text} versions:

The default widths of numbers in the ToC are static. This can lead to problems with large sectioning numbers as well as large page numbers. It’s even more relevant for Roman numbering, where the width of numbers is even wider. In such cases, numbers and textual entries of the ToC may overlap.

You can fix this easily by:

# Creating a poster

You know the huge scientific posters on walls of university institutes. Want to create one yourself? The tikzposter class provides an efficient block layout for large posters with several predefined themes, from sober to stylish.

Here’s an example:

Source code and explanation: http://latex-cookbook.net/cookbook/examples/poster/.

# Getting bold math symbols

Load the bm package in your preamble. Do this after all packages, which define symbol fonts. If you are not sure about this, place this line below all font packages:

Declare a command for each bold symbol:

Use the new macros in your document within math mode.