<?xml version="1.0" encoding="iso-8859-1"?>
<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>[Lowerbounds, Upperbounds] &#187; Software Tools</title>
	<atom:link href="http://magic.aladdin.cs.cmu.edu/category/software-tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://magic.aladdin.cs.cmu.edu</link>
	<description>Algorithms are everywhere.</description>
	<lastBuildDate>Tue, 23 Dec 2008 19:58:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9-rare</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using \raggedbottom To Identify Where To Reword</title>
		<link>http://magic.aladdin.cs.cmu.edu/2008/05/12/using-raggedbottom-to-identify-where-to-reword/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2008/05/12/using-raggedbottom-to-identify-where-to-reword/#comments</comments>
		<pubDate>Tue, 13 May 2008 04:07:47 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/?p=530</guid>
		<description><![CDATA[Say you are preparing a camera-ready submission and you are running a little low on space, maybe by a few lines. At this point, hopefully you are willing to put in the time and try rewording some of your sentences. A usual way to start is to identify a paragraph with a very short final [...]]]></description>
			<content:encoded><![CDATA[<p>Say you are preparing a camera-ready submission and you are running a little low on space, maybe by a few lines. At this point, hopefully you are willing to put in the time and try rewording some of your sentences. A usual way to start is to identify a paragraph with a very short final line and try rewording a sentence within so that the paragraph uses one less line.</p>
<p>But if you have tried this route, you may notice that TeX has &#8220;optimized away&#8221; your effort by subtly padding the pages with more vertical spaces, thereby keeping the page count constant&#8230;</p>
<p>Long story short, you want to use <code>\raggedbottom</code>. Put it in the preamble and recompile. With this, LaTeX will keep the breaks at the same places, but it will not pad and hence the bottom of the pages will be ragged (duh!). Now you can usually see why your effort did not produce the desired effect: the space that you just freed up does not allow the current page/column to absorb enough material from the next.</p>
<p>With the ability to find a short page/column by inspection, now you can identify the <em>earliest</em> place where rewording is more likely help. Repeat the reword-recompile cycle a couple times, and the page count will go down. Just be sure to take out <code>\raggedbottom</code> when you are done! <img src='http://magic.aladdin.cs.cmu.edu/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>P.S. The two-page mode in your previewer can make the inspection more effective.</p>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2008/05/12/using-raggedbottom-to-identify-where-to-reword/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s All Text! Add-on for Firefox</title>
		<link>http://magic.aladdin.cs.cmu.edu/2008/03/27/its-all-text-add-on-for-firefox/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2008/03/27/its-all-text-add-on-for-firefox/#comments</comments>
		<pubDate>Thu, 27 Mar 2008 17:15:56 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[Text Editing]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/?p=502</guid>
		<description><![CDATA[It&#8217;s All Text! is one of my most-used Firefox add-ons and recently it&#8217;s been upgraded to run on 3.0b4.
Edit textareas using an external editor, because it&#8217;s all text!
Right click on a textarea, select &#8220;It&#8217;s All Text!&#8221; and edit the text in the editor of your choice.
Alternatively, click on the edit buttons added for your convenience. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://addons.mozilla.org/en-US/firefox/addon/4125">It&#8217;s All Text!</a> is one of my most-used Firefox add-ons and recently it&#8217;s been upgraded to run on 3.0b4.</p>
<blockquote><p>Edit textareas using an external editor, because it&#8217;s all text!</p>
<p>Right click on a textarea, select &#8220;It&#8217;s All Text!&#8221; and edit the text in the editor of your choice.</p>
<p>Alternatively, click on the edit buttons added for your convenience. Right click on the edit buttons for even more options, including preferences.</p></blockquote>
<p>There are good reasons why you want to use your own favorite text editor to do text editing, and this add-on makes the process extremely easy (no cut and paste needed). But my initial reason was to avoid the &#8220;back&#8221; button: on my ThinkPad, it&#8217;s right next to the arrow keys and if you happen to hit it by mistake, whoosh, all your text is gone&#8230;</p>
<p>Highly recommended.</p>
<p>P.S. Of course this post and many others are written using it. <img src='http://magic.aladdin.cs.cmu.edu/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2008/03/27/its-all-text-add-on-for-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PGF Version 2 is Released</title>
		<link>http://magic.aladdin.cs.cmu.edu/2008/02/26/pgf-version-2-is-released/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2008/02/26/pgf-version-2-is-released/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 23:59:17 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/?p=106</guid>
		<description><![CDATA[From the project homepage:
PGF is a TeX macro package for generating graphics. It is platform- and format-independent and works together with the most important TeX backend drivers, including pdftex and dvips. It comes with a user-friedly syntax layer called TikZ.
I have been a happy user of PGF ever since 2006. For certain types of graphics [...]]]></description>
			<content:encoded><![CDATA[<p>From the project <a href="http://sourceforge.net/projects/pgf/">homepage</a>:</p>
<blockquote><p>PGF is a TeX macro package for generating graphics. It is platform- and format-independent and works together with the most important TeX backend drivers, including pdftex and dvips. It comes with a user-friedly syntax layer called TikZ.</p></blockquote>
<p>I have been a happy user of PGF ever since 2006. For certain types of graphics like data structures and geometry, it really makes more sense to &#8220;code it&#8221; then to &#8220;draw it&#8221; (interactively). The package is very rich in features, as you can witness just by flipping through the 560 page <a href="http://www.ctan.org/tex-archive/graphics/pgf/base/doc/generic/pgf/pgfmanual.pdf">manual</a>.</p>
<p>560 pages for a package? I know it&#8217;s long, but of course you don&#8217;t need to learn every single option of every single feature before you can use PGF productively. (Actually, you will use a high-level abstraction layer called TikZ as explained in the manual.) The manual provides several tutorials to help you start.</p>
<p>Lastly, I note that the package is written by fellow Theory researcher <a href="http://www.tcs.uni-luebeck.de/en/mitarbeiter/tantau/index.html">Till Tantau</a>. Thank you Till!</p>
<p>P.S. Version 2.0 is in the MiKTeX distribution already. Just do an automatic update.</p>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2008/02/26/pgf-version-2-is-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SumatraPDF 0.8 Released</title>
		<link>http://magic.aladdin.cs.cmu.edu/2008/01/02/sumatrapdf-08-released/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2008/01/02/sumatrapdf-08-released/#comments</comments>
		<pubDate>Wed, 02 Jan 2008 18:01:57 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[Electronic Documents]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/?p=433</guid>
		<description><![CDATA[SumatraPDF has just become a very strong contender as an everyday PDF viewer on Windows. The reason: it finally supports searching and bookmarks in version 0.8.
Its interface is still a bit over simplistic, but it&#8217;s already quite good for everyday uses. At the moment, the keyboard shortcuts are not very well-documented. Looking at the source [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.kowalczyk.info/software/sumatrapdf/index.html">SumatraPDF</a> has just become a very strong contender as an everyday PDF viewer on Windows. The reason: it finally supports searching and bookmarks in version 0.8.</p>
<p>Its interface is still a bit over simplistic, but it&#8217;s already quite good for everyday uses. At the moment, the <a href="http://blog.kowalczyk.info/software/sumatrapdf/manual.html">keyboard shortcuts</a> are not very well-documented. Looking at the source code, I noticed some missing entries that are noteworthy:</p>
<ul>
<li>The search interface: <code>/</code> starts a search, so as <code>Ctrl-F</code>. <code>Ctrl-G</code> and <code>F3</code> is next, and <code>Shift-F3</code> is previous. Note that the toolbar doesn&#8217;t have to be visible for the search keys to work.</li>
<li><code>Ctrl-L</code> toggles full screen mode.</li>
<li><code>F12</code> toggles the bookmark panel.</li>
</ul>
<p>(<strong>Update:</strong> Also note that Ctrl-Drag will select a region and copy its text to clipboard.)</p>
<p>I don&#8217;t have a list of the numerous PDF viewers on Windows here: a <a href="http://www.google.com/search?q=pdf+viewer+windows">google search</a> will get you many hits. Personally, I have &#8220;switched&#8221; to SumatraPDF on my browsers a few months ago, while spending most of my &#8220;PDF time&#8221; in PDF-XChange Viewer (<a href="http://magic.aladdin.cs.cmu.edu/2007/10/21/free-pdf-annotation-softwares/">see this post</a> about its annotation capability).</p>
<p>I still keep Adobe Reader 8 as the default PDF handler: in terms of printing, anti-aliasing and javascript support, I have yet to see any competition to Adobe. However, now that PDF is <a href="http://blogs.adobe.com/insidepdf/2007/12/iso_ballot_for_pdf_17_passed.html">in the process of becoming an ISO standard</a> and FSF is declaring the <a href="http://www.gnupdf.org/">GNU PDF project</a> as one of the few <a href="http://www.fsf.org/campaigns/priority.html">high priority projects</a>, hopefully we will see some change in a few years (see <a href="http://www.linux.com/feature/122195">this linux.com article</a>).</p>
<p>I should note that SumatraPDF 0.8 is still missing hyperlink support. Also, none of Windows PDF viewers seems to support <a href="http://itexmac.sourceforge.net/pdfsync.html">pdfsync</a> (round-tripping between PDF and TeX source). I know the former is being worked on. The latter, hmm&#8230;</p>
<p>P.S. Common PDF viewers on Windows also include Ghostview and Foxit Reader.</p>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2008/01/02/sumatrapdf-08-released/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Protect Your Email Address in PS and PDF</title>
		<link>http://magic.aladdin.cs.cmu.edu/2007/12/09/protect-your-email-address-in-ps-and-pdf/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2007/12/09/protect-your-email-address-in-ps-and-pdf/#comments</comments>
		<pubDate>Sun, 09 Dec 2007 16:49:01 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[Electronic Documents]]></category>
		<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/?p=468</guid>
		<description><![CDATA[The randtext package is a great random find in CTAN. Here is its description in full, but with an emphasis added by me:
The package provides a single macro \randomize{TEXT} that typesets the characters of TEXT in random order, such that the resulting output appears correct, but most automated attempts to read the file will misunderstand [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.ctan.org/tex-archive/help/Catalogue/entries/randtext.html">randtext</a> package is a great random find in CTAN. Here is its description in full, but with an emphasis added by me:</p>
<blockquote><p>The package provides a single macro \randomize{TEXT} that typesets the characters of TEXT in random order, such that the resulting output appears correct, but <em>most</em> automated attempts to read the file will misunderstand it. </p>
<p>This function allows one to include an email address in a TeX document and publish it online without fear of email address harvesters or spammers easily picking up the address.</p>
<p>The author is Charles Duan.</p></blockquote>
<p>While you most certainly want to use this package for some protection, you should not rely solely on it. For a historical reason(*) , Adobe&#8217;s PDF library can easily extract an email address protected by this package. I don&#8217;t know about the top search engines, but I would expect their extractors to perform no worse.</p>
<p>(*) Basically, space characters need not exist after the TeX phase. They may instead exist as kerning and spacing information. Therefore, Adobe have an extraction routine that guesses the word breaks based on how the characters are spaced. In other words, the routine is literally &#8220;reading&#8221; the text from the rendering, just like any human!</p>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2007/12/09/protect-your-email-address-in-ps-and-pdf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ipe 6.0pre30 works with pdfTeX 1.4</title>
		<link>http://magic.aladdin.cs.cmu.edu/2007/11/27/ipe-60pre30-works-with-pdftex-14/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2007/11/27/ipe-60pre30-works-with-pdftex-14/#comments</comments>
		<pubDate>Tue, 27 Nov 2007 15:58:37 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[Ipe]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/?p=470</guid>
		<description><![CDATA[A month ago I wrote about how to install MiKTeX 2.5 concurrently with 2.6 so that I can run Ipe 6.0pre28 on my main production machine. 
Well, Ipe 6.0pre30 has just been released yesterday. From the announcement email, the major features of this release include:

  * Ipe now works with pdftex 1.40 (in MikTeX [...]]]></description>
			<content:encoded><![CDATA[<p>A month ago I wrote about <a href="http://magic.aladdin.cs.cmu.edu/2007/10/16/how-to-install-miktex-25-today/">how to install MiKTeX 2.5 concurrently with 2.6</a> so that I can run <a href="http://tclab.kaist.ac.kr/ipe/">Ipe</a> 6.0pre28 on my main production machine. </p>
<p>Well, Ipe 6.0pre30 has just been released yesterday. From the <a href="https://mail.cs.uu.nl/mailman/listinfo/ipe-announce">announcement email</a>, the major features of this release include:</p>
<blockquote><p>
  * Ipe now works with pdftex 1.40 (in MikTeX 2.6 and texlive 2007).</p>
<p>  * Pascal-Nicolas Becker, Frederik Hermans, and Damian Schmidt<br />
    implemented the missing forms of intersection snapping (for arcs<br />
    and Bezier curves), with bug fix by Jonathan Backer.</p>
<p>  * Fixed the broken user interface (fields were too small to contain<br />
    the text) on Unix (removed a static QFont) (bug #191).</p>
<p>  * Figtoipe now distributed separately.
</p></blockquote>
<p>I note that the source and the windows packages are already available at the LuaForge download site.</p>
<p>Thanks Otfried!</p>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2007/11/27/ipe-60pre30-works-with-pdftex-14/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing PDF Margins With The pdfpages Package</title>
		<link>http://magic.aladdin.cs.cmu.edu/2007/11/13/changing-pdf-margins-with-the-pdfpages-package/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2007/11/13/changing-pdf-margins-with-the-pdfpages-package/#comments</comments>
		<pubDate>Wed, 14 Nov 2007 03:22:40 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[Electronic Documents]]></category>
		<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/?p=145</guid>
		<description><![CDATA[Sometimes I am given a PDF and I wish I could change its margins. For example, when I print out a conference version of a paper to study in detail, usually there isn&#8217;t much space on the sides to write my own ideas. I heard Fermat had a solution for this type of issue  [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes I am given a PDF and I wish I could change its margins. For example, when I print out a conference version of a paper to study in detail, usually there isn&#8217;t much space on the sides to write my own ideas. I heard Fermat had a solution for this type of issue <img src='http://magic.aladdin.cs.cmu.edu/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> , but in the modern days, I use sticky notes. The same situation surprisingly arises even if you use PDF annotating softwares. <a href="http://magic.aladdin.cs.cmu.edu/2007/10/21/free-pdf-annotation-softwares/">Free</a> or not free (no link for them), they simply do not support the &#8220;enlarge canvas&#8221; feature yet. All you can do is to insert electronic sticky notes. So much for the metaphor!</p>
<p>Now there is actually a technology called &#8220;reflowable PDFs&#8221;, which are PDFs that contain enough information to support reflowing its content to fit any width. You can see <a href="http://www.adobe.com/uk/epaper/tips/acr5reflow/">this page</a> for a screenshot of a reflowed document. Reflowing works wonder for text-dominant documents like novels, but the PDF has to be specially prepared for reflowing to really work well. (Try View->Zoom->Reflow in Adobe Reader 8.)</p>
<p>But if the given PDF is not reflowable, we can still use some graphics editor and edit the PDF interactively. After all, a PDF is mostly a vector graphics file, modulo some potential embedded bitmaps, and so you can edit it like any vector graphics file. I&#8217;ve seen it done in Illustrator, and I guess some of the free software competitors like <a href="http://www.inkscape.org/">Inkscape</a> or <a href="http://www.scribus.net/">Scribus</a> can do this kind of editing too. But using a command line tool would be far easier.</p>
<p>For a long while, I actually know how to change the margins of a PDF. (Turns out <a href="http://blogs.adobe.com/acrolaw/2006/01/how_do_i_shrink.html">lawyers</a> have essentially the same problem.) The trick is to use the <a href="http://www.ctan.org/tex-archive/macros/latex/contrib/pdfpages/"><code>pdfpages</code></a> package with pdfLaTeX. You may recall that this package allows us to include specific pages of a PDF into our own document. Magically, it has a <code>scale</code> option (that is really inherited from <code>graphicx</code>)&#8230; This gives us the first batch file: <a href="/wp-uploads/pdf-rescale.bat">pdf-rescale.bat</a>. Execute</p>
<blockquote><p><code>pdf-rescale.bat foo.pdf 0.8</code></p></blockquote>
<p>and you will get <code>foo-0.8.pdf</code>, which is <code>foo.pdf</code> shrunk to 80%. I&#8217;ve found that 80% is a good default and so the third argument is actually optional. You can also specify a scale of larger than 1 for some journal articles formatted for smaller paper sizes. I can also imagine fancier applications in which you combine this idea with the <code>geometry</code> package (see <a href="http://magic.aladdin.cs.cmu.edu/2005/08/25/setting-margin-in-latex/">this post</a>) to control of the final outcome.</p>
<p>But since we are not changing the actual size of the paper, shrinking the content for a larger margin actually means, well, shrunk content. Conference proceedings are already typeset in a small enough font. Since the proceedings are in two columns, I had the idea to print each column on its own page. That will definitely give us ample space. After a lot of different attempts since last year, I finally managed to get the second batch file: <a href="/wp-uploads/pdf-1c.bat">pdf-1c.bat</a>. Execute</p>
<blockquote><p><code>pdf-1c.bat foo.pdf</code></p></blockquote>
<p>and you will get <code>foo-1c.pdf</code>, which is <code>foo.pdf</code> but with one column per page. No kidding.</p>
<p>The following PNG illustrates these scripts using the title page of an old paper. The upper-left shows the original, and the upper-right is after shrinking to 80%. The lower-left and lower-right are the two pages from the one-column version. I have also attached the <a href="/wp-uploads/pdf-montage-src.pdf">source PDF</a> from which I generated the PNG. The key feature is that this PDF retains the text of the original&#8212;try search for the word &#8220;degree&#8221; and you will see. (At one point my solution was to assemble a bunch of PNGs representing each single column into a huge PDF. Although you can annotate on it electronically, you cannot search in it. It also prints slowly.)</p>
<p><img src='/wp-uploads/pdf-montage-400.png' /></p>
<p>Finally, I also note that it is in fact possible to prepare reflowable PDFs using pdfLaTeX or dvipdfm (there seems to be trouble if going through a PS), but I will save it for a later story. For now, you can experience reflowing a LaTeX PDF with <a href="http://www.tug.org/pracjourn/2007-2/robbers/robbers.pdf">this PracTeX article</a>, which is actually on the use of the <code>pdfpages</code> package. Having played with reflowing for a while, I would say that the real deal-breaker for reflowable PDFs lies in the mathematical expressions. You can see <a href="www.tug.org/TUGboat/Articles/tb22-4/tb72perlS.pdf">this TUGboat article</a> for some excellent macros on fine-tuning mathematical expressions. Now, try to reflow it&#8230; <img src='http://magic.aladdin.cs.cmu.edu/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>P.S. If you write the corresponding bash scripts, please send them to me so that I can, with full acknowledgement, post them here. The only reason why I stick to batch files is to avoid extra dependencies. </p>
<p><strong>Change PDF Margin Scripts</strong>: <a href="/wp-uploads/pdf-rescale.bat">pdf-rescale.bat</a> <a href="/wp-uploads/pdf-1c.bat">pdf-1c.bat</a></p>
<p><strong>Update</strong>: Joshua Dunfield has ported the rescaling script to Linux. See the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2007/11/13/changing-pdf-margins-with-the-pdfpages-package/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Word Capitalization in Emacs and PowerPoint</title>
		<link>http://magic.aladdin.cs.cmu.edu/2007/11/06/word-capitalization-in-emacs-and-powerpoint/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2007/11/06/word-capitalization-in-emacs-and-powerpoint/#comments</comments>
		<pubDate>Wed, 07 Nov 2007 04:26:20 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[PowerPoint]]></category>
		<category><![CDATA[Text Editing]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/?p=461</guid>
		<description><![CDATA[One of my favorite keyboard shortcuts in PowerPoint is Shift-F3. It rotates the capitalization of the current word among lowercased, Capitalized and UPPERCASED. Note that you do not have to select the word, and the cursor does not have to be at the beginning of the word either(*).
But the title of this post clearly said [...]]]></description>
			<content:encoded><![CDATA[<p>One of my favorite keyboard shortcuts in PowerPoint is <code>Shift-F3</code>. It rotates the capitalization of the current word among lowercased, Capitalized and UPPERCASED. Note that you do not have to select the word, and the cursor does not have to be at the beginning of the word either(*).</p>
<p>But the title of this post clearly said Emacs, didn&#8217;t it? Well, since I missed this feature in Emacs, I just implemented it in a pinch and bound it to <code>Shift-F3</code>. <img src='http://magic.aladdin.cs.cmu.edu/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  The code is in this <a href="http://www.emacswiki.org/cgi-bin/emacs-en/RotateWordCapitalization">page</a> in EmacsWiki. I have only tested it on GNU Emacs, and so I can only hope that it works in XEmacs.</p>
<p>(*) Actually, you rarely have to select a word in PowerPoint in order to format it. Commands like Bold <code>Ctrl-B</code> and Italic <code>Ctrl-I</code> will act on the current word when there is no selection. Also, similar behavior is in fact present in all Office applications. I just picked PowerPoint.</p>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2007/11/06/word-capitalization-in-emacs-and-powerpoint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Continuous LaTeX Compilation Using latexmk</title>
		<link>http://magic.aladdin.cs.cmu.edu/2007/11/06/continuous-latex-compilation-using-latexmk/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2007/11/06/continuous-latex-compilation-using-latexmk/#comments</comments>
		<pubDate>Tue, 06 Nov 2007 05:50:22 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/?p=127</guid>
		<description><![CDATA[Now that we know how to precompile the preamble to cut down the running time of latex, here is a tool that furthers the goal of saving time in the document production process&#8212;latexmk.
As its name suggests, latexmk is a &#8220;make&#8221; utility for LaTeX files. In particular, it understands when a particular document requires varying number [...]]]></description>
			<content:encoded><![CDATA[<p>Now that we know how to <a href="http://magic.aladdin.cs.cmu.edu/2007/11/02/precompiled-preamble-for-latex/">precompile the preamble</a> to cut down the running time of <code>latex</code>, here is a tool that furthers the goal of saving time in the document production process&#8212;<a href="http://www.phys.psu.edu/~collins/software/latexmk-jcc/"><code>latexmk</code></a>.</p>
<p>As its name suggests, <code>latexmk</code> is a &#8220;make&#8221; utility for LaTeX files. In particular, it understands when a particular document requires <em>varying</em> number of runs to resolve all references, with a <code>bibtex</code> and/or <code>makeindex</code> throw in at the <em>right</em> moment in-between the runs. Recent versions even support multiple bibliographies and the like. In short, assuming no source errors, if you execute <code>latexmk foo.tex</code>, you <em>will</em> get a fully compiled <code>foo.dvi</code> without any manual intervention. (PDF users: add the <code>-pdf</code> option. <code>nomencl</code>(ature) and <code>glossaries</code> package users: see below.)</p>
<p>Now <code>latexmk</code> would be a great piece of software to recommend just for the features I have mentioned above. Indeed, over the years I have seen various  Makefile solutions using the <code>make</code> utility, some of which are fairly sophisticated. There are also direct competitors like <a href="http://docs.miktex.org/manual/texifying.html"><code>texify</code></a> and the like. (See this <a href="http://www.emacswiki.org/cgi-bin/wiki/LatexMk">article</a> in EmacsWiki.) While I find that <code>latexmk</code> fits my workflow in terms of ease of use and customizability, you may also want to check out these other intelligent options too. They all beat the &#8220;latex, latex, bibtex, latex, latex&#8221; batch script.</p>
<p>But <code>latexmk</code> is better than that&#8212;it has support for <em>continuous/automatic compilation</em>: if you run <code>latexmk -pvc main.tex</code>, then whenever it detects that one of the dependent source files of <code>main.tex</code> has been changed&#8212;be that a TeX, bib, an included graphics, or any file you declare to be a source, <code>latexmk</code> will automatically recompile it for you. That means you don&#8217;t need to start the compilation manually after changes and an oven-fresh dvi/pdf will be delivered to your previewer as soon as it is ready.</p>
<p>Finally, here are some notes on <code>latexmk</code>:</p>
<ul>
<li>You really want the <a href="http://www.phys.psu.edu/~collins/software/latexmk-jcc/versions.html">latest version</a>, even though the version number may say &#8220;beta&#8221;. The script is very mature. Also note that <code>MiKTeX</code> ships with <code>latexmk.exe</code>, which is a wrapper to call Perl on <code>TEXROOT\scripts\latexmk\perl\latexmk.pl</code></li>
<p>, which is the script you want to replace.</p>
<li>You can set up your <code>.latexmkrc</code> to override defaults or even define new dependencies. Below I have attached some interesting bits of my <code>.latexmkrc</code> just for an example. For instance, you can avoid launching a previewer even though you are using the <code>-pvc</code> option, and you can support the <code>nomencl</code> package and the like by declaring a custom dependency. And since this is a Perl script, you can use any Perl constructs. You can read the documentation for more possibilities.<br />
<blockquote><p><code>$latex = 'latex -src-specials -parse-first-line -c-style-errors';<br />
$pdflatex = 'pdf' . $latex;<br />
$dvi_previewer = 'exit';        # don't start a previewer for me<br />
@default_files = ('main');<br />
$clean_ext =                    # space separated string<br />
  join(' ', qw( fmt acn acr alg gls glo glg ist nls nlo nlg brf out pdfsync rel));<br />
push @cus_dep_list, "nlo nls 0 nlo2nls"; # nomenclature<br />
sub nlo2nls { system("makeindex $_[0].nlo -s nomencl.ist -o $_[0].nls -t $_[0].nlg"); }<br />
push @cus_dep_list, "acn acr 0 acn2acr"; # glossaries and acronym hack<br />
sub acn2acr { system("makeindex $_[0].acn -s main.ist -o $_[0].acr -t $_[0].alg"); }<br />
push @cus_dep_list, "glo gls 0 glo2gls"; #MiKTeX 2.6 has a broken makeglossaries.exe<br />
sub glo2gls { system("makeindex $_[0].glo -s main.ist -o $_[0].gls -t $_[0].glg"); }</code></p></blockquote>
</li>
<li>The <code>-silent</code> option suppresses the output of  <code>latex</code> and show you only the errors in a succinct format. Here is an example transcript when I run <code>latexmk -silent foo.tex</code> with two planted errors.<br />
<blockquote><p><code>No specific requests made, so default to dvi by latex<br />
Latexmk: Run number 1 of rule 'latex'<br />
Latexmk: Running 'latex -src-specials -parse-first-line -c-style-errors  -interaction=batchmode -c-style-errors  "foo.tex"'<br />
This is pdfTeX, Version 3.141592-1.40.4 (MiKTeX 2.6)<br />
entering extended mode<br />
foo.tex:3: Undefined control sequence<br />
foo.tex:4: Undefined control sequence<br />
Latexmk: Use the -f option to force complete processing.</code></p></blockquote>
</li>
</ul>
<p>Have fun with <code>latexmk</code>!</p>
<p>P.S. I should note one fine point: if you have the habit of saving your file after every single sentence, then perhaps continuous compilation can be a bit counterproductive. Emacs users can consider tuning their <code>auto-save-timeout</code> and <code>auto-save-interval</code> instead.</p>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2007/11/06/continuous-latex-compilation-using-latexmk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Precompiled Preamble for LaTeX</title>
		<link>http://magic.aladdin.cs.cmu.edu/2007/11/02/precompiled-preamble-for-latex/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2007/11/02/precompiled-preamble-for-latex/#comments</comments>
		<pubDate>Fri, 02 Nov 2007 05:38:47 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/?p=447</guid>
		<description><![CDATA[If you can save six seconds every time you run LaTeX, would you do it?
Indeed, I have been pondering on this issue for quite some time now. Every time I compile &#8220;a large document that shall not be named&#8221;, I notice that the first six seconds are used to process the code before \begin{document}. But [...]]]></description>
			<content:encoded><![CDATA[<p>If you can save six seconds every time you run LaTeX, would you do it?</p>
<p>Indeed, I have been pondering on this issue for quite some time now. Every time I compile &#8220;a large document that shall not be named&#8221;, I notice that the first six seconds are used to process the code before <code>\begin{document}</code>. But this code&#8212;known as the preamble&#8212;hardly sees any changes between runs. The preamble for this particular document may be a bit longer than usual, but considering that I am usually working on a chapter at a time using the <code>\includeonly</code> facility (<a href="http://www.ics.mq.edu.au/~rdale/resources/writingnotes/latexstruct.html">see a tutorial here</a>), these six seconds actually represent over 50% of the running time. Computationally and environmentally, this is horribly inefficient.</p>
<p>But a few days ago, I have finally stumbled upon <a href="http://www.physics.hmc.edu/latex.php">a solution</a>&#8212;it&#8217;s called &#8220;custom format file&#8221;. However, let me call it <em>precompiled preamble</em>, borrowing the concept from C compilers that support <a href="http://en.wikipedia.org/wiki/Precompiled_header">precompiled headers</a>. Assuming your source file is <code>main.tex</code>, here is how you may use this method:</p>
<ol>
<li>Rearrange your preamble so that its static part precedes any dynamic part. What in the preamble can be &#8220;dynamic&#8221;? For example, if you use <code>\includeonly</code>, you probably want to change its argument rather frequently and so it is not static. Another example is the <a href="http://www.ctan.org/tex-archive/macros/latex/contrib/svninfo/">svninfo</a> package, which introduces a command <code>\svnInfo</code> whose arguments get updated every time you commit. While you can certainly load <code>svninfo.sty</code> in the precompiled preamble, you also want the <code>\svnInfo</code> to remain in <code>main.tex</code>. Finally, some packages read and write auxiliary files when you issue a command that you should put in the preamble (eg, <a href="http://ctan.tug.org/tex-archive/macros/latex/contrib/nomencl/">nomencl</a> uses <code>\makenomenclature</code>). Clearly, you have to run these commands in every run.</li>
<li>Extract the static part of the preamble into, say, <code>preamble.tex</code>. At this point, <code>main.tex</code> no longer contains the static part. It should start with the dynamic part, or simply <code>\begin{document}</code> if you have nothing dynamic.</li>
<li>Execute <code>latex -ini -job-name="main" "&#038;latex preamble.tex\dump"</code>. You will notice that a new file <code>main.fmt</code> has been generated in the same directory, along with other auxiliary files. PDF users can replace <code>latex</code> with <code>pdflatex</code> in both occurrences and the same applies to the steps below. Also, in some distributions, the options could be &#8220;-jobname&#8221;. Make sure you get <code>main.fmt</code> and <em>not</em> <code>preamble.fmt</code> in this step.</li>
<li>Edit the first line of <code>main.tex</code> so that it starts with <code>%&#038;main</code>. There can be other stuff on that line too, for example<br />
<blockquote><p><code>%&#038;main -*- mode: latex; TeX-master: "main.tex"; -*-</code></p></blockquote>
<p>works for me. (See <a href="http://magic.aladdin.cs.cmu.edu/2005/10/12/emacs-local-variables/">this post</a> if you are not familiar with Emacs local variables.)</li>
<li>(Drum beats) Execute <code>latex main.tex</code> as usual. You may get an error about the class file immediately, or you may notice that <code>latex</code> finishes as usual. But if you have paid attention to the output, or if you inspect the the log file, then you will see that the preamble gets processed in &#8220;no time&#8221; at all. At this point, cheers!</li>
<li>If you happen to hit an error, you will need to run <code>latex -parse-first-line main.tex</code> instead. The extra option will force <code>latex</code> to parse the first line of <code>main.tex</code> where we have asked for <code>main.fmt</code> to be used instead of the default format. (In Linux, you can try to locate <code>texmf.cnf</code> and change the option <code>parse_first_line</code> from <code>f</code> to <code>t</code>.)</li>
</ol>
<p>To make things slightly fancier, here is an modification of my own. First, add this to the end of <code>preamble.tex</code>:</p>
<blockquote><p><code>\def\preambleloaded{Precompiled preamble loaded.}</code></p></blockquote>
<p>Then, before the dynamic preamble (or <code>\begin{document}</code> if there is none) of <code>main.tex</code>, add:</p>
<blockquote><p><code>\def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax}<br />
\ifundefined{preambleloaded}\input{preamble}\else\typeout{\preambleloaded}\fi</code></p></blockquote>
<p>The idea is to define a macro in the precompiled preamble and use it to detect if the precompiled preamble has been loaded or not. If not, <code>\input{preamble}</code> will be used to pull the static preamble back in and you will not see any error at all.</p>
<p>Of course, the actual amount of time saved will depend on your computer and your preamble. But in my case of long preamble and short document, the saving has been truly tremendous. (Hence I took some time to write this post in the hope that it would help someone down the road.)</p>
<p><strong>Updated</strong> 2007/11/04: Changed the format file name to <code>main.fmt</code> and expanded on the dynamic preamble note.</p>
<p><strong>File</strong> 2007/11/11: Attached beamer preamble test files in a <a href='/wp-uploads/beamerpreamble.zip'>zip</a>, as referred to in <a href="http://magic.aladdin.cs.cmu.edu/2007/11/02/precompiled-preamble-for-latex/#comment-21374">my comment</a>.</p>
<p><strong>Updated</strong> 2007/11/11: Added comments for Linux users, after resolving the issue raised by <a href="http://magic.aladdin.cs.cmu.edu/2007/11/02/precompiled-preamble-for-latex/#comment-21369">Suresh&#8217;s comment</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2007/11/02/precompiled-preamble-for-latex/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Have You Encrypted Your Flash Drive Yet?</title>
		<link>http://magic.aladdin.cs.cmu.edu/2007/10/22/have-you-encrypted-your-flash-drive/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2007/10/22/have-you-encrypted-your-flash-drive/#comments</comments>
		<pubDate>Mon, 22 Oct 2007 12:31:20 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[Software Tools]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/?p=383</guid>
		<description><![CDATA[My key case got stolen from the gym a while ago. The theft caused me about several nights of sleep and several hundred dollars&#8230; cash, CMU ID, driver&#8217;s license (showing my address), keys (the subsequent lock replacement), and the key case itself!
And the thief also got my Sandisk SD Plus card. That&#8217;s the only thing [...]]]></description>
			<content:encoded><![CDATA[<p>My key case got stolen from the gym a while ago. The theft caused me about several nights of sleep and several hundred dollars&#8230; cash, CMU ID, driver&#8217;s license (showing my address), keys (the subsequent lock replacement), and the key case itself!</p>
<p>And the thief also got my <a href="http://www.sandisk.com/Products/Catalog(1119)-SanDisk_Ultra_II_SD_Plus_Cards.aspx">Sandisk SD Plus card</a>. That&#8217;s the only thing that makes me &#8220;feel good&#8221; about the whole incident: the card has been encrypted using <a href="http://www.truecrypt.org/">TrueCrypt</a>, which is a free open-source disk encryption software for Windows and Linux. I can only hope that TrueCrypt doesn&#8217;t have any security flaw in its implementation and that whoever gets my card does not want my data badly enough to crack AES and Twofish. Oh well&#8230;</p>
<p>The situation could have been very different had I not used TrueCrypt&#8230; So, have you encrypted your flash drive yet?</p>
<p>P.S. I highly recommend the SD Plus cards. These are SD cards with a built-in USB interface and so they are as universal as USB thumb drives. Their speed is reasonable, even though it is not very good. There are faster devices for the same money (like <a href="http://www.buffalotech.com/products/flash-memory/">the Ultra series from Buffalo</a>), but not in this stamp-sized form factor. I store my card together with coins!</p>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2007/10/22/have-you-encrypted-your-flash-drive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free PDF Annotation Softwares</title>
		<link>http://magic.aladdin.cs.cmu.edu/2007/10/21/free-pdf-annotation-softwares/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2007/10/21/free-pdf-annotation-softwares/#comments</comments>
		<pubDate>Sun, 21 Oct 2007 18:25:20 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[Electronic Documents]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/?p=429</guid>
		<description><![CDATA[Given the amount of documents that I deal with, I&#8217;ve had many opportunities to save paper if only I could annotating on a PDF directly. Until recently, Jarnal has been the only free solution on Windows. However, I would say that Jarnal is not exactly the most polished piece of software I have used&#8230; (But [...]]]></description>
			<content:encoded><![CDATA[<p>Given the amount of documents that I deal with, I&#8217;ve had many opportunities to save paper if only I could annotating on a PDF directly. Until recently, <a href="http://www.dklevine.com/general/software/tc1000/jarnal.htm">Jarnal</a> has been the only free solution on Windows. However, I would say that Jarnal is not exactly the most polished piece of software I have used&#8230; (But I am not complaining against its price.)</p>
<p>Well, Jarnal has some serious competition now. <a href="http://www.docu-track.com/home/prod_user/pdfx_viewer/">PDF-XChange Viewer</a> is a free (as in beer) PDF viewer that supports a full suite of native PDF annotation capabilities. By &#8220;native&#8221;, I mean if you insert a &#8220;sticky note&#8221; comment into the PDF, it shows up as a sticky note in Adobe Reader and so you can open, close and move the note, just like the stickies created by Acrobat Professional. In comparison, the interface is not very customizable and the keyboard shortcuts are not quite &#8220;there&#8221; yet, but it is certainly looking very good for a version-1 product. The font rendering is not as good as well, but it is comparable to other free solutions. Its performance on graphics intensive PDF is very good on too! There is even a button that allows you to quickly open the current PDF using Adobe Reader, just in case.</p>
<p>I wish it has better ink support, but again, I am not complaining against its price. <img src='http://magic.aladdin.cs.cmu.edu/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>P.S. Not that I really want to destroy any sales, but I note that <a href="http://sourceforge.net/projects/pdfcreator/">PDFCreator</a> is a very good Distiller replacement. Together with PDF-XChange Viewer, they cover most of my PDF needs.</p>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2007/10/21/free-pdf-annotation-softwares/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>How to Install MiKTeX 2.5 Today</title>
		<link>http://magic.aladdin.cs.cmu.edu/2007/10/16/how-to-install-miktex-25-today/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2007/10/16/how-to-install-miktex-25-today/#comments</comments>
		<pubDate>Tue, 16 Oct 2007 21:34:12 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[Ipe]]></category>
		<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/?p=438</guid>
		<description><![CDATA[(Updated on 2007-10-31 with simpler steps. This post assumes you are running Windows, but it&#8217;s actually applicable to Unix users if you replace the MiKTeX terms with their TeX Live counterparts. )
The most recent release of MiKTeX is 2.6 and it ships with pdfLaTeX 1.4. Unfortunately, it is incompatible with Ipe&#8217;s latest release 6.0pre28 because [...]]]></description>
			<content:encoded><![CDATA[<p>(<strong>Updated</strong> on 2007-10-31 with simpler steps. This post assumes you are running Windows, but it&#8217;s actually applicable to Unix users if you replace the MiKTeX terms with their TeX Live counterparts. )</p>
<p>The most recent release of MiKTeX is 2.6 and it ships with pdfLaTeX 1.4. Unfortunately, it is <a href="http://http.theano.de/cgi-bin/bugzilla/show_bug.cgi?id=233">incompatible</a> with <a href="http://tclab.kaist.ac.kr/ipe/">Ipe</a>&#8217;s latest release 6.0pre28 because this version of Ipe cannot cope with the PDF generated by pdfLaTeX 1.4. As the next version of Ipe is not coming very soon (Otfried says &#8220;Certainly not before spring 2008.&#8221;), one solution would be to downgrade to MiKTeX 2.5 so that Ipe can use the pdfLaTeX 1.3 that ships with MiKTeX 2.5. But if you have upgraded to pdfLaTeX 1.4 with a reason (like <a href="http://magic.aladdin.cs.cmu.edu/2007/05/28/the-microtype-package/">having fun with <code>microtype</code></a>), then you can also keep the two installations side-by-side with some storage overhead (~100MB).  Assuming that your MiKTeX 2.6 is installed in <code>C:\texmf-2.6</code>, here is how you might do the MiKTeX 2.5 installation:</p>
<ol>
<li>Get a copy of <code>basic-miktex-2.5.2580.exe</code>. It&#8217;s the self-contained &#8220;basic installer&#8221; for MiKTeX 2.5 and contains some basic packages. This file does not seem to be available at the official <a href="https://sourceforge.net/project/showfiles.php?group_id=10783">MiKTeX download</a> page any more, but Google can help you find <a href="http://www.google.com/search?q=basic-miktex-2.5.2580.exe">a copy</a>, or you can get a <a href="/wp-uploads/basic-miktex-2.5.2580.exe">local copy hosted on this server</a>.</li>
<li>Launch the basic installer and install MiKTeX 2.5 to, say, <code>C:\texmf-2.5</code>.</li>
<li>After the installation finishes, remove <code>C:\texmf-2.5</code> from the PATH environment variable. That way, whenever you run <code>latex</code>, you are still running pdfLaTeX 1.4.</li>
<li>Run Yap 2.6 once and you will be prompted to associate .dvi files with it. (The 2.5 installer associates .dvi files with Yap 2.5, of course. And frankly, I recommend <a href="http://magic.aladdin.cs.cmu.edu/2007/03/06/switching-from-yap-to-dviout/">dviout over Yap</a>.)</li>
<li>Set up an environment variable called <code>IPEPDFLATEX</code> to override IPE&#8217;s default pdflatex command, eg, <code>IPEPDFLATEX=C:\texmf-2.5\miktex\bin\pdflatex.exe</code> if that&#8217;s where you installed it to. At this moment, you may also be interested to set up something like <code>IPELATEXDIR=C:\temp\iperun</code> to control where Ipe generates the temp files.</li>
<li>If you don&#8217;t use any special packages in your Ipe files, then you can skip this step. But for completeness, we can let MiKTeX 2.5 know about the extra packages installed in MiKTeX 2.6. From the Start menu, run MiKTeX 2.5->Settings. In the Roots tab, add <code>C:\texmf-2.6</code> to the bottom of the search list. Click OK and the filename database will be refreshed. (Unix users: this is the <code>Kpathsea</code> step. <a href="http://www.tug.org/texinfohtml/kpathsea.html#Path-sources">See here.</a>)</li>
</ol>
<p>At this point, the side-by-side installation is complete. Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2007/10/16/how-to-install-miktex-25-today/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Goto Last Change in Emacs</title>
		<link>http://magic.aladdin.cs.cmu.edu/2007/10/06/green-on-white/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2007/10/06/green-on-white/#comments</comments>
		<pubDate>Sat, 06 Oct 2007 20:30:44 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[Text Editing]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/?p=120</guid>
		<description><![CDATA[From an interesting idea in gnu.emacs.bug&#8230;
How many times have you found yourself mosying thru a file when you wonder, where the heck was I just editing?  Well, the best you can do is hit undo, ^F, and undo again, to get back.
&#8230; comes a very handy function in Emacs&#8212;get this elisp file and bind [...]]]></description>
			<content:encoded><![CDATA[<p>From an interesting <a href="http://groups.google.com/group/gnu.emacs.bug/browse_thread/thread/49587d39d6c7bb30/492dd6c9c1626dd9">idea</a> in gnu.emacs.bug&#8230;</p>
<blockquote><p>How many times have you found yourself mosying thru a file when you wonder, where the heck was I just editing?  Well, the best you can do is hit undo, ^F, and undo again, to get back.</p></blockquote>
<p>&#8230; comes a very handy function in Emacs&#8212;<a href="http://www.emacswiki.org/cgi-bin/emacs/goto-last-change.el">get this elisp file</a> and bind a key to <code>goto-last-change-with-auto-marks</code>. (I bind it to F4, but of course it&#8217;s up to you.)</p>
<p>I note that my typical usage is a bit different from the post above: I usually remember what I was just editing, but I am reviewing a different part of the file. This feature allows me to jump back to my editing point quickly.</p>
<p>I must have used it so frequently that I just pressed F4 in another editor&#8230; and that&#8217;s how I realize I should share it here.</p>
<p>P.S. You may also be interested in this bit of advice for a slightly different experience:</p>
<blockquote><p><code>(defadvice goto-last-change-with-auto-marks (before mav-goto-last-change activate)<br />
  "Split the window beforehand to retain the current view"<br />
  (unless (eq last-command 'goto-last-change-with-auto-marks)<br />
    (split-window-vertically)))</code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2007/10/06/green-on-white/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Current Ipe and pdfLaTeX Incompatibility</title>
		<link>http://magic.aladdin.cs.cmu.edu/2007/07/08/current-ipe-and-pdflatex-incompatibility/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2007/07/08/current-ipe-and-pdflatex-incompatibility/#comments</comments>
		<pubDate>Sun, 08 Jul 2007 18:10:12 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[Ipe]]></category>
		<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/2005/04/26/connectors-in-powerpoint/</guid>
		<description><![CDATA[I upgraded my MiKTeX installation to version 2.6 because I want to use pdfLaTeX 1.4 for microtyping. But it turns out that upgrading to MiKTeX 2.6 breaks the current release of Ipe:
Ipe cannot currently cope with the PDF output generated by the new version 1.40 of Pdflatex. This version is included in MikTeX 2.6 and [...]]]></description>
			<content:encoded><![CDATA[<p>I upgraded my MiKTeX installation to version 2.6 because I want to use pdfLaTeX 1.4 for <a href="http://magic.aladdin.cs.cmu.edu/2007/05/28/the-microtype-package/">microtyping</a>. But it turns out that upgrading to MiKTeX 2.6 breaks the current release of <a href="http://tclab.kaist.ac.kr/ipe/">Ipe</a>:</p>
<blockquote><p>Ipe cannot currently cope with the PDF output generated by the new version 1.40 of Pdflatex. This version is included in MikTeX 2.6 and in TexLive 2007. Therefore, Ipe does not currently work with MikTeX 2.6 or TexLive 2007. This will be fixed in Ipe 7.0.0, but since I&#8217;m changing many other things at the same time, do not expect this version before September 2007.</p></blockquote>
<p>Thankfully, I also have an older laptop and with Subversion, it is not difficult to work on both simultaneously.</p>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2007/07/08/current-ipe-and-pdflatex-incompatibility/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Microtype Package</title>
		<link>http://magic.aladdin.cs.cmu.edu/2007/05/28/the-microtype-package/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2007/05/28/the-microtype-package/#comments</comments>
		<pubDate>Mon, 28 May 2007 19:05:47 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/?p=393</guid>
		<description><![CDATA[The short of this post is: if you use a recent LaTeX distribution, then by simply adding \usepackage{microtype} to the preamble, your document will look subtly nicer and the number of overfull/underfull hboxes will go down. In two-column publications, this package is really wonderful.
The tricks implemented in this package are called &#8220;microtypography&#8221;, which refers to [...]]]></description>
			<content:encoded><![CDATA[<p>The short of this post is: if you use a recent LaTeX distribution, then by simply adding <code>\usepackage{microtype}</code> to the preamble, your document will look subtly nicer and the number of overfull/underfull hboxes will go down. In two-column publications, this package is really wonderful.</p>
<p>The tricks implemented in this package are called &#8220;microtypography&#8221;, which refers to techniques that enhance typography at a very small scale. (Tweaking <code>\baselinestretch</code> doesn&#8217;t count. <img src='http://magic.aladdin.cs.cmu.edu/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> )</p>
<p>One such technique is <a href="http://commons.wikimedia.org/wiki/Image:Textformatting.svg">character protrusion</a>&#8212;the ability to slightly extend certain characters, like punctuations, into the right margin. When used properly, the right margin will actually look &#8220;more justified&#8221; than justified. (The example above protrudes the hyphens completely. See below for a more moderate protrusion example that demonstrates the &#8220;more justified&#8221; look.)</p>
<p>Another technique is font expansion&#8212;the ability to dynamically tweak the width of the fonts within a line very slightly. The effect of this technique is more even density across a page due to better line breaking, but it is by design meant to be virtually imperceptible. (You can see it in before-after comparisons below.)</p>
<p>Aesthetics aside, these two techniques can cut down on the number of bad hboxes because they give extra flexibility to the line-breaking algorithm in TeX. Their effectiveness clearly varies from document to document, but the extra elbow room cannot hurt and so you may as well use it in every document. I especially like it in two-column publications based on my experiments.</p>
<p>A whole <a href="http://citeseer.ist.psu.edu/466366.html">thesis</a> has been written about the techniques that lead to this package, and the package also comes with an extensive <a href="http://www.ctan.org/tex-archive/macros/latex/contrib/microtype/">manual</a> that describes other microtypographic techniques implemented by the package. I must note that if you use a PDF viewer that supports PDF 1.5 (current <a href="http://www.foxitsoftware.com/pdf/rd_intro.php">Foxit</a> and <a href="http://blog.kowalczyk.info/software/sumatrapdf/">Sumatra</a> fans may need Adobe Reader), you can even interact with a &#8220;live demo&#8221; of character protrusion and font expansion on page 4 of the manual. This is a highly recommended exercise. The manual itself is, of course, typeset with both features turned on as an example of the package, and so at least you get to see character protrusion in action if you look for it.</p>
<p>Finally, system requirements: first of all, the package is smart and simply adding <code>\usepackage{microtype}</code> will &#8220;just work&#8221;. But you really want a recent pdfTeX backend, and you can upgrade to version 1.4 to reap all the benefits in your PDFs. Note that pdfTeX can also generate DVIs. I know, it sounds weird, but for instance, recent versions of MiKTeX actually generate DVIs via pdfTeX. (<code>microtype</code> was a big part of the reason I upgraded from 2.4, and that led me to undergo the conversion <a href="http://magic.aladdin.cs.cmu.edu/2007/03/06/switching-from-yap-to-dviout/">from Yap to dviout</a>.) Font expansion is not available in DVI though, but character protrusion does work.</p>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2007/05/28/the-microtype-package/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Debugging Bad \hboxes with AUCTeX</title>
		<link>http://magic.aladdin.cs.cmu.edu/2007/05/22/debugging-bad-hboxes-with-auctex/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2007/05/22/debugging-bad-hboxes-with-auctex/#comments</comments>
		<pubDate>Tue, 22 May 2007 20:33:02 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Text Editing]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/?p=421</guid>
		<description><![CDATA[When you use AUCTeX to compile a LaTeX document that contains an error, the compilation will fail and AUCTeX will remind you in the minibuffer area: LaTeX errors in `*foo output*'. Use C-c ` to display. By pressing C-c `, which invokes the next-error function, you can navigate to the source locations of the errors [...]]]></description>
			<content:encoded><![CDATA[<p>When you use AUCTeX to compile a LaTeX document that contains an error, the compilation will fail and AUCTeX will remind you in the minibuffer area: <code>LaTeX errors in `*foo output*'. Use C-c ` to display.</code> By pressing <code>C-c `</code>, which invokes the <code>next-error</code> function, you can navigate to the source locations of the errors and fix them one by one. It surely is one of the most convenient features of AUCTeX.</p>
<p>But AUCTeX also has a lesser known feature in this regard: by pressing <code>C-c C-w</code>, which by default binds to <code>TeX-toggle-debug-boxes</code>, you can tell AUCTeX whether the debugger should consider underfull/overfull <code>\hbox</code>es as errors too. When preparing for the final(*) revision of a document, this feature really makes locating the bad <code>\hbox</code>es a breeze! </p>
<p>(What&#8217;s remaining are of course the <code>\vbox</code>es, but there doesn&#8217;t seem to be any good way to locate them using the output messages alone.)</p>
<p>(*) It is usually not a very productive idea to fix bad boxes before the document content is finalized.</p>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2007/05/22/debugging-bad-hboxes-with-auctex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switching From Yap to Dviout</title>
		<link>http://magic.aladdin.cs.cmu.edu/2007/03/06/switching-from-yap-to-dviout/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2007/03/06/switching-from-yap-to-dviout/#comments</comments>
		<pubDate>Tue, 06 Mar 2007 21:40:26 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/?p=398</guid>
		<description><![CDATA[(Most recently updated on 2008-02-08, but I have kept the referenced MiKTeX version at 2.5. As far as I know, none of the changes in MiKTeX 2.6 and 2.7 matters to the topic of this post.)
I have recently upgraded my MiKTeX to the latest version 2.5 for some reason. And as much as I love [...]]]></description>
			<content:encoded><![CDATA[<p>(<strong>Most recently updated</strong> on 2008-02-08, but I have kept the referenced MiKTeX version at 2.5. As far as I know, none of the changes in MiKTeX 2.6 and 2.7 matters to the topic of this post.)</p>
<p>I have recently upgraded my MiKTeX to the latest version 2.5 for some reason. And as much as I love MiKTeX, I have switched from YAP (Yet Another Previewer, the DVI previewer in MiKTeX) to <a href="http://www.ctan.org/tex-archive/dviware/dviout/">Dviout</a>.</p>
<p>Dviout may not be very familiar to non-Japanese users because, to my understanding, it is primarily developed to deal with Japanese usage (think about fonts). However, it works equally well in English too. I can recommend Dviout over YAP 2.5 for several reasons:</p>
<ul>
<li>Dviout pretty much does everything YAP is capable of: color specials, <a href="http://arxiv.org/hypertex/">HyperTeX</a> jumps (you use the <a href="http://www.tug.org/applications/hyperref/"><code>hyperref</code></a> package, don&#8217;t you?), and perhaps most importantly, <a href="http://magic.aladdin.cs.cmu.edu/2006/06/07/latex-source-specials/">round-tripping using source specials</a> (but see the note below).</li>
<li>Unlike YAP 2.5, it does not seem to have any <a href="http://sourceforge.net/search/?ml_name=miktex-users&#038;type_of_search=mlists&#038;group_id=10783&#038;words=lock">DVI locking</a> issue, at least not in my daily usage of working on a large document. (To me, this alone is worth the switch until YAP eliminates the lock issue.)</li>
<li>In my experience, Dviout is much faster than YAP ever since it had a major change in version 2.5. Unlike YAP, Dviout does not make you choose between &#8220;dvips&#8221; vs &#8220;pk font&#8221; rendering&#8212;the former is slow, and the latter cannot be used when your document has any graphics. There is really no good choice in YAP.</li>
<li>The particular document I am working with is also somewhat graphics intensive. Like YAP, Dviout is able to call Ghostscript to show the included graphics in the DVI preview. But it also caches the generated bitmaps and use them later for unmodified figures. This saves me a lot of time. (And this is the primary reason why I expect to stick with Dviout for a while. I sprinkle <code>\parpic</code>s and <code>wrapfigure</code>s quite liberally on my spaghetti.)</li>
<li>Dviout allows you to customize the shortcut keys. I like to exercise my left hand more often and so I set some shortcuts on my left hand.</li>
<li>Dviout can do a text search directly inside DVIs. This can be handy if all you have is a DVI file. (Package documentation comes to mind. And yes, you could have converted it to PS and then do the search in the PS&#8230;)</li>
</ul>
<p>(Note: there is an issue that I am still puzzling on. In the forward search, sometimes Dviout will land on a few paragraphs earlier than the intended destination. I will update this post once I figure out the solution.</p>
<p><strong>Update</strong> 2007-03-07: Nailed it. First, recall that source specials are implemented by inserting tags that specify the source file and the corresponding line number into the DVI file. The problem is that sometimes the line numbers in the tags are not in increasing order. Here is how the stream of tags might look like: <code>{src:1003main.tex}{src:1055main.tex}{src:1015main.tex}{src:1019main.tex}</code>. In this case, if you ask the DVI previewer to go to line 1015 of main.tex, a simple scan algorithm will hit the second tag and then incorrectly conclude that no further reading is necessary. This is exactly what happened. Workaround? I guess I will have to wait until I finish my current project and patch the source directly.)</p>
<p>Below I will show how to get Dviout working with MiKTeX 2.5. (<strong>Update</strong> 2007-11-15: The same instruction works for MiKTeX 2.6 because there is no change in directory layout.)</p>
<ol>
<li>Remove the directory <code>C:\localtexmf\fonts</code> if you have one. It contains your existing PK font files. We can afford to regenerate them. MiKTeX 2.5 by default put PK files in a different location too.</li>
<li>Create a new file <code>dviout.par</code> and put it in the same directory with <code>dviout.exe</code>. It&#8217;s the preference file for Dviout.</li>
<li>I have included the non-default parameters that I use at the end of this post. You can use it as your first <code>dviout.par</code> and start from there. As you can see, there are some hard-coded path names that you will need to change. The following is a list of parameters that you want to pay attention to, in the order of appearance in my <code>dviout.par</code> below:
<dl>
<dt><code>GS</code></dt>
<dd>This means &#8220;On&#8221; with &#8220;Direct PS&#8221; turned off in the Graphic tab. Keeping Direct PS off can mitigate a class of problems due to dvi files prepared with source specials containing postscript. For instance, you can generate such a dvi file by using <code>hyperref</code> with the <code>dvips</code> driver, which is usually the default. The right driver for dviout is <code>hypertex</code>, used like this <code>\usepackage[hypertex]{hyperref}</code>.</dd>
<dt><code>gsx</code></dt>
<dd>You may have installed Ghostscript somewhere else. I note that MiKTeX comes with Ghoscript these days, but I usually keep an installation of the most recent Ghoscript so I don&#8217;t use the one that comes with MiKTeX.</dd>
<dt><code>gdat</code></dt>
<dd>All my documents store their figures in a <code>figure</code> subdirectory. The current setting tells Dviout to cache the preview bitmaps in the same subdirectory instead of the parent directory where the DVI is located.</dd>
<dt><code>gen</code></dt>
<dd>I installed my MiKTeX there. The default for 2.7 would be <code>`C:\Progra~1\miktex~1.7\bin\makepk.exe ^s ^d ^D ^M</code>. There should be no space in the path name and so you must use short path. Also, be careful with the backquote character.</dd>
<dt><code>key</code></dt>
<dd>I have added four shortcut keys to my config. &#8220;z&#8221; and &#8220;x&#8221; are for back and forward, &#8220;-&#8221; and &#8220;=&#8221; are for zooming out and in. Also, note that &#8220;space&#8221; is by default mapped to next-page, and so the pair &#8220;z&#8221; and &#8220;space&#8221; is all I use most of the time. Remember, the shortcuts are fully configurable in the Option->Set Parameter->Key tab.</dd>
<dt><code>BMP</code> and <code>scale</code></dt>
<dd>I have made an unusual choice here because of my late-night TeXing. The negative numbers represent negative gamma, which is to say that the DVI text is displayed in white on black. If you want the normal black on white, change the -400 to 1100. The particular number depends largely on the font you use and your monitor, but 1100 is in the ball park. (This answers <a href="http://magic.aladdin.cs.cmu.edu/2007/03/06/switching-from-yap-to-dviout/#comment-21450">rmcd&#8217;s comment.</a>)</dd>
<dt><code>TEXROOT</code></dt>
<dd>For MiKTeX 2.6, the current setting is a sensible choice. This is what <code>^r</code> in the <code>TEXPK</code> option expands into.</dd>
<dt><code>TEXPK</code></dt>
<dd>If you have installed MiKTeX 2.6 at its default destination, use <code>TEXPK=”^r\fonts\pk\\dpi^d\^s.pk;C:\Program Files\MiKTeX 2.6\fonts\vf\\^s.vf”</code> instead. You can read my comment on 2007-03-23 to understand what it does and how you can come up with the right setting for your machine with the help of YAP.</dd>
<dt><code>TEXFONTS</code></dt>
<dd>According to the Dviout manual, this option is needed when you cannot generate a PK font but you want to replace the missing characters with spaces of the correct size, hence the need to locate the TFM (font metric) files. I would say that if you cannot generate an English PK font, then you want to resolve the issue completely instead of relying on this feature.</dd>
<dt><code>src</code></dt>
<dd>I use GNU Emacs on Windows since a long time ago and I am still at version 21. That explains why I picked <code>gnuclientw</code> as my <code>src</code> editor. In the comments, rmcd explained how to use <code>emacsclient</code> instead. Dviout supports DDE as well and so you can use many other editors. See the help file for instructions.</dd>
<dt><code>gsrc</code></dt>
<dd>I use <a href="http://tclab.kaist.ac.kr/ipe/">Ipe</a> for most of my graphics. That explains the path in <code>gsrc</code>.</dd>
<dt><code>isp</code></dt>
<dd>With the <code>GS</code> option above, we have turned off Direct PS. This &#8220;ignore some source specials&#8221; setting further suppresses a whole bunch of (mostly harmless) warnings. There are pros and cons, but I think this together with the <code>GS</code> setting above is a sensible default.</dd>
<dt><code>file</code></dt>
<dd>This is where you put <code>dviout.par</code>. Of course, you don&#8217;t really change this setting by changing it inside <code>dviout.par</code>, but this is a non-default setting with a hardcoded path. <img src='http://magic.aladdin.cs.cmu.edu/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </dd>
</dl>
</li>
<li>Finally, to make AUCTeX use Dviout instead of YAP, here is a snip from my <code>tex-site.el</code>. Note that I am showing you Emacs Lisp here and as rmcd pointed out in his comment, you do not want to enter the backslashes before the two inner double-quotes if you are using Emacs&#8217;s <code>customize-variable</code> command to change your <code>TeX-view-style</code>. The backslashes are only necessary in Emacs Lisp so that we escape the two inner double-quotes.<br />
<blockquote><p><code>(setq TeX-view-style<br />
                                                 '(("^a5$" "yap %d -paper a5")<br />
		       ("^landscape$" "yap %d -paper a4r -s 4")<br />
		       ("^epsf$" "gsview32 %f")<br />
		       ;;("." "yap -1 -s%n%b %d")<br />
                       ("." "dviout -1 %d \"# %n %b\"")))<br />
</code></p></blockquote>
</li>
</ol>
<p>Here are some usage tips on Dviout:</p>
<ul>
<li>As much as I prefer not to ask you to touch the registry, you want to know that Dviout remembers some of its settings in <code>HKCU\Software\SHIMA\DVIOUT</code>. For instance, it stores the window dimensions there. (I set my xPos, yPos, Height and Width in the registry once and for all.) I believe that all options set <em>outside</em> of <code>Option->Set Parameters</code>, such as <code>Option->Continuous Renew</code>, are stored in the registry.</li>
<li>You may also want to disable <code>Options->Check color specials</code> from the menu in case Dviout complains about your DVI file. It happens when your color specials have certain issues as explained in the manual. I meet these issues too frequently.</li>
<li>Make sure you enable <code>Options->Setup Parameters...->System->Auto Renew</code>. (It&#8217;s on by default, but it&#8217;s worth checking in case you turned it off by accident.) It forces a update check when you switch into Dviout from another application. This behavior is shared among most, if not all, DVI previewers.</li>
<li><code>Options->Continuous Renew</code> is a good thing if you have a large monitor or a dual monitor to let you see both your text editor and Dviout without overlap. This option will cause Dviout to pop into foreground when the DVI file is updated. Using Microsoft&#8217;s <a href="http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx">Tweak UI</a>, in <code>General->Focus</code>, enable <code>Prevent applications from stealing focus</code> and set it to flash the taskbar button one time. That will make Dviout always show you the latest DVI without stealing the focus from your text editor. (I use this with <a href="http://magic.aladdin.cs.cmu.edu/2007/11/06/continuous-latex-compilation-using-latexmk/">the continuous mode in latexmk</a>.)</li>
<li><strong>Most importantly</strong>, once you have customized the options using <code>Option->Setup Parameters</code> to your own liking, select <code>Option->Non-default Parameters</code>. A small text box will pop up and you can copy and paste its content into your <code>dviout.par</code>. (That&#8217;s how I get the file below.)</li>
</ul>
<p>Have fun with Dviout!</p>
<p>Finally here is my current <code>dviout.par</code> (last updated 2008-02-08). I have also uploaded it as a <a href='/wp-uploads/dviout.par'>file</a> to avoid line wrapping and other funny things due to quotes.</p>
<blockquote><p><code>br=0x800000<br />
bf=0x800000<br />
bb=0x1d4c000<br />
multi=4<br />
button=+<br />
dpi=600<br />
GIF=5<br />
GS=17<br />
gsx=C:\Progra~1\gs\gs\bin\gswin32c.exe^-IC:\Progra~1\gs\fonts;C:\Progra~1\gs\gs\lib;C:\Progra~1\gs\gs\Resource^-dTextAlphaBits=4^-dGraphicsAlphaBits=4<br />
gdat=./figures<br />
gsize=+<br />
search=448<br />
sdpi=600<br />
hyper=0x1d030<br />
hbuf=0x400000<br />
ToEdit=^c^V<br />
FB=2<br />
varf=+<br />
gen="`C:\texmf\miktex\bin\makepk.exe ^s ^d ^D ^M"<br />
y=F614.295pt:794.96999ptP<br />
key=DR=-:DM==:JL=x:JF=z<br />
log=C:\temp\dviout.log<br />
BMP=6:6:-400<br />
scale=2:2:-400:4:4:-400:2:2:1100:4:4:1100<br />
TEXROOT="C:\Documents and Settings\All Users\Application Data\MiKTeX\2.6"<br />
TEXPK=^r\fonts\pk\\dpi^d\^s.pk;C:\texmf\fonts\vf\\^s.vf<br />
TEXFONTS=C:\texmf\fonts\tfm\\<br />
src='gnuclientw^s+%d "%s"'<br />
gsrc=.eps.pdf=C:\UnixHome\ipe\bin\ipe.exe^s"%n.ipe"<br />
isp=ps:SDict;!<br />
file=c:\unixhome\dviout\dviout.par<br />
</code></p></blockquote>
<p>P.S. I should mention that staying with MiKTeX 2.4 would not be a bad choice if I could&#8230; You should also be reminded of <a href="http://www.miktex.org/Issues.aspx">potential issues</a>  if you decide to upgrade to Vista before <a href="http://www.miktex.org/2.6/">MiKTeX 2.6</a> comes out.</p>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2007/03/06/switching-from-yap-to-dviout/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>Adjust the Slide Show Window</title>
		<link>http://magic.aladdin.cs.cmu.edu/2007/02/01/adjust-the-slide-show-window/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2007/02/01/adjust-the-slide-show-window/#comments</comments>
		<pubDate>Thu, 01 Feb 2007 11:01:52 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[PowerPoint]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/?p=379</guid>
		<description><![CDATA[Sometimes you will encounter a projector screen that hangs so low, making the bottom of the slide way below anyone in the room can see. One way to avoid this annoying situation is to leave some space at the bottom of your slides. This works well when you know the room ahead of time. But [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you will encounter a projector screen that hangs so low, making the bottom of the slide way below anyone in the room can see. One way to avoid this annoying situation is to leave some space at the bottom of your slides. This works well when you know the room ahead of time. But what if you are visiting a new place? (Hmm&#8230; job talks come to mind.)</p>
<p>Turns out there are actually a couple of solutions.</p>
<p>My favorite is to use a rarely used feature of PowerPoint&#8212;you can in fact adjust the dimension of the slide show window through some minimal scripting. Here is a <a href='/wp-uploads/AdjustSlideShowWindow.ppt'>demo file</a> as a proof of concept. (If you use Internet Explorer, please save the file and then open it locally. See below.) I can imagine many fancy mechanisms to integrate this into your slides.</p>
<p>Or you can open the PowerPoint file inside Internet Explorer, which will host the slide show inside its client area. (Try drag and drop the file into IE.) You can then resize the IE window as you go.</p>
<p>Or you can hold down the <code>Alt</code> key and then click that tiny &#8220;Slide Show from current slide&#8221; icon in the lower left corner. Your slide show will now be run in a windowed mode, similar to how it is being run when you open a PowerPoint file inside IE. You can then adjust this window like any other window.</p>
<p>All of these methods have issues though. If you use the first, you need to cover up the strip of desktop exposed due to a reduced window size. I bring a full-screen-sized black bitmap for this reason. But if you do this right, it does look very nice. The second and third bring unnecessary clutter like toolbars to the projector screen. Plus, you lose the ability to make pen annotations if you happen to be a tablet user.</p>
<p>P.S. I tested this in version 2003 only. I no longer have the older versions.</p>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2007/02/01/adjust-the-slide-show-window/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Two Patches for X41 Tablet</title>
		<link>http://magic.aladdin.cs.cmu.edu/2006/11/09/two-patches-for-x41-tablet/</link>
		<comments>http://magic.aladdin.cs.cmu.edu/2006/11/09/two-patches-for-x41-tablet/#comments</comments>
		<pubDate>Thu, 09 Nov 2006 06:24:08 +0000</pubDate>
		<dc:creator>Maverick Woo</dc:creator>
				<category><![CDATA[Tablet PC]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://magic.aladdin.cs.cmu.edu/?p=259</guid>
		<description><![CDATA[Recently I have finally switched to a ThinkPad X41 Tablet for my everyday computing need. I said &#8220;finally&#8221; because I actually had the machine since more than a year ago (Sept 2005), but it had more than a couple issues that kept me from relying on it solely. I remember being asked on a trip [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I have finally switched to a ThinkPad X41 Tablet for my everyday computing need. I said &#8220;finally&#8221; because I actually had the machine since more than a year ago (Sept 2005), but it had more than a couple issues that kept me from relying on it solely. I remember being asked on a trip why I brought two laptops along. <img src='http://magic.aladdin.cs.cmu.edu/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>The good news is that Microsoft has fixed two of my issues over the summer. If you are using a X41 tablet as well (already there are five in my group), here they are:</p>
<ul>
<li>Insufficient System Resources Exist to Complete the API during hibernation: <a href="http://support.microsoft.com/?kbid=909095">hot fix 909095</a></li>
<li>The mouse pointer or pen pointer behavior is irregular in Windows XP Tablet PC Edition 2005: <a href="http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-65472">hot fix 920295</a></li>
</ul>
<p>The latter is particularly important since it makes the tablet a lot more responsive when the CPU is under load. I can&#8217;t imagine how I could have lived with a &#8220;jumpy&#8221; cursor for over a year&#8230;</p>
<p>Now if only someone makes a fast and reliable 1.8&#8243; harddrive&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://magic.aladdin.cs.cmu.edu/2006/11/09/two-patches-for-x41-tablet/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
