summaryrefslogtreecommitdiff
path: root/macros/luatex/optex/languages.opm
diff options
context:
space:
mode:
Diffstat (limited to 'macros/luatex/optex/languages.opm')
-rw-r--r--macros/luatex/optex/languages.opm41
1 files changed, 39 insertions, 2 deletions
diff --git a/macros/luatex/optex/languages.opm b/macros/luatex/optex/languages.opm
index b4d6f57d2a..5bfa2febdc 100644
--- a/macros/luatex/optex/languages.opm
+++ b/macros/luatex/optex/languages.opm
@@ -1,6 +1,6 @@
%% This is part of OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \_mtext {Languages <2020-02-14>}
+\_codedecl \_mtext {Languages <2020-03-15>} % preloaded in format
\_doc -----------------------------
Only three words are generated by \OpTeX/ macros: \"Chapter",
@@ -69,7 +69,44 @@
\_def\_today{\_mtext{today}}
\_public \today ;
+ \_doc -----------------------------
+ Quotes should be tagged by `\"<text>"` and `\'<text>'` if `\<iso-code>quotes`
+ is declared at beginning of the document. If not, then the control
+ sequences `\"` and `\'` are undefined. Remember, that they are used in
+ another meaning when `\oldaccents` command is used.
+ The macros `\"` and `\'` are not defined as `\protected` because we need
+ their expansion when `\outlines` are created.
+ User can declare quotes by `\quoteschars<clqq><crqq><clq><crq>`, where
+ <clqq>...<crqq> are normal quotes and <clq>...<crq> are alternative quotes.
+ or use `\altquotes` to swap between meaning of these two types of quotes.
+ \_cod -----------------------------
-\_endcode % -------------------------------------
+\_def \_enquotes {\_quoteschars “”‘’}
+\_def \_csquotes {\_quoteschars „“‚‘}
+\_def \_frquotes {\_quoteschars “”«»}
+\_let \_plquotes = \_frquotes
+\_let \_esquotes = \_frquotes
+\_let \_grquotes = \_frquotes
+\_let \_ruquotes = \_frquotes
+\_let \_itquotes = \_frquotes
+\_let \_skquotes = \_csquotes
+\_let \_dequotes = \_csquotes
+\_def \_quoteschars #1#2#3#4{\_def\_altquotes{\_quoteschars#3#4#1#2}\_public\altquotes;%
+ \_def \"##1"{#1##1#2}\_def \'##1'{#3##1#4}}
+ \_doc -----------------------------
+ Sometimes should be usable to leave the markup `"such"` or `'such'` i.e.~without
+ the first backslash. Then you can make the characters `"` and `'` active
+ by `\activequotes` macro and leave quotes without first backsash.
+ First, delare `\<iso-code>quotes`, then `\altwquotes` (if needed) and finally
+ `\activequotes`.
+ \_cod -----------------------------
+
+\def\_activequotes{\_ea\_activequotesA\"""\_ea\_activequotesA\'''}
+\def\_activequotesA#1#2#3{\_bgroup\_lccode`\~=`#3\_lowercase{\_egroup\_adef#3##1~{#1##1#2}}}
+
+\_public \quoteschars \activequotes \enquotes \csquotes \skquotes \frquotes \plquotes
+ \esquotes \grquotes \ruquotes \itquotes \dequotes ;
+
+\_endcode % -------------------------------------