[luatex] Core dump error

2019-03-15 Thread Br. Samuel Springuel
I'm having some problems using `\localleftbox` and `\localrightbox` in 
LuaTeX 1.10 (the TeX Live 2019 Pretest) and GregorioTeX.  In trying to 
diagnose this problem, I stripped things down to this simple test document:


```
\documentclass{article}

\begin{document}
Something
\localleftbox{Hello}
%\localrightbox{Goodbye} % This one will trigger the error too.

Something
\end{document}
```

This document complies just fine with 1.07 (which shipped with TeX Live 
2018).  With 1.10, however, I get a core dump:


```
This is LuaTeX, Version 1.10.0 (TeX Live 2019)
 restricted system commands enabled.
(./Untitled.tex
LaTeX2e <2018-12-01>

luaotfload | main : initialization completed in 0.107 seconds
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/article.cls
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/size10.clo)) 
(./Untitled.aux
)lualatex: ../../../texk/web2c/luatexdir/lang/texlang.c:972: 
hnj_hyphenation: Assertion `tail != 0' failed.

Aborted (core dumped)
```

Did something change in `\localleftbox` and `\localrightbox` which I 
should be aware of?


--
✝✝
Br. Samuel, OSB
(R. Padraic Springuel)
St. Anselm’s Abbey
4501 South Dakota Ave, NE
Washington, DC, 20017
202-269-2300
(c) 202-853-7036

PAX ☧ ΧΡΙΣΤΟΣ


Re: [luatex] finish_pdffile callback

2018-02-09 Thread Br. Samuel Springuel
I almost always use synctex, so that's a personal possibility, but I'm 
also programming for others who might not.


What about the `stop_run` callback?  Are the files closed by the time 
the final message is being spit out?

--
✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ


Re: [luatex] First question: Retrieve *family* name of a font / the three main families

2018-01-20 Thread Br. Samuel Springuel

On 1/20/18 7:00 PM, Reinhard Kotucha wrote:

I can't imagine that anybody in the world wants to typeset
Beethoven's 9th Symphony with a sans-serif or typewriter font.


Probably not, but there are people who want to typeset Jazz lead sheets
with a sans font that makes the whole thing look handwritten:

https://www.musictypefoundry.com/images/MTF-Improviso-2.0-allofme.png


And I'm sure if you poked around enough, some one would want to do
something with a typewriter font too.  There are people out there with
all kinds of needs/wants/tastes.

--
✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ


Re: [luatex] First question: Retrieve *family* name of a font / the three main families

2018-01-20 Thread Br. Samuel Springuel

On 1/20/18 11:36 AM, Ulrike Fischer wrote:

Well as I already wrote on tex.SX it is rather unclear what you mean
by family and how you want to use it.


The goal is to be able to pass the information to another program, 
LilyPond, and use it to set the fonts there so that there is some 
consistency in the look of documents which mix results from LuaTeX and 
LilyPond (and it happens automatically).


Unlike LuaTex (and other TeX flavors) which permit mixing fonts as 
you've indicated, LilyPond doesn't.  Instead it defines three font 
groups: roman, sans, and typewriter.  Within those groups changes in 
weight, shape, etc. are automatically done within the same font family. 
I.e. if I define the roman font to be Century Schoolbook, then the bold 
text will always be the Century Schoolbook-Bold.  If I define it to be 
Arial then bold will be Arial Bold.  So far as I know, there is no way 
to do something like what you indicate is possible in LuaTeX within 
LilyPond.  In this respect, selecting the font in LilyPond is like 
selecting a font in a "dumb" program like Word or OpenOffice.


When Urs says he wants the font family, then, he's looking for that 
primary name which would allow a "dumb" program to select the normal, 
bold, italic, etc. font varieties from that same family.

--
✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ


Re: [luatex] First question: Retrieve *family* name of a font / the three main families

2018-01-19 Thread Br. Samuel Springuel

On 2018-01-19 8:37 AM, Urs Liska wrote:
otfinfo seems to be available on Windows and even included in 
http://w32tex.org/ ,  but I'm not sure if that will be an acceptable 
dependency.


IIRC, otfinfo is also made available by TeXLive.  In 2016 the Gregorio 
project started adding version information to our fonts and I modified 
our system-setup.bat (a script we provide to help diagnose installation 
problems) to make use of otfinfo in order to check that version 
information.  I only would have done that if I felt it was reasonable to 
expect otfinfo to be available on Windows, i.e. TeXLive and/or MiKTeX 
installed it.


--
✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ


[luatex] Strange behavior for io.popen

2017-06-06 Thread Br. Samuel Springuel
In working with the TeXLive 2017 pretest, we (the Gregorio developers) 
came across what appears to be a bug in io.popen: it's passing the 
statement `all commands are permitted` to the sh instance that it was 
creating, resulting in an `all: command not found` error.  After some 
considerable testing (see conversation here: 
https://github.com/gregorio-project/gregorio/issues/1362), we isolated 
the problem to the `--shell-escape` switch.  If the simple document 
below is compiled *without* the switch, it is behaves as expected and is 
able to retrieve the gregorio version number (gregorio is on the list of 
commands permitted without shell-escape in texmf.cnf for TeXLive 2017). 
When compiled with the switch, however, the error crops up and the 
document reads `l is nil`.



```
\documentclass{article}
\begin{document}
\directlua{
f = io.popen('gregorio --version', 'r')
if f then
l = f:read('*l')
if l then
tex.print('got '..l)
else
tex.print('l is nil')
end
else
tex.print('f is nil')
end
}
\end{document}
```

Besides the original Ubuntu 16.04 system this was seen on, we've also 
been able to confirm it on Gentoo, Mac 10.10 (Yosemite), and Windows 10 
and so believe the problem to be platform independent.


--
✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ


Re: [luatex] Lua interpreter difference between Windows and Mac

2017-02-19 Thread Br. Samuel Springuel

On 2017-02-19 2:02 AM, Akira Kakuto wrote:

Probably kpse.find_file(filename) on windows without file type
searches TEXINPUTS by default. Try by adding file type as follows:

kpse.set_program_name('texlua')
font_target = "greciliae.ttf"
font_directory = kpse.find_file(font_target, 'truetype fonts')
print(font_directory)


That does seem to have fixed the problem.  Thanks.

--
✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ


[luatex] Lua interpreter difference between Windows and Mac

2017-02-18 Thread Br. Samuel Springuel

I'm writing a lua script which has the following code block:

  font_target = "greciliae.ttf"
  font_directory = kpse.find_file(font_target)
  print(font_directory)

Given that greciliae.ttf is installed in 
$TEXMFLOCAL/fonts/truetype/public/gregoriotex, the code block works fine 
on my Mac (10.11.6) when executed by texlua (and I assume on other Unix 
flavors, though I haven't tested that yet).  However, when I test the 
same code on a Windows (10) machine, font_directory ends up being nil.


When I type `kpsewhich greciliae.ttf` at the command prompt on the 
Windows machine, I get the proper path returned, so I know that 
kpsewhich can find the file.


If I switch font_target to a "gregoriotex.sty" (which is installed in 
$TEXMFLOCAL/tex/lualatex/gregoriotex/) font_directory returns the proper 
value on both machines.  Thus I know that kpse.find_file does actually 
work, at least some of the time, on Windows.


Why isn't kpse.find_file finding fonts that kpsewhich can find on 
Windows?  Am I doing something wrong?


Both machines are running version 0.95.0 (TeXLive 2016) of texlua.
--
✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ


[luatex] Change in behavior

2016-08-21 Thread Br. Samuel Springuel
As part of the GregorioTeX package, we have a Lua function which 
rescales a particular distance register by multiplying it by an 
arbitrary factor (the factor can be non-integer, so we cannot do this 
math in TeX itself).  Originally we wrote the function as this:


local function scale_space(factor)
  local skip = tex.getskip('gre@skip@temp@four')
  skip.width = skip.width * factor
  -- should skip.stretch and skip.shink also be scaled?
end

However, we found that after updating our testing process to use TL2016 
(and thus LuaTeX 0.95 instead of 0.80) the rescaling was no longer 
happening.  After some experimentation, we found that the following worked:


local function scale_space(factor)
  local skip = tex.getskip('gre@skip@temp@four')
  skip.width = skip.width * factor
  tex.setskip('gre@skip@temp@four',skip)
  -- should skip.stretch and skip.shink also be scaled?
end

This implies to me that the behavior of the function interface for token 
registers changed at some point between these two versions.  In 0.80 a 
variable filled with a token register was linked to that register and 
changes to the variable were reflected in the token register itself.  In 
0.95 the variable is not linked to the register and thus changes to the 
variable are not communicated to the register unless and until that is 
done so explicitly.  Is my interpretation of the situation correct?  If 
so, when did this change occur and what is the best way for me to stay 
abreast of these sort of changes.

--
✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ


[luatex] LuaLaTeX 0.95 and xcolor

2016-05-05 Thread Br. Samuel Springuel
The attached document compiles fine using LuaLaTeX 0.80 (TeXLive 2015), 
but under LuaLaTeX 0.95 (TeXLive 2016) an error is raised by the xcolor 
package stating that `gregoriocolor` is not defined.


Both pdfLaTeX 3.14159265-2.6-1.40.16 (TeX Live 2015) and 
3.14159265-2.6-1.40.17 (TeXLive 2016) compile the document fine.  I have 
reported the error to the author of xcolor, but thought you might also 
like to know about it given that the error requires LuaLaTeX to trigger.

--
✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ


Main.tex
Description: TeX document


[luatex] TexLive 2016 Pretest Bug: Paper

2016-05-02 Thread Br. Samuel Springuel
When using the TeXLive 2016 Pretest, the geometry package does not 
appear to be able to change the paper size when using the LuaLaTeX 
engine.  The failure is silent (no error or warning).


For instance, if the default paper size is set to letter (as it is on my 
system), then the following document will come out on letter paper:


\documentclass{article}

\usepackage{geometry}
\geometry{a4paper}

\listfiles

\begin{document}
Test
\end{document}

Test system is Linux Ubuntu 14.04.

My guess is that this has to do with the backend changes in LuaTeX 0.85.

Log file from compiling above document:

This is LuaTeX, Version 0.95.0 (TeX Live 2016)  (format=lualatex 2016.5.2)  2 
MAY 2016 15:40
 restricted system commands enabled.
**debugging.tex
(./debugging.tex
LaTeX2e <2016/03/31>
Babel <3.9r> and hyphenation patterns for 1 language(s) loaded.
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/local/texlive/2016/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2010/09/12 v5.6 Page Geometry

(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(/usr/local/texlive/2016/texmf-dist/tex/generic/ifpdf/ifpdf.sty
Package: ifpdf 2016/04/04 v3.0 Provides the ifpdf switch
)
(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2010/03/01 v1.5 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/local/texlive/2016/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count87
\Gm@cntv=\count88
\c@Gm@tempcnt=\count89
\Gm@bindingoffset=\dimen103
\Gm@wd@mp=\dimen104
\Gm@odd@mp=\dimen105
\Gm@even@mp=\dimen106
\Gm@layoutwidth=\dimen107
\Gm@layoutheight=\dimen108
\Gm@layouthoffset=\dimen109
\Gm@layoutvoffset=\dimen110
\Gm@dimlist=\toks15
)
(./debugging.aux)
\openout1 = debugging.aux

LaTeX Font Info:Checking defaults for OML/cmm/m/it on input line 8.
LaTeX Font Info:... okay on input line 8.
LaTeX Font Info:Checking defaults for T1/cmr/m/n on input line 8.
LaTeX Font Info:... okay on input line 8.
LaTeX Font Info:Checking defaults for OT1/cmr/m/n on input line 8.
LaTeX Font Info:... okay on input line 8.
LaTeX Font Info:Checking defaults for OMS/cmsy/m/n on input line 8.
LaTeX Font Info:... okay on input line 8.
LaTeX Font Info:Checking defaults for OMX/cmex/m/n on input line 8.
LaTeX Font Info:... okay on input line 8.
LaTeX Font Info:Checking defaults for U/cmr/m/n on input line 8.
LaTeX Font Info:... okay on input line 8.

*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
*geometry* verbose mode - [ preamble ] result:
* driver: pdftex
* paper: a4paper
* layout: 
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* modes:
* h-part:(L,W,R)=(89.62709pt, 418.25368pt, 89.6271pt)
* v-part:(T,H,B)=(101.40665pt, 591.5302pt, 152.11pt)
* \paperwidth=597.50787pt
* \paperheight=845.04684pt
* \textwidth=418.25368pt
* \textheight=591.5302pt
* \oddsidemargin=17.3571pt
* \evensidemargin=17.3571pt
* \topmargin=-7.86334pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=10.0pt
* \footskip=30.0pt
* \marginparwidth=65.0pt
* \marginparsep=11.0pt
* \columnsep=10.0pt
* \skip\footins=9.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)

[1

{/usr/local/texlive/2016/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./debugging.aux)

 *File List*
 article.cls2014/09/29 v1.4h Standard LaTeX document class
  size10.clo2014/09/29 v1.4h Standard LaTeX file (size option)
geometry.sty2010/09/12 v5.6 Page Geometry
  keyval.sty2014/10/28 v1.15 key=value parser (DPC)
   ifpdf.sty2016/04/04 v3.0 Provides the ifpdf switch
  ifvtex.sty2010/03/01 v1.5 Detect VTeX and its facilities (HO)
 ifxetex.sty2010/09/12 v0.6 Provides ifxetex conditional
 ***

)

Here is how much of LuaTeX's memory you used:
 753 strings out of 495119
 10,89155 words of node,token memory allocated
 346 words of node memory still in use:
   2 hlist, 1 vlist, 1 rule, 7 glue, 39 glue_spec, 1 write nodes
   avail lists: 2:12,3:3,4:1,5:11,6:6,7:22,8:1,9:6
 4351 multiletter control sequences out of 65536+60
 15 fonts using 632831 bytes
 23i,4n,23p,131b,121s stack positions out of 5000i,500n,1p,20b,10s

Output written on debugging.pdf (1 page, 10593 bytes).

PDF statistics: 12 PDF