Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illegal Unit of Measure #2

Closed
tarsobcaldas opened this issue Jan 31, 2022 · 9 comments
Closed

Illegal Unit of Measure #2

tarsobcaldas opened this issue Jan 31, 2022 · 9 comments
Assignees
Labels
Major Bug This breaks a document

Comments

@tarsobcaldas
Copy link

Issue

I'm testing this package on LaTeX, but it prompts that the length set for

\clubpenalty
\widowpenalty
\displaywidowpenalty
\interlinepenalty
\brokenpenalty

have no unit defined. Is this intended?

Expected Behavior

Expected the program wouldn't issue any error.

Reproduction

No response

Log File

! Illegal unit of measure (pt inserted).
<to be read again>
!
l.10 \setlength{\clubpenalty}{1}

?
! Illegal unit of measure (pt inserted).
<to be read again>
!
l.11 \setlength{\widowpenalty}{1}

?
! Illegal unit of measure (pt inserted).
<to be read again>
!
l.12 \setlength{\displaywidowpenalty}{0}

?
! Illegal unit of measure (pt inserted).
<to be read again>
!
l.13 \setlength{\interlinepenalty}{0}

?
! Illegal unit of measure (pt inserted).
<to be read again>
!
l.14 \setlength{\brokenpenalty}{0}

?

Format

LaTeX

Distribution

TeX Live

Distribution Version

TeX Live 2021

Lua-widow-control Version

1.1.2

Other Relevant Packages and Versions

No response

Other

No response

@tarsobcaldas tarsobcaldas added the Major Bug This breaks a document label Jan 31, 2022
@gucci-on-fleek
Copy link
Owner

Hmm, that definitely shouldn't happen.

Can you please try running this and paste in the full .log file?

\nonstopmode
\documentclass{article}

\show\setlength
\showthe\clubpenalty
\showthe\widowpenalty
\showthe\displaywidowpenalty
\showthe\interlinepenalty
\showthe\brokenpenalty

\usepackage{lua-widow-control}

\show\setlength
\showthe\clubpenalty
\showthe\widowpenalty
\showthe\displaywidowpenalty
\showthe\interlinepenalty
\showthe\brokenpenalty

\begin{document}
    \null
\end{document}

@tarsobcaldas
Copy link
Author

This is LuaHBTeX, Version 1.13.2 (TeX Live 2021/W32TeX)  (format=lualatex 2022.1.30)  30 JAN 2022 22:20
 restricted system commands enabled.
**mwe
(./mwe.tex
LaTeX2e <2021-11-15> patch level 1
Lua module: luaotfload 2021-05-21 3.18 Lua based OpenType font support
Lua module: lualibs 2021-05-20 2.74 ConTeXt Lua standard libraries.
Lua module: lualibs-extended 2021-05-20 2.74 ConTeXt Lua libraries -- extended c
ollection.
luaotfload | conf : Root cache directory is "K:/texlive/2021/texmf-var/luatex-ca
che/generic/names".
luaotfload | init : Loading fontloader "fontloader-2021-05-20.lua" from kpse-res
olved path "k:/texlive/2021/texmf-dist/tex/luatex/luaotfload/fontloader-2021-05-
20.lua".
Lua-only attribute luaotfload@noligature = 1
Lua-only attribute luaotfload@syllabe = 2
luaotfload | init : Context OpenType loader version 3.116
Inserting `luaotfload.node_processor' at position 1 in `pre_linebreak_filter'.
Inserting `luaotfload.node_processor' at position 1 in `hpack_filter'.
Inserting `luaotfload.glyph_stream' at position 1 in `glyph_stream_provider'.
Inserting `luaotfload.define_font' at position 1 in `define_font'.
Lua-only attribute luaotfload_color_attribute = 3
luaotfload | conf : Root cache directory is "K:/texlive/2021/texmf-var/luatex-ca
che/generic/names".
Inserting `luaotfload.harf.strip_prefix' at position 1 in `find_opentype_file'.
Inserting `luaotfload.harf.strip_prefix' at position 1 in `find_truetype_file'.
Inserting `luaotfload.harf.finalize_vlist' at position 1 in `post_linebreak_filt
er'.
Inserting `luaotfload.harf.finalize_hlist' at position 2 in `hpack_filter'.
Inserting `luaotfload.cleanup_files' at position 1 in `wrapup_run'.
Inserting `luaotfload.harf.finalize_unicode' at position 1 in `finish_pdffile'.
Inserting `luaotfload.glyphinfo' at position 1 in `glyph_info'.
Lua-only attribute luaotfload.letterspace_done = 4
Inserting `luaotfload.aux.set_sscale_dimens' at position 1 in `luaotfload.patch_
font'.
Inserting `luaotfload.aux.set_font_index' at position 2 in `luaotfload.patch_fon
t'.
Inserting `luaotfload.aux.patch_cambria_domh' at position 3 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 4 in `luaotfload.patch_font
'.
Inserting `luaotfload.aux.set_xheight' at position 5 in `luaotfload.patch_font'.
Inserting `luaotfload.rewrite_fontname' at position 6 in `luaotfload.patch_font'
. L3 programming layer <2022-01-21>
Inserting `tracingstacklevels' at position 1 in `input_level_string'.
(k:/texlive/2021/texmf-dist/tex/latex/base/article.cls
Document Class: article 2021/10/04 v1.4n Standard LaTeX document class
(k:/texlive/2021/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2021/10/04 v1.4n Standard LaTeX file (size option)
luaotfload | db : Font names database loaded from K:/texlive/2021/texmf-var/luat
ex-cache/generic/names/luaotfload-names.lua.gz)
\c@part=\count183
\c@section=\count184
\c@subsection=\count185
\c@subsubsection=\count186
\c@paragraph=\count187
\c@subparagraph=\count188
\c@figure=\count189
\c@table=\count190
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen137
)
> \setlength=macro:
#1#2->#1 #2\relax .
l.4 \show\setlength
                 

> 150.
l.5 \showthe\clubpenalty
                      

> 150.
l.6 \showthe\widowpenalty
                       

> 50.
l.7 \showthe\displaywidowpenalty
                              

> 0.
l.8 \showthe\interlinepenalty
                           

> 100.
l.9 \showthe\brokenpenalty
                        


(k:/texlive/2021/texmf-dist/tex/lualatex/lua-widow-control/lua-widow-control.st
y
Package: lua-widow-control 2021/12/14 v1.1.2
\lwcemergencystretch=\dimen138
Lua module: lua-widow-control 2021/12/14 1.1.2 
    This module provides a LuaTeX-based solution to prevent
    widows and orphans from appearing in a document. It does
    so by increasing or decreasing the lengths of previous
    paragraphs.
        
Lua-only attribute lua-widow-control = 5 (k:/texlive/2021/texmf-dist/tex/latex/
microtype/microtype.sty
Package: microtype 2021/12/10 v3.0b Micro-typographical refinements (RS)

(k:/texlive/2021/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks16
)
(k:/texlive/2021/texmf-dist/tex/latex/etoolbox/etoolbox.sty
Package: etoolbox 2020/10/05 v2.5k e-TeX tools for LaTeX (JAW)
\etb@tempcnta=\count191
)
\MT@toks=\toks17
\MT@count=\count192
\MT@tempbox=\box50
LaTeX Info: Redefining \leftprotrusion on input line 1010.
LaTeX Info: Redefining \rightprotrusion on input line 1018.
LaTeX Info: Redefining \textls on input line 1173.
\MT@outer@kern=\dimen139
LaTeX Info: Redefining \textmicrotypecontext on input line 1759.
\MT@listname@count=\count193

(k:/texlive/2021/texmf-dist/tex/latex/microtype/microtype-luatex.def
File: microtype-luatex.def 2021/12/10 v3.0b Definitions specific to luatex (RS)

Lua module: microtype 2021/12/10 3.0b microtype module.
Module microtype Info: overwriting function `keepligature' on input line 63
LaTeX Info: Redefining \lsstyle on input line 685.
LaTeX Info: Redefining \lslig on input line 685.
\MT@outer@space=\skip49
)
Package microtype Info: Loading configuration file microtype.cfg.

(k:/texlive/2021/texmf-dist/tex/latex/microtype/microtype.cfg
File: microtype.cfg 2021/12/10 v3.0b microtype main configuration file (RS)
))
Inserting `remove_widows' at position 1 in `pre_output_filter'.
Inserting `save_paragraphs' at position 2 in `pre_linebreak_filter'.
Inserting `mark_paragraphs' at position 2 in `post_linebreak_filter'.)
> \setlength=macro:
#1#2->#1 #2\relax .
l.13 \show\setlength
                  

> 1.
l.14 \showthe\clubpenalty
                       

> 1.
l.15 \showthe\widowpenalty
                        

> 0.
l.16 \showthe\displaywidowpenalty
                               

> 0.
l.17 \showthe\interlinepenalty
                            

> 0.
l.18 \showthe\brokenpenalty
                         

(k:/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-luatex.def
File: l3backend-luatex.def 2022-01-12 L3 backend support: PDF output (LuaTeX)
\l__color_backend_stack_int=\count194
\l__pdf_internal_box=\box51
)
(k:/texlive/2021/texmf-dist/tex/latex/livroabertoem/mwe.aux
! Undefined control sequence.
l.27 \pgfsyspdfmark
                  {pgfid2}{6243614}{56613061}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.


! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.27 \pgfsyspdfmark {p
                    gfid2}{6243614}{56613061}
You're in trouble here.  Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

! Undefined control sequence.
l.28 \pgfsyspdfmark
                  {pgfid1}{3622174}{51448830}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.30 \pgfsyspdfmark
                  {pgfid3}{3622174}{48748747}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.32 \pgfsyspdfmark
                  {pgfid4}{4133355}{48748747}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.36 \pgfsyspdfmark
                  {pgfid5}{29752360}{3077051}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.39 \pgfsyspdfmark
                  {pgfid6}{23219386}{44633086}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.43 \pgfsyspdfmark
                  {pgfid7}{23219386}{41880574}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.47 \pgfsyspdfmark
                  {pgfid8}{23219386}{39128062}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.50 \pgfsyspdfmark
                  {pgfid9}{23219386}{36375550}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.53 \pgfsyspdfmark
                  {pgfid10}{23219386}{26807294}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.57 \pgfsyspdfmark
                  {pgfid11}{23219386}{16452606}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.60 \pgfsyspdfmark
                  {pgfid13}{28834856}{3077051}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.62 \pgfsyspdfmark
                  {pgfid12}{3622174}{51448830}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.65 \pgfsyspdfmark
                  {pgfid19}{29752360}{3077051}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.70 \pgfsyspdfmark
                  {pgfid18}{23219386}{51448830}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.73 \pgfsyspdfmark
                  {pgfid28}{28834856}{3077051}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.75 \pgfsyspdfmark
                  {pgfid29}{29752360}{3077051}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.77 \pgfsyspdfmark
                  {pgfid30}{28834856}{3077051}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

)
\openout1 = mwe.aux

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 20.
LaTeX Font Info:    ... okay on input line 20.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 20.
LaTeX Font Info:    ... okay on input line 20.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 20.
LaTeX Font Info:    ... okay on input line 20.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 20.
LaTeX Font Info:    ... okay on input line 20.
LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line 20.
LaTeX Font Info:    Trying to load font information for TS1+cmr on input line 2
0.
 (k:/texlive/2021/texmf-dist/tex/latex/base/ts1cmr.fd
File: ts1cmr.fd 2019/12/16 v2.5j Standard LaTeX font definitions
)
LaTeX Font Info:    ... okay on input line 20.
LaTeX Font Info:    Checking defaults for TU/lmr/m/n on input line 20.
LaTeX Font Info:    ... okay on input line 20.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 20.
LaTeX Font Info:    ... okay on input line 20.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 20.
LaTeX Font Info:    ... okay on input line 20.
LaTeX Info: Redefining \microtypecontext on input line 20.
Package microtype Info: Applying patch `item' on input line 20.
Package microtype Info: Applying patch `toc' on input line 20.
Package microtype Info: Applying patch `eqnum' on input line 20.
Package microtype Info: Applying patch `footnote' on input line 20.
Package microtype Info: Generating PDF output.
Package microtype Info: Character protrusion enabled (level 2).
Package microtype Info: Using default protrusion set `alltext'.
Package microtype Info: Automatic font expansion enabled (level 2),
(microtype)             stretch: 20, shrink: 20, step: 1, non-selected.
Package microtype Info: Using default expansion set `alltext-nott'.
LaTeX Info: Redefining \showhyphens on input line 20.
Package microtype Info: No adjustment of tracking.
Package microtype Info: No adjustment of spacing.
Package microtype Info: No adjustment of kerning.

(k:/texlive/2021/texmf-dist/tex/latex/microtype/mt-LatinModernRoman.cfg
File: mt-LatinModernRoman.cfg 2021/02/21 v1.1 microtype config. file: Latin Mod
ern Roman (RS)
)
Inserting `disable_box_warnings' at position 1 in `hpack_quality'.
Removing  `disable_box_warnings' from `hpack_quality'.
[1

{k:/texlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./mwe.aux))

Here is how much of LuaTeX's memory you used:
 2507 strings out of 477811
 125165,460012 words of node,token memory allocated
 4430 words of node memory still in use:
   12 hlist, 1 vlist, 1 rule, 18 disc, 1 local_par, 60 glue, 3 kern, 3 penalty, 
6 margin_kern, 437 glyph, 66 attribute, 48 glue_spec, 66 attribute_list, 1 write
 nodes
   avail lists: 2:26,3:8,4:10,5:22,6:2,7:1014,9:30,10:2,11:36
 23212 multiletter control sequences out of 65536+600000
 15 fonts using 510647 bytes
 57i,5n,65p,995b,141s stack positions out of 5000i,500n,10000p,200000b,80000s
<k:/texlive/2021/texmf-dist/fonts/opentype/public/lm/lmroman10-regular.otf>
Output written on mwe.pdf (1 page, 4743 bytes).

PDF statistics: 15 PDF objects out of 1000 (max. 8388607)
 8 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. 100000000)

@gucci-on-fleek
Copy link
Owner

gucci-on-fleek commented Jan 31, 2022

I think that there's an old .aux file in the folder where you're compiling it from that might be interfering with things. Can you delete mwe.aux and try again?

@tarsobcaldas
Copy link
Author

This is LuaHBTeX, Version 1.13.2 (TeX Live 2021/W32TeX)  (format=lualatex 2022.1.30)  30 JAN 2022 22:26
 restricted system commands enabled.
**mwe
(./mwe.tex
LaTeX2e <2021-11-15> patch level 1
Lua module: luaotfload 2021-05-21 3.18 Lua based OpenType font support
Lua module: lualibs 2021-05-20 2.74 ConTeXt Lua standard libraries.
Lua module: lualibs-extended 2021-05-20 2.74 ConTeXt Lua libraries -- extended c
ollection.
luaotfload | conf : Root cache directory is "K:/texlive/2021/texmf-var/luatex-ca
che/generic/names".
luaotfload | init : Loading fontloader "fontloader-2021-05-20.lua" from kpse-res
olved path "k:/texlive/2021/texmf-dist/tex/luatex/luaotfload/fontloader-2021-05-
20.lua".
Lua-only attribute luaotfload@noligature = 1
Lua-only attribute luaotfload@syllabe = 2
luaotfload | init : Context OpenType loader version 3.116
Inserting `luaotfload.node_processor' at position 1 in `pre_linebreak_filter'.
Inserting `luaotfload.node_processor' at position 1 in `hpack_filter'.
Inserting `luaotfload.glyph_stream' at position 1 in `glyph_stream_provider'.
Inserting `luaotfload.define_font' at position 1 in `define_font'.
Lua-only attribute luaotfload_color_attribute = 3
luaotfload | conf : Root cache directory is "K:/texlive/2021/texmf-var/luatex-ca
che/generic/names".
Inserting `luaotfload.harf.strip_prefix' at position 1 in `find_opentype_file'.
Inserting `luaotfload.harf.strip_prefix' at position 1 in `find_truetype_file'.
Inserting `luaotfload.harf.finalize_vlist' at position 1 in `post_linebreak_filt
er'.
Inserting `luaotfload.harf.finalize_hlist' at position 2 in `hpack_filter'.
Inserting `luaotfload.cleanup_files' at position 1 in `wrapup_run'.
Inserting `luaotfload.harf.finalize_unicode' at position 1 in `finish_pdffile'.
Inserting `luaotfload.glyphinfo' at position 1 in `glyph_info'.
Lua-only attribute luaotfload.letterspace_done = 4
Inserting `luaotfload.aux.set_sscale_dimens' at position 1 in `luaotfload.patch_
font'.
Inserting `luaotfload.aux.set_font_index' at position 2 in `luaotfload.patch_fon
t'.
Inserting `luaotfload.aux.patch_cambria_domh' at position 3 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 4 in `luaotfload.patch_font
'.
Inserting `luaotfload.aux.set_xheight' at position 5 in `luaotfload.patch_font'.
Inserting `luaotfload.rewrite_fontname' at position 6 in `luaotfload.patch_font'
. L3 programming layer <2022-01-21>
Inserting `tracingstacklevels' at position 1 in `input_level_string'.
(k:/texlive/2021/texmf-dist/tex/latex/base/article.cls
Document Class: article 2021/10/04 v1.4n Standard LaTeX document class
(k:/texlive/2021/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2021/10/04 v1.4n Standard LaTeX file (size option)
luaotfload | db : Font names database loaded from K:/texlive/2021/texmf-var/luat
ex-cache/generic/names/luaotfload-names.lua.gz)
\c@part=\count183
\c@section=\count184
\c@subsection=\count185
\c@subsubsection=\count186
\c@paragraph=\count187
\c@subparagraph=\count188
\c@figure=\count189
\c@table=\count190
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen137
)
> \setlength=macro:
#1#2->#1 #2\relax .
l.4 \show\setlength
                 

> 150.
l.5 \showthe\clubpenalty
                      

> 150.
l.6 \showthe\widowpenalty
                       

> 50.
l.7 \showthe\displaywidowpenalty
                              

> 0.
l.8 \showthe\interlinepenalty
                           

> 100.
l.9 \showthe\brokenpenalty
                        


(k:/texlive/2021/texmf-dist/tex/lualatex/lua-widow-control/lua-widow-control.st
y
Package: lua-widow-control 2021/12/14 v1.1.2
\lwcemergencystretch=\dimen138
Lua module: lua-widow-control 2021/12/14 1.1.2 
    This module provides a LuaTeX-based solution to prevent
    widows and orphans from appearing in a document. It does
    so by increasing or decreasing the lengths of previous
    paragraphs.
        
Lua-only attribute lua-widow-control = 5 (k:/texlive/2021/texmf-dist/tex/latex/
microtype/microtype.sty
Package: microtype 2021/12/10 v3.0b Micro-typographical refinements (RS)

(k:/texlive/2021/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks16
)
(k:/texlive/2021/texmf-dist/tex/latex/etoolbox/etoolbox.sty
Package: etoolbox 2020/10/05 v2.5k e-TeX tools for LaTeX (JAW)
\etb@tempcnta=\count191
)
\MT@toks=\toks17
\MT@count=\count192
\MT@tempbox=\box50
LaTeX Info: Redefining \leftprotrusion on input line 1010.
LaTeX Info: Redefining \rightprotrusion on input line 1018.
LaTeX Info: Redefining \textls on input line 1173.
\MT@outer@kern=\dimen139
LaTeX Info: Redefining \textmicrotypecontext on input line 1759.
\MT@listname@count=\count193

(k:/texlive/2021/texmf-dist/tex/latex/microtype/microtype-luatex.def
File: microtype-luatex.def 2021/12/10 v3.0b Definitions specific to luatex (RS)

Lua module: microtype 2021/12/10 3.0b microtype module.
Module microtype Info: overwriting function `keepligature' on input line 63
LaTeX Info: Redefining \lsstyle on input line 685.
LaTeX Info: Redefining \lslig on input line 685.
\MT@outer@space=\skip49
)
Package microtype Info: Loading configuration file microtype.cfg.

(k:/texlive/2021/texmf-dist/tex/latex/microtype/microtype.cfg
File: microtype.cfg 2021/12/10 v3.0b microtype main configuration file (RS)
))
Inserting `remove_widows' at position 1 in `pre_output_filter'.
Inserting `save_paragraphs' at position 2 in `pre_linebreak_filter'.
Inserting `mark_paragraphs' at position 2 in `post_linebreak_filter'.)
> \setlength=macro:
#1#2->#1 #2\relax .
l.13 \show\setlength
                  

> 1.
l.14 \showthe\clubpenalty
                       

> 1.
l.15 \showthe\widowpenalty
                        

> 0.
l.16 \showthe\displaywidowpenalty
                               

> 0.
l.17 \showthe\interlinepenalty
                            

> 0.
l.18 \showthe\brokenpenalty
                         

(k:/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-luatex.def
File: l3backend-luatex.def 2022-01-12 L3 backend support: PDF output (LuaTeX)
\l__color_backend_stack_int=\count194
\l__pdf_internal_box=\box51
)
(k:/texlive/2021/texmf-dist/tex/latex/livroabertoem/mwe.aux
! Undefined control sequence.
l.27 \pgfsyspdfmark
                  {pgfid2}{6243614}{56613061}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.


! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.27 \pgfsyspdfmark {p
                    gfid2}{6243614}{56613061}
You're in trouble here.  Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

! Undefined control sequence.
l.28 \pgfsyspdfmark
                  {pgfid1}{3622174}{51448830}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.30 \pgfsyspdfmark
                  {pgfid3}{3622174}{48748747}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.32 \pgfsyspdfmark
                  {pgfid4}{4133355}{48748747}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.36 \pgfsyspdfmark
                  {pgfid5}{29752360}{3077051}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.39 \pgfsyspdfmark
                  {pgfid6}{23219386}{44633086}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.43 \pgfsyspdfmark
                  {pgfid7}{23219386}{41880574}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.47 \pgfsyspdfmark
                  {pgfid8}{23219386}{39128062}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.50 \pgfsyspdfmark
                  {pgfid9}{23219386}{36375550}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.53 \pgfsyspdfmark
                  {pgfid10}{23219386}{26807294}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.57 \pgfsyspdfmark
                  {pgfid11}{23219386}{16452606}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.60 \pgfsyspdfmark
                  {pgfid13}{28834856}{3077051}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.62 \pgfsyspdfmark
                  {pgfid12}{3622174}{51448830}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.65 \pgfsyspdfmark
                  {pgfid19}{29752360}{3077051}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.70 \pgfsyspdfmark
                  {pgfid18}{23219386}{51448830}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.73 \pgfsyspdfmark
                  {pgfid28}{28834856}{3077051}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.75 \pgfsyspdfmark
                  {pgfid29}{29752360}{3077051}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
l.77 \pgfsyspdfmark
                  {pgfid30}{28834856}{3077051}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

)
\openout1 = mwe.aux

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 20.
LaTeX Font Info:    ... okay on input line 20.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 20.
LaTeX Font Info:    ... okay on input line 20.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 20.
LaTeX Font Info:    ... okay on input line 20.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 20.
LaTeX Font Info:    ... okay on input line 20.
LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line 20.
LaTeX Font Info:    Trying to load font information for TS1+cmr on input line 2
0.
 (k:/texlive/2021/texmf-dist/tex/latex/base/ts1cmr.fd
File: ts1cmr.fd 2019/12/16 v2.5j Standard LaTeX font definitions
)
LaTeX Font Info:    ... okay on input line 20.
LaTeX Font Info:    Checking defaults for TU/lmr/m/n on input line 20.
LaTeX Font Info:    ... okay on input line 20.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 20.
LaTeX Font Info:    ... okay on input line 20.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 20.
LaTeX Font Info:    ... okay on input line 20.
LaTeX Info: Redefining \microtypecontext on input line 20.
Package microtype Info: Applying patch `item' on input line 20.
Package microtype Info: Applying patch `toc' on input line 20.
Package microtype Info: Applying patch `eqnum' on input line 20.
Package microtype Info: Applying patch `footnote' on input line 20.
Package microtype Info: Generating PDF output.
Package microtype Info: Character protrusion enabled (level 2).
Package microtype Info: Using default protrusion set `alltext'.
Package microtype Info: Automatic font expansion enabled (level 2),
(microtype)             stretch: 20, shrink: 20, step: 1, non-selected.
Package microtype Info: Using default expansion set `alltext-nott'.
LaTeX Info: Redefining \showhyphens on input line 20.
Package microtype Info: No adjustment of tracking.
Package microtype Info: No adjustment of spacing.
Package microtype Info: No adjustment of kerning.

(k:/texlive/2021/texmf-dist/tex/latex/microtype/mt-LatinModernRoman.cfg
File: mt-LatinModernRoman.cfg 2021/02/21 v1.1 microtype config. file: Latin Mod
ern Roman (RS)
)
Inserting `disable_box_warnings' at position 1 in `hpack_quality'.
Removing  `disable_box_warnings' from `hpack_quality'.
[1

{k:/texlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./mwe.aux))

Here is how much of LuaTeX's memory you used:
 2507 strings out of 477811
 125165,460012 words of node,token memory allocated
 4430 words of node memory still in use:
   12 hlist, 1 vlist, 1 rule, 18 disc, 1 local_par, 60 glue, 3 kern, 3 penalty, 
6 margin_kern, 437 glyph, 66 attribute, 48 glue_spec, 66 attribute_list, 1 write
 nodes
   avail lists: 2:26,3:8,4:10,5:22,6:2,7:1014,9:30,10:2,11:36
 23212 multiletter control sequences out of 65536+600000
 15 fonts using 510647 bytes
 57i,5n,65p,995b,141s stack positions out of 5000i,500n,10000p,200000b,80000s
<k:/texlive/2021/texmf-dist/fonts/opentype/public/lm/lmroman10-regular.otf>
Output written on mwe.pdf (1 page, 4743 bytes).

PDF statistics: 15 PDF objects out of 1000 (max. 8388607)
 8 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. 100000000)

@tarsobcaldas
Copy link
Author

I'm having problem with two documents. One uses the abntex2 class and the other memoir. I tried changing abntex2 to memoir and it didn't prompt the error, neither it did with article.

Tomorrow I'll try to see how to reproduce the error.

@gucci-on-fleek
Copy link
Owner

It looks like your test file is named C:\some folder\some subfolder\mwe.tex. It also looks like there exists a file called k:/texlive/2021/texmf-dist/tex/latex/livroabertoem/mwe.aux.

What I think is happening here is that:

  1. LaTeX opens C:\some folder\some subfolder\mwe.tex and starts compiling it.
  2. At the end of the preamble, LaTeX attempts to read in C:\some folder\some subfolder\mwe.aux.
  3. Since mwe.tex doesn't have any references/sections/etc., it never writes C:\some folder\some subfolder\mwe.aux.
  4. Since LaTeX can't find C:\some folder\some subfolder\mwe.aux, it searches the texmf trees for any file called mwe.aux.
  5. You've added the livroabertoem folder to texmf-dist, which happened to contain a file called mwe.aux.
  6. LaTeX reads in k:/texlive/2021/texmf-dist/tex/latex/livroabertoem/mwe.aux and gets confused since it corresponds to a different document.

You probably want to run dir /s *.aux in k:/texlive/2021/texmf-dist and delete any files that it finds.

@gucci-on-fleek
Copy link
Owner

Ok, so now back to the issue.

You mentioned that you got the error when using abntex2. I was able to narrow the problem down to this:

\nonstopmode
\documentclass{article}

\show\setlength
\usepackage{calc}
\show\setlength

\usepackage{lua-widow-control}

\begin{document}
    \null
\end{document}

I get the same error that you got earlier:

… … …
> \setlength=macro:
#1#2->#1 #2\relax .
l.4 \show\setlength
                 

(c:/texlive/2021/texmf-dist/tex/latex/tools/calc.sty
Package: calc 2017/05/25 v4.3 Infix arithmetic (KKT,FJ)
\calc@Acount=\count191
\calc@Bcount=\count192
\calc@Adimen=\dimen138
\calc@Bdimen=\dimen139
\calc@Askip=\skip49
\calc@Bskip=\skip50
LaTeX Info: Redefining \setlength on input line 80.
LaTeX Info: Redefining \addtolength on input line 81.
\calc@Ccount=\count193
\calc@Cskip=\skip51
)
> \setlength=macro:
->\protect \setlength  .
l.6 \show\setlength
                 


(c:/Users/Max/Stuff/Docker/lua-widow-control/texmf/tex/lualatex/lua-widow-contr
ol/lua-widow-control.sty
Package: lua-widow-control 2021/12/14 v1.1.2

! Illegal unit of measure (pt inserted).
<to be read again> 
!
l.10 \setlength{\clubpenalty}{1}
                              
Dimensions can be in units of em, ex, in, pt, pc,
cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one!
I'll assume that you meant to say pt, for printer's points.
To recover gracefully from this error, it's best to
delete the erroneous units; e.g., type `2' to delete
two letters. (See Chapter 27 of The TeXbook.)
… … …

So it looks like the calc package redefines \setlength. Seeing as the calc package has been included in LaTeX by default since 1997, I'm gonna call this a bug in lua-widow-control. I'll have a patch out shortly.

@gucci-on-fleek
Copy link
Owner

Alright, v1.1.3 should fix the issue. I've uploaded it to CTAN, so it should probably be in TeX Live in about 12–24 h.

And thanks for reporting the issue! calc is a pretty important package, so this was a fairly major incompatibility.

@tarsobcaldas
Copy link
Author

No problem! Really cool package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Major Bug This breaks a document
Projects
Status: Done
Development

No branches or pull requests

2 participants