Some TeX Developments

Coding in the TeX world

Archive for February, 2011

TUG 2011: 19th–21st October, Kerala, India

with 2 comments

The yearly TUG conference for 2011 was originally scheduled to be held in Cairo, Egypt. Recent events there mean that there has been a rethink, and that this year’s event will now take place in Kerala, India, for the 19th to the 21st of October. This is going to be hosted by River Valley, a typesetting company with a very strong interest in TeX.

Written by Joseph Wright

February 23rd, 2011 at 8:22 am

Posted in General

{TeX} elections

without comments

The {TeX} Q&A site is holding it’s first elections for community moderators. The idea is that anyone with enough involvement in the community can vote: there are 8 candidates (including me). In contrast to some of the other Stack Exchange sites, the election is a pretty calm affair, with a broad agreement on the nature of the job between the candidates. So quite how to make a decision on how to vote is not so easy. There are 8 days to think about it, and it’s worth noting that there will be a chat session on Thursday, so that people can put questions to the potential moderators. It will be interesting to see what gets asked.

Written by Joseph Wright

February 21st, 2011 at 9:47 pm

Posted in General

{TeX} Q&A Moderator election

without comments

The increasingly-popular {TeX} Q&A site is holding it’s first moderator election.Anyone with a reputation of 300 or greater can stand, which means a good portion of the community is eligible. The nomination stage runs for 7 days, so there is no immediate panic to decide to stand!

Written by Joseph Wright

February 14th, 2011 at 8:27 pm

Posted in General

Detexify fundraising

without comments

Detexify has rapidly become a standard tool for LaTeX users, allowing you to draw a symbol and be pointed in the direction of how to enter it in LaTeX. People who’ve followed Detexify from the start will know that it began as a ‘bit of fun’ project, but it’s clearly grown since then! There is now a fundraising call to pay for hosting the site: these things stack up. Hopefully, the community can find a good solution to this: it’s a great service, and I think is something that we should all look to encourage if we can.

Written by Joseph Wright

February 11th, 2011 at 6:42 am

Posted in General

QuickLaTeX: A LaTeX plugin for WordPress

with 11 comments

Reading through the chat page for the {TeX} Q&A site today, I stumbled upon a reference to QuickLaTeX. This is a plugin for WordPress to allow you to show LaTeX code in your page or blog. That’s not unique, but what is interesting is that it runs the LaTeX on the QuickLaTeX server, meaning that you don’t need LaTeX on your web host’s system. For me, that was immediately interesting as I don’t have a TeX installation on the host for this site. (It looks like QuickLaTeX is built using TeX Live 2010, so most packages should be available unless you are on the bleeding-edge.)

The system seems pretty easy to use. The plugin follows the standard WordPress model: download, install and activate. The plugin page gives some details on how to use it, but a few examples here will show off the power of the system. It’s possible to put something simple into the blog, such as

\[ y = mx + c \]

and get

    \[ y = mx + c \]

or something much more complex, like

\begin{tikzpicture}
[+preamble]
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
[/preamble]
\begin{axis}
\addplot3[surf,domain=0:360,samples=40] {cos(x)*cos(y)};
\end{axis}
\end{tikzpicture}

and get

Rendered by QuickLaTeX.com

All that is needed, beyond the plugin, is to put [latexpage] at the start of the page. You can then escape any ‘raw’ LaTeX by prefixing the beginning with !, for example

!\[ y = mx + c \]

is what I used for the first of my demos.

I don’t often find the need to post actual LaTeX examples in my blog, but the facility is certainly one I’m happy to have access to. The license for QuickLaTeX asks for a public link to their site, which seems like a small pay-off for a very handy service.

Written by Joseph Wright

February 10th, 2011 at 8:47 am

Posted in LaTeX

Tagged with , ,

TeXworks: building on a Mac

with one comment

Development of TeXworks has picked up over the last couple of months, with a drive to get to version 0.4. Several builds for Windows have been posted on the TeXworks downloads page, so testing there has been pretty easy. For Linux users, the instructions for building from source are not too bad, so anyone wanting to test on Linux has also been okay. However, Mac users face more a more difficult time. The last official binaries were posted in February 2010, and most Mac users don’t build software from the sources.

There was a post to the TeXworks mailing list yesterday asking for volunteers to get Mac binaries sorted out. This will not be a trivial process: Mac OS X is used on PowerPC and Intel chips, and the later covers both 32- and 64-bit cases. However, the aim has to be first to solve the more basic problem of getting the software to build at all! Bruno Voisin has managed that, but this is a test case and not really suitable for distribution.

As I’ve got a Mac, I’m having a go at solving some of the problems, but my experience with serious programming is pretty much non-existent, so whether I’ll be much help I’m not sure. So any keen TeX-using Mac programmers reading might want to take a look at the discussion and make suggestions (or of course provide some binaries and build instructions!).

Written by Joseph Wright

February 6th, 2011 at 11:38 am

Posted in TeXworks

Using \let to remove a space

with 4 comments

On the {TeX} Q&A site, there was a question recently about splitting the first token off a list, with the requirement that spaces are not skipped. In my answer, I’ve used \let to remove one space. The question is how to do this. Normally, if you want to use \let you do

\let\TokenA\TokenB

In this case, TeX will skip spaces after \let and \TokenA, so we can’t use it to \let to a space. However, what we can do is notice that TeX allows us to have an optional = followed by one space in the syntax for \let. We also need to make sure that TeX does not discard two spaces in the early stage of parsing, so can use \@firstonone:

\@firstofone{\let\TokenA= }

This will \let \TokenA to the next token in the input, even if it is a space. I’ve used this to remove the next token from some input in combination with \afterassignment:

\long\def\firstofone#1{#1}
\def\GobbleExactlyOne{%
  \afterassignment\NextThing
  \firstofone{\let\TokenA= }%
}

Not something you need every day, but worth knowing about I think.

Written by Joseph Wright

February 5th, 2011 at 7:39 am

Posted in General

Useful LaTeX2e programming macros

without comments

Martin Scharrer has put together a hand reference list of macros for programming LaTeX2e. This covers stuff in the LaTeX kernel itself, rather than add-ons such as etoolbox. This should be a real benefit to newer LaTeX programmers, as finding all of this information has in the past been quite awkward.

Written by Joseph Wright

February 5th, 2011 at 7:19 am

Posted in LaTeX

Tagged with , ,