<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Excursus &#187; XeTeX</title>
	<atom:link href="http://markelikalderon.com/category/xetex/feed/" rel="self" type="application/rss+xml" />
	<link>http://markelikalderon.com</link>
	<description>Philosophy and Text</description>
	<lastBuildDate>Tue, 27 Dec 2011 23:01:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>SyncTeX: Why it Matters</title>
		<link>http://markelikalderon.com/2008/09/11/synctex-why-it-matters/</link>
		<comments>http://markelikalderon.com/2008/09/11/synctex-why-it-matters/#comments</comments>
		<pubDate>Thu, 11 Sep 2008 01:07:48 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[XeTeX]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2008/09/11/synctex-why-it-matters/</guid>
		<description><![CDATA[One of the features of MacTeX 2008 that I was looking forward to was its inclusion of SyncTeX, Jerome Laurens replacement for pdfsync. There are two ways to call SyncTeX, from the command line and in source. From the command line simply use the argument -synctex=1, and from source include \synctex=1 in the preamble. The [...]]]></description>
			<content:encoded><![CDATA[<p>One of the features of MacTeX 2008 that I was looking forward to was its inclusion of <a href="http://itexmac.sourceforge.net/SyncTeX.html">SyncTeX</a>, Jerome Laurens replacement for pdfsync.</p>

<p>There are two ways to call SyncTeX, from the command line and in source. From the command line simply use the argument <code>-synctex=1</code>, and from source include <code>\synctex=1</code> in the preamble. The former may be preferable if you want to distribute your LaTeX source&#8212;that way it will run without errors even by those whose TeX distributions do not include SyncTeX support.</p>

<p>Here is how synchronization worked with pdfsync. A word in your source is associated with a file name and a line number where it occurs. The file name and line number together constituted the input record. That same word as it occurs in the pdf generated from the source is associated with a page number and a location on that page. Together these constituted the output record. Synchronization was achieved by linking the input record with the output record. Moreover this was done by assigning each of these records with a unique tag. This was necessary since while the TeX engine will place a word in the source on some page in the generated pdf and on some location on that page, by the time it has done this, it has &#8220;forgotten&#8221; the file name and line number. Unique tags were thus required to preserve this information for synchronization. These tags were stored in special data nodes in every pargraph, math display, etc.</p>

<p>There were three problems, however, with this synchronization solution:</p>

<ol>
<li>The data nodes used by pdfsync could interfere with TeX&#8217;s line breaking mechanism and thus affect the layout of the page.</li>
<li>pdfsync was incompatible with certain LaTeX packages. While some could be rewritten to accommodate pdfsync, others could not.</li>
<li>The mapping from the input record to the output record was not one-one, but one-many. So developers of pdf viewers supporting pdfsync had to choose the right mapping from the input record to the output record, and this was not always easy to do.</li>
</ol>

<p>Instead of using special data notes, SyncTeX exploits kern nodes and glue nodes that are determined early on in TeX&#8217;s processing of the source to track the location of a word in the pdf output.</p>

<p>Another advantage of SyncTeX over pdfsync is that SyncTeX also supports dvi and xdv outputs (not that useful for me, but your situation may differ).</p>

<p>The TeXLive distribution, which MacTeX is built upon, is the first implementation of SyncTeX, and both PdfTeX and XeTeX in TeXLive now have SyncTeX support embedded deep within these TeX engines.</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2008/09/11/synctex-why-it-matters/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>MacTeX 2008</title>
		<link>http://markelikalderon.com/2008/09/01/mactex-2008/</link>
		<comments>http://markelikalderon.com/2008/09/01/mactex-2008/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 12:10:46 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[TeX]]></category>
		<category><![CDATA[XeTeX]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/?p=526</guid>
		<description><![CDATA[MacTeX 2008 has just been released. Here are some of the new features: Packages in TeX Live 2008 can be updated over the internet. This is a major advance in the distribution. See documentation about the TeX Live Manager for details, and read the tlmgr man page. Additional documentation for the Mac is forthcoming; see [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.tug.org/mactex/2008/">MacTeX 2008</a> has just been released. Here are some of the new features:</p>

<ul>
<li>Packages in TeX Live 2008 can be updated over the internet. This is a major advance in the distribution. See documentation about the TeX Live Manager for details, and read the tlmgr man page. Additional documentation for the Mac is forthcoming; see the final paragraph of the previous section.</li>
<li>Donald Knuth updates the TeX once every five or six years, fixing bugs that have accumulated over that time. This is an update year; TeX now has version number 3.1415926.</li>
<li>pdfTeX has been updated to version 3.1415926-1.40.9.</li>
<li>XeTeX has been updated to version 3.1415926-2.2-0.999.6; by default the program now uses the xdvipdfmx driver.</li>
<li>luaTeX is in TeX Live 2008; this is a beta release of a program intended to eventually replace pdftex. To use the program, call it using one of the following commands: luatex, pdfluatex, lualatex, pdflualatex.</li>
<li>Jerome Laurens&#8217; new SyncTeX is included. This software causes pdfTeX, pdfeTeX, and XeTeX to output a &#8220;synctex&#8221; file during typesetting containing information to synchronize the source input and pdf output of a TeX run. In modern TeX distributions, pdfeTeX is used for almost all typesetting, since LaTeX and other engines are symbolically linked to that program, so SyncTeX is available for most typesetting jobs.</li>
</ul>

<p>I have been waiting for this, not least because I want to dump pdfsync in favor of SyncTeX. However, the link to the zip file gives the following error <code>“unknown error” (NSURLErrorDomain:-1)</code>. :( Hopefully this will be fixed soon.</p>

<p><strong>Update</strong>: The MacTeX link is now live. I am downloading it now. \o/</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2008/09/01/mactex-2008/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Lowering the Entry Barrier to the TeX World</title>
		<link>http://markelikalderon.com/2008/07/14/lowering-the-entry-barrier-to-the-tex-world/</link>
		<comments>http://markelikalderon.com/2008/07/14/lowering-the-entry-barrier-to-the-tex-world/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 22:43:42 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[XeTeX]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2008/07/14/lowering-the-entry-barrier-to-the-tex-world/</guid>
		<description><![CDATA[When I first made the switch from Word to LaTeX, I felt the need for a dedicated LaTeX editor to provide help and guidance. Fortunately for OS X users, there is Dick Koch&#8217;s TeXShop. I was lucky. It did just what I expected and it comfortably eased me into the world of TeX. I no [...]]]></description>
			<content:encoded><![CDATA[<p>When I first made the switch from Word to LaTeX, I felt the need for a dedicated LaTeX editor to provide help and guidance. Fortunately for OS X users, there is <a href="http://www.uoregon.edu/~koch/" title="Richard Koch Home Page">Dick Koch</a>&#8217;s <a href="http://www.uoregon.edu/~koch/texshop/" title="TeXShop">TeXShop</a>. I was lucky. It did just what I expected and it comfortably eased me into the world of TeX. I no longer use TeXShop because:</p>

<ol>
<li>I use a text editor for a number of other tasks (including but not limited to keeping my calendar with <a href="http://www.roaringpenguin.com/products/remind" title="Remind | Roaring Penguin">Remind</a>, keeping notes in <a href="http://daringfireball.net/projects/markdown/" title="Daring Fireball: Markdown">Markdown</a>, constructing to do lists&#8230;) and felt it would be counterproductive to proliferate editors when all of these tasks are text based.</li>
<li>Relatedly, as I was worked increasingly with text files, I found the need for advanced text editing features not found in TeXShop.</li>
</ol>

<p>Still, I would unhesitantly recommend TeXShop to any one new to TeX on OS X, and many much more proficient TeXnicians than I use TeXShop on a daily basis.</p>

<p>There are dedicated LaTeX editors on other platforms, but none are configured the way TeXShop is. (The LaTeX editors available for Windows that I have seen makes me weep.) <a href="http://www.tug.org/interviews/interview-files/jonathan-kew.html" title="Jonathan Kew - Interview - TeX Users Group">Jonathan Kew</a>, the developer of <a href="http://scripts.sil.org/xetex" title="The XeTeX typesetting system">XeTeX</a>, hopes to correct this situation with <a href="http://tug.org/texworks/">TeXWorks</a>:</p>

<blockquote>
  <p>The TeXworks project is an effort to build a simple TeX front-end program (working environment) that will be available for all today’s major desktop operating systems—in particular, MS Windows (XP and Vista), typical GNU/Linux distros and other X11-based systems, and Mac OS X. It is deliberately modeled on Dick Koch’s award-winning TeXShop for Mac OS X, which is credited with a resurgence of TeX usage on the Mac platform.</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2008/07/14/lowering-the-entry-barrier-to-the-tex-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running VC</title>
		<link>http://markelikalderon.com/2008/03/23/running-vc/</link>
		<comments>http://markelikalderon.com/2008/03/23/running-vc/#comments</comments>
		<pubDate>Sun, 23 Mar 2008 00:13:31 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[XeTeX]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2008/03/23/running-vc/</guid>
		<description><![CDATA[After posting about the version control bundle, I gave it a test spin. The version control bundle requires GNU awk. If gawk is not installed on your *nix system, this script will do it for you: #!/bin/sh # # installgawk.sh # # A bash script to install the latest version of GNU awk. Be sure [...]]]></description>
			<content:encoded><![CDATA[<p>After <a href="http://markelikalderon.com/blog/2008/03/12/the-version-control-bundle/">posting</a> about <a href="http://www.ctan.org/tex-archive/support/vc/">the version control bundle</a>, I gave it a test spin.</p>

<p>The version control bundle requires <a href="http://www.gnu.org/software/gawk/" title="Gawk - GNU Project - Free Software Foundation (FSF)">GNU awk</a>. If gawk is not installed on your *nix system, this script will do it for you:</p>

<pre><code>#!/bin/sh
#
# installgawk.sh
#
# A bash script to install the latest version of GNU awk. Be sure to set the variables to the desired values. 
#
# http://www.gnu.org/software/gawk/
#
# Mark Eli Kalderon 2008-03-22

# Gawk. Change to the desired version if necessary
VER="3.1.6"
GAWK="gawk-${VER}"

# Build directories. Change to the desired directories if necessary.
GBLDDIR=/var/tmp/${GAWK}-build

# Create gawk build directory, but save source files if they exist.
test -d ${GBLDDIR} || mkdir ${GBLDDIR}
test -d ${GBLDDIR}/${GAWK} &amp;&amp; /bin/rm -rf ${GBLDDIR}/${GAWK}
cd $GBLDDIR

# Download and unpack gawk source.
curl http://ftp.gnu.org/gnu/gawk/${GAWK}.tar.gz -O
tar -xvzf ${GAWK}.tar.gz
cd ${GAWK}

# Configure and build gawk.
./configure
make
make check

# Install gawk (in /usr/local/bin/). Will prompt for password.
sudo make install
</code></pre>

<p>As of version 0.3, the vc bundle supports <a href="http://bazaar-vcs.org/">bazaar</a>, <a href="http://git.or.cz/" title="Git - Fast Version Control System">git</a>, and <a href="http://subversion.tigris.org/" title="subversion.tigris.org">subversion</a> and runs on Windows and unices. Within the vc directory there are subdirectories for each of these cases:</p>

<ul>
<li>bzr-unix/</li>
<li>bzr-windows/</li>
<li>git-unix/</li>
<li>git-windows/</li>
<li>svn-unix/</li>
<li>svn-windows/</li>
</ul>

<p>Each of these subdirectories contains a pair of scripts. As I am on OS X and wanted to see how well this would work with git, I used the scripts in git-unix/:</p>

<ul>
<li>vc</li>
<li>vc-git.awk</li>
</ul>

<p>Copy these to the root directory of your repository. vc is a shell script that extracts version control information and writes it to a new file, vc.tex. vc does this by calling vc-git.awk to process the output of git status and git log. To use these scripts, put the following in the preamble of your LaTeX document:</p>

<pre><code>\immediate\write18{sh ./vc}
\input{vc}
</code></pre>

<p>\write18 allows you to call shell scripts when running LaTeX. Most TeX installations has \write18 disabled by default for security reasons. That&#8217;s a good thing. Rather than enabling this globally, you can enable this on an as needed basis, by running pdflatex or xelatex with the -shell-escape argument.</p>

<p>vc.tex defines the following macros which can now be used in your LaTeX document:</p>

<ul>
<li><strong>\VCRevision</strong> current (maximum) working copy revision number </li>
<li><strong>\VCRevisionMod</strong> as \VCRevision, but with an additional note if the working copy contains modiﬁed ﬁles </li>
<li><strong>\VCAuthor</strong> author of the last check-in operation </li>
<li><strong>\VCDateRAW</strong> date of last check-in in native format of the VCS software </li>
<li><strong>\VCDateISO</strong> date of last check-in in ISO format YYYY-MM-DD </li>
<li><strong>\VCDateTEX</strong> date of last check-in in TeX format YYYY/MM/DD </li>
<li><strong>\VCTime</strong> time of last check-in </li>
<li><strong>\VCModifiedText</strong> contains the note shown in macro \VCRevisionMod if there were modiﬁed ﬁles. This macro can be redeﬁned by the user. </li>
<li><strong>\VCModified</strong> 0 if there are no modiﬁed ﬁles in the working copy 
directory; 1 or 2 if there are modiﬁed ﬁles. In general you 
don’t need this macro.</li>
</ul>

<p>These macros can be called wherever appropriate. I wanted my version control information discretely tucked away in a footer:</p>

<pre><code>\usepackage{fancyhdr}
\lfoot{\tiny{Revision: \VCRevision ; Author: \VCAuthor ; Date: \VCDateISO}}
\cfoot{}
\rfoot{}
</code></pre>

<p>The result:</p>

<p><img src="http://markelikalderon.com/wp-content/uploads/2008/03/vc-output.png" alt="vc output" /></p>

<p>If you want the version control information in draft mode only, Stephan Hennig, vc bundle&#8217;s maintainer, suggests using the <a href="http://www.ctan.org/tex-archive/help/Catalogue/entries/ifdraft.html" title="The TeX Catalogue OnLine, Entry for ifdraft, Ctan Edition">ifdraft</a> package.</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2008/03/23/running-vc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More XeTeX Info</title>
		<link>http://markelikalderon.com/2008/03/20/more-xetex-info/</link>
		<comments>http://markelikalderon.com/2008/03/20/more-xetex-info/#comments</comments>
		<pubDate>Thu, 20 Mar 2008 15:07:31 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[XeTeX]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2008/03/20/more-xetex-info/</guid>
		<description><![CDATA[As I lamented in an earlier post, XeTeX, as cool as it is, still suffers from a paucity of documentation. (Though the situation is improving, and part of the problem is that the technology is relatively new and in flux.) Well, things have just improved. Michel Goossens has published online a working draft of The [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://markelikalderon.com/wp-content/uploads/2007/08/xetex_icon.jpeg" alt="xetex logo" /></p>

<p>As I lamented in an earlier <a href="http://markelikalderon.com/blog/2007/08/02/xetex-info/">post</a>, XeTeX, as cool as it is, still suffers from a paucity of documentation. (Though the situation is improving, and part of the problem is that the technology is relatively new and in flux.) Well, things have just improved. Michel Goossens has <a href="http://xml.web.cern.ch/XML/lgc2/">published</a> online a working draft of <a href="http://xml.web.cern.ch/XML/lgc2/xetexmain.pdf"><em>The XeTeX Companion: TeX meets Opentype and Unicode</em></a>.</p>

<p>Also of interest is two chapters that didn&#8217;t make the cut of the second edition of the <a href="http://www.amazon.com/LaTeX-Graphics-Companion-Illustrating-Typesetting/dp/0201854694" title="Amazon.com: The LaTeX Graphics Companion: Illustrating Documents with TeX and Postscript(R) (Tools and Techniques for Computer Typesetting): Michel Goossens,Sebastian Rahtz,Frank Mittelbach: Books"><em>LaTeX Graphics Companion</em></a>. Updated and extended, <em>PostScript fonts and beyond</em> and <em>PostScript and PDF tools</em> is available for <a href="http://xml.web.cern.ch/XML/lgc2/tlgc2extra.pdf">download</a> as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2008/03/20/more-xetex-info/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XeTeX Info</title>
		<link>http://markelikalderon.com/2007/08/02/xetex-info/</link>
		<comments>http://markelikalderon.com/2007/08/02/xetex-info/#comments</comments>
		<pubDate>Thu, 02 Aug 2007 15:44:39 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Markup]]></category>
		<category><![CDATA[XeTeX]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2007/08/02/xetex-info/</guid>
		<description><![CDATA[Font management is one are where TeX is really showing its age. Installing fonts in a TeX tree is a daunting task for the uninitiated, to say the least. Doubtless, it would be very different if unicode existed when Donald Knuth wrote TeX. Fortunately, XeTeX addressed some of these issues. XeTeX is an alternative TeX [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://markelikalderon.com/wp-content/uploads/2007/08/xetex_icon.jpeg' alt='XeTeX Icon' /></p>

<p>Font management is one are where <a href="http://www.tug.org/" title="TeX Users Group (TUG) home page">TeX</a> is really showing its age. Installing fonts in a TeX tree is a daunting task for the uninitiated, to say the least. Doubtless, it would be very different if <a href="http://unicode.org/" title="Unicode Home Page">unicode</a> existed when <a href="http://www-cs-faculty.stanford.edu/~knuth/" title="Don Knuth's Home Page">Donald Knuth</a> wrote TeX.</p>

<p>Fortunately, <a href="http://scripts.sil.org/xetex" title="The XeTeX typesetting system">XeTeX</a> addressed some of these issues. XeTeX is an alternative TeX engine, originally written for OS X but now available on other platforms, that uses your system&#8217;s fonts and makes them available for typesetting. Installing new fonts is as simple as installing them on your system. And it knows all about unicode, so non-Roman fonts are no problem. Check out the XeTeX <a href="http://www.tug.org/mactex/src/Demos/XeTeX-showcase/00Start-Here.html">showcase</a> for some impressive examples.</p>

<p>XeTeX&#8217;s documentation, while helpful, is still rather sparse. So mission critical information can be hard to fine. The <a href="http://www.tug.org/mailman/listinfo/xetex" title="XeTeX Info Page">XeTeX mailing list</a> is friendly and helpful. But sometimes you just want to find stuff out for yourself.</p>

<p>Recently, on the XeTeX mailing list, Bruno Voison, posted a useful tip. XeTeX lacks a man page, but to get information about is options, run the following command:</p>

<pre><code>xetex -help
</code></pre>

<p>Unlike <a href="http://www.tug.org/applications/pdftex/" title="pdfTeX">pdfTeX</a>, XeTeX does not generate PDFs directly; rather, on OS X, it uses the driver xdv2pdf. For a list of options for this driver, run the following command:</p>

<pre><code>xdv2pdf
</code></pre>

<p>While xdv2pdf is the standard driver on OS X, a lot of LaTeX functionality can only be had using the alternative driver, xdvipdfmx. One advantage of using xdvipdfmx is that the bookmarks it creates can be read by Preview and any other PDF programs that uses OS X&#8217;s PDFkit. Unfortunately, the bookmarks created by xdv2pdf can only be read by Adobe applications. For a list of options for this driver, run the following command:</p>

<pre><code>xdv2pdfmx
</code></pre>

<p>For the curious, I am generating XeTeX with the following options:</p>

<pre><code>-output-driver="xdvipdfmx -S -E"
</code></pre>

<p>This says use the xdv2pdfmx driver with the -S and -E options. The former produces and encrypted PDF and the later embeds all the fonts.</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2007/08/02/xetex-info/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

