diff options
author | Norbert Preining <norbert@preining.info> | 2021-01-11 03:01:24 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-01-11 03:01:24 +0000 |
commit | 5187d8af76756cc8c101de4a50c9ccfb9acd0c9a (patch) | |
tree | 5699e7dfdf3ec8f07725f09ea89e72f2b75b7b18 /macros/luatex | |
parent | ef57fc77f3c939d55d51322d428e40a5a3c9ed8e (diff) |
CTAN sync 202101110301
Diffstat (limited to 'macros/luatex')
-rw-r--r-- | macros/luatex/generic/luavlna/README.md | 2 | ||||
-rw-r--r-- | macros/luatex/generic/luavlna/luavlna-doc.pdf | bin | 91137 -> 91253 bytes | |||
-rw-r--r-- | macros/luatex/generic/luavlna/luavlna-doc.tex | 5 | ||||
-rw-r--r-- | macros/luatex/generic/luavlna/luavlna.lua | 28 | ||||
-rw-r--r-- | macros/luatex/generic/luavlna/luavlna.sty | 4 | ||||
-rw-r--r-- | macros/luatex/generic/luavlna/luavlna.tex | 12 | ||||
-rw-r--r-- | macros/luatex/latex/hu-berlin-bundle/README.md | 3 | ||||
-rw-r--r-- | macros/luatex/latex/hu-berlin-bundle/hu-berlin-bundle.dtx | 81 | ||||
-rw-r--r-- | macros/luatex/latex/hu-berlin-bundle/hu-berlin-bundle.pdf | bin | 301369 -> 305252 bytes |
9 files changed, 102 insertions, 33 deletions
diff --git a/macros/luatex/generic/luavlna/README.md b/macros/luatex/generic/luavlna/README.md index 853a3683ff..de38ed0c67 100644 --- a/macros/luatex/generic/luavlna/README.md +++ b/macros/luatex/generic/luavlna/README.md @@ -1,4 +1,4 @@ -# Luavlna, version v0.1g, 2020-06-02 +# Luavlna, version 0.1h, 2021-01-08 # Introduction diff --git a/macros/luatex/generic/luavlna/luavlna-doc.pdf b/macros/luatex/generic/luavlna/luavlna-doc.pdf Binary files differindex 84e384611f..40cca34546 100644 --- a/macros/luatex/generic/luavlna/luavlna-doc.pdf +++ b/macros/luatex/generic/luavlna/luavlna-doc.pdf diff --git a/macros/luatex/generic/luavlna/luavlna-doc.tex b/macros/luatex/generic/luavlna/luavlna-doc.tex index eb39ca3ac9..20a83ae127 100644 --- a/macros/luatex/generic/luavlna/luavlna-doc.tex +++ b/macros/luatex/generic/luavlna/luavlna-doc.tex @@ -83,7 +83,8 @@ Co třeba í znaky š diakritikou? Různé možnosti [v závorkách <i jiných znacích -Podpora iniciál a titulů: M. J. Hegel, Ing. Běháková, Ph.D., Ž. Zíbrt. +Podpora iniciál a titulů: M. J. Hegel, Ing. Běháková, Ph.D., Ž. Zíbrt, +Ch. Borner. Podpora jednotek: 100,5 MN\cdot{}s, 100.5 kJ, 200 µA, $-1$ dag, 12 MiB, 1 m$^3$/s. @@ -110,7 +111,7 @@ Co třeba í znaky š diakritikou? Různé možnosti [v závorkách \textless i jiných znacích -Podpora iniciál a titulů: M. J. Hegel, Ing. Běháková, Ph.D., Ž. Zíbrt. +Podpora iniciál a titulů: M. J. Hegel, Ing. Běháková, Ph.D., Ž. Zíbrt, Ch. Borner. Podpora jednotek: 100,5 MN\cdot{}s, 100.5 kJ, 200 µA, $-1$ dag, 12 MiB, 1 m$^3$/s. diff --git a/macros/luatex/generic/luavlna/luavlna.lua b/macros/luatex/generic/luavlna/luavlna.lua index 511ee859a1..be833905f2 100644 --- a/macros/luatex/generic/luavlna/luavlna.lua +++ b/macros/luatex/generic/luavlna/luavlna.lua @@ -166,6 +166,20 @@ end local init_buffer = "" local is_initial = function(c, lang) + -- space is not initial + if c == " " then + init_buffer = "" + return false + end + -- look in the initals table + if lang then + -- insert the current character to the init_buffer + -- and try to find the string in the initial table + -- for the current language + init_buffer = init_buffer .. c + local tbl = initials[lang] or {} + if tbl[init_buffer] then return true end + end return is_uppercase(c) end @@ -295,7 +309,7 @@ local function prevent_single_letter (head) space = false -- handle initials -- uppercase letter followed by period (code 46) - elseif no_initials~=true and init and head.id == glyph_id and head.char == period_char and nextn.id == glue_id and utf_len(word) == 1 then + elseif no_initials~=true and init and head.id == glyph_id and head.char == period_char and nextn.id == glue_id then head = insert_penalty(head) elseif head.id == glyph_id then local char = getchar(head) @@ -334,7 +348,7 @@ end -- detect if the current character is a hyphen local function is_breakable_hyphen(n) - return n.id == glyph_id and hyphenate_langs[n.lang] and n.char == hyphenchar + return n.id == glyph_id and hyphenate_langs[n.lang] and n.char == hyphenchar and n.next end -- don't process hyphens if the next node is penalty @@ -346,6 +360,14 @@ local function is_next_penalty(n) end end +-- split hyphens should be active only inside words, there is no need to break +-- standalone hyphens +local function is_next_glyph(n) + local next_node = n.next + return next_node and next_node.id == glyph_id +end + + -- Enable hyphenation of words that contain hyphens -- and repeating of the explicit hyphen on a new line when -- the hyphen is hyphenated @@ -357,7 +379,7 @@ local break_hyphens = function(head, tail) local n = head while n do local skip = node.has_attribute(n, M.preventsingleid) - if skip ~= 1 and is_breakable_hyphen(n) and not is_next_penalty(n) and not is_hyphen_ligature(n) then + if skip ~= 1 and is_breakable_hyphen(n) and not is_next_penalty(n) and is_next_glyph(n) and not is_hyphen_ligature(n) then -- Insert an infinite penalty before, and a zero-width glue node after, the hyphen. -- Like writing "\nobreak-\hspace{0pt}" or equivalently "\penalty10000-\hskip0pt" local p = node.new(node.id('penalty')) diff --git a/macros/luatex/generic/luavlna/luavlna.sty b/macros/luatex/generic/luavlna/luavlna.sty index aa6f623aa9..89e6d47543 100644 --- a/macros/luatex/generic/luavlna/luavlna.sty +++ b/macros/luatex/generic/luavlna/luavlna.sty @@ -1,4 +1,4 @@ -\ProvidesPackage{luavlna}[2019/10/30 luavlna] +\ProvidesPackage{luavlna}[2021-01-08 luavlna] \RequirePackage{kvoptions} @@ -23,7 +23,7 @@ \def\enablesplithyphens#1{% \ifcsname l@#1\endcsname% - \typeout{set lang #1, \the\csname l@#1\endcsname}% + \typeout{set lang #1, \the\csname l@#1\endcsname} \directlua{enable_split_hyphens("\the\csname l@#1\endcsname")}% \fi% } diff --git a/macros/luatex/generic/luavlna/luavlna.tex b/macros/luatex/generic/luavlna/luavlna.tex index 0b6540a5cc..ab47b8d6fc 100644 --- a/macros/luatex/generic/luavlna/luavlna.tex +++ b/macros/luatex/generic/luavlna/luavlna.tex @@ -71,20 +71,20 @@ end % Set letters which are prevented from breaking \def\singlechars#1#2{% -\directlua{set_singlechars("#1","#2")}% +\directlua{set_singlechars("#1","#2")} } % Define compound initials \def\compoundinitials#1#2{% -\directlua{set_compounds("#1","#2")}% +\directlua{set_compounds("#1","#2")} } % Enable inserting of visual marks for debugging \def\preventsingledebugon{% -\directlua{luavlna.debug(true)}% +\directlua{luavlna.debug(true)} } \def\preventsinglelang#1{% - \directlua{set_main_language("#1")}% + \directlua{set_main_language("#1")} } %\newluatexattribute\preventsinglestatus @@ -94,12 +94,12 @@ end \preventsinglestatus=2 } -\def\preventsingleoff{% +\def\preventsingleoff{ \preventsinglestatus=1 } % Disable inserting of visual marks for dewbugging \def\preventsingledebugoff{% -\directlua{luavlna.debug(false)}% +\directlua{luavlna.debug(false)} } % enable/disable split hyphens for a language diff --git a/macros/luatex/latex/hu-berlin-bundle/README.md b/macros/luatex/latex/hu-berlin-bundle/README.md index c308748424..40b582c70b 100644 --- a/macros/luatex/latex/hu-berlin-bundle/README.md +++ b/macros/luatex/latex/hu-berlin-bundle/README.md @@ -67,6 +67,9 @@ All notable changes to this project will be documented in the [README.md](https: This project **does not** adhere to [Semantic Versioning](http://semver.org/). The markdown syntax is inspired by the conventions proposed by [keepachangelog.com](http://keepachangelog.com/). +### v1.0.9 (2021/01/10) +* (letter) making everything multi-lingual (at least German and English); German is default language. You can load English e.g. by `documentclass[english]{hu-berlin-letter}` (addresses [issue No. 3](https://github.com/LukasCBossert/hu-berlin-bundle/issues/3)) + ### v1.0.8 (2020/10/30) * (letter) replacing actual logo with a dummy text (due to possible copyright conflicts). The correct logo has to be called `hu-berlin-logo.pdf` diff --git a/macros/luatex/latex/hu-berlin-bundle/hu-berlin-bundle.dtx b/macros/luatex/latex/hu-berlin-bundle/hu-berlin-bundle.dtx index 20c78fce0f..738f1cee2d 100644 --- a/macros/luatex/latex/hu-berlin-bundle/hu-berlin-bundle.dtx +++ b/macros/luatex/latex/hu-berlin-bundle/hu-berlin-bundle.dtx @@ -1,6 +1,6 @@ % \iffalse %<*internal|cls|sty> -\def\Version{2020/10/30 v1.0.8} +\def\Version{2021/01/10 v1.0.9} %</internal|cls|sty> %<*internal> \iffalse @@ -304,6 +304,11 @@ All notable changes to this project will be documented in the [README.md](https: This project **does not** adhere to [Semantic Versioning](http://semver.org/). The markdown syntax is inspired by the conventions proposed by [keepachangelog.com](http://keepachangelog.com/). + +### v1.0.9 (2021/01/10) +* (letter) making everything multi-lingual (at least German and English); German is default language. You can load English e.g. by `documentclass[english]{hu-berlin-letter}` (addresses [issue No. 3](https://github.com/LukasCBossert/hu-berlin-bundle/issues/3)) + + ### v1.0.8 (2020/10/30) * (letter) replacing actual logo with a dummy text (due to possible copyright conflicts). The correct logo has to be called `hu-berlin-logo.pdf` @@ -557,7 +562,7 @@ Philosophische Fakultät \setkomavar{institute.head.mail}{maike.musterfrau@hu-berlin.de} % \end{macrocode} % \begin{macrocode} -\setkomavar{local}{% +\setkomavar{office}{% Mohrenstraße 40/41\\ Zimmer X\\ D-10117 Berlin} @@ -826,6 +831,17 @@ Thank you very much for your letter. % \end{macrocode} % We load \pkg{scrlttr2} which is the documentclass for letters. % Furthermore we set up some options. +% The default language is German. But all strings are also +% available for English. You can load English as option to the +% documentclass. +% \begin{macrocode} +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrlttr2}} +\DeclareOption{english}{\PassOptionsToPackage{ngerman,main=english}{babel}} +\DeclareOption{ngerman}{\PassOptionsToPackage{ngerman}{babel}} +\ExecuteOptions{ngerman} +\ProcessOptions\relax +% \end{macrocode} +% Now the documentclass itself. % \begin{macrocode} \LoadClass[% fontsize=10pt, @@ -907,8 +923,35 @@ Thank you very much for your letter. \let\enclold\encl \renewcommand\encl[1]{\vskip0ptplus1filll\enclold{#1}} % \end{macrocode} -% We define new |komavar|s. -% +% We define new |komavar|s and we make it for +% German and for English as well. +% \begin{macrocode} +\providecaptionname{english}{\hubCCseparator}{Copy to} +\providecaptionname{english}{\hubEnclSeparator}{Attachment} +\providecaptionname{english}{\hubMyRef}{Reference:} +\providecaptionname{english}{\hubFromName}{Clerk:} +\providecaptionname{english}{\hubDate}{Date:} +\providecaptionname{english}{\hubAddress}{Postal address:} +\providecaptionname{english}{\hubConnections}{Public transport:} +\providecaptionname{english}{\hubOffice}{Office:} +\providecaptionname{english}{\hubBank}{Bank:} +\providecaptionname{english}{\hubOfficeHours}{Consultation hours:} +\providecaptionname{english}{\hubAccessibility}{Entrance:} +% \end{macrocode} +% Now for German. +% \begin{macrocode} +\providecaptionname{ngerman}{\hubCCseparator}{Kopie an} +\providecaptionname{ngerman}{\hubEnclSeparator}{Anlage} +\providecaptionname{ngerman}{\hubMyRef}{Geschäftszeichen:} +\providecaptionname{ngerman}{\hubFromName}{Bearbeiter:} +\providecaptionname{ngerman}{\hubDate}{Datum:} +\providecaptionname{ngerman}{\hubAddress}{Postanschrift:} +\providecaptionname{ngerman}{\hubConnections}{Verkehrsverbindungen:} +\providecaptionname{ngerman}{\hubOffice}{Sitz:} +\providecaptionname{ngerman}{\hubBank}{Bank:} +\providecaptionname{ngerman}{\hubOfficeHours}{Sprechzeiten:} +\providecaptionname{ngerman}{\hubAccessibility}{Eingang:} +% \end{macrocode} % First the possibility to name the faculty, % \begin{macrocode} \newkomavar{faculty} @@ -936,27 +979,27 @@ Thank you very much for your letter. % \end{macrocode} % Since there are many buildings with offices we tell where to find the sender % \begin{macrocode} -\newkomavar{local} -\setkomavar*{local}{Sitz:} +\newkomavar{office} +\setkomavar*{office}{\hubOffice} % \end{macrocode} % and how to get there. % \begin{macrocode} \newkomavar{connections} -\setkomavar*{connections}{Verkehrsverbindungen:} +\setkomavar*{connections}{\hubConnections} % \end{macrocode} % Furthermore we inform about office hours % \begin{macrocode} \newkomavar{officehours} -\setkomavar*{officehours}{Sprechzeiten:} +\setkomavar*{officehours}{\hubOfficeHours} % \end{macrocode} % and if there is accessibility for wheelchairs etc. % \begin{macrocode} \newkomavar{accessibility} -\setkomavar*{accessibility}{{\large\reflectbox{\Wheelchair}} Eingang:} +\setkomavar*{accessibility}{{\large\reflectbox{\Wheelchair}} \hubAccessibility} % \end{macrocode} % \begin{macrocode} \newkomavar{bank} -\setkomavar*{bank}{Bankverbindung:} +\setkomavar*{bank}{\hubBank} \setkomavar{bank}{Deutsche Bank PGK AG} \newkomavar{IBAN} \setkomavar{IBAN}{\mbox{IBAN DE95 1007 0848 0512 6206 01}} @@ -1099,10 +1142,10 @@ Thank you very much for your letter. % \end{macrocode} % Now the actual location of the sender % \begin{macrocode} -\Ifkomavarempty{local} +\Ifkomavarempty{office} {} - {\textbf{\usekomavar*{local}}\\ - \usekomavar{local}\par} + {\textbf{\usekomavar*{office}}\\ + \usekomavar{office}\par} % \end{macrocode} % The last information section should be pinned to the bottom. % \begin{macrocode} @@ -1200,7 +1243,7 @@ Thank you very much for your letter. % \end{macrocode} % % \begin{macrocode} -\setkomavar*{fromaddress}{Postanschrift:} +\setkomavar*{fromaddress}{\hubAddress} \setkomavar{fromaddress}{% Humboldt-Universität zu Berlin\\ Unter den Linden 6\\ @@ -1215,21 +1258,21 @@ Thank you very much for your letter. % \end{macrocode} % % \begin{macrocode} -\setkomavar*{date}{Datum:} +\setkomavar*{date}{\hubDate} % \end{macrocode} % % \begin{macrocode} -\setkomavar*{fromname}{Bearbeiter:} +\setkomavar*{fromname}{\hubFromName} % \end{macrocode} % % \begin{macrocode} -\setkomavar*{myref}{Geschäftszeichen:} +\setkomavar*{myref}{\hubMyRef} % \end{macrocode} % \begin{macrocode} -\setkomavar*{enclseparator}{Anlage} +\setkomavar*{enclseparator}{\hubEnclSeparator} % \end{macrocode} % \begin{macrocode} -\setkomavar*{ccseparator}{Kopie an} +\setkomavar*{ccseparator}{\hubCCseparator} % \end{macrocode} % \begin{macrocode} % \RequirePackage{hyperref} diff --git a/macros/luatex/latex/hu-berlin-bundle/hu-berlin-bundle.pdf b/macros/luatex/latex/hu-berlin-bundle/hu-berlin-bundle.pdf Binary files differindex 56c521ac5a..3d08232e45 100644 --- a/macros/luatex/latex/hu-berlin-bundle/hu-berlin-bundle.pdf +++ b/macros/luatex/latex/hu-berlin-bundle/hu-berlin-bundle.pdf |