Skip to content

Commit

Permalink
Initial fix for issue 129.
Browse files Browse the repository at this point in the history
  • Loading branch information
reutenauer committed Mar 17, 2016
1 parent b8ee724 commit d74a64b
Show file tree
Hide file tree
Showing 10 changed files with 416 additions and 50 deletions.
3 changes: 3 additions & 0 deletions doc/Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
08-02-2016
* Updated gloss-occitan from CTAN

18-01-2016
* Fixed issue #124 (minor typo in polyglossia-frpt.lua)

03-12-2015
* Merged pull request #117 for more French guillemet spacing
* Merged pull request #121 to add \bbl@loaded; fixes issue #120
Expand Down
134 changes: 134 additions & 0 deletions issues/129/feature.output
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
Using the default profile...
Feature: Fixing bug 129

Scenario: Running with LuaTeX # features/issue129.feature:3
Given I am testing LuaTeX # features/step_definitions/text_steps.rb:31
And the main language is German # features/step_definitions/text_steps.rb:51
And another language is english with variant=british # features/step_definitions/text_steps.rb:60
And another language is Italian # features/step_definitions/text_steps.rb:60
And another language is Spanish # features/step_definitions/text_steps.rb:60
When I set "Rindfleischetikettierungsgesetz\textenglish{mellifluous}" in a very narrow paragraph # features/step_definitions/text_steps.rb:153
And show me the interactive prompt # features/step_definitions/text_steps.rb:176
This is LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238)
restricted \write18 enabled.
(/tmp/d20160210-15044-j6cur8/scenario.tex
LaTeX2e <2016/02/01>
Babel <3.9o> and hyphenation patterns for 1 language(s) loaded.
(/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/base/minimal.cls
Document Class: minimal 2001/05/25 Standard LaTeX minimal class
) (/home/arthur/perso/polyglossia/tex/polyglossia.sty (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/etoolbox/etoolbox.sty) (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/makecmds/makecmds.sty) (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/xkeyval/xkeyval.sty (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/generic/xkeyval/xkeyval.tex (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/generic/xkeyval/xkvutils.tex (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/generic/xkeyval/keyval.tex)))) (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/fontspec/fontspec.sty (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/l3kernel/expl3.sty (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/l3kernel/expl3-code.tex) (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/l3kernel/l3pdfmode.def)) (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/l3packages/xparse/xparse.sty) (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/luatex/luaotfload/luaotfload.sty(using cache: /home/arthur/perso/TeX/live/dev/texmf-var/luatex-cache/generic)
luaotfload | main : initialization completed in 0.056 seconds) (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/base/fontenc.sty (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/euenc/eu2enc.def) (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/euenc/eu2lmr.fd)(load luc: /home/arthur/perso/TeX/live/dev/texmf-var/luatex-cache/generic/fonts/otf/lmroman10-regular.luc)) (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/xelatex/xunicode/xunicode.sty (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/tipa/t3enc.def(load luc: /home/arthur/perso/TeX/live/dev/texmf-var/luatex-cache/generic/fonts/otf/lmromanslant10-regular.luc)(load luc: /home/arthur/perso/TeX/live/dev/texmf-var/luatex-cache/generic/fonts/otf/lmroman10-italic.luc)(load luc: /home/arthur/perso/TeX/live/dev/texmf-var/luatex-cache/generic/fonts/otf/lmroman10-bold.luc) (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/euenc/eu2lmss.fd)(load luc: /home/arthur/perso/TeX/live/dev/t
exmf-var/luatex-cache/generic/fonts/otf/lmsans10-regular.luc)) (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/graphics/graphicx.sty (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/graphics/graphics.sty (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/graphics/trig.sty) (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/latexconfig/graphics.cfg) (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/pdftex-def/pdftex.def (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/generic/oberdiek/infwarerr.sty) (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/generic/oberdiek/ltxcmds.sty))))) (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/fontspec/fontspec.cfg))) (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/generic/oberdiek/ifluatex.sty) (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/generic/ifxetex/ifxetex.sty) (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/luatex/luatexbase/luatexbase.sty (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/luatex/ctablestack/ctablestack.sty))) (/home/arthur/perso/polyglossia/tex/gloss-german.ldfLanguage data for german
hyphenation
lefthyphenmin 2
loader loadhyph-de-1901.tex
righthyphenmin 2
patterns hyph-de-1901.pat.txt
synonyms table: 0x3aae720

hyph-de-1901.pat.txt
Language german was not yet loaded; created with id 4
Language german already loaded; id is 4
Language german already loaded; id is 4
Language german already loaded; id is 4
Language german already loaded; id is 4
Language german already loaded; id is 4
Language german already loaded; id is 4
Language german already loaded; id is 4Language data for ngerman
hyphenation
lefthyphenmin 2
loader loadhyph-de-1996.tex
righthyphenmin 2
patterns hyph-de-1996.pat.txt
synonyms table: 0x3aae8f0

hyph-de-1996.pat.txt
Language ngerman was not yet loaded; created with id 8
Language ngerman already loaded; id is 8 (/home/arthur/perso/polyglossia/tex/babelsh.def)) (/home/arthur/perso/polyglossia/tex/gloss-english.ldf)Language data for ukenglish
hyphenation hyph-en-gb.hyp.txt
lefthyphenmin 2
loader loadhyph-en-gb.tex
righthyphenmin 3
patterns hyph-en-gb.pat.txt
synonyms table: 0x3aad090

hyph-en-gb.pat.txt
Language ukenglish was not yet loaded; created with id 12
Language ukenglish already loaded; id is 12 (/home/arthur/perso/polyglossia/tex/gloss-italian.ldf
Language italian not found in language.dat.lua
Language italian not found in language.dat.lua
Language italian not found in language.dat.lua
Language italian not found in language.dat.lua
Language italian not found in language.dat.lua
Language italian not found in language.dat.lua

Package polyglossia Warning: \setlocalhyphenmin useless for unhyphenated language italian on input line 9.

) (/home/arthur/perso/polyglossia/tex/gloss-spanish.ldf
Language spanish not found in language.dat.lua
Language spanish not found in language.dat.lua
Language spanish not found in language.dat.lua
Language spanish not found in language.dat.lua
Language spanish not found in language.dat.lua
Language spanish not found in language.dat.lua

Package polyglossia Warning: \setlocalhyphenmin useless for unhyphenated language spanish on input line 8.

)
No file scenario.aux.
(/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/tipa/t3cmr.fd) (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/generic/oberdiek/ifpdf.sty) (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/generic/oberdiek/luatex-loader.sty
(/home/arthur/perso/TeX/live/dev/texmf-dist/scripts/oberdiek/oberdiek.luatex.lua))) (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/oberdiek/grfext.sty (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty)) (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/oberdiek/kvoptions.sty (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/generic/oberdiek/etexcmds.sty))) (/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
Underfull \hbox (badness 10000) in paragraph at lines 12--15
[][]

Overfull \hbox (24.58998pt too wide) in paragraph at lines 12--15
\EU2/lmr/m/n/10 Rind-

Overfull \hbox (16.10999pt too wide) in paragraph at lines 12--15
\EU2/lmr/m/n/10 flei-

Overfull \hbox (21.43pt too wide) in paragraph at lines 12--15
\EU2/lmr/m/n/10 sche-

Overfull \hbox (9.99998pt too wide) in paragraph at lines 12--15
\EU2/lmr/m/n/10 ti-

Overfull \hbox (16.65999pt too wide) in paragraph at lines 12--15
\EU2/lmr/m/n/10 ket-

Overfull \hbox (14.43999pt too wide) in paragraph at lines 12--15
\EU2/lmr/m/n/10 tie-

Overfull \hbox (27.30998pt too wide) in paragraph at lines 12--15
\EU2/lmr/m/n/10 rungs-

Overfull \hbox (12.76999pt too wide) in paragraph at lines 12--15
\EU2/lmr/m/n/10 ge-

Overfull \hbox (35.59pt too wide) in paragraph at lines 12--15
\EU2/lmr/m/n/10 setzmel-

Overfull \hbox (8.88998pt too wide) in paragraph at lines 12--15
\EU2/lmr/m/n/10 li-

Overfull \hbox (14.44998pt too wide) in paragraph at lines 12--15
\EU2/lmr/m/n/10 flu-

Overfull \hbox (14.49998pt too wide) in paragraph at lines 12--15
\EU2/lmr/m/n/10 ous
(load luc: /home/arthur/perso/TeX/live/dev/texmf-var/luatex-cache/generic/fonts/otf/lmroman7-regular.luc)(load luc: /home/arthur/perso/TeX/live/dev/texmf-var/luatex-cache/generic/fonts/otf/lmroman5-regular.luc) [1{/home/arthur/perso/TeX/live/dev/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./scenario.aux))
(see the transcript file for additional information)
274 words of node memory still in use:
3 hlist, 1 vlist, 1 rule, 2 glue, 3 attribute, 37 glue_spec, 3 attribute_list, 1 write nodes
avail lists: 1:1,2:29,3:18,4:54,5:2,6:63,7:13,9:21,10:12
</home/arthur/perso/TeX/live/dev/texmf-dist/fonts/opentype/public/lm/lmroman10-regular.otf>
Output written on scenario.pdf (1 page, 4430 bytes).
Transcript written on scenario.log.
Then it should work # features/step_definitions/text_steps.rb:301
And I should see "Rind-flei-sche-ti-ket-tie-rungs-ge-setzmel-li-flu-ous" # features/step_definitions/text_steps.rb:373

1 scenario (1 passed)
9 steps (9 passed)
0m1.192s
82 changes: 82 additions & 0 deletions issues/129/langids.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
This is LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238) (format=luatex 2016.2.9) 9 FEB 2016 23:15
restricted \write18 enabled.
**langids
(./langids.tex
(/home/arthur/perso/TeX/live/dev/texmf-dist/tex/luatex/luatexbase/luatexbase.st
y
Package: luatexbase 2015/10/04 v1.3 luatexbase interface to LuaTeX

(/home/arthur/perso/TeX/live/dev/texmf-dist/tex/luatex/ctablestack/ctablestack.
sty
Package: ctablestack 2015/10/01 v1.0 Catcode table stable support
(/home/arthur/perso/TeX/live/dev/texmf-dist/tex/latex/base/ltluatex.tex
File: ltluatex.tex 2015/12/18 v1.0l LuaTeX support for plain TeX (core)
\e@alloc@attribute@count=\count277
\e@alloc@ccodetable@count=\count278
\e@alloc@luafunction@count=\count279
\e@alloc@whatsit@count=\count280
\e@alloc@bytecode@count=\count281
\e@alloc@luachunk@count=\count282
\catcodetable@initex=\catcodetable1
\catcodetable@string=\catcodetable2
\catcodetable@latex=\catcodetable3
\catcodetable@atletter=\catcodetable4
)
\@catcodetablestackcnt=\count283
)
\CatcodeTableOther=\catcodetable5
\CatcodeTableExpl=\catcodetable6
)
(/home/arthur/perso/TeX/live/dev/texmf-dist/tex/luatex/luaotfload/luaotfload.st
y
Lua module: luaotfload-main 2015/12/09 2.60001 OpenType layout system.
Lua module: lualibs 2015-12-02 2.3 ConTeXt Lua standard libraries.
Lua module: lualibs-extended 2015-12-02 2.3 ConTeXt Lua libraries -- extended co
llection.(using cache: /home/arthur/perso/TeX/live/dev/texmf-var/luatex-cache/ge
neric)
luaotfload | conf : Root cache directory is /home/arthur/perso/TeX/live/dev/texm
f-var/luatex-cache/generic/names.
luaotfload | init : Loading fontloader “fontloader-2016-01-22.lua” from kpse
-resolved path “/home/arthur/perso/TeX/live/dev/texmf-dist/tex/luatex/luaotflo
ad/fontloader-2016-01-22.lua”.
Lua-only attribute luaotfload@state = 1
Lua-only attribute luaotfload@cursbase = 2
Lua-only attribute luaotfload@noligature = 3
luaotfload | init : Context OpenType loader version “2.82”
Inserting `luaotfload.node_processor' at position 1 in `pre_linebreak_filter'.
Inserting `luaotfload.node_processor' at position 1 in `hpack_filter'.
Inserting `luaotfload.define_font' at position 1 in `define_font'.
Lua-only attribute luaotfload_color_attribute = 4
luaotfload | conf : Root cache directory is /home/arthur/perso/TeX/live/dev/texm
f-var/luatex-cache/generic/names.
Inserting `luaotfload.aux.set_sscale_dimens' at position 1 in `luaotfload.patch_
font'.
Inserting `luaotfload.aux.patch_cambria_domh' at position 2 in `luaotfload.patch
_font'.
Inserting `luaotfload.aux.fixup_fontdata' at position 1 in `luaotfload.patch_fon
t_unsafe'.
Inserting `luaotfload.aux.set_capheight' at position 3 in `luaotfload.patch_font
'.
Inserting `luaotfload.rewrite_fontname' at position 4 in `luaotfload.patch_font'
.
luaotfload | main : initialization completed in 0.057 seconds)
luatex-hyphen: using data file: /home/arthur/perso/TeX/live/dev/texmf-var/tex/ge
neric/config/language.dat.lua
4
8
Lua module: polyglossia 2013/05/11 1.3 Polyglossia
9
10
11
Language german was not yet loaded; created with id 15
16
17 [1{/home/arthur/perso/TeX/live/dev/texmf-var/fonts/map/pdftex/updmap/pdftex.m
ap}])<</home/arthur/perso/TeX/live/dev/texmf-dist/fonts/type1/public/amsfonts/cm
/cmr10.pfb>
Output written on langids.pdf (1 page, 13398 bytes).

PDF statistics: 12 PDF objects out of 1000 (max. 8388607)
7 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 131072)
1 words of extra memory for PDF output out of 10000 (max. 10000000)

Binary file added issues/129/langids.pdf
Binary file not shown.
32 changes: 32 additions & 0 deletions issues/129/langids.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
\input luatexbase.sty
\input luaotfload.sty
\directlua{require'luatex-hyphen'}
\directlua{
function log(text)
texio.write_nl('term and log', text)
end
}

\def\test{%
Creating 3 langs
\directlua{lang.new(); lang.new(); lang.new()}

\newlang
}%

\def\newlang{%
New lang: \directlua{lg = lang.new(); log(lang.id(lg))}
}

\test
Again
\test

\directlua{dofile(kpse.find_file('polyglossia.lua'))}

New lang \newlang
\directlua{polyglossia.newloader('spanish')}\newlang
\directlua{polyglossia.newloader('italian')}\newlang
\directlua{polyglossia.newloader('german')}\newlang
\directlua{polyglossia.newloader('turkish')}\newlang
\bye
10 changes: 5 additions & 5 deletions tex/gloss-english.ldf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
\define@key{english}{variant}{%
%needs to be reset for loop over hyphennames below:
\def\do##1{%
\ifcsdef{l@#1}%
\xpg@ifdefined{#1}%
{\csletcs{l@english}{l@#1}\listbreak}%
{}%
}%
Expand All @@ -37,10 +37,10 @@
{\@british@hyphenfalse\english@ordinalmonthdayfalse
\ifluatex\else\setkeys[xpg@setup]{english}{hyphennames={usenglishmax}}\fi
\xpg@info{Option: english variant=american (with additional patterns)}%
\ifcsundef{l@usenglishmax}%
\xpg@ifdefined{usenglishmax}{}%
{\xpg@warning{No hyphenation patterns were loaded for "US English Max"\MessageBreak
I will use the standard patterns for US English instead}%
\adddialect\l@usenglishmax\l@english\relax}{}%
\adddialect\l@usenglishmax\l@english\relax}%
\gdef\english@language{\language=\l@usenglishmax}}%
{\ifstrequal{#1}{australian}%
{\@british@hyphentrue\english@ordinalmonthdayfalse
Expand All @@ -53,10 +53,10 @@
\if@british@locale\@british@hyphentrue\english@ordinalmonthdaytrue\fi
\if@british@hyphen
\ifluatex\else\setkeys[xpg@setup]{english}{hyphennames={ukenglish,british,UKenglish}}\fi
\ifcsundef{l@ukenglish}%
\xpg@ifdefined{ukenglish}{}%
{\xpg@warning{No hyphenation patterns were loaded for British English\MessageBreak
I will use the patterns for US English instead}%
\adddialect\l@ukenglish\l@english\relax}{}%
\adddialect\l@ukenglish\l@english\relax}%
\gdef\english@language{\language=\l@ukenglish\xpg@set@language@luatex@ii{ukenglish}}%
\fi
% and we reset \do to its previous definition here:
Expand Down
24 changes: 12 additions & 12 deletions tex/gloss-german.ldf
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@
\def\@tmpa{#1}%
\ifx\@tmpa\tmp@oldyr\def\@tmpa{old}\fi
\ifx\@tmpa\tmp@old
\ifx\l@german\@undefined
\xpg@ifdefined{german}{}{%
\xpg@nopatterns{german}%
\adddialect\l@german\l@nohyphenation
\fi
}
\@german@oldspellingtrue
\else %try ngerman
\ifx\l@ngerman\@undefined
\ifx\l@german\@undefined
\xpg@nopatterns{ngerman}%
\adddialect\l@ngerman\l@nohyphenation
\else
\else % try ngerman
\xpg@ifdefined{ngerman}{%
\@german@oldspellingfalse
}{% fall back to german
\xpg@ifdefined{german}{%
\xpg@warning{You asked for `ngerman' but only `german' hyphenation is available!}%
\@german@oldspellingtrue
\fi
\else %we use ngerman
\@german@oldspellingfalse
\fi
}{%
\xpg@nopatterns{ngerman}%
\adddialect\l@ngerman\l@nohyphenation
}%
}%
\fi
}

Expand Down
18 changes: 9 additions & 9 deletions tex/gloss-latin.ldf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
% !TEX encoding = UTF-8 Unicode
\ProvidesFile{gloss-latin.ldf}[polyglossia: module for latin]
\PolyglossiaSetup{latin}{
% hyphennames={latin},
hyphennames={latin},
% hyphenmins={2,2},
frenchspacing=true,
fontsetup=true,
Expand Down Expand Up @@ -63,7 +63,7 @@

% set modern as default
\def\latin@variant{\l@latin}%
\ifluatex\xpg@set@language@luatex@ii{latin}\fi
\ifluatex\xpg@set@language@luatex@iv{latin}\fi
\def\captionslatin{\modernlatincaptions}%
\def\datelatin{\modernlatindate}%
\def\classicuclccodes{\lccode`\V=`\u \uccode`\u=`\V}
Expand All @@ -76,28 +76,28 @@
\def\@tempa{#1}%
\ifx\@tempa\tmp@medieval
\def\latin@variant{\l@latin}%
\xpg@set@language@luatex@ii{latin}
\xpg@set@language@luatex@iv{latin}
\def\captionslatin{\medievallatincaptions}%
\def\datelatin{\classiclatindate}%
\classicuclccodes
\xpg@info{Option: Medieval Latin}%
\else
\ifx\@tempa\tmp@classic
\ifx\l@classiclatin\undefined
\xpg@ifdefined{classiclatin}{%
\def\latin@variant{\l@classiclatin}%
\xpg@set@language@luatex@iv{classiclatin}%
}{%
\xpg@nopatterns{Classic Latin}%
\adddialect\l@classiclatin\l@latin
\def\latin@variant{\l@latin}%
\else
\def\latin@variant{\l@classiclatin}%
\xpg@set@language@luatex@ii{classiclatin}%
\fi
}%
\def\captionslatin{\modernlatincaptions}%
\def\datelatin{\classiclatindate}%
\classicuclccodes
\xpg@info{Option: Classic Latin}%
\else
\def\latin@variant{\l@latin}%
\xpg@set@language@luatex@ii{latin}
\xpg@set@language@luatex@iv{latin}
\def\captionslatin{\modernlatincaptions}%
\def\datelatin{\modernlatindate}%
\xpg@info{Option: Modern Latin}%
Expand Down

0 comments on commit d74a64b

Please sign in to comment.