This file contains hidden or 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), <[email protected]> | |
-- VERSION: 1.0 | |
-- CREATED: 2013-08-27 15:27:20+0200 | |
----------------------------------------------------------------------- | |
-- |
This file contains hidden or 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 hidden or 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 hidden or 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), <[email protected]> | |
-- VERSION: 0.0 | |
-- CREATED: 2013-09-08 19:58:40+0200 | |
----------------------------------------------------------------------- | |
-- |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Index: source/texk/web2c/luatexdir/image/writeimg.w | |
=================================================================== | |
diff --git a/trunk/source/texk/web2c/luatexdir/image/writeimg.w b/trunk/source/texk/web2c/luatexdir/image/writeimg.w | |
--- a/trunk/source/texk/web2c/luatexdir/image/writeimg.w (revision 4837) | |
+++ b/trunk/source/texk/web2c/luatexdir/image/writeimg.w (working copy) | |
@@ -693,7 +693,7 @@ | |
// write additional information | |
snprintf(s, 20, "%s.FileName", pdfkeyprefix); | |
pdf_add_name(pdf, s); | |
- pdf_printf(pdf, " (%s)", convertStringToPDFString(p, strlen(p))); |