Skip to content

Instantly share code, notes, and snippets.

View pgundlach's full-sized avatar
💭
Working on boxes and glue

Patrick Gundlach pgundlach

💭
Working on boxes and glue
View GitHub Profile
@pgundlach
pgundlach / layout.xml
Created March 16, 2015 13:46
Sample for table breaking across positioning areas
<Layout xmlns="urn:speedata.de:2009/publisher/en"
xmlns:sd="urn:speedata:2009/publisher/functions/en">
<Pagetype name="true" test="true()">
<Margin left="1cm" right="1cm" top="1cm" bottom="1cm"/>
<PositioningArea name="foo">
<PositioningFrame width="5" height="10" row="1" column="1"/>
<PositioningFrame width="5" height="10" row="1" column="7"/>
</PositioningArea>
</Pagetype>

Keybase proof

I hereby claim:

  • I am pgundlach on github.
  • I am patrickgundlach (https://keybase.io/patrickgundlach) on keybase.
  • I have a public key whose fingerprint is 703C 6BE8 A150 11E6 22B4 3BEC 6074 B788 B6D9 6FE5

To claim this, I am signing this object:

@pgundlach
pgundlach / eu2fxl.fd
Created March 27, 2010 16:27
EU2 encoding file for Linux Libertine
\ProvidesFile{eu2fxl.fd}[2010/03/05 v0.0 Font defs for Linux Libertine for LuaTeX's EU2 encoding]
\DeclareFontFamily{EU2}{fxl}{}
\DeclareFontShape{EU2}{fxl}{m}{n} { <-> "fxlr:+tlig;+tsub;+liga;+rlig;"}{}
\DeclareFontShape{EU2}{fxl}{m}{it} { <-> "fxlri:+tlig;+tsub;+liga;+rlig;"}{}
\DeclareFontShape{EU2}{fxl}{b}{n} { <-> "fxlb:+tlig;+tsub;+liga;+rlig;"}{}
\DeclareFontShape{EU2}{fxl}{b}{it} { <-> "fxlbi:+tlig;+tsub;+liga;+rlig;"}{}
\DeclareFontShape{EU2}{fxl}{m}{sl} { <-> "fxlri:+tlig;+tsub;+liga;+rlig;" }{}
\DeclareFontShape{EU2}{fxl}{bx}{n} { <-> "fxlb:+tlig;+tsub;+liga;+rlig;" }{}
\DeclareFontShape{EU2}{fxl}{bx}{it} { <-> "fxlbi:+tlig;+tsub;+liga;+rlig;"}{}
@pgundlach
pgundlach / beispiel.tex
Created April 3, 2010 19:56
Fontloader für LuaTeX (http://www.luatex.de)
\pdfadjustspacing=2
\directlua{
dofile("fontloader.lua")
}
\def\ladefont#1#2{\directlua{
local ok,f = define_font("#1",65536 * 12)
if ok then
local num = font.define(f)
@pgundlach
pgundlach / myprogram.lua
Created July 3, 2011 07:41
Sample Lua Document to create a two page PDF document with hyperlinks
do
-- this will hold the items that go onto the page
local pagelist
-- Call tex.shipout() with the contents of the pagelist
function shipout()
local vbox,b = node.vpack(pagelist) -- we ignore the badness 'b'
tex.box[666] = vbox
tex.shipout(666)
@pgundlach
pgundlach / sample.tex
Created September 13, 2011 20:56
tex.se sample
\documentclass{article}
\begin{document}
\parindent = 2cm
\setlength{\parfillskip}{0pt plus\dimexpr\textwidth-2\parindent}
A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart. I am alone, and feel.
The charm of existence in this spot, which was created for the bliss of souls like mine.
@pgundlach
pgundlach / ltxbarcode.lua
Created December 23, 2011 09:48
barcodes with LuaTeX
module(...,package.seeall)
local add_checksum_if_necessary, mkpattern, split_number, calculate_unit, pattern_to_wd_dp
function generate_barcode( str )
-- If we only pass 12 digits, the 13th will be added
str = add_checksum_if_necessary(str)
-- The smallest bar/gap is 1/7th the width of a digit.
@pgundlach
pgundlach / ltxbarcode.lua
Created March 14, 2012 10:25
Strichcodes mit LuaTeX
module(...,package.seeall)
local add_checksum_if_necessary, mkpattern, split_number, calculate_unit, pattern_to_wd_dp
function generate_barcode(str)
-- Wenn nur 12 Ziffern übergeben werden, fügen wir die 13 hinzu
str = add_checksum_if_necessary(str)
-- Die kleinste Lücke / Strich ist ein siebtel der Breite einer Ziffer und damit
@pgundlach
pgundlach / emacs.pdf
Created September 8, 2011 11:39
ConTeXt refcard
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pgundlach
pgundlach / main.go
Created September 2, 2016 07:21
Extract the image shape to use with the speedata Publisher
package main
import (
"encoding/xml"
"fmt"
"image"
"image/color"
"log"
"os/exec"