Archive for the ‘TeX’ Category

chess diagrams on A6 cards using LaTeX - 2/2

Friday, December 4th, 2009

In the first part I wrote: “put to a template in your favourite text processor”. Attached is a template (class-file) for LaTeX and an example, the explanations are below.

(more…)

TexML and unicode characters for math operators

Wednesday, November 25th, 2009

Bug (?) report: “after switching from LaTeX(pdflatex) to XeTeX(xelatex) as the PDF generator something has ceased to work. Mathematical operators given as unicode characters in math formulas do not show up in the final document.ยดยด

(more…)

chess publishing in latex, starting

Tuesday, September 15th, 2009

I’m experimenting with LaTeX and chess. As there is no “for dummies” information in internet, my notes (even if incorrect) could be useful for beginners.

So, the step 1. Print some game or some position.

(more…)

my wrappers around “includegraphics”

Monday, July 20th, 2009

To put an image to a document, LaTeX provides the command “\includegraphics“. As it often happens, due to LaTeX was designed for manual typesetting, this command is a nightmare for automatic generation. For a long time, I use a wrapper to solve 99% of the problems.

(more…)

XeLaTeX: change font for headers and footers

Friday, October 24th, 2008

I’ve noticed that headers and footers of the documents, generated by XeLaTeX, use some other font instead of Helvetica. After digging into the LaTeX code, the problem is solved.

(more…)

escape a TeX string in Python

Friday, October 17th, 2008

Do you generate [La]TeX files using Python? If yes, do you escape the special characters. Haven’t you forgotten to escape also empty strings?

To avoid reinventing the wheel, I tried to use TeXML libraries. This is the right choice, but one has to use a little trick.

(more…)

LaTeX to EPS

Tuesday, October 9th, 2007

I’m a bit furious. I spent a lot of time on getting EPS from LaTeX. Portability of PostScript and PDF is a great myth. This idea works only in theory. But in practice, one has to struggle with buggy software.

Finally, I’ve found a working sequence of conversion commands.

(more…)

LaTeX paragraphs cheat sheet

Monday, September 3rd, 2007

* Indents: first, left, right
\parindent, \leftskip, \rightskip

* Space: above, below:
\addvspace

* Align: left, right, center, justified
ragged2e package
\Centering \RaggedRight \RaggedLeft

* Font, linespacing
\selectfont and family

* Keep with next or previous paragraph:
\nobreak or some penalty

poster proposal for XML Prague 2007

Monday, June 11th, 2007

In addition to my talk “Generative XPath” at XML Prague 2007, I decided to submit also a poster:

Title: XML to beautiful documents

Abstract: I’d like to present an alternative to XSL-FO. Using TeX to create PDF from XML is an old trick, but thanks to TeXML (an XML syntax for TeX) and Consodoc (a publishing server), the process is greately simplified and the produced documents are of high quality.

* http://getfo.org/texml/ — URL linking to a web page related to the poster.
* http://consodoc.com/

general questions about DocBook -> LaTeX

Friday, February 23rd, 2007

In the mailing list docbook-apps, I recently answered to the post titled “General questions about DocBook -> LaTeX“. I think my notes are interesting not only for the subscribers, but also for others.

(more…)

file names in LaTeX

Monday, September 25th, 2006

The symbols like “_” and “<SPACE>” are special for LaTeX, therefore using them for file names used by LaTeX isn’t a good idea. Anyway, we can’t control environment and a solution is required. A bookmark for me: Passing Underscore.

LaTeX bizcard variation

Thursday, September 21st, 2006

I’ve adapted the LaTeX bizcard package for the following:
* A4 page.
* Two columns of visit cards, each card is of the size 85×55 mm.
* Top and bottom margins are 10mm.
* The distance between columns is 10mm.
* Left and right margins are 15mm.
Download.

GPL text variations

Monday, September 11th, 2006

I’ve spent some time trying to nicely format an GPL excerpt in LaTeX. The problem is that the all-caps text of the “no warrantly” section doesn’t fit to the TeX rules well. Finally, I gave up and decided to find out how this problem is handled by other people. I found the GNU General Public License (GPL) in LaTeX format on the official site gnu.org. Surprise! They don’t have a solution, they have a workaround. The all-caps text is converted to normal text. I like it. The workaround is adopted.

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…)