<?xml version="1.0" encoding="ISO-8859-1"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xml:lang="en-US">
	<title>william.famille-blum.org news</title>
	<link rel="alternate" type="text/html" href="http://william.famille-blum.org/blog/index.php" />
	<modified>2012-05-20T13:06:19Z</modified>
	<author>
		<name>William blum</name>
	</author>
	<copyright>Copyright 2012, William blum</copyright>
	<generator url="http://www.sourceforge.net/projects/sphpblog" version="0.5.1">SPHPBLOG</generator>
	<entry>
		<title>On text sorting, the fact that Notepad++ is the best text editor, and 2011 wishes! </title>
		<link rel="alternate" type="text/html" href="http://william.famille-blum.org/blog/index.php?entry=entry110123-113226" />
		<content type="text/html" mode="escaped"><![CDATA[A few years ago I spent some time looking for the best text editor for Windows. After testing pretty much all the editors available at the time (Notepad2, Notepad++, UltraEdit, UltraPad, TextPad …) I finally reckoned that the most powerful and versatile one was Notepad++.  I have been using it since then and I regularly recommend it to other people.<br />I could not convince my father to ditch TextPad though because of  its superior text sorting feature. It&#039;s true that the standard sorting plugin shipping with Notepad++ is pretty basic. It only lets you sort the file at a given column and by lexicographical order only.<br />TextPad on the other hand lets you define a sort criterion based on up to three user-defined columns. Also for each column the comparison can be either numerical or lexicographical.<br /><br />The thing is that I am very stubborn: Notepad++ *is* the best editor for Windows, and so to prove it to my father there were no way round it: I had to implement the missing sorting features for Notepad++! <br />Because Notepad++ is open-source I was able to start from existing code. It thus took less than a day to implement the missing feature as a plugin! Of course it had to be superior than TextPad&#039;s implementation. Hence it lets you define an unlimited number of columns, unlike TexPad which is limited to only three.<br /><br /><a href="javascript:openpopup('http://william.famille-blum.org/software/nppcolumnsort/nppcolumnsort.png',519,454,false);"><img src="http://william.famille-blum.org/software/nppcolumnsort/nppcolumnsort.png" width="512" height="448" border="0" alt="" /></a><br /><br />I figured out that my father may not be the only one interested by the plugin so here you go: You can download the plugin including sources at <a href="http://william.famille-blum.org/software/nppcolumnsort/NppColumnSort.zip" target="_blank" >NppColumnSort.zip</a><br /><br />To install it just copy the plugin DLL (under &#039;Unicode Release&#039; in the zip file) to the Notepad++ plugin directory (%ProgramFiles(x86)%\Notepad++\plugins if your Windows is 64bit; %ProgramFiles%\Notepad++\plugins if your Windows is 32bit).<br />	<br />I take the opportunity to wish you a great year 2011 and hope that all your problems will be sorted in whichever order you prefer be it lexicographical or numerical!<br />]]></content>
		<id>http://william.famille-blum.org/blog/index.php?entry=entry110123-113226</id>
		<issued>2011-01-23T00:00:00Z</issued>
		<modified>2011-01-23T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Plotting thesis word count</title>
		<link rel="alternate" type="text/html" href="http://william.famille-blum.org/blog/index.php?entry=entry101116-033103" />
		<content type="text/html" mode="escaped"><![CDATA[I have been playing around with PowerShell lately. Here is the little exercise that I set myself: measure and plot the evolution of the number of words in a TeX document.<br /><br />The script takes a list of folders as parameters. For every TeX file found it calls <a href="http://folk.uio.no/einarro/Comp/texwordcount.html" target="_blank" >texcount.pl</a> to counts the number of words in the document. The total number of words is then saved to a CSV file and two graphs are plotted: one using <a href="http://www.gnuplot.info/" target="_blank" >GNU plot</a> and the other one using the Google Visualization API.<br /><br />I did not have this script at the time of my studies, but since I have been using Subversion to backup and manage revisions of my writings throughout my studies I was able to retrieve past revisions of my work and generate a few word count measurements. The graph below, generated using the PowerShell script, shows the evolution of word count in my D.Phil thesis.<br />
  <script type='text/javascript' src='https://www.google.com/jsapi'></script>
    <script type='text/javascript' src='http://william.famille-blum.org/twc/chart.js' ></script>
    <script type='text/javascript'>
      google.load('visualization', '1', {'packages':['annotatedtimeline']});
      google.setOnLoadCallback(drawChart);
      function drawChart() {
        var data = new google.visualization.DataTable();
        fillChartData(data);
        var chart = new google.visualization.AnnotatedTimeLine(document.getElementById('chart_div'));
        chart.draw(data, {displayAnnotations: true, scaleType: 'maximized'});
      }
    </script>
    <div id='chart_div' style='width: 600px; height: 400px;'></div>

<br />The graph reveals few facts to the reader. For instance that I was not very productive during the first year... But it also shows that I started writing up early on (thanks to my supervisor&#039;s advice). Some doctoral students prefer to postpone writing up till the last few months.  I am glad I did not adopt this strategy; it made the whole writing process very smooth and eliminate a lot of stress towards the end.<br /><br />The graph also shows two particularly productive periods corresponding to two important milestones in the D.Phil process at Oxford: the transfer and the confirmation. The thesis reached a plateau on October 5th 2008, the date when I submitted the thesis to the examiners. There were subsequent minor modifications requested by the examiners after the viva, as well as some cosmetic changes for the camera-ready version sent to the Bodleian.<br /><br />Here is the script in case you are interested: <a href="http://william.famille-blum.org/twc/twc.ps1" target="_blank" >twc.ps1</a>. I suggest you to use it to monitor your progress on your writings by setting it as a daily job under the Windows Task Scheduler.<br /><br />The usage syntax is <br /><code>./twc.ps1 [-tag name] [-date date] [-output outputdir] inputdirs</code><br /><br />For example the command<br /><code>./twc.ps1 -tag first_version -date &#039;16 Nov 2010&#039; -output c:\report c:\thesis </code><br />creates a datapoint named &#039;first_version&#039; at the specified date whose value is the total number of words in TeX documents under directory c:\thesis; the CSV file and graphs are stored under c:\report.<br /><br />For more examples just run the command without argument.]]></content>
		<id>http://william.famille-blum.org/blog/index.php?entry=entry101116-033103</id>
		<issued>2010-11-16T00:00:00Z</issued>
		<modified>2010-11-16T00:00:00Z</modified>
	</entry>
	<entry>
		<title>SyncTeX-related news</title>
		<link rel="alternate" type="text/html" href="http://william.famille-blum.org/blog/index.php?entry=entry081007-214408" />
		<content type="text/html" mode="escaped"><![CDATA[- Most TeX distributions (TeXLive 2008 and MikTex 2.7) have now been updated to support SyncTeX. The option is activated with the -synctex switch at the command-line as follows:<br /><code>pdflatex -synctex=-1 mybook.tex</code><br /><br />This command produces a file name &#039;mybook.synctex&#039; which can then be used to perform PDF&lt;-&gt;TEX synchronization. The file can be large so you can instead produce a compressed version (mybook.synctex.gz) with:<br /><code>pdflatex -synctex=1 mybook.tex</code><br /><br />- The SyncTeX patch that I&#039;ve developed is now maintained in the main development branch of SumatraPDF; it is part of the <a href="http://blog.kowalczyk.info/software/sumatrapdf/download.html" target="_blank" >latest official release (version 0.9.3)</a>. <br /><br />I will still continue to publish <a href="http://william.famille-blum.org/software/sumatra/SumatraPDF-sync.exe" target="_blank" >my own builds</a> of SumatraPDF to my website (the executable is updated regularly even though I am not posting about it): at the moment the only difference with the official release is the presence of a dialog box to let the user configure the inverse-search command. (In the official release this is done by passing command line parameters to SumatraPDF.exe.)<br /><br />- I wrote a <a href="http://william.famille-blum.org/blog/static.php?page=static081010-000413" target="_blank" >short documentation</a> to help you configure your favourite editors for synchronization with SumatraPDF.<br /><br /><b>Links:</b><br />- <a href="http://william.famille-blum.org/blog/static.php?page=static081010-000413" target="_blank" >Editors configuration</a><br />- <a href="http://william.famille-blum.org/software/sumatra/index.html" target="_blank" >My own build of SumatraPDF</a><br />- SumatraPDF <a href="http://blog.kowalczyk.info/software/sumatrapdf/download.html" target="_blank" >official build</a><br />- <a href="http://miktex.org/" target="_blank" >MikTeX</a> and <a href="http://www.tug.org/texlive/" target="_blank" >TeXLive</a>]]></content>
		<id>http://william.famille-blum.org/blog/index.php?entry=entry081007-214408</id>
		<issued>2008-10-07T00:00:00Z</issued>
		<modified>2008-10-07T00:00:00Z</modified>
	</entry>
	<entry>
		<title>SyncTeX and SumatraPDF</title>
		<link rel="alternate" type="text/html" href="http://william.famille-blum.org/blog/index.php?entry=entry080612-040012" />
		<content type="text/html" mode="escaped"><![CDATA[The author of the <a href="http://itexmac.sourceforge.net/" target="_blank" >pdfsync TeX package</a>, Jérôme Laurens, has developed a new technology called SyncTex that will eventually replace pdfsync. SyncTex is directly integrated in pdftex. This has many benefits: there is no need to load a special package in your .tex document, there is no more incompatibilities with latex packages, and the synchronization is more precise. One disadvantage is that the generated synchronization file can be huge, and for that reason it has an option to zip it.<br /><br /><h4>Installing SyncTex</h4><br />SyncTex is not yet released in current TeX distributions (TeXLive 2007), but you can install it by following these steps:<br />1- install the <a href="http://www.tug.org/texlive/" target="_blank" >TexLive distribution</a><br />2- replace the following three files:<br />  C:\TeXLive2007\bin\win32\pdftex.exe<br />  C:\TeXLive2007\bin\win32\pdftex.dll<br />  C:\TeXLive2007\bin\win32\kpathsea356.dll<br />by <a href="http://www.tug.org/svn/texlive/trunk/Master/bin/win32/pdftex.dll" target="_blank" >pdftex.dll</a>, <a href="http://www.tug.org/svn/texlive/trunk/Master/bin/win32/pdftex.exe" target="_blank" >pdftex.exe</a>, and <a href="http://www.tug.org/svn/texlive/trunk/Master/bin/win32/kpathsea356.dll" target="_blank" >kpathsea356.dll</a>.<br />3- Regenerate the format files using the setup program from the TexLive CD<br /><br /><h4>Using SyncTex</h4><br />Now to generate .synctex files you just need to specify the --synctex command-line argument to pdftex as follows:<br /><code>pdflatex --synctex=-1 test.tex</code><br /><br /><h4>Synchronizing with SumatraPDF</h4><br />The author has provided a reference parser implementation for  synchronization files generated by SyncTex. I have integrated it in SumatraPDF. If people are interested to test it, a binary version is available <a href="http://william.famille-blum.org/software/sumatra/SumatraPDF-sync.exe" target="_blank" >here</a>.<br /><br />I plan to commit my changes to the Sumatra code base in the coming days if I see that it works well with me.]]></content>
		<id>http://william.famille-blum.org/blog/index.php?entry=entry080612-040012</id>
		<issued>2008-06-12T00:00:00Z</issued>
		<modified>2008-06-12T00:00:00Z</modified>
	</entry>
	<entry>
		<title>PDF-Latex synchronization (continued)</title>
		<link rel="alternate" type="text/html" href="http://william.famille-blum.org/blog/index.php?entry=entry080515-065447" />
		<content type="text/html" mode="escaped"><![CDATA[<ins>Update 21 May 2008: script file for emacs added</ins><br /><br />This is the dual of the previous post: I have now implemented forward-search in SumatraPDF, i.e. the ability to go from the source .tex file to the corresponding location in the PDF. The communication between the TeX editor and SumatraPDF relies on the <a href="http://en.wikipedia.org/wiki/Dynamic_Data_Exchange" target="_blank" >DDE</a> protocol. (Most TeX editors such as WinEdt and TeXnicCenter support it.)<br /><br /><h5>Binary</h5><br />If you want to give it a try, the updated binary can be downloaded <a href="http://william.famille-blum.org/software/sumatra/SumatraPDF-sync.exe" target="_blank" >here</a>.<br /><br /><h5>Configuring with WinEdt</h5><br />For <a href="http://www.winedt.com/" target="_blank" >WinEdt</a>, I have created a macro file to do all the stuff automatically. To install it, proceed as follows:<br /><br />1- Download the macro file <a href="http://william.famille-blum.org/software/sumatra/Sumatra-Find.edt" target="_blank" >Sumatra-Find.edt</a>.<br />2- Save it in the folder: <code>C:\Program Files\WinEdt Team\WinEdt\Exec\</code><br />3- Edit the file: goto line 22 and replace the string &#039;d:\Tools\SumatraPDF-sync.exe&#039; by the path to your local copy of Sumatra.<br />4- Go to the menu &#039;Option\Menu setup&#039;. Create a new macro menu somewhere (under &#039;Accessories&#039; for instance) and fill the options as follows:<br />  Name: <code>Sumatra Find</code><br />  Macro: <code>Exe(&#039;%b\Exec\Sumatra-Find.edt&#039;);</code><br /> Requires File Filter: <code>%P\%N.pdf</code><br /> Start in: <code>%P</code><br /> Shortcut: <code>F8</code><br /><br />That&#039;s it! Now you can just press F8 anywhere in your .tex sources files and it will automatically locate the corresponding position in the PDF.<br /><br /><h5>Configuring with TeXnicCenter</h5><br />To setup forward-search with TeXnicCenter proceed as follows:<br />1- Menu &#039;Build\Define output profiles...&#039;<br />2- Select the profile &quot;Latex=&gt;PDF&quot;<br />3- Select the tab &#039;Viewer&#039;<br />4- Fill the options as follows:<br /> Path of executable: <code>c:\tools\SumatraPDF-sync.exe</code><br /> Forward search: select <code>DDE command</code><br /> Command: [ForwardSearch(&quot;%bm.pdf&quot;,&quot;%nc&quot;,%l,0)]<br /> server: SUMATRA<br /> topic: control<br /><br /><h5>Configuring with ntEmacs</h5><br />1- Download the script file <a href="http://william.famille-blum.org/software/sumatra/sumatra-forward.el" target="_blank" >sumatra-forward.el</a> and load it from your init.el file.<br />2- Make sure that you have the <a href="http://ftp.gnu.org/old-gnu/emacs/windows/docs/ntemacs/contrib/ddeclient.zip" target="_blank" >ddeclient tools</a>. (It is bundled with <a href="http://ntemacs.sourceforge.net/" target="_blank" >ntemacs</a>)<br />3- Press F8 in the TeX document to trigger a forward-search<br /><br /><h5>Synchronization in action</h5><br /><a href="http://william.famille-blum.org/software/sumatra/sumatra-sync.png" target="_blank" >Screenshot</a><br /><br />Enjoy! And feel free to post a comment to let me know how it works for you.<br />]]></content>
		<id>http://william.famille-blum.org/blog/index.php?entry=entry080515-065447</id>
		<issued>2008-05-15T00:00:00Z</issued>
		<modified>2008-05-15T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Synchronizing PDF files with Latex documents</title>
		<link rel="alternate" type="text/html" href="http://william.famille-blum.org/blog/index.php?entry=entry080514-043933" />
		<content type="text/html" mode="escaped"><![CDATA[I am currently in the process of writing up my PhD thesis using Latex. I just realized how spoiled Mac users are when it comes to TeX tool support: nearly all Tex editors support viewing PDF files with source synchronization (<a href="http://itexmac.sourceforge.net/" target="_blank" >iTeXMac2</a>, <a href="http://macromates.com/" target="_blank" >TextMate</a>, <a href="http://www2.ing.unipi.it/~d9615/homepage/texniscope.html" target="_blank" >TeXniscope</a>, <a href="http://www.uoregon.edu/~koch/texshop/" target="_blank" >TeXShop</a>, <a href="http://www.object-craft.com.au/projects/macosxutils/pdfviewer.html" target="_blank" >PDFViewer</a>). On the windows platform, until recently, not a single PDF viewer was capable of doing that including Acrobat, PDF-XChange Viewer, Foxit reader, and SumatraPDF.<br /><br />Of course under the Windows platform we have the Yap DVI viewer that comes with the <a href="http://miktex.org/" target="_blank" >MikTeX</a> distribution. Ah, Yap,... This crappy piece of software that becomes less and less usable as the version increases: poor responsiveness when browsing the document, no pre-caching of the images, polling the .dvi file thousands times a millisecond to check whether its content has changed instead of using the <a href="http://msdn.microsoft.com/en-us/library/aa365465(VS.85).aspx" target="_blank" >proper</a> Windows API, blocking of the .dvi file preventing latex from compiling, and last but not least: loads of modal error messages forcing you to switch to the mouse to get rid of them when you just want to be typing your latex document.<br /><br />A quick <a href="http://magic.aladdin.cs.cmu.edu/2008/01/02/sumatrapdf-08-released/" target="_blank" >browsing journey on the web</a> suggested me that I was not the only person to feel that frustrated about the current TeX viewing facilities on Windows. But since no one seemed to be interested in implementing the desired features, I decided to give it a try. <br /><br />So here we are: I have proposed several patches for <a href="http://blog.kowalczyk.info/software/sumatrapdf/" target="_blank" >SumatraPDF</a> that were accepted by the author: the first one implements autorefresh: when you recompile your tex document to pdf, the viewer automatically refreshes itself without any need for user interaction.<br /><br />The second feature is inverse-search synchronization based on <a href="http://itexmac.sourceforge.net/pdfsync.html" target="_blank" >pdfsync</a>: when you double-click on the pdf file it brings you directly to the .tex source file corresponding to that location in the pdf. By default the <a href="http://www.winedt.com/" target="_blank" >WinEdt</a> editor is invoked. This can be configured (Menu &#039;File\set inverse search command line&#039;). For instance the string to start <a href="http://www.toolscenter.org/" target="_blank" >TeXnicCenter</a> is<br /><br /><code>&quot;C:\Program Files\TeXnicCenter\TEXCNTR.EXE&quot; /ddecmd &quot;[goto(&#039;%f&#039;, &#039;%l&#039;)]&quot;</code><br /><br />For <a href="http://www.winedt.com/" target="_blank" >WinEdt</a> it is:<br /><br /><code>&quot;C:\Program Files\WinEdt Team\WinEdt\winedt.exe&quot; &quot;[Open(|%f|);SelPar(%l,8)]&quot;</code><br /><br />I have also updated <a href="http://william.famille-blum.org/software/latexdaemon/index.html" target="_blank" >LatexDaemon</a> to make it compatible with pdfsync.<br /><br />If you want to give it a try, you can download the <a href="http://william.famille-blum.org/software/sumatra/SumatraPDF-sync.exe" target="_blank" >binary file here</a>.<br />The changes to the source code have been submitted to the SVN repository at <a href="http://code.google.com/p/sumatrapdf/" target="_blank" >Google Code</a>.<br /><br />See also <a href="http://blog.kowalczyk.info/forum_sumatra/topic.php?TopicId=840&amp;Posts=7" target="_blank" >these</a> <a href="http://blog.kowalczyk.info/forum_sumatra/topic.php?TopicId=864&amp;Posts=4" target="_blank" >forum</a> <a href="http://blog.kowalczyk.info/forum_sumatra/topic.php?TopicId=868&amp;Posts=0" target="_blank" >posts</a>]]></content>
		<id>http://william.famille-blum.org/blog/index.php?entry=entry080514-043933</id>
		<issued>2008-05-14T00:00:00Z</issued>
		<modified>2008-05-14T00:00:00Z</modified>
	</entry>
	<entry>
		<title>My experience with the XML/Docbook/XSLT toolchain</title>
		<link rel="alternate" type="text/html" href="http://william.famille-blum.org/blog/index.php?entry=entry080121-063152" />
		<content type="text/html" mode="escaped"><![CDATA[Recently I have tried to learn how to use the Docbook toolchain to produce documentation. My overall impression is not so good. I have many complaints but I am mainly concerned with its poor performance.<br /><br />Take the editors: I have tried many of them including (XMLMind and Oxygen). On my machine (Athlon XP 1.25GHz, 1.5GB RAM, XP SP2), they all seem to struggle to analyze the XML document as I am typing it. With Oxygen, for instance, there is a noticeable delay of up to 5s when I type which makes it almost useless.<br />Of course you don&#039;t have to use an XML editor as you can edit your document with Notepad. However as the XSLT tools are very strict on the syntax (not like the way browsers interpret HTML), it can be quite hard to edit your document without assistance. Moreover since XML is by nature very verbose, you may end-up spending more time opening and closing corner brackets that actually typing your documents.<br /><br />Now concerning the XSLT parser, the results speak for themselves: Processing <a href="http://william.famille-blum.org/software/cracklock/xmldoc/cracklock-doc.xml" target="_blank" >36.7KB of XML</a> into a 33.3KB <a href="http://william.famille-blum.org/software/cracklock/xmldoc/cracklock-doc-web.html" target="_blank" >HTML file</a> took 34.172s with the <a href="http://xmlsoft.org/XSLT/xsltproc2.html" target="_blank" >xsltproc</a> parser and 38.719s with <a href="http://saxon.sourceforge.net/" target="_blank" >saxon.net 9.0.0.2</a>. For such a simple file (it&#039;s a very small document, not even a book) that&#039;s just ridiculous! To give an element of comparison, on the same machine, to compile the <a href="http://www.amazon.com/TeXbook-Computers-Typesetting-Donald-Knuth/dp/0201134489" target="_blank" >TeX book</a> (by Don Knuth) from a 1.35MB file TeX file into a 500-page PDF file weighting 2.23MB it just takes 7.25s!!! Conclusion, if Knuth had written his book using Docbook back in the 70s, he would probably still be waiting for the compilation to finish...<br /><br />Note:As most of these tools are written in Java (IDE and XSLT included) I guess that part of the poor performance has to be imputed to Java.]]></content>
		<id>http://william.famille-blum.org/blog/index.php?entry=entry080121-063152</id>
		<issued>2008-01-21T00:00:00Z</issued>
		<modified>2008-01-21T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Cracklock 3.8.27 released!</title>
		<link rel="alternate" type="text/html" href="http://william.famille-blum.org/blog/index.php?entry=entry071201-200254" />
		<content type="text/html" mode="escaped"><![CDATA[A new version of Cracklock correcting some bugs is available <a href="http://william.famille-blum.org/software/cracklock/index.html" >here</a>.]]></content>
		<id>http://william.famille-blum.org/blog/index.php?entry=entry071201-200254</id>
		<issued>2007-12-01T00:00:00Z</issued>
		<modified>2007-12-01T00:00:00Z</modified>
	</entry>
</feed>

