Math formulas and arrows with TikZ
In the Art of Problem Solving Forum somebody asked for help in creating a construction for proofs and demonstrations in Logic by LaTeX commands. Math expressions should be aligned, some connected by arrows going vertically and horizontally.
Regarding arrows I would use tikz and also its matrix library for math nodes. The nodes could be connected by -| or |- path construction operations, like
\draw (node1) -| (node2) |- (node3); |
For creation of the example given in the thread on AoPS I’ve used a matrix of math nodes, some empty nodes for alignment and |- -| arrows, here’s the compilable example code:
\documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture}[every node/.style={anchor=west}] \matrix (m) [matrix of math nodes, nodes in empty cells]{ \quad & 1.\quad (x)(Q\supset Fx) & \\ & 2.\quad Q\supset Fx & \textrm{I,\textbf{UI}} & \\ & 3.\quad Q \\ & 4.\quad Fx & 2, 3, \textrm{ M.P.}\\ & 5.\quad (x)Fx & 4, \textrm{ \textbf{UG}} \\ & 6.\quad Q\supset(x)Fx & 3-5, \textrm{ C.P.} \\ & 7.\quad \parbox[t]{2.9cm}{% $(x)(Q\supset(x)Fx)\supset$\\ $[Q\supset(x)Fx]$} & 1-6, \textrm{ C.P.}\\}; \draw[-stealth] (m-7-2.north east) -| (m-1-1.west) |- (m-1-2); \draw[-stealth] (m-6-2.north east) -| (m-3-1.east) |- (m-3-2); \end{tikzpicture} \end{document} |
Output:

LaTeX Community launched new features and new design
Exactly 2 years after LaTeX-Community.org has gone online its forum has got a new fresh look and the community site is providing new features for its members and users.
In a short summary:
- Know How section, intended to contain categorized articles related to LaTeX,
- News section, providing breaking news about LaTeX on web pages and RSS feed,
- Comment feature for adding comments and discussion of articles and news,
- Rating feature for articles.
See the original announcement for more information.
My thanks to Sven Wiegand for developing and maintening this great site. Have a look!
TikZ: Commutative diagrams with crossing edges
When one edge of a graph passes over or under another edge there may be a small gap needed in the drawing of one of those edges. An easy trick is to draw the upper edge two times: first with the background color and more thickness, afterwards normally, like
<node1> edge [-,line width=6pt,draw=white] <node2> edge <node2>
Here’s an example diagram used in the definition of the pull-back of a Banach bundle:

The source code:
\begin{tikzpicture} \matrix (m) [matrix of math nodes, row sep=3em, column sep=3em]{ & f^\ast E_V& & \vphantom{f^\ast}E_V \\ f^\ast E & & \vphantom{f^\ast}E & \\ & U & & V \\ M & & N & \\}; \path[-stealth] (m-1-2) edge (m-1-4) edge (m-2-1) edge [densely dotted] (m-3-2) (m-1-4) edge (m-3-4) edge (m-2-3) (m-2-1) edge [-,line width=6pt,draw=white] (m-2-3) edge (m-2-3) edge (m-4-1) (m-3-2) edge [densely dotted] (m-3-4) edge [densely dotted] (m-4-1) (m-4-1) edge (m-4-3) (m-3-4) edge (m-4-3) (m-2-3) edge [-,line width=6pt,draw=white] (m-4-3) edge (m-4-3); \end{tikzpicture} |
This topic was discussed on Matheplanet.com.
If you want to read more about commutative diagrams with TikZ have a look here: Chains with labeled edges.
New package: zwpagelayout
On December 26th Zdenêk Wagner has released the zwpagelayout package, dealing with page layout in general, like the well known geometry package.
It may not provide as many features as geometry but it brings additional tools, for instance it’s supporting cropmarks.
The package can be loaded by:
\usepackage[options]{zwpagelayout} |
All options have to be set in the preamble, either by this line or given to the document class.
Options may be paper sizes (by name or by lengths), orientation (portrait, landscape), margins, text dimensions (also concerning head and foot), cropmark related options and options concerning the design of book covers like spine and flap.
There are even options to reflect pages horizontally or vertically, that are intended for printing but shouldn’t be used for documents providing hyperlinks.
Further the package is capable of calculating missing page layout dimensions if enough dimensions are already given.
zwpages comes well documented on 16 pages. For more information and download visit:
- the package homepage,
- its directory on CTAN,
- the short README file,
- the package documentation.
WinShell 3.30 released
The version 3.30 of WinShell has been released on Monday this week. WinShell is a LaTeX Editor with Unicode support, spellchecking (Hunspell), project environment, configurable toolbars, syntax highlighting and provides many more features.
Some the new features of the version 3.30 are
- SyncTeX/Sumatra PDF support,
- improved UTF8 support for the spell checker,
- update to Hunspell 1.2.8, Scintilla 1.77,
- BibTeX front-end,
- a pdfLaTeX optimized toolbar,
- Linux support by wine.
For further information and download visit the WinShell Homepage.
New package: pdfcomment
Though pdflatex provides the command pdfannot for pdf annotations it is somehow complicated to use. The new package pdfcomment offers a user-friendly way to insert comments/ annotations into pdf files.
pdfcomment requires the packages hyperref, xkeyval, ifpdf, marginnote and packages needed by them.
pdfcomment provides options for subject, author and color of annotations, supports icons used as graphics for pdf annotations.
For further information you could have a look at
- the README file,
- the documentation in English,
- the documentation in German,
- the package homepage on CTAN,
- the pdfcomment homepage with documentation and example.
TeXnicCenter 1.0 RC is out
The first candidate for TeXnicCenter 1.0 has been released as announced yesterday. It’s expected to be more stable than the beta release. Visit its download page to get it.
TeXblog related news
Some weeks ago I began to work as IT Technician onboard of a passenger ship. I’ve already worked some years as IT Administrator on a ship (for a different company) and also in the position of the IT Communication Officer there, so it’s not completely new to me but will require most of my time.
That’s why I will publish less posts here at the moment, at least for some time.
I’m hoping that readers of this blog would return from time to time to check out if there’s something new. 😉 I will continue working on this site.
Stefan
Texmaker 1.8 released
The today released version 1.8 brings the following changes:
- faster spell checker, based on a more recent hunspell version,
- inverse search will no more launch a new instance of Texmaker because now it can be started only once per user,
- brace matching again,
- improved autocompletion, begin{…} completed with end{…},
- improved error detection.
Texmaker is a free LaTeX IDE running under Linux, Mac OS X and Windows and is published under the GPL 2.
For features, documentation and download visit the Texmaker homepage.
KOMA-Script 3 available
The new version KOMA-Script 3 by Markus Kohm et al. has been released today.
Some of the new features are:
- possibility to change almost all settings, even the paper or font size, after loading the class and even after begin{document},
- arbitrary base font size, not only in pt, also in other units of measure like pica (pc),
- new key=value interface, backward compatible,
- new package tocbasic for generation of table of contents and other lists, supporting the multilingual babel package,
- arbitrary choice where chapters are allowed to start,
- improved documentation.
To download KOMA-Script 3, visit http://developer.berlios.de/projects/koma-script3/.
There are release notes in English and more extensive in German.
edit Nov 11: KOMA-Script 3 is available now also as MiKTeX package. I’ve installed it with TeX Live on Ubuntu Linux by the MiKTeX package manager.
Ubuntu 8.10 “Intrepid Ibex” released

On Oct 30 2008 the Ubuntu team announced the release of Ubuntu 8.10 Desktop and Server. You can read about its features in the press release.
To download Ubuntu 8.10, or obtain CDs, see: Get Ubuntu. For instructions on upgrading to Ubuntu 8.10, visit: Upgrading to Ubuntu 8.10.
Upgrades to the latest version of Ubuntu are entirely free of charge as always.
Check out the release notes and look at the new features.
To get more information, visit www.ubuntu.com.
Using \expandafter for macro redefinitions
Sometimes I want to redefine a macro of a class or package but want to use its original definition. Instead of copy&paste one could use the original macro directly:
- come up with a new macro, ensure that it’s not defined yet,
- save the definition of the original macro to the new macro,
- redefine the original macro using the new macro with the saved original code,
I will give a very simple example for a demonstration. Today a LaTeX Community member said that he’s using the quote environment but wants the enclosed text to have a smaller size. A straightforward solution is to use \renewenvironment copying the original code, let’s say from article.cls, and to make a small modification:
\renewenvironment{quote} {\list{}{\rightmargin\leftmargin}% \item\relax\small} {\endlist} |
Just the \small was added. This solution needs the writer to examine the class source, that may also be changed later.
The second solution is the method I’ve described above:
\newcommand*\origquote{} \let\origquote\quote \renewcommand*\quote{\origquote\small} |
The \newcommand line may be omitted, I’ve just used it to ensure that an error would be raised if a macro with that name was already defined by somehing else.
The last code works like the first solution, but respects the original class code and it will also respect further changes of the class, therefore I’m preferring it.
But the third solution is similar, shorter and doesn’t need the creation of another macro. It’s doing the same job but uses the original macro directly, avoiding a recursion problem by using \expandafter:
\expandafter\def\expandafter\quote\expandafter{\quote\small} |
You can find the same method applied in my comment to a previous blog post.
If you want to know how expandafter works you will find explanations in TeX books and documentations. Further there’s an extensive tutorial by Stephan v. Bechtolsheim (TUGboat, Volume 9, 1988), old but still valid of course.
This topic was discussed in the LaTeX Community Forum and on Matheplanet.com.