This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local traverse_nodes = node.traverse | |
local iowrite = io.write | |
local tableconcat = table.concat | |
local utfchar = unicode.utf8.char | |
local stringformat = string.format | |
local stringrep = string.rep | |
local nodelength = node.length | |
local count_nodes = node.count | |
local nodecodes = table.mirrored (node.types()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LUA_CFLAGS=-I/usr/include/lua | |
LUA_CFLAGS+=-Wall -Werror | |
all: stringext.so | |
stringext.so: stringext.c | |
$(CC) $(LUA_CFLAGS) -O3 -fPIC -o stringext.o -c stringext.c | |
$(CC) -shared -O3 stringext.o -o stringext.so | |
clean: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
current file: \printcurrentfile, line \printcurrentpos \par | |
This token is going to be listed: \collecttoken \jobname %% collect “\jobname” | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\setupregister [index] [symbol=n,] | |
\setupbodyfont [serif,10pt] | |
\starttext | |
\placeindex | |
\page [yes] | |
\startchapter[title={Everything Buns},] | |
\index{all-purpose flour+Everything Buns} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\definefont [DevaOne] [file:chandas.ttf*devanagari-one at 18pt] | |
\definefont [DevaTwo] [file:uttara.ttf*devanagari-two at 18pt] | |
\def \devanagaritest #1{% | |
\detokenize {#1}:\crlf | |
\bgroup#1 | |
श्रेयो हि ज्ञानमभ्यासाज्ज्ञानाद्ध्यानं विशिष्यते । \crlf | |
ध्यानात्कर्मफलत्यागस्त्यागाच्छन्तिरनन्तरम् ॥ | |
\egroup | |
\endgraf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
----------------------------------------------------------------------- | |
-- FILE: import-typo-dir.lua | |
-- DESCRIPTION: fake enough of Context to load typo-dir.lua | |
-- REQUIREMENTS: Context MkIV, Luoatfload, Lualibs etc. | |
-- AUTHOR: Philipp Gesang (Phg), <phg42.2a@gmail.com> | |
-- VERSION: 0.0 | |
-- CREATED: 2013-09-08 19:58:40+0200 | |
----------------------------------------------------------------------- | |
-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
packagedata = packagedata or { } | |
packagedata.beegradients = { } | |
local beegradients = packagedata.beegradients | |
local processorid = "beegradients" --- name of callback | |
local err, warn, info | |
if luatexbase then | |
err, warn, info = luatexbase.provides_module { | |
name = "beegradients", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% http://tex.stackexchange.com/q/131500 | |
\documentclass {scrartcl} | |
\usepackage {luatexbase} | |
\RequireLuaModule {lualibs} | |
\usepackage {luaotfload} %% recommended, in that order! | |
\RequireLuaModule {spreadsheet} | |
\makeatletter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
----------------------------------------------------------------------- | |
-- FILE: sidebearings.lua | |
-- USAGE: ./sidebearings.lua | |
-- DESCRIPTION: access sidebearings with Luatex | |
-- REQUIREMENTS: luaotfload version >= 2.2 | |
-- AUTHOR: Philipp Gesang (Phg), <phg42.2a@gmail.com> | |
-- VERSION: 1.0 | |
-- CREATED: 2013-08-27 15:27:20+0200 | |
----------------------------------------------------------------------- | |
-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if not modules then modules = { } end modules ['luaotfload-database'] = { | |
version = "2.3b", | |
comment = "companion to luaotfload.lua", | |
author = "Khaled Hosny, Elie Roux, Philipp Gesang", | |
copyright = "Luaotfload Development Team", | |
license = "GNU GPL v2" | |
} | |
--- TODO: if the specification is an absolute filename with a font not in the | |
--- database, add the font to the database and load it. There is a small |