Typography with TeX and LaTeX

## Merry Christmas!

Dezember 24th, 2011 by Stefan Kottwitz

This Christmas tree has been created by Mikko Heiskanen with this code:

\documentclass{article} \usepackage{tikz} \usetikzlibrary{scopes,svg.path,shapes.geometric,shadows} \begin{document} \begin{tikzpicture}[ mystar/.style={star, minimum size=2cm, star point ratio=2.5, shade, thick, line join=round, color=yellow!80!black, draw=red!20!black, top color=yellow!80!white, bottom color=yellow!60!black}, mytree/.style={scale=0.5, rotate=180, draw=green!60!black, thick, line join=round, inner color=green!60!yellow, outer color=green!50!black}, myball/.style={shade, ball color=#1, circular drop shadow={ shadow xshift=0pt, shadow yshift=-.5ex, fill=green!40!black}} ] {[mytree] \shadedraw svg "M355,430 q90,10 105,-85 30,0 50,-30 20,30 50,30 50,-20 100,0 10,88 105,85 -45,90 -205,25 Q400,520 355,430"; \shadedraw svg "M380,325 q83,10 105,-80 25,0 35,-30 20,25 40,30 20,-10 35,-25 20,20 40,25 25,90 105,82 -15,50 -120,15 -30,-2 -60,12 -30,0 -52,-28 C490,370 380,360 380,325"; \shadedraw svg "M435,225 q65,-8 90,-70 35,40 70,0 25,60 90,70 -30,52 -90,5 -36,48 -73,-3 C520,254 445,265 435,225"; \shadedraw svg "M470,139 q50,5 90,-80 50,90 90,80 -30,30 -50,20 -40,45 -78,0 Q500,170 470,139"; } %\shadedraw svg[scale=0.5,rotate=180] %"M460,532 q50,-8 q77,-45 v-20 a20,13 0 1 1 48,0 v20 q30,40 77,45"; %pgf/tikz doesn't like the arc operation, as stated in manual   \node[mystar] at (-9.85,-1) {$\lambda$};   \shade[myball=blue] (-9.7,-2.2) circle (.2cm); \shade[myball=red] (-9.2,-3.8) circle (.2cm); \shade[myball=green] (-10.3,-4) circle (.4cm); \shade[myball=yellow] (-8.95,-5.4) circle (.4cm); \shade[myball=red] (-10.7,-6.1) circle (.4cm); \shade[myball=blue] (-10.8,-5) circle (.2cm); \shade[myball=yellow] (-9.5,-6.7) circle (.2cm); \shade[myball=green] (-8.3,-7.6) circle (.4cm); \shade[myball=yellow] (-11.7,-7.6) circle (.4cm); \shade[myball=blue] (-10.5,-7.8) circle (.2cm); \end{tikzpicture} \end{document}

Further trees based using TikZ and pgfplots, using decorations and L-System fractals are here: Christmas trees with TikZ.

Category: TeX.SX, Events, pgf/TikZ | No Comments »

## TeXmaker 3.2 released

Dezember 22nd, 2011 by Stefan Kottwitz

The version 3.2 of the free cross-platform LaTeX editor TeXmaker has been released today, read on LaTeX-community.org. New features, cited from the ChangeLog file:

• block selection mode has been added (alt+mouse)
• a “search in folders” dialog has been added
• the settings file can now be saved, deleted or loaded
• all the colors for the syntax highlighting can now be changed (a preconfigured dark theme is available)
• graphics environments and .asy files have their own syntax highlighting mode
• a selected piece of text can now be surrounded by french/german quotes (these quotes has been added to the “LaTeX” menu and to the completion)
• a panel can be added in the structure view to show the list of opened files (”View” menu)
• the Texdoc tool can be launched directly via the Help menu (users can select the name of the environment before calling Texdoc)
• the list of label and bibliography items can now be used to customize the completion
• the “recent files” list can now be cleaned
• the shortcuts of some commands can now be changed (”switching between the editor and the pdf viewer”, “french/german quotes”, “next/previous document”,…)
• *.asy files can now be opened directly without using the “all files” filter
• *.jpeg has been added to the list of the “includegraphics wizard”
• .thm and .pre files are now deleted while using the “clean” command
• windows and mac versions are now compiled with Qt 4.8 and poppler 0.18.2
• a version compiled on macosx lion is now available
• the version number is now added to the info.plist file (macosx)

Further several bugs have been fixed. The complete ChangeLog can be found here. Click here for downloading versions for Linux, Mac OS X or Windows or source files.

Category: News, IDEs and Editors | No Comments »

Dezember 22nd, 2011 by Stefan Kottwitz

TeXample.net is now on Twitter. TeXample.net is a web site dedicated to TeX and related software, currently it’s focussed on collecting and showing TikZ examples.

Four TikZ examples have been added this week, more are planned, as well as new site features. Twitter will inform about smaller updates, blog posts about bigger changes.

The @TeXgallery Twitter logo is a Koch snowflake, which can be produced using TikZ:

\documentclass{article} \usepackage{tikz} \usetikzlibrary{lindenmayersystems} \usetikzlibrary[shadings] \begin{document} \begin{tikzpicture} \shadedraw[shading=color wheel] [l-system={rule set={F -> F-F++F-F}, step=2pt, angle=60, axiom=F++F++F, order=4}] lindenmayer system -- cycle; \end{tikzpicture} \end{document}

This is also one of the recently added examples.

Category: News, pgf/TikZ, Online Ressources | No Comments »

## LyX 2.0.2 released

Dezember 1st, 2011 by Stefan Kottwitz

The maintenance release 2.0.2 of LyX has been published. New and updated features are:

• Support for CTEX document classes
• Revised support for the latest versions of the Springer document classes svjour3, svmono and svmult
• R code from a Sweave-enabled document can now be exported
• Document color settings are now respected by XHTML export
• tex2lyx has been improved and now supports conversion of horizontal lines, phantom spaces, hyperlinks, underlined and striked out text, rotated and wrapped floats, subfloats, frameless boxes and the font packages beraserif, ccfonts, chancery, fourier, and utopia
• Cursor movement is faster now when inline completion has been enabled in math
• Improved archive feature , now also external files referenced in ERT in the document body, such as by \input or \insertgraphics, are included

This release fixes many bugs, that’s why it’s recommended to update to this version.

This text is available in German. Dieser Text ist auch in Deutsch verfügbar.

Category: News, IDEs and Editors | No Comments »

## Decorate a TikZ path

November 5th, 2011 by Stefan Kottwitz

How to decorate a \path?

My question is about drawing a “commutative-type diagram” in mathematics. I would like to integrate an arrow of the type \rightsquigarrow, which is described how to be obtained here: Squiggly arrows in TikZ.

The problem is that I use \path to connect the entries of my matrix in TikZ (because this part comes integrated in a bigger diagram), and I get an error:

“Package PGF Error: I cannot decorate an empty path.”

The code is

\documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \usepackage{amssymb} \begin{document} \begin{tikzpicture} \matrix (m) [matrix of math nodes, row sep=3em, column sep=4em, text height=2ex, text depth=0.25ex] { U & U \\}; \path [->, font=\scriptsize, line join=round, decoration={zigzag,segment length=4, amplitude=.9,post=lineto,post length=2pt}, decorate] (m-1-1) edge node[auto] {F} (m-1-2); \end{tikzpicture} \end{document}

where the decorate part does not work.

You could specify the decoration to the path, and give the edge the decorate option:

\path [->, decoration={zigzag,segment length=4,amplitude=.9, post=lineto,post length=2pt},font=\scriptsize, line join=round] (m-1-1) edge[decorate] node[auto] {F} (m-1-2);

Category: TikZ | No Comments »

## TUG 2011 Reports

Oktober 23rd, 2011 by Stefan Kottwitz

Daily reports on the TeX Users Group Meeting 2011 can be found on tex.blogoverflow.com:

Now also online: the presentation on TeX Online Communities.

Category: TeX User Group, News, Events | No Comments »

## Bringing together TeX users online

Oktober 23rd, 2011 by Stefan Kottwitz

From Usenet to Web 2.0 and beyond - Presentation on TUG 2011

I attended the TeX Users Group Conference 2011 in Trivandrum, Kerala, India, from October 19 to October 21. On this meeting I made a presentation about TeX online communities, such as discussion groups, mailing lists and web forums. I introduced the TeX Q&A site tex.stackexchange.com and showed some of its features which make it a good choice for developing and sharing TeX contents, for building a TeX knowledge base besides just discussing. Finally I compared those systems.

This presentation and text is free with cc-wiki license and attribution required, which means you are free to use, to share and to remix it, while mentioning the author’s name and if possible linking back to here.

Abstract:

Bringing together TeX users online - from Usenet to Web 2.0 and beyond

It all began with the Usenet, around 1980. The online discussion board comp.text.tex emerged, where TeX hackers gathered and still populate it today.

On the continuously developing Internet, TeX user groups created mailing lists, built home pages and software archives. Web forums turned up and lowered the barrier for beginners and occasional TeX users for getting support.

Today, TeX’s friends can also follow blogs, news feeds, and take part in vibrant question and answer sites.

In this talk we will look at present online TeX activities.

## TUG 2011: TeX in the eBook era

Oktober 16th, 2011 by Stefan Kottwitz

Next week, October 19-21, the 32nd annual meeting of the TeX Users Group will take place in Trivandrum, Kerala, India. It’s hosted by River Valley Technologies. The conference focuses on document production using LaTeX, TeX, ConTeXt, MetaPost, and related software.

For further information, visit

Category: TeX User Group, News, Events | No Comments »

## 10.000 Questions on TeX.SX

Oktober 3rd, 2011 by Stefan Kottwitz

Today the 10.000th question has been posted on TeX.SX:

Why do arguments to nested \tilde or \breve commands reappear when amsmath is used?

It deals with a bug found in amsmath when nested accents are used. A workaround and one working solution have been found, and it turned out that the bug is already on the todo list of AMS. Let’s hope that AMS makes that list available for the public, so we would know if we stumbled across a known bug which will be fixed soon or if it’s unknown.

Since today the TeX-SX Q&A site contains more than 10.000 questions and 18.000 answers of more than 6.900 registered users, only 132 questions are still unanswered. Yet - there are regular chat meetings where unanswered questions are being discussed, answered and sometimes closed, for example if the information in the question was insufficient and hasn’t been updated since a long time.

In July a TeX.SX community blog has been established, in about 20 blog posts by different authors you can read more about the site and its users.

Category: TeX.SX, Online Ressources | No Comments »

## Closed root symbols

Oktober 2nd, 2011 by Stefan Kottwitz

In LaTeX/Mathematics, Wikipedia writes:

Some people prefer writing the square root “closing” it over its content. This method arguably makes it more clear just what is in the scope of the root sign.

It shows a solution defining \sqrt in terms of the default one, which works well. However, Wikipedia continues:

Unfortunately this code won’t work if you want to use multiple roots: if you try to write \sqrt[b]{a} … you’ll just get a wrong output. In other words, you can redefine the square root this way only if you are not going to use multiple roots in the whole document.

On TeX.SX Matthias posted the question, how to solve this for roots of arbitrary degree. I had a look into latex.ltx and decided to redefine the internet \r@@t macro, still similar to the Wikipedia solution:

\makeatletter \let\oldr@@t\r@@t \def\r@@t#1#2{% \setbox0=\hbox{$\oldr@@t#1{#2\,}$}\dimen0=\ht0 \advance\dimen0-0.2\ht0 \setbox2=\hbox{\vrule height\ht0 depth -\dimen0}% {\box0\lower0.4pt\box2}} \LetLtxMacro{\oldsqrt}{\sqrt} \renewcommand*{\sqrt}[2][]{\oldsqrt[#1]{#2}} \makeatother

Now we get a closed root symbol for example also for cubic roots. However, roots without optional arguments, i.e. are not closed. Finally, this can be fixed by forcing \sqrt using the optional argument, if necessary just using a space because. An empty optional argument would cause wrong spacing.

\usepackage{letltxmacro} \LetLtxMacro{\oldsqrt}{\sqrt} \renewcommand*{\sqrt}[2][\ ]{\oldsqrt[#1]{#2}}

Here we did not use TeX’s \let command, but the letltxmacro package which works safer for LaTeX macros with optional arguments. See complete source example. Output:

Matthias wrote a suggestion for incorporating the solution on the Wikipedia discussion page.

This was originally discussed on TeX.SX: “Closed” (square) root symbol.

Category: TeX.SX, Fonts and Symbols, Mathematics | No Comments »