Archive for the ‘TeX’ Category

custom tex in rpm/apt distributions

Friday, January 6th, 2012

I prefer to use TeX from TeXlive distribution, not the default TeX bundled with an operating system. The problem is that rpm and apt tools check dependencies and insist on installing the wrong TeX. To trick the system, a fake package should be made and installed.

(more…)

\AddFontFeature in plain XeTeX

Tuesday, January 18th, 2011

XeLaTeX package “fontspec” provides an useful command “AddFontFeature” to add an effect to the curently selected font. Unfortunately, it works only if fontspec is used. Otherwise, a workaround is required. So far here is a draft to make text narrow:

(more…)

how to install latest LuaTeX

Tuesday, December 21st, 2010

After reading Paul Isambert’s article “Three things you can do with LuaTeX that would be extremely painful otherwise ” I finally decided to check LuaTeX. Unfortunately, the code from the article does not work under old LuaTeX from TeX Live 2009 (and probably from TeX Live 2010 too). I downloaded a binary from the site, tried to run it and got an expected error:

This is LuaTeX, Version beta-0.40.6-2009100220 (TeX Live 2009)
(Fatal format file error; I'm stymied)

(more…)

multi-page tables with inter-row page breaks

Monday, December 6th, 2010

I’m not sure that a typesetting system exists, which could break within a table row. I managed to do it (in the first approximation) in LaTeX: source code, PDF, some explanations.

running TeX tools from non-standard locations

Wednesday, April 28th, 2010

In some configurations (for example, when using MacTeX), if you copy a TeX-related binary to non-standard location, the tool stops working. More precisely, if a tool uses kpathsea library, special setup is required. More practically, is you compile something like dvisvgm, it might not work.

(more…)

XML to paper publishing with manual intervention

Thursday, April 15th, 2010

My paper “XML to paper publishing with manual intervention” is accepted for XATA 2010 (XML: Aplicações e Tecnologias Associadas), 19 and 20 May, Vila do Conde, Portugal. Abstract:

(more…)

unicode math in xelatex

Friday, March 26th, 2010

In XeTeX, an unicode version of TeX, it’s logical to use unicode math. However, till now (march 2010) unicode math publishing doesn’t work directly out of the box. Here are two solutions, one is fast (and not so wrong) and one is probably the future standard.

(more…)

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.