summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/man/man1/ltx2unitxt.1
blob: 8dc8e7142643935c36f81dd8773962beca373e53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.49.3.
.TH LTX2UNITXT "1" "November 2023" "ltx2unitxt  " "User Commands"
.SH NAME
ltx2unitxt \- convert LaTeX source fragment to plain (Unicode) text or simple html
.SH SYNOPSIS
.B ltx2unitxt
[\fI\,-c CONFIG\/\fR] [\fI\,-o OUTPUT\/\fR] [\fI\,--html\/\fR] [...] [\fI\,INFILE\/\fR]...
.SH DESCRIPTION
Convert the LaTeX source in INFILE (or standard input) to plain text
using Unicode code points for accents and other special characters; or,
optionally, output HTML with simple translations for font changes and url
commands.
.PP
Common accent sequences, special characters, and simple markup commands
are translated, but there is no attempt at completeness. Math, tables,
figures, sectioning, etc., are not handled in any way, and mostly left
in their TeX form in the output. The translations assume standard LaTeX
meanings for characters and control sequences; macros in the input are
not considered.
.PP
The input can be a fragment of text, not a full document, as the 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. It uses the LaTeX::ToUnicode
Perl library for the conversion; see its documentation for details.
.PP
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.
.PP
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.
.PP
For an example of using this script and associated code, see the TUGboat
processing at
https://github.com/TeXUsersGroup/tugboat/tree/trunk/capsules/crossref.
.SH OPTIONS
.TP
\fB\-c\fR, \fB\-\-config\fR=\fI\,FILE\/\fR
read (Perl) config FILE for a hook, as explained above
.TP
\fB\-e\fR, \fB\-\-entities\fR
output entities &#xNNNN; instead of literal characters
.TP
\fB\-g\fR, \fB\-\-german\fR
handle some features of the german package
.TP
\fB\-h\fR, \fB\-\-html\fR
output simplistic HTML instead of plain text
.TP
\fB\-o\fR, \fB\-\-output\fR=\fI\,FILE\/\fR
output to FILE instead of stdout
.TP
\fB\-v\fR, \fB\-\-verbose\fR
be verbose
.TP
\fB\-V\fR, \fB\-\-version\fR
output version information and exit
.TP
\-?, \fB\-\-help\fR
display this help and exit
.PP
Options can be abbreviated unambiguously, and start with either \- or \fB\-\-\fR.
.PP
Dev sources, bug tracker: https://github.com/borisveytsman/bibtexperllibs
Releases: https://ctan.org/pkg/bibtexperllibs
.PP
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.