diff options
Diffstat (limited to 'Master/texmf-dist')
17 files changed, 147 insertions, 526 deletions
diff --git a/Master/texmf-dist/doc/latex/polyglossia/README b/Master/texmf-dist/doc/latex/polyglossia/README index 96bff2cf391..394aeaa0e10 100644 --- a/Master/texmf-dist/doc/latex/polyglossia/README +++ b/Master/texmf-dist/doc/latex/polyglossia/README @@ -1,7 +1,7 @@ ¦----------------------------------------------¦ ¦ ¦ - ¦ THE POLYGLOSSIA PACKAGE v1.33.4 ¦ + ¦ THE POLYGLOSSIA PACKAGE v1.33.5 ¦ ¦ ¦ ¦ Modern multilingual typesetting ¦ ¦ with XeLaTeX and LuaLaTeX ¦ diff --git a/Master/texmf-dist/doc/latex/polyglossia/chinese.tex b/Master/texmf-dist/doc/latex/polyglossia/chinese.tex deleted file mode 100644 index 69836304636..00000000000 --- a/Master/texmf-dist/doc/latex/polyglossia/chinese.tex +++ /dev/null @@ -1 +0,0 @@ -你好。我是法国人。特斯是瑞典人。 diff --git a/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf b/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf Binary files differindex 849f314f6b8..d7fe7eee56c 100644 --- a/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf +++ b/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf diff --git a/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf b/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf Binary files differindex 669e13f26dd..d75ca80c4e9 100644 --- a/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf +++ b/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf diff --git a/Master/texmf-dist/doc/latex/polyglossia/examples.pdf b/Master/texmf-dist/doc/latex/polyglossia/examples.pdf Binary files differindex 91be7c3de16..ee14a4b63fe 100644 --- a/Master/texmf-dist/doc/latex/polyglossia/examples.pdf +++ b/Master/texmf-dist/doc/latex/polyglossia/examples.pdf diff --git a/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf Binary files differindex 2c12c0320fb..eb2d391db3a 100644 --- a/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf +++ b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf diff --git a/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex index 96f4d91c762..bed5fcdaea5 100644 --- a/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex +++ b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.tex @@ -373,6 +373,15 @@ the font, by means of \pkg{fontspec}’s \cmd\addfontfeature. If the current fon does not appear to support the script of that language, an error message is displayed. +\section{Hyphenation disabling} + +In some very specific contexts (such as music score creation), \TeX{} hyphenation +is something to avoid as it may cause troubles. \pkg{polyglossia} provides two +functions: \cmd\disablehyphenation and \cmd\enablehyphenation . Note that when +you select a new language, hyphenation will be in the same state (enabled or +disabled) as before. When you reenable it, it will take the last selected +language. + \section{Language-specific options and commands}\label{specific} This section gives a list of all languages for which options and end-user commands are defined. @@ -478,6 +487,8 @@ The default value of each option is given in italic. \subsection{german}\label{german} \textbf{Options}: \begin{itemize} + \item\TB{variant} = \textit{german} or austrian.\new{v1.33.4} + Setting variant=austrian uses some austrian lexical variants. \item \TB{spelling} = \textit{new} (= 1996) or old (= 1901): indicates whether hyphenation patterns for traditional (1901) or reformed (1996) orthography should be used. The latter is the default. @@ -507,8 +518,8 @@ The default value of each option is given in italic. \item ¦"<¦ for French left double quotes («) \item ¦">¦ for French right double quotes (»). \end{itemize} - \item\TB{script} = \textit{latin} or fraktur.\new{v1.2.0} - Setting script=fraktur modifies the captions for typesetting German in Fraktur. + \item\TB{script} = \textit{latin} or fraktur.\new{v1.2.0} + Setting script=fraktur modifies the captions for typesetting German in Fraktur. \end{itemize} \subsection{greek}\label{greek} diff --git a/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx b/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx index 396ec705c6a..f7c32211489 100644 --- a/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx +++ b/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx @@ -11,7 +11,7 @@ ¦----------------------------------------------¦ ¦ ¦ - ¦ THE POLYGLOSSIA PACKAGE v1.33.4 ¦ + ¦ THE POLYGLOSSIA PACKAGE v1.33.5 ¦ ¦ ¦ ¦ Modern multilingual typesetting ¦ ¦ with XeLaTeX and LuaLaTeX ¦ @@ -63,7 +63,7 @@ http://github.com/reutenauer/polyglossia/issues The polyglossia package (C) 2008–2010 François Charette - (C) 2011-2013 Arthur Reutenauer + (C) 2011-2014 Arthur Reutenauer (C) 2013 Elie Roux License information appended @@ -71,7 +71,7 @@ http://github.com/reutenauer/polyglossia/issues \endpreamble \postamble - Copyright (C) 2013 by Arthur Reutenauer <arthur 'dot' reutenauer 'at' normalesup 'dot' org> + Copyright (C) 2014 by Arthur Reutenauer <arthur 'dot' reutenauer 'at' normalesup 'dot' org> This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 @@ -169,7 +169,6 @@ http://github.com/reutenauer/polyglossia/issues \generate{\file{farsidigits.map}{\from{polyglossia.dtx}{farsidigits.map}}} \generate{\file{thaidigits.map}{\from{polyglossia.dtx}{thaidigits.map}}} \def\MetaPrefix{-- } -\generate{\file{polyglossia-brpt.lua}{\from{polyglossia.dtx}{polyglossia-brpt.lua}}} \generate{\file{polyglossia-frpt.lua}{\from{polyglossia.dtx}{polyglossia-frpt.lua}}} \generate{\file{polyglossia-tibt.lua}{\from{polyglossia.dtx}{polyglossia-tibt.lua}}} \generate{\file{polyglossia.lua}{\from{polyglossia.dtx}{polyglossia.lua}}} @@ -574,6 +573,15 @@ http://github.com/reutenauer/polyglossia/issues % does not appear to support the script of that language, an error message is % displayed. % +% \section{Hyphenation disabling} +% +% In some very specific contexts (such as music score creation), \TeX{} hyphenation +% is something to avoid as it may cause troubles. \pkg{polyglossia} provides two +% functions: \cmd\disablehyphenation and \cmd\enablehyphenation . Note that when +% you select a new language, hyphenation will be in the same state (enabled or +% disabled) as before. When you reenable it, it will take the last selected +% language. +% % \section{Language-specific options and commands}\label{specific} % % This section gives a list of all languages for which options and end-user commands are defined. @@ -679,6 +687,8 @@ http://github.com/reutenauer/polyglossia/issues % \subsection{german}\label{german} % \textbf{Options}: % \begin{itemize} +% \item\TB{variant} = \textit{german} or austrian.\new{v1.33.4} +% Setting variant=austrian uses some austrian lexical variants. % \item \TB{spelling} = \textit{new} (= 1996) or old (= 1901): % indicates whether hyphenation patterns for traditional (1901) or reformed % (1996) orthography should be used. The latter is the default. @@ -708,8 +718,8 @@ http://github.com/reutenauer/polyglossia/issues % \item ¦"<¦ for French left double quotes («) % \item ¦">¦ for French right double quotes (»). % \end{itemize} -% \item\TB{script} = \textit{latin} or fraktur.\new{v1.2.0} -% Setting script=fraktur modifies the captions for typesetting German in Fraktur. +% \item\TB{script} = \textit{latin} or fraktur.\new{v1.2.0} +% Setting script=fraktur modifies the captions for typesetting German in Fraktur. % \end{itemize} % % \subsection{greek}\label{greek} @@ -1899,8 +1909,7 @@ and may look very wrong.} } \ifluatex - \newluatexattribute\xpg@frpt - \directlua{polyglossia.load_frpt()} + % TODO \else \newXeTeXintercharclass\breton@punctthin % ! ? ; \newXeTeXintercharclass\breton@punctthick % : @@ -1911,8 +1920,7 @@ and may look very wrong.} \def\breton@punctuation{% \ifluatex - \global\xpg@frpt=1\relax - \directlua{polyglossia.activate_frpt()}% + % TODO \else \XeTeXinterchartokenstate=1% \XeTeXcharclass `\! \breton@punctthin @@ -1926,7 +1934,7 @@ and may look very wrong.} \def\nobreton@punctuation{% \ifluatex - \global\xpg@frpt=0\relax + % TODO \else \XeTeXcharclass `\! \z@ \XeTeXcharclass `\? \z@ @@ -2309,23 +2317,23 @@ and may look very wrong.} \def\contentsname{Sadržaj}% \def\listfigurename{Popis slika}% \def\listtablename{Popis tablica}% - \def\indexname{Indeks}% + \def\indexname{Kazalo}% \def\figurename{Slika}% \def\tablename{Tablica}% \def\partname{Dio}% \def\pagename{Stranica}% \def\seename{Vidjeti}% - \def\alsoname{Vidjeti i}% + \def\alsoname{Također vidjeti}% \def\enclname{Prilozi}% - \def\ccname{Kopije}% + \def\ccname{Kopija}% \def\headtoname{Prima}% \def\proofname{Dokaz}% - \def\glossaryname{Kazalo}% + \def\glossaryname{Pojmovnik}% } \def\datecroatian{% \def\today{\number\day.~\ifcase\month\or siječnja\or veljače\or ožujka\or travnja\or svibnja\or - lipnja\or srpnja\or kolovoza\or rujna\or listopada\or studenog\or + lipnja\or srpnja\or kolovoza\or rujna\or listopada\or studenoga\or prosinca\fi \space \number\year.}} % \end{macrocode} @@ -3304,6 +3312,15 @@ and may look very wrong.} \fi } +\newif\if@austrian@locale +\@austrian@localefalse +\def\tmp@austrian{austrian} +\define@key{german}{variant}[german]{% + \def\@tmpa{#1}% + \ifx\@tmpa\tmp@austrian\@austrian@localetrue\else + \@austrian@localefalse% + \fi} + \newif\if@german@fraktur \def\tmp@fraktur{fraktur} \define@key{german}{script}[latin]{% @@ -3396,13 +3413,17 @@ and may look very wrong.} } \def\date@german{% \def\today{\number\day.% - \space \ifcase\month%TODO add option for Austrian forms (Jänner etc) - \or Januar\or Februar\or März\or April\or Mai\or Juni\or% - Juli\or August\or September\or Oktober\or November\or% - Dezember\fi + \space \ifcase\month% + \or\if@austrian@locale Jänner\else Januar\fi\or Februar\or März\or% + April\or Mai\or Juni\or Juli\or August\or September\or Oktober\or% + November\or Dezember\fi \space \number\year}% } +\def\captions@german@austrian{% + \def\enclname{Beilage(n)}% +} + %%Strings for Fraktur contributed by Gerrit <z0idberg . gmx . de> \def\captions@german@fraktur{% \captions@german% @@ -3414,15 +3435,16 @@ and may look very wrong.} \def\date@german@fraktur{% \def\today{\number\day.% - \space \ifcase\month%TODO add option for Austrian forms (Jänner etc) - \or Januar\or Februar\or März\or April\or Mai\or Juni\or% - Juli\or Auguſt\or September\or Oktober\or November\or% - Dezember\fi + \space \ifcase\month% + \or\if@austrian@locale Jänner\else Januar\fi\or Februar\or März\or% + April\or Mai\or Juni\or Juli\or Auguſt\or September\or Oktober\or% + November\or Dezember\fi \space \number\year}% } \def\captionsgerman{% \if@german@fraktur\captions@german@fraktur\else\captions@german\fi + \if@austrian@locale\captions@german@austrian\fi } \def\dategerman{% @@ -4691,7 +4713,7 @@ and may look very wrong.} \def\abstractname{Santrauka}% \def\bibname{Literatūra}% \def\prefacename{Pratarmė}% - \def\chaptername{skyrius}% + \def\chaptername{Skyrius}% \def\appendixname{Priedas}% \def\contentsname{Turinys}% \def\listfigurename{Iliustracijų sąrašas}% @@ -5419,17 +5441,17 @@ and may look very wrong.} \def\appendixname{Dodatek}% \def\contentsname{Spis treści}% \def\listfigurename{Spis rysunków}% - \def\listtablename{Spis tablic}% + \def\listtablename{Spis tabel}% \def\indexname{Indeks}% \def\figurename{Rysunek}% - \def\tablename{Tablica}% + \def\tablename{Tabela}% \def\partname{Część}% \def\enclname{Załącznik}% \def\ccname{Kopie:}% \def\headtoname{Do}% \def\pagename{Strona}% - \def\seename{Porównaj}% - \def\alsoname{Porównaj także}% + \def\seename{Zobacz}% + \def\alsoname{Zobacz też}% \def\proofname{Dowód}% \def\glossaryname{Glossary}% <-- Needs translation } @@ -5623,7 +5645,7 @@ and may look very wrong.} \define@key{russian}{numerals}[latin]{% \ifstrequal{#1}{cyrillic}% {\cyrillic@numeralstrue} - {\cyrillic@numeralsfalse} + {\cyrillic@numeralsfalse}% } \define@boolkey{russian}[russian@]{babelshorthands}[false]{} @@ -5666,7 +5688,7 @@ and may look very wrong.} \ifx\tempx@\tempa@\@Acdash\else \ifx\tempx@\tempb@\@Bcdash\else \ifx\tempx@\tempc@\@Ccdash\else - \errmessage{Wrong usage of cdash}\fi\fi\fi} + \errmessage{Wrong usage of cdash}\fi\fi\fi}% \def\@Acdash{\ifdim\lastskip>\z@\unskip\nobreak\hskip.2em\fi \cyrdash\hskip.2em\ignorespaces}% \def\@Bcdash{\leavevmode\ifdim\lastskip>\z@\unskip\fi @@ -7050,30 +7072,36 @@ and may look very wrong.} fontsetup=true } +% TODO Add \ifluatex branch everywhere +\ifxetex \newXeTeXintercharclass\turkish@punctthin % ! : \newXeTeXintercharclass\turkish@punctthick % = +\fi \def\turkish@punctthinspace{{\ifdim\lastskip>\z@\unskip\penalty\@M\thinspace\fi}} \def\turkish@punctthickspace{{\unskip\nobreakspace}} \def\turkish@punctuation{% + \ifxetex \XeTeXinterchartokenstate=1% \XeTeXcharclass `\! \turkish@punctthin \XeTeXcharclass `\: \turkish@punctthin \XeTeXcharclass `\= \turkish@punctthick \XeTeXinterchartoks \z@ \turkish@punctthin = \turkish@punctthinspace \XeTeXinterchartoks \z@ \turkish@punctthick = \turkish@punctthickspace + \fi } \def\noturkish@punctuation{% + \ifxetex \XeTeXcharclass `\! \z@ \XeTeXcharclass `\: \z@ \XeTeXcharclass `\= \z@ \XeTeXinterchartokenstate=0% + \fi } \def\turkish@casing{% - \message{\string\turkish@casing\space called.} \lccode`\I=`\ı \uccode`\i=`\İ } @@ -7710,239 +7738,6 @@ U+0039 <> U+0E59 ; % \end{macrocode} % \iffalse %</thaidigits.map> -%<*polyglossia-brpt.lua> -% \fi -% \clearpage -% -% \subsection{polyglossia-brpt.lua} -% \begin{macrocode} -require('polyglossia') -- just in case... - -local add_to_callback = luatexbase.add_to_callback -local remove_from_callback = luatexbase.remove_from_callback -local priority_in_callback = luatexbase.priority_in_callback - -local get_quad = luaotfload.aux.get_quad -- needs luaotfload > 20130516 - -local next, type = next, type - -local nodes, fonts, node = nodes, fonts, node - -local nodecodes = nodes.nodecodes - -local insert_node_before = node.insert_before -local insert_node_after = node.insert_after -local remove_node = nodes.remove -local has_attribute = node.has_attribute -local node_copy = node.copy -local new_node = node.new - -local end_of_math = node.end_of_math -if not end_of_math then -- luatex < .76 - local traverse_nodes = node.traverse_id - local math_code = nodecodes.math - local end_of_math = function (n) - for n in traverse_nodes(math_code, n.next) do - return n - end - end -end - --- node types according to node.types() -local glue_code = nodecodes.glue -local glue_spec_code = nodecodes.glue_spec -local glyph_code = nodecodes.glyph -local penalty_code = nodecodes.penalty -local kern_code = nodecodes.kern - --- we make a new node, so that we can copy it later on -local penalty_node = new_node(penalty_code) -penalty_node.penalty = 10000 - -local function get_penalty_node() - return node_copy(penalty_node) -end - --- same for glue node -local kern_node = new_node(kern_code) - -local function get_kern_node(dim) - local n = node_copy(kern_node) - n.kern = dim - return n -end - --- we have here all possible space characters, referenced by their --- unicode slot number, taken from char-def.lua -local space_chars = {[32]=1, [160]=1, [5760]=1, [6158]=1, [8192]=1, [8193]=1, [8194]=1, [8195]=1, - [8196]=1, [8197]=1, [8198]=1, [8199]=1, [8200]=1, [8201]=1, [8202]=1, [8239]=1, [8287]=1, [12288]=1} - --- from nodes-tst.lua, adapted -local function somespace(n,all) - if n then - local id = n.id - if id == glue_code then - return (all or (n.spec.width ~= 0)) and glue_code - elseif id == kern_code then - return (all or (n.kern ~= 0)) and kern_code - elseif id == glyph_code then - if space_chars[n.char] then - return true - else - return false - end - end - end - return false -end - --- idem -local function somepenalty(n,value) - if n then - local id = n.id - if id == penalty_code then - if value then - return n.penalty == value - else - return true - end - end - end - return false -end - -local xpgfrptattr = luatexbase.attributes['xpg@frpt'] - -local left=1 -local right=2 -local byte = unicode.utf8.byte - --- Now there is a good question: how do we now, in lua, what a \thinspace is? --- In the LaTeX source (ltspace.dtx) it is defined as: --- \def\thinspace{\kern .16667em }. I see no way of seeing if it has been --- overriden or not... So we stick to this value. -local thinspace = 0.16667 --- thickspace is defined in amsmath.sty as: --- \renewcommand{\;}{\mspace+\thickmuskip{.2777em}}. Same problem as above, we --- stick to this fixed value. -local thickspace = 0.2777 -- 5/18 - -local mappings = { - [byte(':')] = {left, thickspace}, --really? - [byte('!')] = {left, thinspace}, - [byte('?')] = {left, thinspace}, - [byte(';')] = {left, thinspace}, - [byte('‼')] = {left, thinspace}, - [byte('⁇')] = {left, thinspace}, - [byte('⁈')] = {left, thinspace}, - [byte('⁉')] = {left, thinspace}, - [byte('»')] = {left, thinspace}, - [byte('>')] = {left, thinspace}, - [byte('«')] = {right, thinspace}, - [byte('‹')] = {right, thinspace}, - } - -local function set_spacings(thinsp, thicksp) - for _, m in pairs(mappings) do - if m[2] == thinspace then - m[2] = thinsp - elseif m[2] == thickspace then - m[2] = thicksp - end - end - thickspace = thicksp - thinspace = thinsp -end - --- from typo-spa.lua -local function process(head) - local done = false - local start = head - -- head is always begin of par (whatsit), so we have at least two prev nodes - -- penalty followed by glue - while start do - local id = start.id - if id == glyph_code then - local attr = has_attribute(start, xpgfrptattr) - if attr and attr > 0 then - local char = start.char - local map = mappings[char] - --node.unset_attribute(start, xpgfrptattr) -- needed? - if map then - local quad = get_quad(start.font) -- might be optimized - local prev = start.prev - if map[1] == left and prev then - local prevprev = prev.prev - local somespace = somespace(prev,true) - -- TODO: there is a question here: do we override a preceding space or not?... - if somespace then - local somepenalty = somepenalty(prevprev,10000) - if somepenalty then - head = remove_node(head,prev,true) - head = remove_node(head,prevprev,true) - else - head = remove_node(head,prev,true) - end - end - insert_node_before(head,start,get_penalty_node()) - insert_node_before(head,start,get_kern_node(map[2]*quad)) - done = true - end - local next = start.next - if map[1] == right and next then - local nextnext = next.next - local somepenalty = somepenalty(next,10000) - if somepenalty then - local somespace = somespace(nextnext,true) - if somespace then - head = remove_node(head,next,true) - head = remove_node(head,nextnext,true) - end - else - local somespace = somespace(next,true) - if somespace then - head = remove_node(head,next,true) - end - end - insert_node_after(head,start,get_kern_node(map[2]*quad)) - insert_node_after(head,start,get_penalty_node()) - done = true - end - end - end - elseif id == math_code then - -- warning: this is a feature of luatex > 0.76 - start = end_of_math(start) -- weird, can return nil .. no math end? - end - if start then - start = start.next - end - end - return head, done -end - -local callback_name = "pre_linebreak_filter" - -local function activate() - if not priority_in_callback (callback_name, "polyglossia-frpt.process") then - add_to_callback(callback_name, process, "polyglossia-frpt.process", 1) - end -end - -local function desactivate() - if priority_in_callback (callback_name, "polyglossia-frpt.process") then - remove_from_callback(callback_name, "polyglossia-frpt.process") - end -end - -polyglossia.activate_frpt = activate -polyglossia.desactivate_frpt = desactivate -polyglossia.set_spacings = set_spacings -polyglossia.thinspace = thinspace -polyglossia.thickspace = thickpace -% \end{macrocode} -% \iffalse -%</polyglossia-brpt.lua> %<*polyglossia-frpt.lua> % \fi % \clearpage @@ -8391,7 +8186,7 @@ polyglossia.enable_hyphenation = enable_hyphenation ¦----------------------------------------------¦ ¦ ¦ - ¦ THE POLYGLOSSIA PACKAGE v1.33.4 ¦ + ¦ THE POLYGLOSSIA PACKAGE v1.33.5 ¦ ¦ ¦ ¦ Modern multilingual typesetting ¦ ¦ with XeLaTeX and LuaLaTeX ¦ @@ -8428,6 +8223,13 @@ Hum, sorry, wishful thinking. Please report any bugs, problems or requests on: http://github.com/reutenauer/polyglossia/issues %</../README> %<*Changelog> +1.33.4 (21-05-2014) + * Option to disable hyphenation entirely, by Élie Roux + * Fix spurious spaces in gloss-russian.ldf, by Oleg Domanov + * Support for the Austrian variant of German, by Jürgen Spitzmüller + * Changes to the Croatian translations, by Ivan Kokan + * Correction to the Lithuanian translations, by Ignas Anikevičius + 1.33.4 (27-06-2013) * Emergency release for a bug introduced in babelsh.def diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-breton.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-breton.ldf index 3b299b36c77..5c49542c128 100644 --- a/Master/texmf-dist/tex/latex/polyglossia/gloss-breton.ldf +++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-breton.ldf @@ -8,8 +8,7 @@ } \ifluatex - \newluatexattribute\xpg@frpt - \directlua{polyglossia.load_frpt()} + % TODO \else \newXeTeXintercharclass\breton@punctthin % ! ? ; \newXeTeXintercharclass\breton@punctthick % : @@ -20,8 +19,7 @@ \def\breton@punctuation{% \ifluatex - \global\xpg@frpt=1\relax - \directlua{polyglossia.activate_frpt()}% + % TODO \else \XeTeXinterchartokenstate=1% \XeTeXcharclass `\! \breton@punctthin @@ -35,7 +33,7 @@ \def\nobreton@punctuation{% \ifluatex - \global\xpg@frpt=0\relax + % TODO \else \XeTeXcharclass `\! \z@ \XeTeXcharclass `\? \z@ diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf index c43775077a4..c76ae47160c 100644 --- a/Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf +++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-croatian.ldf @@ -16,23 +16,23 @@ \def\contentsname{Sadržaj}% \def\listfigurename{Popis slika}% \def\listtablename{Popis tablica}% - \def\indexname{Indeks}% + \def\indexname{Kazalo}% \def\figurename{Slika}% \def\tablename{Tablica}% \def\partname{Dio}% \def\pagename{Stranica}% \def\seename{Vidjeti}% - \def\alsoname{Vidjeti i}% + \def\alsoname{Također vidjeti}% \def\enclname{Prilozi}% - \def\ccname{Kopije}% + \def\ccname{Kopija}% \def\headtoname{Prima}% \def\proofname{Dokaz}% - \def\glossaryname{Kazalo}% + \def\glossaryname{Pojmovnik}% } \def\datecroatian{% \def\today{\number\day.~\ifcase\month\or siječnja\or veljače\or ožujka\or travnja\or svibnja\or - lipnja\or srpnja\or kolovoza\or rujna\or listopada\or studenog\or + lipnja\or srpnja\or kolovoza\or rujna\or listopada\or studenoga\or prosinca\fi \space \number\year.}} \endinput diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-german.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-german.ldf index dc29c14f254..e3e343c48eb 100644 --- a/Master/texmf-dist/tex/latex/polyglossia/gloss-german.ldf +++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-german.ldf @@ -33,6 +33,15 @@ \fi } +\newif\if@austrian@locale +\@austrian@localefalse +\def\tmp@austrian{austrian} +\define@key{german}{variant}[german]{% + \def\@tmpa{#1}% + \ifx\@tmpa\tmp@austrian\@austrian@localetrue\else + \@austrian@localefalse% + \fi} + \newif\if@german@fraktur \def\tmp@fraktur{fraktur} \define@key{german}{script}[latin]{% @@ -125,13 +134,17 @@ } \def\date@german{% \def\today{\number\day.% - \space \ifcase\month%TODO add option for Austrian forms (Jänner etc) - \or Januar\or Februar\or März\or April\or Mai\or Juni\or% - Juli\or August\or September\or Oktober\or November\or% - Dezember\fi + \space \ifcase\month% + \or\if@austrian@locale Jänner\else Januar\fi\or Februar\or März\or% + April\or Mai\or Juni\or Juli\or August\or September\or Oktober\or% + November\or Dezember\fi \space \number\year}% } +\def\captions@german@austrian{% + \def\enclname{Beilage(n)}% +} + %%Strings for Fraktur contributed by Gerrit <z0idberg . gmx . de> \def\captions@german@fraktur{% \captions@german% @@ -143,15 +156,16 @@ \def\date@german@fraktur{% \def\today{\number\day.% - \space \ifcase\month%TODO add option for Austrian forms (Jänner etc) - \or Januar\or Februar\or März\or April\or Mai\or Juni\or% - Juli\or Auguſt\or September\or Oktober\or November\or% - Dezember\fi + \space \ifcase\month% + \or\if@austrian@locale Jänner\else Januar\fi\or Februar\or März\or% + April\or Mai\or Juni\or Juli\or Auguſt\or September\or Oktober\or% + November\or Dezember\fi \space \number\year}% } \def\captionsgerman{% \if@german@fraktur\captions@german@fraktur\else\captions@german\fi + \if@austrian@locale\captions@german@austrian\fi } \def\dategerman{% diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-lithuanian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-lithuanian.ldf index f1bc9344610..d7f37afdf86 100644 --- a/Master/texmf-dist/tex/latex/polyglossia/gloss-lithuanian.ldf +++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-lithuanian.ldf @@ -13,7 +13,7 @@ \def\abstractname{Santrauka}% \def\bibname{Literatūra}% \def\prefacename{Pratarmė}% - \def\chaptername{skyrius}% + \def\chaptername{Skyrius}% \def\appendixname{Priedas}% \def\contentsname{Turinys}% \def\listfigurename{Iliustracijų sąrašas}% diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-polish.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-polish.ldf index 40359e022aa..05b1a9141b6 100644 --- a/Master/texmf-dist/tex/latex/polyglossia/gloss-polish.ldf +++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-polish.ldf @@ -15,17 +15,17 @@ \def\appendixname{Dodatek}% \def\contentsname{Spis treści}% \def\listfigurename{Spis rysunków}% - \def\listtablename{Spis tablic}% + \def\listtablename{Spis tabel}% \def\indexname{Indeks}% \def\figurename{Rysunek}% - \def\tablename{Tablica}% + \def\tablename{Tabela}% \def\partname{Część}% \def\enclname{Załącznik}% \def\ccname{Kopie:}% \def\headtoname{Do}% \def\pagename{Strona}% - \def\seename{Porównaj}% - \def\alsoname{Porównaj także}% + \def\seename{Zobacz}% + \def\alsoname{Zobacz też}% \def\proofname{Dowód}% \def\glossaryname{Glossary}% <-- Needs translation } diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf index 78c984afc89..45563f50fc8 100644 --- a/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf +++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-russian.ldf @@ -22,7 +22,7 @@ \define@key{russian}{numerals}[latin]{% \ifstrequal{#1}{cyrillic}% {\cyrillic@numeralstrue} - {\cyrillic@numeralsfalse} + {\cyrillic@numeralsfalse}% } \define@boolkey{russian}[russian@]{babelshorthands}[false]{} @@ -65,7 +65,7 @@ \ifx\tempx@\tempa@\@Acdash\else \ifx\tempx@\tempb@\@Bcdash\else \ifx\tempx@\tempc@\@Ccdash\else - \errmessage{Wrong usage of cdash}\fi\fi\fi} + \errmessage{Wrong usage of cdash}\fi\fi\fi}% \def\@Acdash{\ifdim\lastskip>\z@\unskip\nobreak\hskip.2em\fi \cyrdash\hskip.2em\ignorespaces}% \def\@Bcdash{\leavevmode\ifdim\lastskip>\z@\unskip\fi diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-turkish.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-turkish.ldf index b9d130f2ba9..7df181f50cb 100644 --- a/Master/texmf-dist/tex/latex/polyglossia/gloss-turkish.ldf +++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-turkish.ldf @@ -8,30 +8,36 @@ fontsetup=true } +% TODO Add \ifluatex branch everywhere +\ifxetex \newXeTeXintercharclass\turkish@punctthin % ! : \newXeTeXintercharclass\turkish@punctthick % = +\fi \def\turkish@punctthinspace{{\ifdim\lastskip>\z@\unskip\penalty\@M\thinspace\fi}} \def\turkish@punctthickspace{{\unskip\nobreakspace}} \def\turkish@punctuation{% + \ifxetex \XeTeXinterchartokenstate=1% \XeTeXcharclass `\! \turkish@punctthin \XeTeXcharclass `\: \turkish@punctthin \XeTeXcharclass `\= \turkish@punctthick \XeTeXinterchartoks \z@ \turkish@punctthin = \turkish@punctthinspace \XeTeXinterchartoks \z@ \turkish@punctthick = \turkish@punctthickspace + \fi } \def\noturkish@punctuation{% + \ifxetex \XeTeXcharclass `\! \z@ \XeTeXcharclass `\: \z@ \XeTeXcharclass `\= \z@ \XeTeXinterchartokenstate=0% + \fi } \def\turkish@casing{% - \message{\string\turkish@casing\space called.} \lccode`\I=`\ı \uccode`\i=`\İ } diff --git a/Master/texmf-dist/tex/latex/polyglossia/polyglossia-brpt.lua b/Master/texmf-dist/tex/latex/polyglossia/polyglossia-brpt.lua deleted file mode 100644 index 56af011152a..00000000000 --- a/Master/texmf-dist/tex/latex/polyglossia/polyglossia-brpt.lua +++ /dev/null @@ -1,224 +0,0 @@ -require('polyglossia') -- just in case... - -local add_to_callback = luatexbase.add_to_callback -local remove_from_callback = luatexbase.remove_from_callback -local priority_in_callback = luatexbase.priority_in_callback - -local get_quad = luaotfload.aux.get_quad -- needs luaotfload > 20130516 - -local next, type = next, type - -local nodes, fonts, node = nodes, fonts, node - -local nodecodes = nodes.nodecodes - -local insert_node_before = node.insert_before -local insert_node_after = node.insert_after -local remove_node = nodes.remove -local has_attribute = node.has_attribute -local node_copy = node.copy -local new_node = node.new - -local end_of_math = node.end_of_math -if not end_of_math then -- luatex < .76 - local traverse_nodes = node.traverse_id - local math_code = nodecodes.math - local end_of_math = function (n) - for n in traverse_nodes(math_code, n.next) do - return n - end - end -end - --- node types according to node.types() -local glue_code = nodecodes.glue -local glue_spec_code = nodecodes.glue_spec -local glyph_code = nodecodes.glyph -local penalty_code = nodecodes.penalty -local kern_code = nodecodes.kern - --- we make a new node, so that we can copy it later on -local penalty_node = new_node(penalty_code) -penalty_node.penalty = 10000 - -local function get_penalty_node() - return node_copy(penalty_node) -end - --- same for glue node -local kern_node = new_node(kern_code) - -local function get_kern_node(dim) - local n = node_copy(kern_node) - n.kern = dim - return n -end - --- we have here all possible space characters, referenced by their --- unicode slot number, taken from char-def.lua -local space_chars = {[32]=1, [160]=1, [5760]=1, [6158]=1, [8192]=1, [8193]=1, [8194]=1, [8195]=1, - [8196]=1, [8197]=1, [8198]=1, [8199]=1, [8200]=1, [8201]=1, [8202]=1, [8239]=1, [8287]=1, [12288]=1} - --- from nodes-tst.lua, adapted -local function somespace(n,all) - if n then - local id = n.id - if id == glue_code then - return (all or (n.spec.width ~= 0)) and glue_code - elseif id == kern_code then - return (all or (n.kern ~= 0)) and kern_code - elseif id == glyph_code then - if space_chars[n.char] then - return true - else - return false - end - end - end - return false -end - --- idem -local function somepenalty(n,value) - if n then - local id = n.id - if id == penalty_code then - if value then - return n.penalty == value - else - return true - end - end - end - return false -end - -local xpgfrptattr = luatexbase.attributes['xpg@frpt'] - -local left=1 -local right=2 -local byte = unicode.utf8.byte - --- Now there is a good question: how do we now, in lua, what a \thinspace is? --- In the LaTeX source (ltspace.dtx) it is defined as: --- \def\thinspace{\kern .16667em }. I see no way of seeing if it has been --- overriden or not... So we stick to this value. -local thinspace = 0.16667 --- thickspace is defined in amsmath.sty as: --- \renewcommand{\;}{\mspace+\thickmuskip{.2777em}}. Same problem as above, we --- stick to this fixed value. -local thickspace = 0.2777 -- 5/18 - -local mappings = { - [byte(':')] = {left, thickspace}, --really? - [byte('!')] = {left, thinspace}, - [byte('?')] = {left, thinspace}, - [byte(';')] = {left, thinspace}, - [byte('‼')] = {left, thinspace}, - [byte('⁇')] = {left, thinspace}, - [byte('⁈')] = {left, thinspace}, - [byte('⁉')] = {left, thinspace}, - [byte('»')] = {left, thinspace}, - [byte('>')] = {left, thinspace}, - [byte('«')] = {right, thinspace}, - [byte('‹')] = {right, thinspace}, - } - -local function set_spacings(thinsp, thicksp) - for _, m in pairs(mappings) do - if m[2] == thinspace then - m[2] = thinsp - elseif m[2] == thickspace then - m[2] = thicksp - end - end - thickspace = thicksp - thinspace = thinsp -end - --- from typo-spa.lua -local function process(head) - local done = false - local start = head - -- head is always begin of par (whatsit), so we have at least two prev nodes - -- penalty followed by glue - while start do - local id = start.id - if id == glyph_code then - local attr = has_attribute(start, xpgfrptattr) - if attr and attr > 0 then - local char = start.char - local map = mappings[char] - --node.unset_attribute(start, xpgfrptattr) -- needed? - if map then - local quad = get_quad(start.font) -- might be optimized - local prev = start.prev - if map[1] == left and prev then - local prevprev = prev.prev - local somespace = somespace(prev,true) - -- TODO: there is a question here: do we override a preceding space or not?... - if somespace then - local somepenalty = somepenalty(prevprev,10000) - if somepenalty then - head = remove_node(head,prev,true) - head = remove_node(head,prevprev,true) - else - head = remove_node(head,prev,true) - end - end - insert_node_before(head,start,get_penalty_node()) - insert_node_before(head,start,get_kern_node(map[2]*quad)) - done = true - end - local next = start.next - if map[1] == right and next then - local nextnext = next.next - local somepenalty = somepenalty(next,10000) - if somepenalty then - local somespace = somespace(nextnext,true) - if somespace then - head = remove_node(head,next,true) - head = remove_node(head,nextnext,true) - end - else - local somespace = somespace(next,true) - if somespace then - head = remove_node(head,next,true) - end - end - insert_node_after(head,start,get_kern_node(map[2]*quad)) - insert_node_after(head,start,get_penalty_node()) - done = true - end - end - end - elseif id == math_code then - -- warning: this is a feature of luatex > 0.76 - start = end_of_math(start) -- weird, can return nil .. no math end? - end - if start then - start = start.next - end - end - return head, done -end - -local callback_name = "pre_linebreak_filter" - -local function activate() - if not priority_in_callback (callback_name, "polyglossia-frpt.process") then - add_to_callback(callback_name, process, "polyglossia-frpt.process", 1) - end -end - -local function desactivate() - if priority_in_callback (callback_name, "polyglossia-frpt.process") then - remove_from_callback(callback_name, "polyglossia-frpt.process") - end -end - -polyglossia.activate_frpt = activate -polyglossia.desactivate_frpt = desactivate -polyglossia.set_spacings = set_spacings -polyglossia.thinspace = thinspace -polyglossia.thickspace = thickpace diff --git a/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty b/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty index 7e5c3251f61..e56d5a9e70a 100644 --- a/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty +++ b/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty @@ -1,5 +1,5 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{polyglossia}[2013/06/27 v1.33.4 +\ProvidesPackage{polyglossia}[2014/05/21 v1.33.5 Babel replacement for XeLaTeX and LuaTeX] \RequirePackage{etoolbox} \RequirePackage{makecmds} @@ -10,6 +10,8 @@ % LuaTeX, but it's not if we run XeTeX, and we need it to know which of % the two engines it is! Hence we include it here. \RequirePackage{ifluatex} +% For symmetry with ifluatex +\RequirePackage{ifxetex} % fontspec now uses LaTeX3 packages such as expl3, so we need this: \ExplSyntaxOn @@ -211,8 +213,17 @@ \ifcsundef{l@#1}% {\xpg@nopatterns{\csname xpg@langname@#1\endcsname}% \expandafter\adddialect\csname l@#1\endcsname\l@nohyphenation\relax}{}% - \csdef{#1@language}{\language=\csname l@#1\endcsname\ifluatex\directlua{polyglossia.select_language('\luatexluaescapestring{\string#1}', \the\csname l@#1\endcsname)}\fi}% + \csdef{#1@language}{% + \ifbool{xpg@hyphenation@disabled}{% + \xdef\xpg@lastlanguage{\the\csname l@#1\endcsname}% + }{% + \ifluatex% + \xpg@set@language@luatex@ii{#1}% + \fi% + \language=\csname l@#1\endcsname% + }% }% + }% \define@choicekey+[xpg@setup]{#1}{direction}[\val\nr]{LR,RL}[LR]% {\ifcase\nr\relax \togglefalse{#1@RL}% @@ -646,9 +657,13 @@ \docsvlist{#1}}% \def\common@language{% FIXME is this really needed??? - \language=\z@ - \lefthyphenmin=\tw@ - \righthyphenmin=\thr@@} + \ifbool{xpg@hyphenation@disabled}{% + \xdef\xpg@lastlanguage{\z@}% + }{% + \language=\z@ + }% + \lefthyphenmin=\tw@ + \righthyphenmin=\thr@@} \def\noextrascurrent#1{\csuse{noextras@#1}} @@ -729,7 +744,7 @@ \global\@namedef{lu@texhyphen@loaded@\the\language}{}% \directlua{polyglossia.select_language('\luatexluaescapestring{\string#1}', \the\csname l@#1\endcsname)}% \fi % - \fi % + \fi % \xpg@initial@setup% \select@@language{#1}% \ifcsundef{setRL}{}% |