Debian Codegraph @

utils/vlna/vlna-src/vlna.man

raw
1 .\" $Id$
2 .TH VLNA 1 "August 30 2022"
3 .nh
4 .SH NAME
5 vlna \- adds tilde after each non-syllabic preposition
6 .SH USAGE
7 .B vlna
8 [\fIoptions\fP]
9 [\fIfilenames\fP]
10 .SH PREFACE
11 There exists a special Czech and Slovak typographical rule: you cannot
12 leave the non-syllabic preposition on the end of one line and continue
13 writing text on next line. For example,
14 you cannot write down the text "v lese" (in a forest) like
15 "v<new-line>lese". The program vlna adds the asciitilde
16 between such preposition and the next word and removes the space(s) in
17 this place. It means, the program converts "v lese" to "v~lese". You
18 can use this program as a preporcessor before TeXing. Moreower, you
19 can set another sequence to store instead asciitilte (see the
20 \fB\-x\fP option).
21 .SH DESCRIPTION
22 The program
23 .B vlna
24 processes one or more files, searches the non-syllabic prepositions
25 followed by space(s) in these files and converts this/these space(s)
26 to asciitilde for each such occurrence.
27 .PP
28 In the processed file, the activity of the program can be blocked by
29 \fB%~-\fP sequence and the activity can be restored again by the
30 \fB%~+\fP sequence. These sequences can include spaces, it means that
31 \fB% ~-\fP is a correct sequence too.
32 .PP
33 The rule to recognize a preposition follows:
34 The arbitrary number of opening parentheses can be written before the
35 preposition and before these (optional) parentheses must be the space,
36 tabelator or new-line. The preposition itself is one-letter word, the letters
37 have to be from this set: {KkSsVvZzOoUuAI}. See the \fB\-v\fP option if you
38 want to change this set of letters. From version 1.2, the TeX sequence
39 can be written before preposition and before the brace. Example:
40 "<new-line>([V lese" is converted to "<new-line>([V~lese".
41 Another example: "\\uv{V lese}" is converted to "\\uv{V~lese}".
42 .PP
43 One or more blank-spaces have to be included after preposition
44 before next word. The blank-space means space or tabelator.
45 One <new-line> can be here too.
46 All these characters are removed and replaced by asciitilde (or by
47 another string, see \fB\-x\fP option). If <new-line> is deleted, another
48 <new-line> is created before preposition (and before optional parentheses)
49 in order to the number of lines is kept unchanged.
50 Example: "... V<new-line><tabelator>lese" is converted to
51 "...<new-line>V~lese".
52 .PP
53 The program checks the consintence of TeX's math environments
54 (if \fB\-m\fP option isn't used). For example the "$...$$...$" sequence
55 (it means the display mode switch inside the text-math mode)
56 generates a warning. Empty line inside display mode generates
57 a warning too and the program processes next text like
58 in normal (non-math) mode. The existence of the "$" inside display mode
59 are accepted because the constructions like
60 $$..\\hbox{..$..$}..$$ are allowed and common.
61 .PP
62 The consistence of verbatim mode is checked on the end of the file.
63 If the file ends but the verbatim mode does not end the warning is printed.
64 This behavior can be switched off by \fB\-n\fP or \fB\-w\fP options.
65 .PP
66 The program suppresses the tilde changing after letters like prepositions
67 but they are not prepositions because the \fB\\TeX\fP or \fB\\LaTeX\fP
68 sequence precedes. Example: "vlastnosti \\TeX u jsou" is not converted to
69 "vlastnosti \\TeX u~jsou", because this text is printed (after TeX
70 processing) like "vlastnosti TeXu jsou". The letter "u" is a suffix here,
71 no preposition.
72 .SH OPTIONS
73 The options are optional and can be written in arbitrarty order separated
74 by space.
75 .TP
76 .B \-f
77 Filter. The [\fIfilenames\fP] are treated as follows:
78 .RS
79 .TP 4
80 .B vlna \-f \fIfilename1 filename2\fP
81 Input is \fIfilename1\fP, output is \fIfilename2\fP.
82 .TP 4
83 .B vlna \-f \fIfilename1\fP
84 Input is \fIfilename1\fP, output is \fIstdout\fP.
85 .TP 4
86 .B vlna \-f
87 Input is \fIstdin\fP, output is \fIstdout\fP.
88 .TP 4
89 \fBvlna\fP \fIfilename1\fP [\fIfilename2\fP [\fIfilename3\fP ...]]
90 If the \fB\-f\fP option is omitted then each file is processed
91 independently and it is re-written.
92 .RE
93 .TP
94 .B \-s
95 The silent mode. No messages, warnings, statistics are printed.
96 Only errors which terminates the program untimely are printed.
97 If this parameter is omitted then banner, warnings and statistics
98 are printed to \fIstderr\fP.
99 .TP
100 .B \-r
101 Do not create the backups. The option \fB\-r\fP is irrelevant if
102 the \fB\-f\fP option is used. If the \fB\-f\fP and \fB\-r\fP options
103 aren't used then each re-written file is stored with its original contents
104 to a backup file (the name of backup file is the same as filename, only
105 the tilde is used instead of the last character).
106 .TP
107 .B \-v \fIcharacters\fP
108 The set of characters treated as non-syllabic prepositions is declared
109 by this option. Default: \fB\-v\ KkSsVvZzOoUuAI\fP.
110 The space between \fB\-v\fP and \fIcharacters\fP is required.
111 .TP
112 .B \-x \fIcode\fP
113 The \fIcode\fP is a string written in hexadecimal notation
114 (even hexa digits is required). This string will be saved after prepositions
115 instead asciitilde which is default.
116 The example: \fB\-x C2A0\fP two bytes are stored after each
117 non-syllabic preposition, first byte has C2 code and second byte
118 has A0 code. This example means that
119 NO-BREAK SPACE in UTF8 encoding will be used after prepositions.
120 Another example: \fB\-x 00A0\fP the NO-BREAK SPACE in UTF16 encoding.
121 Another example: \fB\-x 48454C4C4F\fP the string HELLO will be used.
122 The space between \fB\-x\fP and \fIcode\fP is required.
123 .TP
124 .B \-m
125 The math-modes (\fB$\fP...\fB$\fP and \fB$$\fP...\fB$$\fP) are ignored.
126 It means that non-syllabic prepositions is searched in math-mode too.
127 Default (without \fB\-m\fP option): no changes in math modes are done
128 because (for example) "v" is variable in math-mode, no preposition.
129 .TP
130 .B \-n
131 The verbatim mode (\fB\\verb\fP\fI<char>\fP...\fI<char>\fP,
132 \fB\\begtt\fP...\fB\\endtt\fP) is ignored, it means the program can
133 do a changes in verbatim environment.
134 Default (without \fB\-n\fP option): no changes in verbatim mode are done.
135 .TP
136 .B \-l
137 The LaTeX mode. The following environments are treated as display mode:
138 \fB\\begin{display}\fP...\fB\\end{display}\fP and
139 \fB\\begin{equation}\fP...\fB\\end{equation}\fP and the following
140 environment is treated as verbatim mode:
141 \fB\\begin{verbatim}\fP...\fB\\end{verbatim}\fP.
142 .TP
143 .B \-w
144 The web mode (Knuth's web, no www:-). The following sequences are
145 treated as verbatim:
146 \fB@<\fP, \fB@d\fP...\fB@*\fP, \fB@\fP\fIspace\fP or \fB@>|\fP.
147 It means program code is unchanged in *.w or *.web files, only
148 web-comments are processed.
149 .SH EXAMPLES
150 .TP
151 .B vlna \-m \-n \-s \-r \fIfile\fP
152 The program has a behavior similar to the old \fBvlnka\fP program.
153 .TP
154 .B vlna *.tex
155 All files with .tex suffix in current directory will be processed
156 (and possibly changed). (The "*" is UNIX-shell feautre).
157 .TP
158 .B vlna \-f file > /dev/null
159 Only the consistence checking of math and verbatim modes is processed.
160 No changes are done.
161 .SH AUTHORS
162 Petr Olsak <[email protected]>.
163 Man page (Czech original) and Makefile is created by Rulolf Cejka