TeXdoc.net got a new interface

Today, TeXdoc.net shines in new splendor.

It’s a project of Paulo Cereda and me. While I maintain the web server and the TeX installation, he contributes layout and programming for the interface. Today Paulo provided a completely new version. Together we tested and adjusted the code. What was developed on his Fedora laptop, now runs on the Debian web server, adaption went like a clockwork while skyping.

Now, TeXdoc runs on the dwoo PHP5 template engine. Something new for me after OSQA, Django, Joomla, WordPress, phpBBx, having Drupal still on the list.

What is it all about? Well, TeXdoc.net provides an interface to the current TeX documentation, understanding search keywords but also allowing topic browsing. It bases on the texdoc and texdoctk scripts which belong to a TeX Live installation. Via the server, you an access current manuals without having the newest installation or using an tablet like an iPad or a smartphone.

The main motivation was to provide a generic shortcut for web forums. By highlighting a package name, and clicking a button, you can generate a link to the package documentation. Handy while talking. It is integrated for example on LaTeX-Community.org, TeXwelt.de and goLaTeX.de by buttons and markup code but used anywhere people know the link syntax.

Finally, its OpenSearch feature integrates with the quick-search field in browsers such as Firefox.

 

 

 

 

 

11. February 2015 by stefan
Categories: Events, Online Ressources, Tools for LaTeX | Leave a comment

Matheplanet Award

These days, the voting phase of the Matheplanet Member Award ended. Among the 15 categories, there’s an award for the best LaTeX advisor.

Continue Reading →

27. January 2015 by stefan
Categories: Events, Mathematics, Online Ressources | Leave a comment

News from goLaTeX

The web site and forum goLaTeX.de moved to a new server, which is maintained by me. Johannes already wrote about it on TeXwelt.de (Neuigkeiten bei goLaTeX), and I posted the news here: Server-Umzug.

The appearance stays the same but with improvements:
Continue Reading →

19. January 2015 by stefan
Categories: Events, Online Ressources | Tags: , | Leave a comment

writeLaTeX is now Overleaf

The company behind the collaborative writing and publishing system writeLaTeX.com, Writelatex Limited, decided to rebrand. From now on, the system will carry the name Overleaf.

It continues as a free service with additional advanced features for paid subscriptions. Existing projects, files and links will remain fully accessible, even though a major upgrade is planned for 2015. We can expect faster rendering and higher quality of the real-time preview.

Changing the name is often a challenge. They chose a rather quite time of the year, so it won’t affect users much. More of a risk may be dropping a popular name and needing to establish a new brand, but the advantages seem to outweigh the disadvantages. Specifically, the rich text mode may hide to occasional co-authors that there’s LaTeX under the hood: like in LyX there’s a WYSIWYM mode which makes editing possible for users without LaTeX knowledge. So it’s just consequent to omit LaTeX also in the service name.

You can read the official announcement here: WriteLaTeX is continued Overleaf.

26. December 2014 by stefan
Categories: Online Ressources | Leave a comment

PGFPlots 1.11 released

Christian Feuersänger released version 1.11 of PGFPlots. It’s already one week ago, but regarding this special package that news is important for me, so I share it also here. Furthermore, there are news about the future development.

Parametric Breather Pseudospherical SurfaceI would live to highlight two of the new features. Now you can use radian in arguments for trigonometric functions, besides degree. Before, we could convert radian to degree using the deg() function, such as by sin(deg(x)), if x wasn’t given in degree. So the input of complex trigonometric expressions can be simplified. You just need to specify trig format plots=rad once as an option.

The code for the picture on the right shows “before and after”, in the answer by Christian on TeXwelt to the question, if you can switch from degree to radian with PGFPlots together with the announcement of the upcoming feature.

Or let’s have a look how it’s applied in a small example – here I plotted a spherical harmonics map (used in quantum mechanics), originally requested by Henri in PSTricks:

Spherical Harmonics

\documentclass[border=10pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{trig format plots=rad, compat=1.11}
\usepgfplotslibrary{colormaps}
\begin{document}
\begin{tikzpicture}
  \begin{axis}[colormap/violet, hide axis]
    \addplot3[
      surf,
      domain     = 0:pi,
      domain y   = 0:2*pi,
      samples    = 50,
      samples y  = 70,
      z buffer   = sort
    ] 
    ( {sin(x)*cos(y)*(sqrt(3/(4*pi))*sin(x)*cos(y))^2},
      {sin(x)*sin(y)*(sqrt(3/(4*pi))*sin(x)*cos(y))^2},
      {cos(x)*(sqrt(3/(4*pi))*sin(x)*cos(y))^2} );
  \end{axis}
\end{tikzpicture}
\end{document}

NormalverteilungFurthermore, adding custom annotations became simpler. Until now, you could refer to the coordinate system using the axis cs:syntax, for drawing additional lines, arrows, labels or annotations. In contrast to low level pgf/TikZ coordinates, axis cs applies logarithms, data scaling and custom transformations, so that should be choosen. Now, that’s implicitly done. For example, it could look like Elke’s filled area below a normal distribution:

\draw [dotted] (axis cs:2.698,-4) -- (axis cs:2.698,4.5);
\node at (axis cs:0,1.4) [anchor=east, rotate=90] {50\,\%};

With the new version it can be simplified to

\draw [dotted] (2.698,-4) -- (2.698,4.5);
\node at (0,1.4) [anchor=east, rotate=90] {50\,\%};

So less writing work and easier to read, especially if i’s used many times, such as in Elke’s plot.

That small update fixed also several bugs. With my frequent usage I stumbled only across one of them, which as now been fixed (too much whitespace with the units library under certain circumstances – i.e. bounding box too big). The README file provides further information.

Regarding the future development: in a comment to zu a question about rotation transformation with PGFPlots Christian announced, that current development of PGFPlots focuses on scalability and performance, motivated by the many 3d surface plots on TeXwelt. He already finished a prototype version, which can double the speed. This version bases on a Lua backend. I look forward to this development, since I frequently generate complex plots and compile a lot of times, until viewing angle, sampling rate, coloring and further options result in the best possible visualization.

You can use your package manager for updating PGFPlots, alternatively you can download the new version from SourceForge or from CTAN.

15. August 2014 by stefan
Categories: Graphics, News, pgf/TikZ | Leave a comment

Periodically, more or less

Sinuskurve in 3DRecently I got my hands on the sine function, again. It’s the classic example for a periodic function. Everybody knows that horizontal wave in the cartesian coordinate system. Starting with a polar plot of a complex sine function in two dimensions I would like to visualize the function in three dimensions.

Continue Reading →

01. August 2014 by stefan
Categories: Graphics, Mathematics, pgf/TikZ | Leave a comment

Dynamic systems, bifurcations, procedural worlds

I’m using pgfplots a lot, so I will share some examples today.

Here, I benefit from these features of pgfplots, going beyond base TikZ:

  • Simple plotting with 3d coordinates and axonometric projection
  • Presentation of required coordinate axes
  • Using color gradients
  • Reading in files with externally calculated data

In any case we can use Lua for calculating data. Lua generates the TeX commands for printing, which will be processed in a pgfplots axis environment.

Here are the samples, just click on it to get to the corresponding thread on TeXwelt with full source code.

Lorenz attractor (dynamic system)

While I posted a Python calculated version on TeXwelt.de, Henri added one, which bases on LuaTeX. Let’s see his picture at first:

Lorenz attractor

Of pgfplots I used the transparency feature besides the standard 3d plot, so I got an impression of the density:

Lorenz attractor

Once we calculated the data, the code is simple:

\documentclass[border=10pt]{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
  \begin{axis}[
      xmin = -25, xmax = 25,
      ymin = -25, ymax = 25,
      zmin =   0, zmax = 50,
      hide axis,
    ]
    \addplot3[mark=none, mesh, shader=interp, color=black, opacity=0.2]
      file { lorenz.dat }; 
  \end{axis}
\end{tikzpicture}
\end{document}

Fractal landscapes – the base for producing procedural worlds

Between adjacent points, new points will be calculated, with random but limited variation. Finally we will get a mountainous landscaoe. The calculated points get color according to their height: blue for sea level and below, green for mountains and white above the snowline.

Fractal landscape

Next step: specify nice starting values, for beginning with a certain base structure, such as an island in the water.

Feigenbaum diagram (bifurkations)

This is a classic of the chaos theory und closely related to the Mandelbrot set. Also here, we use transparency for an impression of the point density.

Feigenbaum diagram

I often started such topics on TeXwelt.de. LaTeX support for thesis writers is not the only talking point there. It became established, that TeX connoisseurs post their ideas in shape of a question, often themselves posting the first answer, opening a discussion. The final goal is a knowledge database, built on top of questions and answers.

08. July 2014 by stefan
Categories: Graphics, Mathematics, pgf/TikZ | Leave a comment

Iterated fractals

I recently dealt with  Iterated function systems , in short IFS. Here we got repeated transformations: the space will be mapped onto itself. There can be different map specifications. We do this an infinite number of times :-) and take a look at the set in space, which stays invariant. This can be a fractal object.

Enough of theory, there are great books on it, and Wikipedia provides a nice starting point. How do we generate such a fractal image? The simplest approach is the so called chaos game: wie nehmen einen Punkt her, and apply one of the transformations, randomly chosen. Because we got point sets, which are invariant under those transformations, the mapped point will be in the set again. We take the new point and repeat it, thousands of times, until a clear shape appears.

Let’s do this with the famous Barnsley fern!

But how? We need loops and the possibility of calculating affine transformations. It can be done with pgfmath, but I think it’s hardly readable. So I rather take Lua, integrating a programming language in the classical sense into the macro expansion language TeX. It’s easily written in Lua. I put the transformation parameters and probabilities into a matrix, so it can easily be changed for experiments. Let’s start the chaos game!

For compiling, we need LuaTeX and patience. For testing and playing with parameters and probabilities, it’s recommendable to choose a low number of iterations.

\documentclass[tikz,border=10pt]{standalone}
\usepackage{luacode}
\begin{luacode*}
  function barnsley(iterations,options)
    local x = math.random()
    local y = math.random()
    local m = {
        0.0,   0.0,   0.0, 0.16, 0.0,  0.0, 0.01,
       0.85,  0.04, -0.04, 0.85, 0.0,  1.6, 0.85,
        0.2, -0.26,  0.23, 0.22, 0.0,  1.6, 0.07,
      -0.15,  0.28,  0.26, 0.24, 0.0, 0.44, 0.07
    }
    local pm = { m[7], m[7] + m[14], m[7] + m[14] + m[21] }
    if options ~= [[]] then
      tex.sprint("\\draw[" .. options .. "] ")
    else
      tex.sprint("\\addplot coordinates{")
    end
    for i=1, iterations do
      p = math.random()
      if     p < pm[1] then
        case = 0
      elseif p < pm[2] then
        case = 1
      elseif p < pm[3] then
        case = 2
      else
        case = 3
      end
      newx = (m[7*case+1] * x) + (m[7*case+2] * y) + m[7*case+5]
         y = (m[7*case+3] * x) + (m[7*case+4] * y) + m[7*case+6]
         x = newx
      tex.sprint("("..x..","..y..") circle (0.05pt)")
    end
    tex.sprint(";")
  end
\end{luacode*}
\begin{document}
\begin{tikzpicture}
  \directlua{barnsley(100000, [[color=green!50!black,fill]])}
\end{tikzpicture}
\end{document}
Barnsley fern

On TeXwelt.de I produced variations, printed using pgfplots.

Farn variation Farn variation

Also the famous Sierpinski triangle can be generated using the chaos game instead of the L-System approach, the similar source code is on TeXwelt.de, like linked above:

Sierpinski triangle

Now in three dimensions? :-) No joke – in analogy to the triangle there’s the squarish Sierpinski carpet, wich becomes the so called Menger sponge in three dimensions.

07. July 2014 by stefan
Categories: Graphics, Mathematics, pgf/TikZ | Leave a comment

TeX Live 2014 released – what’s new

TeX Live 2014 has been released and is now available for download. Let’s have a look at the changes.

TeX

TeX and MetaFont have been updated. This previously happened 2008, and this year Donald Knuth provided another update. Now we got TeX version 3.14159265, included in TeX Live 2014. Well, the slight changes are essentially invisible: regarding TeX, the only change concerns the “null control sequence”\csname\endcsname, there was a missing space. if somebody wants to try, with this code by Oleg Bulatov, 2008:

\def\\#1{\message{#1bar}}
\def\surprise{wunder}
\let\foo=!
\\\surprise
\\{\csname\endcsname}
\end

you will get a message on the terminal

wunderbar \csname\endcsnamebar

where one would expect just wunderbar bar. Well, that’s fixed now in the print_cs routine! Very nice to see, that the last known TeX bug is so “serious”.

Also MetaFont has been updated to version 2.7182818, which means just a fix of one bug, also discovered in 2008. A classic – a memory leak.

The remaining things are maintainance work. You can read more details about this in Donald Knuth’s article “The TeX tuneup of 2014“.

pdfTeX

“Fake spaces” have been introduced. The original TeX does not insert space characters between words. Instead, words and punctuation characters are positioned for optimal full justification without an explicit space character inbetween. This is very good for printing, however today we often read documents on electronic devices such as laptops, tablet computers and smart phones. They use different screen widths, even on the same device it can change when you rotate the device. Text should reflow on-the-fly. For this it’s better to have a space character as a word delimiter.

Continue Reading →

18. June 2014 by stefan
Categories: LaTeX Distributions, TeX Live | Leave a comment

LaTeX2e got an update

Today an update of LaTeX2e has been released on CTAN. The previous update dates back to June 27, 2011. LaTeX2e has been stable for a long time, there are mainly maintenance work and bug fixes.

  • The package fixltx2e got an update: loading the package fixes bugs and improves bad design decisions of previous versions of LaTeX. Such corrections were put into an extra package for backwards compatibility. From this version on, placement arguments for floats will be checked and in case of errors, such as a wrong v in \begin{figure}[tv], an error message will be raised. Furthermore the behavior in case of mixing one- and twocolumn floats has been improved, to fix that it was possible that placement got out of sync.
  • There’s a new package with the name fltrace: the original internal LaTeX code for placing floats has been extracted and information output has been added, which can be switched off and on, to analyze and to understand how LaTeX works when placing the floats. \usepackage{fltrace}\tracefloats activates it.
  • The inputenc package has been improved: there were problems with the Unicode based engines XeTeX and LuaTeX, now it’s compatible with option utf8or ascii, it runs and just issues a warning. Other options, i.e. really incompatible input encodings, cause the compiler to stop with an error message.
  • .ins files, used to extract code files from source files, are now provided for single files instead of complete subfolders, making updates easier.
  • The multicol package got corrections and an extension: code can be run dependent on in which column we currently are.
  • tabularx relaxes restrictions for using \tabularx and \endtabularx in the definition of new environments.
  • showkeys got bug fixes for using at the beginning of list items and with grouping by curly braces within the optional argument of \cite.
  • The color package now provides the command \nopagecolor.
  • In graphicx the command \rotatebox now accepts arguments containing paragraph breaks done by \par or an empty line.
  • Also keyval now can deal with \par and empty lines in values.

Continue Reading →

04. May 2014 by stefan
Categories: LaTeX General, News | Leave a comment

← Older posts