summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/lualatex/cstypo
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-09-03 21:36:23 +0000
committerKarl Berry <karl@freefriends.org>2016-09-03 21:36:23 +0000
commitc22ab9576265f84ca4d5a4a331998e171aa3872d (patch)
tree2a67326fbb1bcbc774fe3ba8fe090a599a37f7e7 /Master/texmf-dist/doc/lualatex/cstypo
parent25b22d051f604243eafddac4e9e54e56f80f0f66 (diff)
cstypo (3sep16)
git-svn-id: svn://tug.org/texlive/trunk@41986 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/lualatex/cstypo')
-rw-r--r--Master/texmf-dist/doc/lualatex/cstypo/README.md6
-rw-r--r--Master/texmf-dist/doc/lualatex/cstypo/cstypo.pdfbin67456 -> 74001 bytes
-rw-r--r--Master/texmf-dist/doc/lualatex/cstypo/cstypo.tex26
-rw-r--r--Master/texmf-dist/doc/lualatex/cstypo/cstypotest.pdfbin21174 -> 28731 bytes
-rw-r--r--Master/texmf-dist/doc/lualatex/cstypo/cstypotest.tex78
5 files changed, 105 insertions, 5 deletions
diff --git a/Master/texmf-dist/doc/lualatex/cstypo/README.md b/Master/texmf-dist/doc/lualatex/cstypo/README.md
index db71a70026b..4b0ed9a8ef0 100644
--- a/Master/texmf-dist/doc/lualatex/cstypo/README.md
+++ b/Master/texmf-dist/doc/lualatex/cstypo/README.md
@@ -1,11 +1,9 @@
# cstypo
-This package provides macros for Czech language typography rules using
-Lua(La)TeX.
+This package provides macros for Czech language typography rules using Lua(La)TeX.
- License is MIT license. See `LICENSE` file.
- Author is [Václav Haisman](mailto:vhaisman+cstypo@gmail.com?subject=[cstypo])
-- Source code on GitHub in [`wilx/cstypo`](https://github.com/wilx/cstypo)
- repository.
+- Source code on GitHub in [`wilx/cstypo`](https://github.com/wilx/cstypo) repository.
diff --git a/Master/texmf-dist/doc/lualatex/cstypo/cstypo.pdf b/Master/texmf-dist/doc/lualatex/cstypo/cstypo.pdf
index 98610d9d79e..a1454c37073 100644
--- a/Master/texmf-dist/doc/lualatex/cstypo/cstypo.pdf
+++ b/Master/texmf-dist/doc/lualatex/cstypo/cstypo.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/lualatex/cstypo/cstypo.tex b/Master/texmf-dist/doc/lualatex/cstypo/cstypo.tex
index 9e87d617b90..1246e3d9566 100644
--- a/Master/texmf-dist/doc/lualatex/cstypo/cstypo.tex
+++ b/Master/texmf-dist/doc/lualatex/cstypo/cstypo.tex
@@ -13,6 +13,12 @@
\usepackage{polyglossia}
\setmainlanguage[]{english}
+\usepackage{newunicodechar}
+\newunicodechar{℃}{{°C}}
+\newunicodechar{℉}{{°F}}
+
+\usepackage[autostyle]{csquotes}
+
\author{Václav Haisman\texorpdfstring{%
\\{\small\href{mailto:vhaisman+cstypo@gmail.com?subject=[cstypo]}{vhaisman@gmail.com}}}{}}
\date{\today}
@@ -66,6 +72,9 @@ enforcable through this package.
\section{User interface}
+Czech typography rules, when enabled by the following macros, are only
+enforced on text marked as Czech by \texttt{polyglossia} or \texttt{babel}.
+
The following two macros allow to enable and disable hook that enforces
penalization of line breaks after single letter words:
%(\refitem{rulesList{itm:singleletter}):
@@ -88,13 +97,24 @@ to have this rule enforced for all of the single letter words except for the
\end{lstlisting}
The following two macros allow to enable and disable hook that enforces
-penalization of line breaks between number and \% symbol.
+penalization of line breaks between number and \enquote*{\%} symbol and also
+few more symbols: per thousand~\enquote*{‰}, degree~\enquote*{°}, degree
+Celsius~\enquote*{℃} and degree Fahrenheit~\enquote*{℉}.
\begin{lstlisting}[style=myLatexStyle]
\cstypoPercentsEnable
\cstypoPercentsDisable
\end{lstlisting}
+The following two macros allow to enable and disable hook that enforces
+penalization of line breaks between~\enquote*{§} symbol and following number.
+
+\begin{lstlisting}[style=myLatexStyle]
+\cstypoParagraphEnable
+\cstypoParagraphDisable
+\end{lstlisting}
+
+
\section{History}
This package was inspired by
@@ -106,6 +126,10 @@ people of
\href{http://tex.stackexchange.com/}{\TeX.SE} site itself.
\begin{description}[style=nextline, labelwidth=4.5em, leftmargin=!, labelindent=0em]
+\item[\texttt{v0.03}] Limit Czech typography rules enforcement only to text
+ marked as Czech language. Handle per thousand~\enquote*{‰},
+ degree~\enquote*{°}, degree Celsius~\enquote*{℃}, degree
+ Fahrenheit~\enquote*{℉} and paragraph~\enquote*{§} symbols.
\item[\texttt{v0.02}] Fixed some packaging and documentation issues found by
CTAN submission review.
\item[\texttt{v0.01}] First published version of this package.
diff --git a/Master/texmf-dist/doc/lualatex/cstypo/cstypotest.pdf b/Master/texmf-dist/doc/lualatex/cstypo/cstypotest.pdf
index 9752e42b352..1d6912a1341 100644
--- a/Master/texmf-dist/doc/lualatex/cstypo/cstypotest.pdf
+++ b/Master/texmf-dist/doc/lualatex/cstypo/cstypotest.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/lualatex/cstypo/cstypotest.tex b/Master/texmf-dist/doc/lualatex/cstypo/cstypotest.tex
index bd94218c940..bfdc3cfab4d 100644
--- a/Master/texmf-dist/doc/lualatex/cstypo/cstypotest.tex
+++ b/Master/texmf-dist/doc/lualatex/cstypo/cstypotest.tex
@@ -32,6 +32,23 @@ Mezi oblíbené dětské pohádky patří pohádky \emph{[O Palečkovi], Alenka
Se správným nastavením fontů znak \% v `na 100 \%' skončí na další řádce.
+\expl{Next line is similar as the one above but tests behaviour for the ‰
+ character.}
+
+Zde, v České republice, stále není povoleno ani 1 ‰ alkoholu v krvi při
+řízení automobilu.
+
+\expl{Next line shows bad line break between degree sign `°' and number.}
+
+Součet všech tří úhlů v trojůhelníku je vždy 180 °.
+
+Voda taje při teplotě 0 ℃ a vypařuje se při 100 ℃.
+
+\expl{Next line show use of ``paragraf'' symbol. It should be kept with the
+ following number.}
+
+Jak může státní zástupce věc odložit zmiňuje § 159a.
+
\section{Better line breaks}
\expl{And here we add Lua code to penalize single letter words. It results in
following line layout:}
@@ -39,6 +56,7 @@ following line layout:}
\cstypoSingleLetterEnable{}
\cstypoPercentsEnable{}
\cstypoALetterEnable{}
+\cstypoParagraphEnable{}
Mezi oblíbené dětské pohádky patří pohádky \emph{O Palečkovi, Alenka v říši
divů} a \emph{Socialismem k lepším zítřkům.}
@@ -53,6 +71,50 @@ Mezi oblíbené dětské pohádky patří pohádky \emph{[O Palečkovi], Alenka
Se správným nastavením fontů znak \% v `na 100 \%' skončí na další řádce.
+\expl{Next line is similar as the one above but tests behaviour for the ‰
+ character.}
+
+Zde, v České republice, stále není povoleno ani 1 ‰ alkoholu v krvi při
+řízení automobilu.
+
+\expl{Next line shows line break between degree sign `°' and number. The
+ degree sign should stay with the number.}
+
+Součet všech tří úhlů v trojůhelníku je vždy 180 °.
+
+Voda taje při teplotě 0 ℃ a vypařuje se při 100 ℃.
+
+\expl{Next line show use of ``paragraf'' symbol. It should be kept with the
+ following number.}
+
+Jak může státní zástupce věc odložit zmiňuje § 159a.
+
+
+\section{Bad line breaks because of English}
+\expl{This section shows that while the hooks are still active, the actual
+ Czech language text is marked as English which results in bad line breaks.}
+
+\begin{english}
+Mezi oblíbené dětské pohádky patří pohádky \emph{O Palečkovi, Alenka v říši
+ divů} a \emph{Socialismem k lepším zítřkům.}
+
+Mezi oblíbené dětské pohádky patří pohádky \emph{[O Palečkovi], Alenka v říši
+ divů} a \emph{Socialismem (k lepším zítřkům).}
+
+Se správným nastavením fontů znak \% v `na 100 \%' skončí na další řádce.
+
+Zde, v České republice, stále není povoleno ani 1 ‰ alkoholu v krvi při
+řízení automobilu.
+
+Součet všech tří úhlů v trojůhelníku je vždy 180 °.
+
+Voda taje při teplotě 0 ℃ a vypařuje se při 100 ℃.
+
+Jak může státní zástupce věc odložit zmiňuje § 159a.
+
+\end{english}
+
+
\section{Bad line breaks again}
\expl{This section shows that disabling of the hook works and that the
prepositions are again left at the end of their line.}
@@ -60,6 +122,7 @@ Se správným nastavením fontů znak \% v `na 100 \%' skončí na další řád
\cstypoSingleLetterDisable{}
\cstypoPercentsDisable{}
\cstypoALetterDisable{}
+\cstypoParagraphDisable{}
Mezi oblíbené dětské pohádky patří pohádky \emph{O Palečkovi, Alenka v říši
divů} a \emph{Socialismem k lepším zítřkům.}
@@ -75,6 +138,21 @@ Mezi oblíbené dětské pohádky patří pohádky \emph{[O Palečkovi], Alenka
Se správným nastavením fontů znak \% v `na 100 \%' skončí na další řádce.
+\expl{Next line is similar as the one above but tests behaviour for the ‰
+ character.}
+
+Zde, v České republice, stále není povoleno ani 1 ‰ alkoholu v krvi při
+řízení automobilu.
+
+\expl{Next line shows bad line break between degree sign `°' and number.}
+
+Součet všech tří úhlů v trojůhelníku je vždy 180 °.
+
+Voda taje při teplotě 0 ℃ a vypařuje se při 100 ℃.
+
+\expl{Next line show use of ``paragraf'' symbol. It should be kept with the
+ following number.}
+Jak může státní zástupce věc odložit zmiňuje § 159a.
\end{document}