Archive for the ‘TeX’ Category

source specials for PDF

Monday, September 4th, 2006

Some TeX implementations or macro packages provide the facility to automatically include so-called “source specials” into a .dvi file. These contain the line number, eventually a column number, and the filename of the .tex source. This makes it possible to jump from a .dvi file to the corresponding place in the .tex source and back (also called “reverse search” and “forward search”). I’ve asked for the same for .pdf files, and have got an answer from Will Robertson in comp.text.tex:

(more…)

parsing latex log files

Thursday, August 10th, 2006

In mary cases, LaTeX should be run several times to get the correct result (for example, to resolve cross-references). The only way to detect if re-run is required is to analyze the log file. I haven’t found anything ready to use, so I’ve written it myself.

(more…)

understanding if LaTeX run is successful

Thursday, March 23rd, 2006

I’m using LaTeX in batch scripts, and I need to detect if the result is successful. It seems the best way is to look into the log file. I wonder if an imaginery tool “texloginfo” exists to:

(more…)

showbox in LaTeX

Sunday, February 26th, 2006

Not a first time when I need to trace a LaTeX layout by digging into the details, and again I’ve spend time remembering how to do it. Fixing the magic in writing.

(more…)

minipage and vertical spacing, parskip

Friday, October 14th, 2005

I noticed that my \parskip was ignored by the “minipage” environment. After some investigations I found that many vertical spacing commands have a special behaviour inside a minipage, and that the command “if@minipage” is used quite often.

(more…)

avoiding space before and after list in a table cell

Friday, October 14th, 2005

The problem is best described by someone else’s question:

I’m trying to use the generic list environment inside a longtable. Unfortunately I get unexpected space above and below the list environment. If I use the same list between normal paragraphs, this extra space is not there.

Any ideas?

(more…)

TABLE TENNIS TABLES

captions of wide longtables are indented

Wednesday, October 12th, 2005

Some of my longtables are wider than \hsize (=\columnwidth). It’s ok. The problem is the left-aligned captions of such tables. If a table is X too wide, then the caption is indented by X.

(more…)

revising LaTeX notes on font substitutions

Wednesday, October 5th, 2005

Automatic font selection scheme in LaTeX somethimes is not so good. For example, when series “n” (normal) and “bx” (extra bold) are defined for a font, and an user want “b” (bold), the system uses “n” font, not “bx” font.

(more…)

avoiding babel shorthands

Tuesday, October 4th, 2005

Babel allows LaTeX to speak multiple languages. It also introduces shorthands, one- or two-character sequences, which help non-English authors to type language-specific letters easily. Unfortunately, this feature leads to problems when generating LaTeX-files automatically.

(more…)

WingDings font in LaTeX

Thursday, September 29th, 2005

My documents should use WingDings font, so I’ve added the font to LaTeX. It wasn’t easy task because (1) the font is True Type (2) the font encoding is non-standard.

(more…)

using Helvetica symbols in LaTeX

Thursday, September 22nd, 2005

A LaTeX document sets Helvetica as the main font, but some special symbols (like “copyright”) look strange. After detailed look at PDF, I found that the symbols aren’t taken from the font, but assembled from different items.

(more…)

image color inconsistency by pdfLaTeX and dvipdf

Thursday, September 15th, 2005

I’ve noticed that results of pdfLaTeX and LaTeX plus dvipdf sometimes differ. One case is the color of an image.

(more…)

Are CJK and everysel compatible?

Monday, September 12th, 2005

CJK and everysel seems not compatible. If a CJK document loads “everysel” package (or “ragged2e”, which loads “everysel”), the result has artefacts.

(more…)

LaTeX, CJK, and “Font C70/song/m/n/6/57=cyberb57 at 6.0pt not loadable: Metric (TFM) file not found.”

Monday, September 12th, 2005

I started to use CJK in LaTeX recently, and I spend a lot of time trying to fix the following problem:

! Font C70/song/m/n/9/65=cyberb65 at 9.0pt not loadable:
                         Metric (TFM) file not found.

                   relax
l.74 ^^e6^^97^^a0
                 \par
?

(more…)

making unicode pdf bookmarks with TeXML

Wednesday, September 7th, 2005

I’ve added a new feature to TeXML. Content of the element “pdf” is converted to utf16be and encoded using escape-sequences. It is useful for making PDF strings, in particular, for PDF bookmark strings.

(more…)

no Chinese bookmarks in Acrobat Reader

Thursday, June 23rd, 2005

I’ve spent two days understanding how to create CJK bookmarks using LaTeX. Finally, I checked the internal structure of a PDF document with a sheet of paper, a calculator and the PDF reference. The PDF document is correct. Problem is in Acrobat Reader 5 (AR5). It is said that AR5 uses the system font to display the bookmarks, and the system font on Windows 2000 Rus doesn’t have CJK symbols.

search path in LaTeX breaks expectations

Tuesday, June 21st, 2005

Some tutorials on non-root installation of LaTeX modules rely on the environment variable TEXMFLOCAL. Unfortunately, it doesn’t work when the folder “~/texmf” contains conflicting files.

(more…)

TeXML: any encoding as ASCII

Monday, June 20th, 2005

The TeXML development version 1.27 brings new essential functionality: “–ascii” parameter. Now it’s possible to generate plain ASCII TeX files in a desired encoding. Non-ascii bytes are encoded as “^^XX“.

(more…)

latex utf8 files as plain ascii

Wednesday, June 15th, 2005

I have problems with non-latin publishing through LaTeX, and I’m going to ask for help in forums. While asking, I should provide a sample LaTeX file, but how to show non-latin characters? Fortunately, I have TeX background and know some tricks. One of them is that combination “^^xx” is interpreted as a character with the hexadecimal code “xx” by the TeX reader before any other processing. So, for example, if I use the symbol “\u9009″ which is encoded in utf8 by bytes “e9″, “80″ and “89″, I can write in the source LaTeX file: “^^e9^^80^^89″.

Chinese publishing

Tuesday, June 14th, 2005

Without any knowledge of Chinese, I have to publish a Chinese document. Fortunately, I have a source as an utf8-encoded XML.

(more…)