5,133 reputation
1527
bio website bitbucket.org/phg
location Golgafrincham
age
visits member for 2 years, 3 months
seen 3 hours ago

3h
comment Write unit tests for Lua in ConTeXt
Btw. are you aware of the test suite? You might draw inspiration from their approach.
3h
comment Write unit tests for Lua in ConTeXt
What Lua files might one need to include to get the variables? -- For the context namespace this does make only limited sense because it relies on Luatex builtins from the tex namespace only available during a TeX run. Also, don’t waste your time trying to run Context .lua files on a regular Lua interpreter. They make use of many of the Luatex extensions even outside the TeX run. Basically, in order to use the fundamental Lua libraries you can run your scripts with mtxrun directly, for everything more complicated you’re going to have to run Context itself.
2d
comment \LaTeX macro: “Font shape `OT1/LatinModernSans(0)/m/n' undefined”
@Socob: I thought \setmainfont etc. just select the default font and didn't think of it as a "font definition" -- Well, in order to use the font above all you need to define it. So if you have printed text in your document then the statement will result in font definitions. So there is a difference between just loading fontspec and saying \setsansfont{Latin Modern Sans}? -- Possibly. Fontspec’s definitions for LM (see the the file I cited earlier) may differ from a dynamic definition using the \setfoofont macros.
Aug
17
comment \LaTeX macro: “Font shape `OT1/LatinModernSans(0)/m/n' undefined”
doesn't LuaTeX load Latin Modern as a default anyway? Or is it Computer Modern? -- The latter: by default the Luatex formats behave like Pdftex and load only CM in the Type1 version. Fontspec, however, loads the LM fonts with a set of definitions for different optical sizes. (See e.g. cat $(kpsewhich eu2lmr.fd).) There is really no point in defining the font yourself again after loading Fontspec.
Aug
8
comment Eadui font and luatex
Thérèse, @Herbert: Definitely a bug, I’m on it, but if there’s an official fix unfortunately it will take a while.
Aug
5
comment LuaTeX and polyglossia -> Warnings
None that I know of but I can only support the Luatex version in TeX Live as well as the latest SVN trunk. But it’s not that big of a deal: after all, we’re talking about a harmless warning, not an error.
Aug
5
comment LuaTeX and polyglossia -> Warnings
I would like to get rid of those. -- You can get rid of the first one by updating you Luatex engine.
Jul
29
comment æ ø å giving “Package inputenc Error: Keyboard character used is undefined”
@DoomStone Don’t use luainputenc, it’s a compatiblity package for documents with evil encodings. Instead use UTF-8 natively (run the files through iconv(1) if necessary) and load the fontspec package.
Jul
26
comment Arch Linux: fontspec does not find system fonts
That’s an old one and it had the bug you describe. Unfortunately, the TeX packages in most distros are crap and Arch is no exception. You could install a current TeX live yourself, otherwise you will have to wait for the Arch maintainers to catch up.
Jul
26
comment Arch Linux: fontspec does not find system fonts
What version of Luaotfload do you run? You can find out running luaotfload-tool --version. The current version (2.5) should update the font index automatically if a font couldn’t be found, unless you explicitly disabled the updates in the configuration file. In any case it should work on Arch because that’s the platform it is being developed on. If not then you most likely found a bug.
Jul
24
comment Escape a string printed from Lua using ConTeXt
@Aditya Are you sure? It calls tex.sprint() explicitly with the currently active catcode table. There is context.verbatim(), though, which sets the vrbcatcodes table.
Jul
23
comment Escape a string printed from Lua using ConTeXt
You can use \pushcatcodetable \setcatcodetable \somecatcodetable to set the table and \popcatcodetable to drop it again (that’s context.pushcatcodetable() context.setcatcodetable(catcodes.numbers.vrbcatcodes) / context.popcatcodetable() at the Lua end, or use context.sprint(n, ...) with the catcode table as the first argument). As for the terminology: TeX is interpreted by a TeX engine.
Jul
23
comment Escape a string printed from Lua using ConTeXt
The solution you are looking for is switching the catcode table. vrbcatcodes should suffice for most literal printing, but if you like you can skim the list for a more appropriate one: git.contextgarden.net/context/context/blob/master/tex/context/… (Btw. there is no such thing as a “TeX compiler”.)
Jul
19
awarded  Enlightened
Jul
19
awarded  Nice Answer
Jul
14
awarded  Necromancer
Jul
12
comment How to get box dimensions within lualatex
@JPi “Is there a way of doing this for boxes generated in lua” -- Each hlist and vlist node has width, height and depth attributes. See the manual, section 8.1.2.
Jul
11
comment Small caps font is not enabled with fontspec and MinionPro
@egreg: Indeed. That is weird. I’m not that well informed about how things work on the Latex end, but my guess is that something (Fontspec? Microtype?) doesn’t get the feature string right. It should be something like +smcp;letterspace=5 instead (I have no clue as to what the value 50 might mean in this context).
Jul
11
comment Small caps font is not enabled with fontspec and MinionPro
@dmakarov Ah, the linked code does indeed lack small caps. You can try requesting letterspacing directly like so: \textsc{\addfontfeatures{RawFeature={letterspace=10}}foo bar baz} but I have no idea how to translate this into a more Fontspec’y / Latexnical idiom.
Jul
11
comment Small caps font is not enabled with fontspec and MinionPro
@dmakarov It might be easier to post the output on a paste site like gist.github.com pastebin.com -- they do a much better job at preserving formatting than these puny comments. Btw. your luaotfload and luatex look fine and you have more recent Minion Pro than me. I have no idea why it doesn’t work for you.