<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>Will Robertson on LaTeXwspr81 at gmail dot com
From Adelaide, Australia.</description><title>LaTeX Alive</title><generator>Tumblr (3.0; @latex-alive)</generator><link>http://latex-alive.tumblr.com/</link><item><title>Use of § in refstyle</title><description>&lt;p&gt;I&amp;#8217;m a big fan of the refstyle package. (Before I knew it existed, I started writing something similar myself. I&amp;#8217;m glad I found refstyle before it was too late!)&lt;/p&gt;

&lt;p&gt;The refstyle package automates the use of cross references; while vanilla LaTeX would have us write &lt;code&gt;Figure~\ref{xyz}&lt;/code&gt;, this is written in refstyle as &lt;code&gt;\figref{xyz}&lt;/code&gt;. Far more flexible and this syntax lends itself to many clever extensions such as referring to ranges of figures with &lt;code&gt;\figrangeref&lt;/code&gt; or multiple individual ones using comma-lists. (And sections, and chapters, and equations, etc.)&lt;/p&gt;

&lt;p&gt;From memory, The LaTeX Companion does not mention refstyle; I don&amp;#8217;t recommend the use of prettyref or fancyref these days, as they&amp;#8217;re both very limited in comparison. There is a rival to refstyle named cleveref which I have not used; it has been actively developed for a number of years and is worth checking out.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ll talk about refstyle&amp;#8217;s syntax vs cleveref another day, perhaps. If we were to chose one of them to emulate for a LaTeX3 package, which would we choose? I do not know. We&amp;#8217;re not at that stage now, so I&amp;#8217;ll put off thinking about it.&lt;/p&gt;

&lt;p&gt;What I do want to discuss here is the use of the section sign, §. By default,  writing&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;see \secref{foo} for foo and we know about bar already (\secref*{bar}).
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;results in the output&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;see section §1 for foo and we know about bar already (§2).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this case, I&amp;#8217;m (ab)using the default appearance of the section sign to use &lt;code&gt;\secref*&lt;/code&gt; as a ‘short reference’ that&amp;#8217;s nice and tidy within parentheses, while preferring to spell out ‘section’ explicitly in text within a sentence.&lt;/p&gt;

&lt;p&gt;My PhD supervisor has pointed out to me, however, that writing ‘section §1’ is like writing ‘section section 1’ — not really the thing to do. Luckily refstyle provides hooks (namely, &lt;code&gt;\ifRSstar&lt;/code&gt;) that allow us to define a reference that defaults to ‘section 1’ but shifts to ‘§1’ when the star form is used.&lt;/p&gt;

&lt;p&gt;In the configuration file that defines the &lt;code&gt;refcmd&lt;/code&gt; for sections, simply write&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;refcmd  = {\ifRSstar\S\fi\ref{#1}},
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and we&amp;#8217;re all set.&lt;/p&gt;

&lt;p&gt;(At the same time, I switch all of the lowercase alternatives to uppercase so that cross-references are always ‘Section 1’ and so on — this is probably a regional preference.)&lt;/p&gt;</description><link>http://latex-alive.tumblr.com/post/49664021645</link><guid>http://latex-alive.tumblr.com/post/49664021645</guid><pubDate>Sun, 05 May 2013 17:05:59 +0930</pubDate></item><item><title>Removing subsection numbers in a ToC</title><description>&lt;p&gt;Very behind on taking care of the &lt;a href="http://www.tug.org/TUGboat/tb30-2/tb95robertson.pdf"&gt;Herries Press packages&lt;/a&gt; (PDF) which I&amp;#8217;m maintaining. Apologies to all who have emailed with suggestions, comments, and questions, and to whom I&amp;#8217;ve unfortunately not been able to respond.&lt;/p&gt;

&lt;p&gt;Funny request today: how can I remove subsection &lt;em&gt;numbers&lt;/em&gt; from the Table of Contents without removing their entries altogether? LaTeX&amp;#8217;s &lt;code&gt;tocdepth&lt;/code&gt; counter controls which entries will appear in the ToC, but has nothing to say about their formatting. Adjusting LaTeX&amp;#8217;s ToC formatting yourself is of course possible, but the &lt;code&gt;tocloft&lt;/code&gt; package makes things a bit easier.&lt;/p&gt;

&lt;p&gt;Still, in this case it doesn&amp;#8217;t provide an easy interface, since who in their right mind would want to number a subsection but not include that number in the ToC? (You can&amp;#8217;t fight stylistic decisions like this sometimes—just go with the flow.) Even with &lt;code&gt;tocloft&lt;/code&gt;, it&amp;#8217;s still necessary to write some internal code — and caveat emptor as always in such a case because you never know when the package might change its internal commands behind your back!&lt;/p&gt;

&lt;p&gt;In this case, the trick is to read the &lt;code&gt;tocloft&lt;/code&gt; documentation and notice that it provides hooks for inserting material before and after the number of a section entry in the ToC. For subsections, these commands, respectively, are &lt;code&gt;\cftsubsecpresnum&lt;/code&gt; and &lt;code&gt;\cftsubsecaftersnum&lt;/code&gt;. E.g., write&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;\renewcommand\cftsubsecaftersnum{!}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;to have a bang after every subsection number. (Presumably, a style or spacing change would be more common here.)&lt;/p&gt;

&lt;p&gt;Aha! The intrepid LaTeX programmer at this point might suggest something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;\def\cftsubsecpresnum#1\cftsubsecaftersnum{}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That is, when the pre-hook before the number executes, read everything up to and including the after-hook, and do nothing with it. (If the definition was &lt;code&gt;{#1}&lt;/code&gt; instead, then it would typeset as usual.)&lt;/p&gt;

&lt;p&gt;Well, give it a try like I did, and you&amp;#8217;ll discover it fails miserably. Back to the drawing board—time to read the package &lt;em&gt;source&lt;/em&gt;. The issue stems from the fact that LaTeX uses one command only to typeset each line of a ToC, so this command must be completely general whether it&amp;#8217;s a chapter or section or subsection that it&amp;#8217;s dealing with.&lt;/p&gt;

&lt;p&gt;Internally, the number in the ToC is typeset using something like&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&amp;#8230; &lt;code&gt;\@cftbsnum&lt;/code&gt; &lt;em&gt;«&amp;#160;the number itself&amp;#160;»&lt;/em&gt; &lt;code&gt;\@cftasnum&lt;/code&gt; &amp;#8230;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;where &lt;code&gt;\@cftnbsum&lt;/code&gt; and &lt;code&gt;\@cftasnum&lt;/code&gt; are &lt;code&gt;\let&lt;/code&gt; equal to their appropriate high level definitions &lt;code&gt;\cft…presum&lt;/code&gt; and &lt;code&gt;\cft…aftersnum&lt;/code&gt; as necessary for the context. Therefore, any look-ahead-and-gobble command must be defined specifically to look ahead for the &lt;em&gt;internal&lt;/em&gt; version of the hook rather than the high-level name for it given in the documentation.&lt;/p&gt;

&lt;p&gt;Et voila:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;\usepackage{tocloft}
\makeatletter
\def\cftsubsecpresnum#1\@cftasnum{}
\makeatother
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I still don&amp;#8217;t think this is very useful, but it&amp;#8217;s a nice trick.&lt;/p&gt;

&lt;hr&gt;&lt;p&gt;Hooks are funny in this way. If you define them to be defined by commands with an argument, such as&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&amp;#8230; &lt;code&gt;\cftsubsecsnumhook{&lt;/code&gt; &lt;em&gt;«&amp;#160;the actual number here&amp;#160;»&lt;/em&gt; &lt;code&gt;}&lt;/code&gt; &amp;#8230;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;it&amp;#8217;s hard to do parsing on it that involves scanning ahead for the contents of the number. On the other hand, in this case where the hook has the form where it&amp;#8217;s surrounded by a pre-hook and a post-hook, it&amp;#8217;s hard to grab the whole argument and do something with it since the internal post-hook might not be very user-accessible, as in the example above.&lt;/p&gt;

&lt;p&gt;I don&amp;#8217;t know if there&amp;#8217;s a way to structure hooks in any better way, however. One possibility I can think of would be to have a generic ‘end hook’ token that could always be read until, such as&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&amp;#8230; &lt;code&gt;\cftsubsecpresnum&lt;/code&gt; &lt;em&gt;«&amp;#160;the actual number here&amp;#160;»&lt;/em&gt; &lt;code&gt;\cftendhook \cftsubsecaftersnum&lt;/code&gt; &amp;#8230;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;where &lt;code&gt;\cftendhook&lt;/code&gt; was simply a no-op. There would be some subtle issues with nesting that would be somewhat painful to work around.&lt;/p&gt;

&lt;p&gt;Maybe it would be better to have the number braced as an argument and instead of having &lt;code&gt;\cftsubsecpresnum&lt;/code&gt; be a no-op by default it could be an identity function: (&lt;code&gt;\def\cftsubsecpresnum#1{#1}&lt;/code&gt;)&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&amp;#8230; &lt;code&gt;\cftsubsecpresnum {&lt;/code&gt; &lt;em&gt;«&amp;#160;the actual number here&amp;#160;»&lt;/em&gt; &lt;code&gt;} \cftsubsecaftersnum&lt;/code&gt; &amp;#8230;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Does anyone know of any best practices here?&lt;/p&gt;</description><link>http://latex-alive.tumblr.com/post/47606953910</link><guid>http://latex-alive.tumblr.com/post/47606953910</guid><pubDate>Wed, 10 Apr 2013 16:57:37 +0930</pubDate></item><item><title>New babel release on CTAN</title><description>&lt;p&gt;In May 2012, Javier Bezos wrote the following message to the LaTeX-L mailing list:&lt;/p&gt;

&lt;p&gt;&amp;gt; Babel gets back on track and it is again actively maintained. The goals are mainly to fix bugs, to make it compatible with XeTeX and LuaTeX (as far as possible), and perhaps to add some minor new features (provided they are backward compatible).&lt;/p&gt;

&lt;p&gt;&amp;gt; No attempt will be done to take full advantage of the features provided by XeTeX and LuaTeX, which would require a completely new core (as for example polyglossia or as part of LaTeX3).&lt;/p&gt;

&lt;p&gt;In November of that year, a new &lt;a href="http://www.mail-archive.com/ctan-ann@dante.de/msg05230.html"&gt;alpha release&lt;/a&gt; was uploaded to CTAN, and in January 2013 a &lt;a href="http://www.mail-archive.com/ctan-ann@dante.de/msg05345.html"&gt;beta release&lt;/a&gt; was made. In the change notes to the beta, Javier wrote:&lt;/p&gt;

&lt;p&gt;&amp;gt; I hope the final version will be available by March/April.&lt;/p&gt;

&lt;p&gt;Well, as of a few days ago, version &lt;a href="http://www.mail-archive.com/ctan-ann@dante.de/msg05446.html"&gt;3.9b of babel&lt;/a&gt; is now available on CTAN. Read more about the release at &lt;a href="http://www.tex-tipografia.com/babel_news.html"&gt;Javier&amp;#8217;s website&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s been around five years since the last update by Johannes Braams, who was babel&amp;#8217;s original developer and who maintained it for many years, pre-dating my involvement with the TeX world. (Indeed, Javier himself has been a contributor to the LaTeX community longer than I.)&lt;/p&gt;

&lt;p&gt;Babel has had a bit of a funny role in LaTeX, as it is not strictly an integral part of LaTeX2e itself, but until recently was tightly knit into LaTeX2e&amp;#8217;s development. With active development of babel required to fix bugs and provide (some) support for XeTeX and LuaTeX, it was no longer appropriate to keep babel as part of the LaTeX2e release cycle.&lt;/p&gt;

&lt;p&gt;Congratulations to Javier for continuing babel and successfully releasing an important new version. It&amp;#8217;s people like this that keep the LaTeX world relevant in what seems like a quickly changing world.&lt;/p&gt;

&lt;hr&gt;&lt;p&gt;It&amp;#8217;s difficult to give up code you&amp;#8217;ve lived with for many years, and I know it must have been a hard decision for Johannes to pass on the reigns to another. I know this because I&amp;#8217;m staring at the prospect myself, with hundreds of unread emails from the last eighteen months, many of which are questions and suggestions on many of the LaTeX packages I maintain.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m not ready to give them up myself, but I will need to work hard this year to get back on track. I use people like Javier as inspiration to keep on shipping.&lt;/p&gt;</description><link>http://latex-alive.tumblr.com/post/46831273444</link><guid>http://latex-alive.tumblr.com/post/46831273444</guid><pubDate>Mon, 01 Apr 2013 17:17:00 +1030</pubDate></item><item><title>New version of pstool</title><description>&lt;p&gt;Somewhat to my surprise, I have a new version of &lt;code&gt;pstool&lt;/code&gt; to release.
This is a LaTeX package I maintain that provide an easy workflow (I hope) for including &lt;code&gt;psfrag&lt;/code&gt; graphics into pdfLaTeX documents.
This allows, say, graphs from Matlab or Mathematica to be presented with fonts matching your document and using macros defined in your main preamble.&lt;/p&gt;

&lt;p&gt;For context below, here&amp;#8217;s a brief run-down of how it works.
As a graphic is requested in the main document (using &lt;code&gt;\psfragfig&lt;/code&gt; or similar), a check is made whether it has been converted into PDF in a previous compilation (and the source graphic hasn&amp;#8217;t been updated in the mean time).
If so, it saves some time and simply loads that graphic.
If not, an entirely new LaTeX document is created with the preamble of the main document, but which otherwise contains only the graphic that needs to be processed.
This document is run through the regular (‘old-fashioned’) &lt;code&gt;latex&lt;/code&gt; → &lt;code&gt;dvips&lt;/code&gt; → &lt;code&gt;ps2pdf&lt;/code&gt; compilation workflow, which performs the wanted &lt;code&gt;psfrag&lt;/code&gt; substitutions (and any other PostScript-based processing) and the final figure is cropped to size.
Execution returns back in the main document and the PDF graphic can be inserted directly, and the compilation of the main document continues as normal.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;pstool&lt;/code&gt; package been invaluable to me in preparation of my PhD thesis, but I haven&amp;#8217;t had the opportunity to work on the code for a long time.
In fact, I discovered some code I&amp;#8217;d written for it from 2010 (see below) that I&amp;#8217;d never released to CTAN.
Why a new package now, then? Because I hate it when my code breaks and wastes people&amp;#8217;s time.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Windows ps2pdf breaking&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Some time back, the maintainers of &lt;code&gt;ps2pdf&lt;/code&gt; changed the way that options were passed on the command line under Windows, so where previously &lt;code&gt;pstool&lt;/code&gt; was writing something like&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ps2pdf "-dPDFSETTINGS=/prepress" "foo.ps" "foo.pdf"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;to generate the PDF file from the &lt;code&gt;psfrag&lt;/code&gt;-generated PostScript file, the default settings were now terribly broken for recent users of MiKTeX, causing their documents to fail to compile. The syntax which now works correctly is&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ps2pdf -dPDFSETTINGS#/prepress "foo.ps" "foo.pdf"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Note &lt;code&gt;#&lt;/code&gt; instead of &lt;code&gt;=&lt;/code&gt; to set the options.
In order to fix the issue, I decided to separate the fix from the user-level interface to pstool, which can set &lt;code&gt;ps2pdf&lt;/code&gt; options with syntax like&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;\usepackage[
    ps2pdf-options={-dPDFSETTINGS=/prepress}
]{pstool} 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Rather than requiring users to know to replace the &lt;code&gt;=&lt;/code&gt; with &lt;code&gt;\#&lt;/code&gt; (remembering that &lt;code&gt;#&lt;/code&gt; is a special character than needs to be escaped), &lt;code&gt;pstool&lt;/code&gt; automatically replaces all equals signs in the &lt;code&gt;ps2pdf&lt;/code&gt; options with hash characters.
This provides some level of platform-independence so that documents will compile correctly whether on Windows, Linux, or Mac OS X.
Of course, it will still work correctly for Windows users that write &lt;code&gt;\#&lt;/code&gt; anyway.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;More robust preamble scanning&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The second feature (and this is the code that was written in 2010 but never released) is a more robust scanning method for copying the main document&amp;#8217;s preamble into the preamble for each externally processed graphic.
In prior versions of the package, this was achieved by redefining &lt;code&gt;\begin{document}&lt;/code&gt; but this method broke whenever a class or package did their own redefinition.
The command &lt;code&gt;\EndPreamble&lt;/code&gt; was provided to manually indicate where the preamble should end, but users would usually run across the error and not know where to look to fix the problem.&lt;/p&gt;

&lt;p&gt;The changes for this feature are all internal and shouldn&amp;#8217;t be noticeable if the code is working correctly; &lt;code&gt;\EndPreamble&lt;/code&gt; still works for the cases where you don&amp;#8217;t need the entire document preamble to be replicated for each graphic.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Cross-references and citations supported&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The third major change for the new version of &lt;code&gt;pstool&lt;/code&gt; is to support cross-references and citations in externally-processed graphics.
This has been on my wish-list for some time, as I know that some people have used references and citations in their figures and graphs, and have had to use Rolf Niepraschk&amp;#8217;s &lt;code&gt;pst-pdf&lt;/code&gt; (or my wrapper package &lt;code&gt;auto-pst-pdf&lt;/code&gt;) in this case.
That solution is fine and perhaps still preferable in many cases, but if it could be done in &lt;code&gt;pstool&lt;/code&gt; then I wanted to try and support it if possible.&lt;/p&gt;

&lt;p&gt;It wasn&amp;#8217;t entirely straightforward, but I think it now works.
The short of it is: the main file&amp;#8217;s &lt;code&gt;.aux&lt;/code&gt; and &lt;code&gt;.bbl&lt;/code&gt; files are now copied over for each graphic&amp;#8217;s external compilation; the current page number is passed into the external graphic; and anything written to the &lt;code&gt;.aux&lt;/code&gt; file by the external graphic is copied back into the main document&amp;#8217;s &lt;code&gt;.aux&lt;/code&gt; file.
Copying the &lt;code&gt;.bbl&lt;/code&gt; file is only necessary to support &lt;code&gt;biblatex&lt;/code&gt; use, for reasons I&amp;#8217;m still not entirely clear on.&lt;/p&gt;

&lt;p&gt;What does this allow us to do now?
If you have a document that defines several different equations and plots the results of those equations, it is possible to annotate the figure with the actual equation numbers cross-referenced from the document.
Or even include a citation in the graph for some method that was described in another paper.&lt;/p&gt;

&lt;p&gt;However, there&amp;#8217;s a downside to all of this, which is that &lt;code&gt;pstool&lt;/code&gt; graphics require multiple passes to resolve any cross-referencing.
And this is not possible to detect automatically (well, it may be theoretically possible but I don&amp;#8217;t think it&amp;#8217;s easy).
So the old approach of &lt;code&gt;pstool&lt;/code&gt; to check the PDF and update the graphic only if necessary fails for those which use cross-references; in these cases, it is necessary to force their generation manually until everything resolves.
This can be done on a per-graphic level by using &lt;code&gt;\psfragfig*&lt;/code&gt;, or on a document level by loading the package with the &lt;code&gt;[process=all]&lt;/code&gt; option.&lt;/p&gt;

&lt;hr&gt;&lt;p&gt;This new version is still being &lt;a href="https://github.com/wspr/pstool"&gt;tested on GitHub&lt;/a&gt; (please check it out if you&amp;#8217;d like to help!) and I hope to upload it to CTAN in the next few days. I hope this release marks the beginning of somewhat of a return to the LaTeX community for me — last year was tumultuous for many reasons and I hope I can now re-dedicate some time every week.&lt;/p&gt;

&lt;p&gt;Famous last words.&lt;/p&gt;</description><link>http://latex-alive.tumblr.com/post/42471549527</link><guid>http://latex-alive.tumblr.com/post/42471549527</guid><pubDate>Thu, 07 Feb 2013 12:23:18 +1030</pubDate></item><item><title>Here’s a photo I took of Donald Knuth at the TUG 2010...</title><description>&lt;img src="http://24.media.tumblr.com/be0f2a1789baed952ef8adea25c9807e/tumblr_mg1bnhgvJ61qc4z2lo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Here’s a photo I took of Donald Knuth at the TUG 2010 conference during his “&lt;a href="http://river-valley.tv/tug-2010/an-earthshaking-announcement"&gt;Earthshaking Announcement&lt;/a&gt;”. I’m not sure exactly how it has been distributed (perhaps Facebook) but I see it’s now &lt;a href="http://www.superscholar.org/features/20-most-influential-scientists-alive-today/"&gt;floating around&lt;/a&gt; the internet. I’m not a big stickler for attribution in this case—I’m quite happy the photo turned out this well at all, let alone good enough for others to use. In any event, I thought it would be a good idea to clear up who the original author of the photograph was.&lt;/p&gt;

&lt;p&gt;For future reference, I’m happy for my photographs to be freely used with attribution. Should really start making more of them public…&lt;/p&gt;</description><link>http://latex-alive.tumblr.com/post/39543689056</link><guid>http://latex-alive.tumblr.com/post/39543689056</guid><pubDate>Thu, 03 Jan 2013 16:08:05 +1030</pubDate></item><item><title>TUG 2012 in Boston</title><description>&lt;p&gt;This year&amp;#8217;s been a bit of a rollercoaster for being busy and trying to make decisions. After flipping-flopping over the last six months, I&amp;#8217;ve decided at the last minute to attend &lt;a href="http://tug.org/tug2012/"&gt;TUG 2012&lt;/a&gt; in Boston in July. (Thanks to Steve Peter, president, for the gentle nudge that finally sorted me out.)&lt;/p&gt;

&lt;p&gt;TUG is the annual conference of the TeX Users Group, and I attended it for the first time in San Francisco in 2010. It was the best conference I&amp;#8217;ve been to, and I&amp;#8217;m expecting to have a great time in Boston as well. I&amp;#8217;ve barely been to the east coast of the US, so I&amp;#8217;m excited to explore the city in the days around the conference.&lt;/p&gt;

&lt;p&gt;For my presentation, I&amp;#8217;ll talk about LaTeX3 from a fairly high level, why it exists, why I work on it, and other assorted aspects of my somewhat-dormant TeX work. (Spoiler: without LaTeX3 I wouldn&amp;#8217;t have been able to develop &lt;code&gt;unicode-math&lt;/code&gt;; it would simply have been too much work.) If there&amp;#8217;s anything in particularly you think I should address, feel free to drop me a line beforehand.&lt;/p&gt;

&lt;p&gt;If you yourself are attending the conference, please say hi. What do people like to drink in Boston? I&amp;#8217;ll buy you one.&lt;/p&gt;</description><link>http://latex-alive.tumblr.com/post/23864071578</link><guid>http://latex-alive.tumblr.com/post/23864071578</guid><pubDate>Mon, 28 May 2012 00:42:55 +0930</pubDate></item><item><title>Lucida Math OpenType

As part of the next incarnation of the...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_lr0a2ffRHX1qc4z2lo1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;h2&gt;Lucida Math OpenType&lt;/h2&gt;

&lt;p&gt;As part of the next incarnation of the Lucida typefaces, I’ve been testing out the OpenType versions of the maths fonts.&lt;/p&gt;

&lt;p&gt;It’s fair to say that most people will have seen a Lucida font in one form or another. Lucida has been very popular in the past as one of the very few commercial and unique maths fonts for TeX. It is a super-family of fonts with more font faces than I’m aware of in any other such collection, including serif, sans serif, typewriter, script, blackletter, handwriting, casual, fax (a sturdier serif), and symbols or wingdings. It has been distributed very widely on various computer systems, with Lucida Grande used in Mac OS X itself (the menu font, among other uses), and Java and Windows shipping the standard serif/sans/mono trio for many years.&lt;/p&gt;

&lt;p&gt;For more information about the Lucida fonts and their new release, Ulrik Vieth and Mojca Miklavec have just published a TUGboat paper with &lt;a href="https://www.tug.org/members/TUGboat/tb32-2/tb101vieth.pdf"&gt;all the gossip&lt;/a&gt;. (Link accessible for TUG members only until it becomes open access in one year.)
Further information can also be found on TUG’s own &lt;a href="http://www.tug.org/store/lucida/designnotes.html"&gt;site for the font&lt;/a&gt; and &lt;a href="http://mysite.verizon.net/william_franklin_adams/lucida.txt"&gt;an overview of the fonts&lt;/a&gt; written by the font designers, Charles Bigelow and Kris Holmes.&lt;/p&gt;

&lt;p&gt;Due to my particular interest in &lt;a href="http://www.ctan.org/pkg/unicode-math"&gt;Unicode maths&lt;/a&gt;, I’m especially excited to see a new OpenType maths font on the scene. I like to think that we’re entering into somewhat of a golden age of maths font design, as OpenType provides a mechanism by which both TeX users and GUI apps such as Microsoft Word can use them; in times past, it was simply rarely worth the expense of creating a new TeX maths font and this is evident by the relative paucity of them.&lt;/p&gt;

&lt;p&gt;After the Lucida release later this year, available OpenType maths fonts will include:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Latin Modern Math (1347)&lt;/li&gt;
&lt;li&gt;XITS Math (2428) &lt;/li&gt;
&lt;li&gt;Cambria Math v1.0 (1592) &lt;/li&gt;
&lt;li&gt;Lucida Math (1947)&lt;/li&gt;
&lt;li&gt;Lucida Math Demibold (877) &lt;/li&gt;
&lt;li&gt;Asana Math (2240)&lt;/li&gt;
&lt;li&gt;Neo Euler (411)&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;shown with approximate symbol counts for each font (based on symbols defined in &lt;code&gt;unicode-math&lt;/code&gt;, &lt;em&gt;not&lt;/em&gt; by literal glyph count). The STIX fonts are the reference, here, and contain the largest number of symbols; I believe recent versions of Cambria Math have more than is listed above. But what is impressive to see is that not only does Lucida have a large glyph coverage already, but it will also be provided with a ‘bold’ version of the font as well and, as far as I know, will be the first OpenType maths font to offer this.&lt;/p&gt;

&lt;p&gt;To facilitate the use of the bold font, &lt;code&gt;unicode-math&lt;/code&gt; can now load multiple maths fonts simultaneously through LaTeX’s &lt;code&gt;\mathversion&lt;/code&gt; command (although this new feature hasn’t been widely tested), which is shown in the image above.
Note in the image above the integral sign for the bold example isn’t scaling yet; this will be rectified of course for the release version of the fonts.&lt;/p&gt;

&lt;p&gt;I’m very pleased to be able to play whatever small role I can in bringing these fonts to new audiences. Many thanks to Charles Bigelow and Kris Holmes for working on the new fonts and everyone involved in the OpenType transition but particularly the seemingly tireless Khaled Hosny. Great work!&lt;/p&gt;</description><link>http://latex-alive.tumblr.com/post/9792202222</link><guid>http://latex-alive.tumblr.com/post/9792202222</guid><pubDate>Mon, 05 Sep 2011 01:36:15 +0930</pubDate></item><item><title>Non-textual tabular requirements

I once wrote a procedure for...</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_litalaye4d1qc4z2lo1_400.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;h2&gt;Non-textual tabular requirements&lt;/h2&gt;

&lt;p&gt;I &lt;a href="http://www.tug.org/pracjourn/2005-2/robertson/"&gt;once wrote&lt;/a&gt; a procedure for drawing tabulars with square cells; it was one of my earliest experiences with LaTeX programming, actually. When I’d done so, I received a comment ‘why doesn’t LaTeX allow this easily’?&lt;/p&gt;

&lt;p&gt;Well, I wondered, why not? My feelings at the time (echoed a little today) were that LaTeX is a tool for writing largely technical documents, and such specific requirements fall outside its regular bounds of ways to typeset tabular material. (Forget, for the minute, that LaTeX’s tables are pretty ugly by default; I’m assuming everybody uses the booktabs package.)&lt;/p&gt;

&lt;p&gt;I still agree with the author of booktabs on this matter: ‘It is not going too far to say that if you cannot create a table using the commands in this package, you should redesign it.’ However, I do admit that things like tables with coloured rows and so on do have their uses.&lt;/p&gt;

&lt;p&gt;Just recently &lt;a href="http://www.advogato.org/person/karlberry/diary/199.html"&gt;Karl Berry&lt;/a&gt; mentioned he wanted to typeset a grid of images with a large image in the centre. (Not unlike what you see at the top of the page. Just replace the coloured boxes by real images.) This isn’t something that LaTeX does out of the box, and I’m not sure, actually, if any third package can do it either. (I tried but failed with multirow.)&lt;/p&gt;

&lt;p&gt;Spurred on by the &lt;a href="http://randomdeterminism.wordpress.com/2011/03/28/would-a-table-by-any-other-name-be-as-useful/"&gt;requisite ConTeXt example&lt;/a&gt; that ‘just works’, my own attempt to implement this arrangement turned out to be quite easy but not exactly straightforward.
Let me know if there’s a better way.&lt;/p&gt;

&lt;p&gt;First of all, the input syntax:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;\begin{tighttabular}{@{}c@{}c@{}c@{}c@{}c@{}c@{}}
\1&amp;\1&amp;\1&amp;\1&amp;\1&amp;\1\\
\1&amp;\1&amp;\1&amp;\1&amp;\1&amp;\1\\
\1&amp;\1&amp;  &amp;  &amp;\1&amp;\1\\
\1&amp;\1&amp;\9&amp;  &amp;\1&amp;\1\\
\1&amp;\1&amp;\1&amp;\1&amp;\1&amp;\1\\
\1&amp;\1&amp;\1&amp;\1&amp;\1&amp;\1\\
\end{tighttabular}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Notice that my approach simply puts the material in the lower-left cell in order to fill in the space taken up by the others. This would not work if the cells were of unknown and uneven sizes.&lt;/p&gt;

&lt;p&gt;The definition of &lt;code&gt;tighttabular&lt;/code&gt; is easy; just define &lt;code&gt;\arraystretch&lt;/code&gt; to zero, locally:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;\newenvironment{tighttabular}{%
  \def\arraystretch{0}%
  \begin{tabular}%
}{%
  \end{tabular}%
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;How do we place material in that box &lt;code&gt;\9&lt;/code&gt; so it comes out with the correct alignment? Actually, it’s not that bad:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;\def\9{%
  \rlap{\smash{\largebox}}%
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;code&gt;\rlap&lt;/code&gt; first removes the horizontal width, and the &lt;code&gt;\smash&lt;/code&gt; removes the vertical height. This is done so that the cell that holds &lt;code&gt;\9&lt;/code&gt; takes up only the same amount of space as the other cells around it. (Otherwise, they would stretch to fit, distorting the size and alignment of the tabular.)&lt;/p&gt;

&lt;p&gt;Finally, what is &lt;code&gt;\1&lt;/code&gt; and how do you get the colours to do that?&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;\def\1{\smallbox}
\def\smallbox{\color{blah!!+}\rule{2cm}{2cm}}
\def\largebox{\scalebox{2}{\smallbox}}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(&lt;code&gt;\scalebox&lt;/code&gt; requires the graphicx package.)
These boxes use the xcolor package’s very convenient ‘colour series’ feature:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;\usepackage{xcolor}
\definecolorseries{blah}{hsb}{step}[hsb]{.5,1,1}{.1,-.05,0}
\resetcolorseries{blah}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And that’s it. Whether you think this whole approach is nice and straightforward or horribly arcane will be somewhat of a personal decision. We’re still awaiting the one tabular package to replace all others in the LaTeX world, although I’m pleased to see recent efforts moving towards providing a complete interface to the different methods supported by the various LaTeX third-party packages in this area.&lt;/p&gt;

&lt;p&gt;(With my LaTeX3 hat on: no, as far as I know we’ve not even begun thinking about how this might be dealt with there. I’m not an expert in this area. Although I will say that I mildly dislike both LaTeX’s &lt;code&gt;&amp;&lt;/code&gt; and ConTeXt’s &lt;code&gt;\bTR&lt;/code&gt;…&lt;code&gt;\eTR&lt;/code&gt; syntax; for me, the former is too close to the metal and the latter too verbose.)&lt;/p&gt;</description><link>http://latex-alive.tumblr.com/post/4181257183</link><guid>http://latex-alive.tumblr.com/post/4181257183</guid><pubDate>Tue, 29 Mar 2011 19:36:56 +1030</pubDate></item><item><title>fontspec missing font error</title><description>&lt;p&gt;The latest version of fontspec now returns proper error messages when a font cannot be found:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
./small.tex:6: 
! fontspec error: "font-not-found"
! 
! The font "Ggeorgia" cannot be found.
! 
! See the fontspec documentation for further information.
! For immediate help type H &amp;lt;return&amp;gt;.
!...............................................  

l.6 \fontspec{Ggeorgia}

? H
|'''''''''''''''''''''''''''''''''''''''''''''''
| A font might not be found for many reasons.
| Check the spelling, where the font is installed etc. etc.
| 
| When in doubt, ask someone for help!
|...............................................
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The wording might not be optimal, but having something to explain what&amp;#8217;s going on here has been missing for a long time!&lt;/p&gt;

&lt;p&gt;The ASCII-art ‘design’ of these error messages comes from work we&amp;#8217;ve been doing in expl3 trying to make the console output a little more attractive. It&amp;#8217;s not an easy job working around TeX&amp;#8217;s idiosyncrasies here, but I&amp;#8217;m quite happy with the final result.&lt;/p&gt;</description><link>http://latex-alive.tumblr.com/post/3537159172</link><guid>http://latex-alive.tumblr.com/post/3537159172</guid><pubDate>Sun, 27 Feb 2011 18:24:24 +1030</pubDate></item><item><title>KenKen in LaTeX etc.</title><description>&lt;p&gt;The latest issue of the PracTeX Journal (discl.: I used to be a production editor there some years back) contains a set of interesting challenges: typeset and &lt;a href="http://tug.org/pracjourn/2010-2/distract.html"&gt;solve a KenKen puzzle&lt;/a&gt;. I haven&amp;#8217;t seen this puzzle before; it looks fun for those of you who like this sort of thing. I encourage all with the time to attempt at least some of the problem—it looks fun!&lt;/p&gt;

&lt;p&gt;In 2008 TPJ issued a similar challenge &lt;a href="http://tug.org/pracjourn/2008-2/distract/"&gt;for Sudoku&lt;/a&gt;. At the time I didn&amp;#8217;t think anyone would implement a complete Sudoku solution in TeX but I was astonished and happily surprised when &lt;em&gt;two&lt;/em&gt; solutions were forthcoming.&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s good to remember that almost anything can be done in TeX macros if one tries hard enough. In this theme, my favourite example of ‘why not?’ when it comes to theoretically-possible but rather-quite-difficult problem solving in TeX is from the late Michael Downes&amp;#8217; series of ‘&lt;a href="http://www.ctan.org/tex-archive/info/challenges/AroBend/"&gt;Around the Bend&lt;/a&gt;’ problems. (Peter Wilson created a wonderfully typeset version available, in a TeX Live distribution at least, via ‘&lt;code&gt;texdoc AroundTheBend&lt;/code&gt;’.) See chapters 10 and 11:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Using as few lines of TeX code as possible, set up an Around the Bend post containing a typical exercise so that it can be processed by plain TeX to (a) skip over the exercise text and (b) decode an embedded encoded answer.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It&amp;#8217;s a fascinating idea to encode and decode text in TeX itself (of course with LuaTeX around now such ‘problems’ are little more than academic); as far as I know, however, such tools were never exploited for robust text passing to/from other formats. (E.g., inside PDF metadata where data should be encoded correctly.)&lt;/p&gt;

&lt;p&gt;And surely everyone reading this has seen David Carlisle&amp;#8217;s &lt;a href="http://www.tug.org/TUGboat/Articles/tb19-4/tb61carl.pdf"&gt;&lt;code&gt;xii.tex&lt;/code&gt;&lt;/a&gt; before, right?&lt;/p&gt;</description><link>http://latex-alive.tumblr.com/post/3458934671</link><guid>http://latex-alive.tumblr.com/post/3458934671</guid><pubDate>Wed, 23 Feb 2011 19:34:33 +1030</pubDate></item><item><title>Trends in recent years for texhax and the Mac OS X TeX mailing...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_lgnhk8jYue1qc4z2lo1_400.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;em&gt;Trends in recent years for texhax and the Mac OS X TeX mailing lists. And a comparison with tex.stackexchange.com.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://weblog.elzevir.fr/"&gt;Manuel Pégourié-Gonnard&lt;/a&gt; asked whether I’d looked at the number of posts to the &lt;a href="http://tug.org/mailman/listinfo/texhax"&gt;texhax mailing list&lt;/a&gt; when I posted last night about traffic to comp.text.tex. I had considered it, but I ran out of time, then, to scrape the data from the online archives. See above for the newly-gleaned information.&lt;/p&gt;

&lt;p&gt;Interesting enough (and perhaps gratifying) to see that texhax traffic has remained constant over the last eight years; the mailing list itself dates back to 1986 but only recent years were available for my primitive data-analysis skills.&lt;/p&gt;

&lt;p&gt;I’ve also included the data for the &lt;a href="http://mactex-wiki.tug.org/wiki/index.php?title=TeX_on_Mac_OS_X_mailing_list"&gt;TeX on Mac OS X&lt;/a&gt; mailing list, and there the results are a little more noisy. (Note even three months with greater than 1000 posts per month!) The drop-off in 2007 is interesting, because it correlates with &lt;a href="http://www.tug.org/twg/mactex/award/2007/gerben/aboutgwtex.html"&gt;the switch&lt;/a&gt; from Gerben Wierda’s ‘gwTeX’ distribution to TeX Live as the basis for MacTeX. Gerben’s work in the 2000s was fantastic, and TeX on the Mac would not have thrived as it did without him—but the move to a centralised TeX Live seems to have been the right choice at that time. (Gerben provided the initial support for TeX Live on the Mac, so his work lives on.)&lt;/p&gt;

&lt;p&gt;Since 2007 the data for the Mac OS X TeX mailing list is pretty much constant, tracking slightly above texhax in terms of number of posts per month.&lt;/p&gt;

&lt;hr&gt;&lt;p&gt;I also mentioned yesterday that I think a fair chunk of the traffic to comp.text.tex may have moved to tex.stackexchange.com. The ‘tex.se’ Q&amp;A site officially launched three months ago after a three month beta period. At that time, the site had on average 12.7 questions per day with 2.4 answers being given per question (numbers from &lt;a href="http://area51.stackexchange.com/proposals/2148/tex-latex-and-friends"&gt;area51&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Three months later, being now, the site &lt;a href="http://stackexchange.com/sites?expand=true"&gt;receives&lt;/a&gt; 24 questions per day, and the answer ratio is slightly lower at 2.1 answers per question.&lt;/p&gt;

&lt;p&gt;In total, the site currently contains some 3400 questions and 7200 answers: the equivalent of around 1700 ‘posts’ per month (I don’t have exactly numbers to the day for how long it’s been operating). And this rate seems to be increasing, although two data-points is hardly a trend.&lt;/p&gt;

&lt;p&gt;Compared to the traffic for comp.text.tex and the mailing lists I’ve shown above, I don’t think you can argue that tex.se is now playing a very important role for TeX support.&lt;/p&gt;</description><link>http://latex-alive.tumblr.com/post/3306843451</link><guid>http://latex-alive.tumblr.com/post/3306843451</guid><pubDate>Tue, 15 Feb 2011 19:13:21 +1030</pubDate></item><item><title>With new LaTeX sites around nowadays such as...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_lgm2nxMle21qc4z2lo1_400.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;With new LaTeX sites around nowadays such as tex.stackexchange.com and latex-community.org, it seems that the &lt;a href="https://groups.google.com/group/comp.text.tex/topics?hl=en"&gt;comp.text.tex newsgroup&lt;/a&gt;, the mainstay of the TeX support world, is in decline.&lt;/p&gt;

&lt;p&gt;Newsgroups in 2011 are an anachronism from the younger days of the internet, and access to them is rather more limited than it used to be. Google provides a web interface to them through Google Groups but in recent years it’s slowly been more and more spam-afflicted.&lt;/p&gt;

&lt;p&gt;Is this a indication, perhaps, that TeX use itself is diminishing? I don’t think you can really argue this, as posts on c.t.t. hardly reflect consistent usage numbers over time—if newcomers to TeX and friends find Q&amp;A sites like Stack Exchange I think they’ll be far less likely to want to use Google Groups, which is far more clunky with a poorer signal-to-noise ratio.&lt;/p&gt;

&lt;p&gt;But it’s still a shame (or perhaps just a nostalgic twinge) to see a community in decline, even while new ones are coming into being. Despite this, the c.t.t. archives are full of valuable information, and even if new postings diminish the group will live on as a historical record of helpful answers. When in doubt, &lt;a href="https://groups.google.com/group/comp.text.tex/search?hl=en&amp;group=comp.text.tex&amp;q=TeX+pearls&amp;qt_g=Search+this+group"&gt;search&lt;/a&gt;!&lt;/p&gt;</description><link>http://latex-alive.tumblr.com/post/3291766519</link><guid>http://latex-alive.tumblr.com/post/3291766519</guid><pubDate>Tue, 15 Feb 2011 04:53:58 +1030</pubDate></item><item><title>Delayed active characters</title><description>&lt;p&gt;Funny problem in mathtools vs. francais babel. (Only a coincidence that I&amp;#8217;m debugging two babel problems back-to-back.)&lt;/p&gt;

&lt;p&gt;Morten Høgholm&amp;#8217;s mathtools package has an option to turn the colon into an active character so that writing &lt;code&gt;:=&lt;/code&gt; produces a colon-equals sign with a correctly centred colon. (Unicode mathematics provides a specific character for this symbol but the input shorthand is still a convenience.)&lt;/p&gt;

&lt;p&gt;But babel&amp;#8217;s French module also has a feature with an active colon, and although both mathtools and babel can be otherwise used together without problem, these two features cannot both be active simultaneously. This is a documented problem, and a workaround requires changes to babel to allow hooks into its active characters. (Not going to happen any time soon, in other words.)&lt;/p&gt;

&lt;p&gt;Despite the documented incompatibility, there was still something breaking when both packages were loaded, and even when the centred-colon feature was never activated. Turns out we were lazy in mathtools. (To be fair, this portion of the code originated in the depths of time on comp.text.tex.)&lt;/p&gt;

&lt;p&gt;Active characters are interesting because they can be switched on and off by changing their catcode, and they remember their meaning the whole time. In mathtools, we were taking advantage of this by writing something like&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;\begingroup
  \catcode`\:=\active
  \gdef:\fancycolon % not the actual defn.
\endgroup
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and in the mathtools option processing, all we had to do to activate the centred-colon feature was to execute&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;\catcode`\:=\active
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and our previously saved definition automatically takes into effect.&lt;/p&gt;

&lt;p&gt;Unfortunately, this is a rather inconsiderate way to do things, because it doesn&amp;#8217;t take into account the fact that other people (in this case babel) might also want to assign the colon an active meaning. If mathtools is loaded after babel, then the colon is overwritten even though the centred-colon feature is never activated!&lt;/p&gt;

&lt;p&gt;There are a few ways that both mathtools and babel could behaviour more sensibly here. But when dealing with catcodes, such clashes are inevitable since there are so few ASCII characters and we always want to simplify the way we write our documents.&lt;/p&gt;</description><link>http://latex-alive.tumblr.com/post/3248199551</link><guid>http://latex-alive.tumblr.com/post/3248199551</guid><pubDate>Sat, 12 Feb 2011 17:51:00 +1030</pubDate></item><item><title>TeX’s font-loading optimisation</title><description>&lt;p&gt;A user of Peter Wilson’s &lt;code&gt;fonttable&lt;/code&gt; package reported an interesting bug in the interaction between it and the Spanish module (if not others) of &lt;code&gt;babel&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Here’s the problem in a nutshell:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;\documentclass{article}
\usepackage[spanish]{babel}
\begin{document}
$\lim x_n$
{\font\x=cmr10\x hello}
$\lim x_n$
\end{document}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Can you see the problem? It certainly wasn’t immediately obvious to me.&lt;/p&gt;

&lt;p&gt;I probably wouldn’t have had time to work through the problem (after all, it’s clearly &lt;code&gt;babel&lt;/code&gt;’s problem, not &lt;code&gt;fonttable&lt;/code&gt;’s) but the user that reported the problem had also tracked down the root of it already (thanks!). In Spanish, the maths operator &lt;code&gt;\lim&lt;/code&gt; is written as ‘lím’, which requires the use (in 8-bit LaTeX) of an acute accent combined with a dotless ‘i’. And inside the definition for &lt;code&gt;\dotlessi&lt;/code&gt; in &lt;code&gt;babel&lt;/code&gt;’s Spanish module, you’ll find&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;\expandafter\expandafter\expandafter
\split@name\expandafter\string\the\textfont\mathgroup\@nil
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Note the &lt;code&gt;\split@name&lt;/code&gt; command, which  takes an NFSS font name such as &lt;code&gt;OT1/cmr10/m/n/10&lt;/code&gt; and split it into its components (resp.: encoding, family, series, shape, size). It’s operating on &lt;code&gt;\the\textfont\mathgroup&lt;/code&gt; there, and this is where the problem comes from.&lt;/p&gt;

&lt;p&gt;By default in a 10pt LaTeX document, &lt;code&gt;\textfont&lt;/code&gt; is defined as &lt;code&gt;OT1/cmr10/m/n/10&lt;/code&gt;. 
In pseudocode, LaTeX originally calls something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;\font \OT1/cmr10/m/n/10 = cmr10 at 10pt
\textfont\fam=\OT1/cmr10/m/n/10
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(This would not execute without ‘&lt;code&gt;/&lt;/code&gt;’ having &lt;code&gt;\catcode&lt;/code&gt; ‘letter’.) The problem comes in when someone comes along and writes something like&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;\font\x=cmr10 at 10pt
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Because TeX does not want to load the same font more than once, it optimises its references to font names to point to the last name a specific font was requested with (here ‘font’ means ‘font face + size’).&lt;/p&gt;

&lt;p&gt;At this point, the &lt;code&gt;\textfont&lt;/code&gt; now points to &lt;code&gt;\x&lt;/code&gt; instead of &lt;code&gt;\OT1/cmr10/m/n/10&lt;/code&gt;, which causes &lt;code&gt;\split@name&lt;/code&gt; to break pretty spectacularly. And this even happens if the font loading happens inside a group:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;\font\1=cmr10 at 9pt
{\font\2=cmr10 at 9pt}
\textfont\fam=\1
\showthe\textfont\fam
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The above code returns ‘&lt;code&gt;\2&lt;/code&gt;’, quite unintuitively. So what can be done about this problem? Let’s assume for now that we can’t change how &lt;code&gt;babel&lt;/code&gt; does things (I don’t know the practicality of that in any event).&lt;/p&gt;

&lt;p&gt;One way to avoid this problem occurring might be to dynamically check the current ‘values’ of &lt;code&gt;\textfont&lt;/code&gt;, &lt;code&gt;\scriptfont&lt;/code&gt;, etc., and then not reload the same font under a different name if it’s the same as the font you would like to load. This could be implemented in a wrapper around &lt;code&gt;\font&lt;/code&gt; like &lt;code&gt;\newcommand&lt;/code&gt; is around &lt;code&gt;\def&lt;/code&gt;, and this might be something we look into for &lt;code&gt;expl3&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A less general solution is to simply load the new font like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;\font\x=cmr10 at 9.9999pt
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Because the font is technically at a different size (although the difference is imperceptible), TeX considers it a separate font and will no longer replace its old pointer to &lt;code&gt;\OT1/cmr10/m/n/10&lt;/code&gt; with &lt;code&gt;\x&lt;/code&gt;. (I also perform this trick in &lt;code&gt;unicode-math&lt;/code&gt; to load the same font with different &lt;code&gt;\fontdimen&lt;/code&gt;s for assigning to different math groups.)&lt;/p&gt;

&lt;p&gt;This is certainly less robust than an explicit check, and will not always be an acceptable solution, but it’s simple to implement in &lt;code&gt;fonttable&lt;/code&gt; and serves its purpose there quite well.&lt;/p&gt;

&lt;p&gt;In conclusion, due to this fragility in &lt;code&gt;babel&lt;/code&gt; (I don&amp;#8217;t know if it&amp;#8217;s the Spanish module only but it seems likely the problem could occur elsewhere), be careful loading certain fonts with &lt;code&gt;\font&lt;/code&gt; unless you are confident it won’t also be used as a maths font. If possible, use the LaTeX font loading interface instead.&lt;/p&gt;</description><link>http://latex-alive.tumblr.com/post/3229118083</link><guid>http://latex-alive.tumblr.com/post/3229118083</guid><pubDate>Fri, 11 Feb 2011 15:18:00 +1030</pubDate></item><item><title>Callbacks in LuaTeX</title><description>&lt;p&gt;You often hear the term “callbacks” bandied about when reading about new functionality offered by LuaTeX. Callbacks offer powerful functionality, but they don’t have pithy explanation that can easily explain why they’re so useful.&lt;/p&gt;

&lt;p&gt;Paul Isambert has written a great example of using callbacks on comp.text.tex, his post prompted by Dan Luecking’s plea:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;What is a callback? And don’t tell me to read the manual: 
it has over 100 instances of the word callback and I gave 
up trying to find out what they are after examining the 
first 50 or so instances. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Paul’s reply is &lt;a href="http://groups.google.com.au/group/comp.text.tex/msg/62205ab5d302e11f"&gt;here&lt;/a&gt;; he hints at an upcoming &lt;a href="http://tug.org/TUGboat/"&gt;TUGboat&lt;/a&gt; article going into more detail (don’t have a TUG subscription? You should: it’s cheap and furthers the development of TeX and friends), but here’s his opening explanation:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;[A] callback is a point where you can interrupt TeX’s 
normal operations, and throw in some (Lua) code of your own. There are 
many such points, for many different operations: managing the input 
buffer, reading a file, loading a font, building a paragraph, etc. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;His example then shows a short way to do in LuaTeX what requires rather more fragile and tricky code in regular TeX. Good stuff.&lt;/p&gt;</description><link>http://latex-alive.tumblr.com/post/1379738847</link><guid>http://latex-alive.tumblr.com/post/1379738847</guid><pubDate>Sat, 23 Oct 2010 19:33:55 +1030</pubDate></item><item><title>The asymptote LaTeX package</title><description>&lt;p&gt;John Bowman has just announced &lt;a href="http://sourceforge.net/projects/asymptote/forums/forum/409349/topic/3901078"&gt;version 2.05 of Asymptote&lt;/a&gt;, a 3D programmatic drawing package that uses TeX for typesetting its labels. Asymptote is unique in its ability to generate 3D graphics that can be rotated and zoomed within Adobe Reader, allowing far more interactive graphics for scientific documents.&lt;/p&gt;

&lt;p&gt;John has written several TUG papers on Asymptote over the last few years; the latest was for the &lt;a href="http://tug.org/TUGboat/Contents/contents31-2.html"&gt;TUG 2010 conference&lt;/a&gt; held earlier this year in San Francisco (the video of John&amp;#8217;s presentation is available on &lt;a href="http://river-valley.tv/interactive-tex-aware-3d-vector-graphics/"&gt;River Valley TV&lt;/a&gt;). I had the great pleasure of meeting John at the conference; amongst other things we discussed some improvements I had in mind for the LaTeX package for including Asymptote graphics within a document.&lt;/p&gt;

&lt;p&gt;After the conference I foolishly went over the package and re-wrote much of it in the DocStrip format to better document the internal behaviour of the code. Unfortunately—hence the ‘foolishly’—many bugs were introduced in the process when my new code smoothed over edge cases that it shouldn&amp;#8217;t have—but it&amp;#8217;s now finally working and included in the main Asymptote distribution. The package source is now more modern and better documented (available in the file &lt;code&gt;doc/asy-latex.dtx&lt;/code&gt; in the Asymptote distribution), which should help with maintenance in the long run.&lt;/p&gt;

&lt;p&gt;The main reason for the re-write was to add the feature to be able to include graphics defined in external files; before, graphics had to be included inline in the form&lt;/p&gt;

&lt;p&gt;&lt;code&gt;\begin{asy}&lt;/code&gt;&lt;br/&gt;
    &lt;em&gt;asy graphics code&lt;/em&gt;&lt;br/&gt;&lt;code&gt;\end{asy}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The new version of &lt;code&gt;asymptote.sty&lt;/code&gt; allows you to write&lt;/p&gt;

&lt;p&gt;&lt;code&gt;\asyinclude{&lt;/code&gt;&lt;em&gt;myfig.asy&lt;/em&gt;&lt;code&gt;}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;where the &lt;em&gt;asy graphics code&lt;/em&gt; is now placed in the file &lt;em&gt;myfig.asy&lt;/em&gt;. This can be useful when you wish to re-use an Asymptote graphic between multiple files or if you just like to keep your document source as minimal as possible.&lt;/p&gt;

&lt;p&gt;Thanks to John for his patience in testing the packages as bugs were fixed and yet more bugs were discovered. It&amp;#8217;s been great to work together.&lt;/p&gt;</description><link>http://latex-alive.tumblr.com/post/1343206529</link><guid>http://latex-alive.tumblr.com/post/1343206529</guid><pubDate>Mon, 18 Oct 2010 21:28:36 +1030</pubDate></item><item><title>A little bit of TLContrib</title><description>&lt;p&gt;The indefatigable Taco Hoekwater &lt;a href="http://www.bittext.nl/node/7"&gt;has released&lt;/a&gt; a new project called &amp;#8220;&lt;a href="http://tlcontrib.metatex.org/"&gt;TLContrib&lt;/a&gt;&amp;#8221;, which is an orthogonal package hosting site for TeX Live installations. It does not mirror TeX Live, but consists of a place to distribute material that is otherwise unsuitable for the main TeX Live tree: namely, non-free material, binary updates, and pre-release updates. For example:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Non-free material: &lt;a href="http://www.ntg.nl/maps/34/11.pdf"&gt;cowfont&lt;/a&gt; (pdf link)&lt;/li&gt;
&lt;li&gt;Binary updates: LuaTeX, MetaPost&lt;/li&gt;
&lt;li&gt;Pre-releases: siunitx, fontspec&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;TLContrib is ready to be used by any users of TeX Live 2010; no extra software needs to be installed nor extra configuration performed.&lt;/p&gt;

&lt;p&gt;Joseph Wright has already &lt;a href="http://www.texdev.net/2010/10/09/tex-live-packaging-expands/"&gt;commented&lt;/a&gt; on this new repository and has taken advantage of TLContrib for providing &lt;a href="http://www.texdev.net/2010/10/12/testing-versions-of-siunitx-v2-1-on-tlcontrib/"&gt;testing releases&lt;/a&gt; for siunitx. I&amp;#8217;m currently experimenting with the same idea for fontspec.&lt;/p&gt;

&lt;p&gt;While users until now have been able to grab pre-release versions of siunitx and fontspec from &lt;a href="http://bitbucket.org/josephwright/siunitx"&gt;Bitbucket&lt;/a&gt; and &lt;a href="http://github.com/wspr/fontspec/"&gt;Github&lt;/a&gt;, the nice thing about using TLContrib is that you can use standard TeX Live tools to do the updates.&lt;/p&gt;

&lt;h2&gt;TLContrib as a user&lt;/h2&gt;

&lt;p&gt;Here&amp;#8217;s how it&amp;#8217;s all done as a user. First define an alias to make things easier to remember; put this into your &lt;code&gt;.bash_profile&lt;/code&gt; or equivalent:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;alias tlc="tlmgr --repository &lt;a href="http://tlcontrib.metatex.org/2010"&gt;http://tlcontrib.metatex.org/2010&lt;/a&gt;"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can now view what is available in the TLContrib repository with standard &lt;code&gt;tlmgr&lt;/code&gt; commands such as&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;tlc list
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;to see what is currently available for installation. Packages can be updated to their pre-release versions by typing, say,&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;tlc update siunitx
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and if an update performed in this way ‘goes bad’ and you&amp;#8217;d like to revert to the official release, execute&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;tlmgr install fontspec --reinstall
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and things will be back to normal.&lt;/p&gt;

&lt;h2&gt;TLContrib as a package author&lt;/h2&gt;

&lt;p&gt;As a package author, what I really like about TLContrib is the automated upload process—it&amp;#8217;s a very friction-free way to push out quick updates to users. It works by only accepting the very rigid directory structure via which the package is installed into a &lt;code&gt;texmf&lt;/code&gt; directory on installation. No human verification of the package contents is performed, so updates are very fast (a delay of at most one hour).&lt;/p&gt;

&lt;p&gt;(Updates can even be slurped in from an online SVN repository, but I&amp;#8217;m not sure how that would typically work for a LaTeX package that would typically not be kept in a &lt;code&gt;texmf&lt;/code&gt; directory structure for development.)&lt;/p&gt;

&lt;p&gt;In contrast, material submitted to CTAN must be manually processed for addition to TeX Live so that real humans can check to verify correctness and consistency of installation, and to ensure that the material is legally allowed to be included in the distribution, which is free in a very strict sense. It will be great to be able to iterate package development quickly, when necessary, through TLContrib while sending stable releases to CTAN and TeX Live.&lt;/p&gt;</description><link>http://latex-alive.tumblr.com/post/1303450459</link><guid>http://latex-alive.tumblr.com/post/1303450459</guid><pubDate>Wed, 13 Oct 2010 13:52:19 +1030</pubDate></item><item><title>Improving documentation through the community</title><description>&lt;p&gt;While I&amp;#8217;m technically spending as little time as possible on TeX development at the moment, I&amp;#8217;m still keeping an eye on things around the place. (In some cases, having to fix bugs comes as a rather time-critical priority now that users are updating very frequently with tools such as &lt;code&gt;tlmgr&lt;/code&gt; or MacTeX&amp;#8217;s ‘TeX Live Utility’.)&lt;/p&gt;

&lt;p&gt;Over on the TeX branch of Stack Exchange (still yet to be named, although I favour ‘overfull-hbox.com’), I&amp;#8217;m currently experimenting with a way to replace my current lack of attention on my documentation with community-contributed material.&lt;/p&gt;

&lt;p&gt;The background to this is that LuaTeX&amp;#8217;s font loading through &lt;code&gt;luaotfload&lt;/code&gt; allows OpenType fonts to be augmented at load time with new features and updated information such as kerning. I&amp;#8217;d love to be able to document this feature properly in fontspec, but the problem is that I don&amp;#8217;t have time to learn about it and write it up in the detail that it deserves. So I&amp;#8217;ve opened up a question on StackExchange asking how to do this (&lt;a href="http://tex.stackexchange.com/q/3602/179"&gt;‘changing kerning of a font in LuaLaTeX’&lt;/a&gt;) with the request that the answer come in the form of a patch to the fontspec manual.&lt;/p&gt;

&lt;p&gt;I don&amp;#8217;t know if anyone&amp;#8217;s going to reply, but there&amp;#8217;s a bounty of 400 reputation points going for it if anyone does. (You get 10 reputation points for each upvote on a question or answer you post on the site). The reputation system is an indicator of your participation on the site, so the reward is essentially just good karma — but I hope this can perhaps be a useful way to muster the community so that users who otherwise might not be able to contribute with the code can still help out with the non-technical aspects of putting together a package. You&amp;#8217;d be surprised how long it takes to write good documentation!&lt;/p&gt;</description><link>http://latex-alive.tumblr.com/post/1239466142</link><guid>http://latex-alive.tumblr.com/post/1239466142</guid><pubDate>Mon, 04 Oct 2010 11:57:42 +1030</pubDate></item><item><title>Hiatus</title><description>&lt;p&gt;Those of you who have been following my activity for the last few years will recall my frequent comments &amp;#8220;the thesis is almost done&amp;#8221; — for the last several years. Well, has it been? All that time?&lt;/p&gt;

&lt;p&gt;The past year has been a combination of too many mini-projects for me: code and papers for my PhD; fontspec and unicode-math in XeLaTeX and LuaLaTeX; the Herries Press collection of packages; the continued development of LaTeX3; teaching and lecturing; and more besides. My responsibilities seem to be compounding rather than settling down. My actual thesis has seen far less attention than it should have.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&amp;#8220;Why, I feel all thin, sort of &lt;em&gt;stretched&lt;/em&gt;, if you know what I mean: like butter that has been scraped over too much bread. That can&amp;#8217;t be right. I need a change, or something.&amp;#8221;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I wish it didn&amp;#8217;t have to come to this, but as of today I&amp;#8217;m not going to be able to devote any significant time to the LaTeX world until my thesis is complete. I&amp;#8217;ll still be answering support emails when I can, and I&amp;#8217;ll release bug fixes for urgent problems, but don&amp;#8217;t expect to hear too much from me for the next six months.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m sorry to let down those with whom I&amp;#8217;m working fairly closely on a couple of different things. Rest assured I&amp;#8217;ll be back and able to spend some real time on everything once I&amp;#8217;ve got the monkey off my back.&lt;/p&gt;</description><link>http://latex-alive.tumblr.com/post/901501691</link><guid>http://latex-alive.tumblr.com/post/901501691</guid><pubDate>Wed, 04 Aug 2010 14:40:00 +0930</pubDate></item><item><title>Correct punctuation spaces</title><description>&lt;p&gt;Who can remember when to use &lt;code&gt;\@&lt;/code&gt; in a (La)TeX document? I thought I knew, but an exception caught me by surprise today.&lt;/p&gt;

&lt;p&gt;In approximate detail, the idea of &lt;code&gt;\@&lt;/code&gt; is to indicate when punctuation is or isn&amp;#8217;t ending a sentence. Why would you want to do that? By default, Plain TeX and LaTeX both have a feature whereby a little extra space is allowed after a sentence (whether a period or other punctuation mark) to help break the paragraph into lines. If you need a little extra space in this line, better to lump it after the period than add extra space between all the words.&lt;/p&gt;

&lt;p&gt;This typesetting approach was very common (often to an exaggerated extent) in the 1800s and early 1900s but nowadays I think is less common. If you don&amp;#8217;t like it, write &lt;code&gt;\frenchspacing&lt;/code&gt; in your preamble and you can forget about whether &lt;code&gt;\@&lt;/code&gt; is ever required. However, when writing a LaTeX document for another source, such as a journal, it&amp;#8217;s polite to follow their style and include such niceties.&lt;/p&gt;

&lt;p&gt;The canonical example for using &lt;code&gt;\@&lt;/code&gt; is after abbreviations such as ‘&lt;code&gt;Prof.\@ Crumb&lt;/code&gt;’. Without the &lt;code&gt;\@&lt;/code&gt;, the space after ‘Prof.’ will be mistakenly enlarged—this is a common typographical mistake in (La)TeX documents.&lt;/p&gt;

&lt;p&gt;Conversely, &lt;code&gt;\@&lt;/code&gt; can also be used to indicate when a punctuation mark &lt;em&gt;should&lt;/em&gt; end a sentence. By default, punctuation after a capital letter is assumed not to end a sentence (so you can write ‘&lt;code&gt;M. C. Escher&lt;/code&gt;’ without the &lt;code&gt;\@&lt;/code&gt;). But if you happened to refer to someone by their initial at the end of a sentence you&amp;#8217;d need to write, say,&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;… `So he did', said M\@.  (New sentence) …
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;to ensure that the extra spacing &lt;em&gt;was&lt;/em&gt; included after that final period.&lt;/p&gt;

&lt;p&gt;I should also mention that I often don&amp;#8217;t use &lt;code&gt;\@&lt;/code&gt; after punctuation in favour of typing an explicit space control sequence; that is, I prefer to write &lt;code&gt;Prof.\ Crumb&lt;/code&gt;. This is shorter to type and perhaps more memorable.&lt;/p&gt;

&lt;p&gt;Well, that&amp;#8217;s where the limits of my understanding finished until today. And then I wrote something like&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;depending on the context of `a' and `b' (etc.) where …
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Much to my surprise, the space after the ‘&lt;code&gt;(etc.)&lt;/code&gt;’ was too large! Turns out that the space factor (which is the parameter governing when and where this extra space should appear) isn&amp;#8217;t ‘reset’ by the parenthesis and you need to write &lt;code&gt;(etc.\@)&lt;/code&gt; instead.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: Karl Berry gives another example:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;… `Et cetera et cetera etc.' said the King …
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here, there will be extra space after the closing quotes &lt;code&gt;'&lt;/code&gt; (or &lt;code&gt;''&lt;/code&gt;) that is incorrectly added due to the presence of the period; the closing bracket &lt;code&gt;]&lt;/code&gt; is also ‘invisible’ to the space factor. His take on the matter:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Fixing end-of-sentence spacing (in one direction or the other) is one of the most common things we have to with TUGboat submissions.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;End update&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The best idea in a case like this is to define a macro for inserting it all without your having to remember it; for example,&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;\makeatletter
\newcommand\etc{etc\@ifnextchar.{}{.\@}}
\makeatother
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;where you would write ‘&lt;code&gt;(\etc)&lt;/code&gt;’ or ‘&lt;code&gt;…, \etc, …&lt;/code&gt;’ but if you wanted to finish a sentence with it, you would explicitly include the period:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;… \etc. (New sentence) …
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I&amp;#8217;m continually learning about small details like this even though I&amp;#8217;ve been using TeX and friends quite closely for a number of years. It&amp;#8217;s important to keep one&amp;#8217;s eyes open.&lt;/p&gt;</description><link>http://latex-alive.tumblr.com/post/827168808</link><guid>http://latex-alive.tumblr.com/post/827168808</guid><pubDate>Sun, 18 Jul 2010 18:23:00 +0930</pubDate></item></channel></rss>
