summaryrefslogtreecommitdiff
path: root/macros/luatex/optex/base/pdfuni-string.opm
diff options
context:
space:
mode:
Diffstat (limited to 'macros/luatex/optex/base/pdfuni-string.opm')
-rw-r--r--macros/luatex/optex/base/pdfuni-string.opm28
1 files changed, 14 insertions, 14 deletions
diff --git a/macros/luatex/optex/base/pdfuni-string.opm b/macros/luatex/optex/base/pdfuni-string.opm
index a289aae731..f9e28582d5 100644
--- a/macros/luatex/optex/base/pdfuni-string.opm
+++ b/macros/luatex/optex/base/pdfuni-string.opm
@@ -1,9 +1,9 @@
-%% This is part of OpTeX project, see http://petr.olsak.net/optex
+%% This is part of the OpTeX project, see http://petr.olsak.net/optex
\_codedecl \pdfunidef {PDFunicode strings for outlines <2020-03-12>} % preloaded in format
\_doc -----------------------------
- The \`\_octalprint` is lua script which prints the character code in the
+ The \`\_octalprint` is a Lua script that prints the character code in the
octal notation.
\_cod -----------------------------
@@ -24,8 +24,8 @@
according to current values on selected macros from `\_regoul`. Then
\`\_removeoutmath` converts `..$x^2$..` to `..x^2..`, i.e removes dollars.
Then \`\_removeoutbraces` converts `..{x}..` to `..x..`.
- Finaly, the <text> is detokenized, spaces are preprocessed using \^`\replstring`
- and then the \`\_pdfunidefB` is repeated on each character. It calls the
+ Finally, the <text> is detokenized, spaces are preprocessed using \^`\replstring`
+ and then the \`\_pdfunidefB` is repeated on each character. It calls the
`\directlua` chunk to print octal numbers in the macro \^`\_octalprint`.
\_cod -----------------------------
@@ -50,11 +50,11 @@
\_ea\_def\_ea#1\_ea{\_out}
}
\_def\_pdfunidefB#1{%
- \_ifx^#1\_else
+ \_ifx^#1\_else
\_tmpnum=`#1
\_pdfunidefC{\_luaescapestring{#1}}%
\_ea\_pdfunidefB \_fi
-}
+}
\_def\_pdfunidefC #1{\_edef\_out{\_out \\\_ea\_octalprint\_ea{\_the\_tmpnum}{#1}}}
\_def\_removeoutbraces #1#{#1\_removeoutbracesA}
@@ -62,12 +62,12 @@
\_def\_removeoutmath #1$#2${#1\_ifx\_end#2\_else #2\_ea\_removeoutmath\_fi}
\_doc -----------------------------
- The \`\_prepinverb``<macro><separator>{<text>}`,
+ The \`\_prepinverb``<macro><separator>{<text>}`,
e.g.\ `\_prepinverb\tmpb|{aaa |bbb| cccc |dd| ee}`
does `\def\tmpb{<su>{aaa }bbb<su>{ cccc }dd<su>{ ee}}` where
<su> is `\scantextokens\unexpanded`. It means that in-line verbatim
are not argument of `\scantextoken`. First `\edef\tmpb` tokenizes again
- the <text> but not the parts which were in the the in-line verbatim.
+ the <text> but not the parts which were in the the in-line verbatim.
\_cod -----------------------------
\_def\_prepinverb#1#2#3{\_def#1{}%
@@ -92,21 +92,21 @@
\_endcode % --------------------------------
There are only two encodings for PDF strings (used in PDFoutlines, PDFinfo
-etc.). First one is PDFDocEncoding which is one-byte encoding, but most
+, etc.). The first one is PDFDocEncoding which is one-byte encoding, but most
Czech or Slovak characters are missing here.
-The second encoding is PDFunicode encoding wich is implemented in this file.
-This encoding is \TeX/-discomfortable, because it looks like
+The second encoding is PDFunicode encoding which is implemented in this file.
+This encoding is \TeX/-discomfortable because it looks like
\begtt
\376\377\000C\000v\000i\001\015\000e\000n\000\355\000\040\000j\000e\000\040
-\000z\000\341\000t\001\033\001\176
+\000z\000\341\000t\001\033\001\176
\endtt
-This example is real encoding of the string "Cvičení je zátěž". You can see
+This example is the real encoding of the string "Cvičení je zátěž". You can see
that this is UTF-16 encoding (two bytes per character) with two starting
bytes FEFF. Moreover, each byte is encoded by three octal digits preceded by
-backslash. The only exception is the visible ASCII character encoding: such
+a backslash. The only exception is the visible ASCII character encoding: such
a character is encoded by its real byte preceded by `\000`.