Previous |  Up |  Next


A TeX macro programmer sometimes needs to convert a string of tokens to another string of tokens with defined rules.For example, we need to remove accents from a Czech text or to recode this text to another encoding or to transform some special characters to something else or... For this purpose, the cnv.tex macro was designed.Last but not least motivation was the problem of my TeX colleague Jaromír Kuben: he needed to convert Czech text to PDF outlines (conversion to UNICODE) using hyperref.sty but without activating Czech characters by inputenc.sty. This article presents the cnv.tex macro for string conversion by a user defined table.The conversion process is out of normal expansion and each token (independent on category code) can be converted to a single token or a group of tokens.The macro is available including documentation on in files cnv.tex, cnv-pu.tex, and cnv-word.tex.
[1]*: cnv.tex – vlastní makro včetně dokumentace, cnv-pu.tex – konverzní tabulka pro PDF záložky, cnv-word.tex – experiment s konverzí celých slov.
Partner of
EuDML logo