Friday, June 29, 2007

LaTeX Workshop Delivered

I'm still catching my breath after giving the LaTeX workshop on Tuesday (26th June). Talked non-stop for 1 hour 20 minutes and I still had several things I couldn't cover in time, especially demonstrating on-the-spot how an ACM conference paper can be produced from a default article document class, and show a few pages from the USMthesis package, etc.

The audience (20~30 people including both lecturers and postgrad students) seems to have liked the talk, and although I don't have any proper feedback data, here are some comments passed to me after the talk:
  • people have heard of LaTeX before, but have no idea how it's used.
  • people have heard of the wonderful "beautiful" outputs of LaTeX, but until I showed them a side-by-side comparison of output from LaTeX and Word, they had no idea what kind of "beautiful" output people meant.
  • people wanted to try LaTeX before, but didn't know what to install.
  • although I told them that some features like auto-generation of table of contents are also available in Word, people actually told me that they know about the feature in Word but "it's too hard to use", whereas in LaTeX one line of code will definitely get it done.
The fact that the Colloquium programme book was created with LaTeX (I helped the committee to do it within 2 days) helped convinced the audience with physical proof of what LaTeX can do...

Maybe within the next week or two, I'll get more comments and feedback via e-mail, or something. But at least now I've managed to raise some interest here...

Thursday, June 28, 2007

Vector Graphics Application with LaTeX PGF/Tikz

I simply must blog this before I go off for a meeting. Nicola Talbot has written a vector graphics program, JpgfDrawing, that can export to LaTeX code that renders the graphics using the Tikz/PGF package. PGF is used in the Beamer package, and I played with Tikz while preparing for the LaTeX workshop. It's the best drawing package for use with pdflatex I've encountered so far. (I'm not a fan of PS files, so I don't use PSTricks much, sorry.)

Sunday, June 24, 2007

Making booklets

So I was asked to help produce the program/abstract book for the CSPC'07 (Postgrad Colloquium) with LaTeX. I said Yes since here's a legitimate opportunity to get my LaTeX fix. ;-)

The end result was to be an A5-sized booklet, i.e. 2-up pages on an A4 sheet, folded. I tried the LaTeX booklet package, but it wouldn't play nice with the geometry package, not without me twiddling explicitly with the page sizes and margins. Dear, dear./>
Thank goodness for GNU/Linux though, since we can always use psutils for producing booklets, and we want PDF outputs anyway. And so, once the full-sized A4 abstractbook.pdf is done, these commands spring into action:

$ pdftops -paper A4 abstractbook.pdf abstractbook.ps
$ psbook -s40 abstractbook.ps absbook-sig.ps
$ psnup -n2 -pa4 absbook-sig.ps abstractbooklet.ps
$ ps2pdf -sPAPERSIZE=a4 abstractbooklet.ps


where the -s40 parameter to psbook signifies there should be 40 pages in the booklet. The number must be a multiple of 4. It doesn't matter if your full-size doc doesn't have the right number of pages; psbook will add blank pages as necessary, so just round up your actual page number to the next multiple of 4 to pass to psbook.

TA-DAAAAA!!!!




It was a learning experience especially the following points:
  • Do not be a smart-aleck and try to reset page numberings when making twoside documents. Let \frontmatter and \bodymatter do the job. Otherwise the odd/even page margins get all messed up.
  • Use the ltxtable package for longtable + tabularx. But then each longtable (with tabularx column specs) needs to be in its own individual file.
  • On the whole, LaTeX is relatively easier than
    • coaxing printers to co-operate.
    • proof-reading.
    • proof-reading.
    • ESPECIALLY the proof-reading.

Friday, June 15, 2007

Wednesday, June 13, 2007

秀萍当妈妈了!


Cynthia's a very close friend from my A-level and Warwick days. She's the kind of person that takes on life's challenges head-on, and I admire her greatly for that. So when she and Andrew (another Warwick coursemate!) got married, I was no end happy for them, and especially for Cyn.

Now they're proud parents of little Joelle Chow! She was born 9th June, 2007 at Royal Free Hospital, London. O joyous day, congratulations Andrew and Cynthia and little Joelle!

Friday, June 8, 2007

tex4ht

曾经好玩地尝试了 latex2html, HeVeA, TtH 等等。简单的 LaTeX 文件是没问题啦,都可以生成不错的 HTML,但若有特别的宏包、自己定义的指令,那就非常对不起了。(其中 TtH 的速度还真不是普通的快!)

最近发现了 tex4ht,似乎还没有什么可以难倒它的!皆因它会先生成一个 .dvi 文件,再从这个文件生成 HTML, OpenDocument 等其他格式。默认的 HTML 是有点丑啦,但可以自己定义 CSS 或其他设置来改善。最重要的是,啥宏包(或是自己定义)的指令都可以处理哦。

起初是有个小疑问:我已习惯了 \includegraphics{file} (即不写明 file extension),结果 tex4ht 就老是要找 .eps 文件……而我又不想改动成 file.eps 那么累赘,还真花了不少时间在网上搜索。最后终于找到解决方法。先要一个 myconfig.cfg 文件:
\Preamble{html}
\DeclareGraphicsExtensions{.jpg,.png,.eps,.pdf}
\begin{document}
\EndPreamble
然后运行(基本指令,当然还可以加上其他配置值)

htlatex myfile "myconfig"

就可以了。

Friday, June 1, 2007

The Rage with Patents

Why this obsession with patents? Why? Patents for industrial and engineering designs, I understand. But patents for algorithms and software procedures and computer applications?

Maybe I should have become a lawyer like my dad secretly wished (before he realised-- happily, I think -- I had a bigger knack for maths and such).

Well here's what Computer Science's Yoda (that's what he is to me) has to say about software patents: Prof Donald Knuth's 1994 Letter to the Patent Office.