LTX2UNITXT(1)
β¨ ltx2unitxt β¨
okay bestie, welcome to ltx2unitxt β it's a User Commands manual page and it's literally here to convert LaTeX source fragments into plain (Unicode) text, or, if you're feeling spicy, into simple html π
πΈ SYNOPSIS πΈ
ltx2unitxt [-c CONFIG] [-o OUTPUT] [--html] [...] [INFILE]...
π¦ DESCRIPTION π¦
So the whole vibe is this: it takes the LaTeX source in INFILE (or from standard input, if you're just piping stuff in like a main character) and converts it to plain text, using Unicode code points for accents and other special characters. OR β plot twist β it can optionally output HTML with simple translations for font changes and url commands. Iconic behavior honestly.
Common accent sequences, special characters, and simple markup commands get translated, but don't get it twisted: there is no attempt at completeness. Math, tables, figures, sectioning, etc., are not handled in any way, and are mostly just left in their TeX form in the output. No cap. The translations assume standard LaTeX meanings for characters and control sequences; macros in the input are not considered. π
The input can be a fragment of text, not a full document, because the whole purpose of this script was to handle bibliography entries and abstracts (for the ltx2crossrefxml script that is part of the crossrefware package). Patches to extend this script are welcome β fr fr, come thru. It uses the LaTeX::ToUnicode Perl library for the conversion; see its documentation for details. π
Conversion is currently done line by line, so TeX constructs that cross multiple lines are not handled properly. If it turns out to be useful, conversion could be done by paragraph instead. (not me being honest about the limitations π)
The config file is read as a Perl source file. It can define a function LaTeX_ToUnicode_convert_hook() which will be called early; the value it returns (which must be a string) will then be subject to the standard conversion. π
For an example of using this script and associated code, see the TUGboat processing at https://github.com/TeXUsersGroup/tugboat/tree/trunk/capsules/crossref. π
π OPTIONS π
-c,--config=FILEβ read (Perl) config FILE for a hook, as explained above β¨-e,--entitiesβ output entities&#xNNNN;instead of literal characters-g,--germanβ handle some features of the german package π©πͺ-h,--htmlβ output simplistic HTML instead of plain text π-o,--output=FILEβ output to FILE instead of stdout-v,--verboseβ be verbose (tell me everything bestie)-V,--versionβ output version information and exit-?,--helpβ display this help and exit
Options can be abbreviated unambiguously, and start with either - or --. Slay. π
π«Ά THE LORE π«Ά
Dev sources, bug tracker: https://github.com/borisveytsman/bibtexperllibs Releases: https://ctan.org/pkg/bibtexperllibs
ltx2unitxt (bibtexperllibs) 0.51 Copyright 2023 Karl Berry. This is free software: you can redistribute it and/or modify it under the same terms as Perl itself. π
and that's the whole page, bestie β ltx2unitxt, September 2024, from the ltx2unitxt manual. go forth and convert ur LaTeX, u got this πβ¨
π¦ where this page comes from
- debian trixie: liblatex-tounicode-perl 0.55-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- fedora 44: texlive-bibtexperllibs 12:svn76255-105.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- fedora 44: texlive-bibtexperllibs 12:svn76255-111.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- opensuse-leap 16.0: texlive-bibtexperllibs-doc 2025.221.1.91svn72184-160000.3.1 Β· GPL-2.0-or-later
- ubuntu questing: liblatex-tounicode-perl 0.55-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms