commit d6b30a4b10458639c8c1ba515ed4e60774c78285ee430d7eae44e7e96a5b69e2 Author: Dr. Werner Fink Date: Tue Dec 20 17:29:17 2011 +0000 . OBS-URL: https://build.opensuse.org/package/show/Publishing:TeXLive/texlive?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/SuSEconfig.texlive b/SuSEconfig.texlive new file mode 100644 index 0000000..60d6def --- /dev/null +++ b/SuSEconfig.texlive @@ -0,0 +1,525 @@ +#!/bin/bash +# +# Copyright (c) 1997-2001 SuSE Gmbh Nuernberg, Germany. All rights reserved. +# Copyright (c) 2004 SuSE LINUX AG, Germany. All rights reserved. +# Copyright (c) 2007-2009 SuSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SuSE LINUX Products GmbH, Nuernberg, Germany. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# +# Author: Werner Fink, 1997-2011 +# + +typeset -r OLDIFS="$IFS" +typeset -i rc=0 +: ${VERBOSE=true} + +test -r /etc/sysconfig/suseconfig && . /etc/sysconfig/suseconfig + +unset ${!LC_*} +LANG=POSIX +MKTEXLSR=true +export LANG MKTEXLSR + +mkdir -p /var/run/texlive +test $? -gt 0 && exit 0 +trap 'rm -rf /var/run/texlive' EXIT + +rotator () +{ + local -i i=0 + local -a elements=('|' '/' '-' '\') + while read -s -n 1 ; do + printf "\r[${elements[((i++%4))]}]" + done + echo +} + +if test $VERBOSE = true ; then + exec 4> >(rotator) +else + exec 4> /dev/null +fi + +type -p texhash &> /dev/null || exit 0 +type -p kpsewhich &> /dev/null || exit 0 +type -p updmap-sys &> /dev/null || exit 0 +type -p find &> /dev/null || { echo "${0##*/}: No find in PATH ... skipping"; exit 0 ; } +type -p sort &> /dev/null || { echo "${0##*/}: No sort in PATH ... skipping"; exit 0 ; } +type -p env &> /dev/null || { echo "${0##*/}: No env in PATH ... skipping"; exit 0 ; } +type -p sed &> /dev/null || { echo "${0##*/}: No sed in PATH ... skipping"; exit 0 ; } +type -p tr &> /dev/null || { echo "${0##*/}: No tr in PATH ... skipping"; exit 0 ; } +type -p grep &> /dev/null || { echo "${0##*/}: No grep in PATH ... skipping"; exit 0 ; } +type -p ed &> /dev/null || { echo "${0##*/}: No ed in PATH ... skipping"; exit 0 ; } + +# Be sure that configuring in /etc/texmf will work even if +# there are files relative to /etc/texmf ... +unset KPSE_DOT || true +: ${TEXMFMAIN:=$(kpsewhich --expand-path='$TEXMFMAIN' 2> /dev/null)} +: ${TEXMFDIST:=$(kpsewhich --expand-path='$TEXMFDIST' 2> /dev/null)} +: ${TEXMFVAR:=$(kpsewhich --var-value=TEXMFVAR 2> /dev/null)} +: ${TEXMFCNF:=$(kpsewhich texmf.cnf 2> /dev/null)} +: ${TEXMFSYSCONFIG:=$(kpsewhich --expand-path='$TEXMFSYSCONFIG' 2> /dev/null)} +: ${TEXMFLSR:=$(kpsewhich --show-path=ls-R 2> /dev/null)} +: ${WEB2C:=$TEXMFVAR/web2c} + +HASHLSR= +for lsr in ${TEXMFLSR//:/ }; do + find $lsr -prune -type d -and -not -fstype nfs > /dev/null 2>&1 || continue + HASHLSR=${HASHLSR:+$HASHLSR:}${lsr} + size=$(find /etc/texmf/ls-R -follow -printf '%s') + if test $size -lt 80 ; then + > /var/run/texlive/run-texhash + fi +done + +tcfmgr () +{ + ${TEXMFMAIN}/texconfig/tcfmgr ${1+"$@"} 2> /dev/null +} + +enablemaps () +{ + updmap-sys --quiet --nohash --listmaps < /dev/null 2> /dev/null | \ + sed -n -r 's@(#![[:space:]])(Mixed)?Map[[:space:]]*@@gp' | \ + xargs -r kpsewhich --format=map 2> /dev/null | \ + sed -r 's@.*/([^/]*)@\1@g' +} + +# +# Straightforward ... here we go +# +if test -e /var/run/texlive/run-texhash; do + typeset -i n=0 + for lsr in ${HASHLSR//:/ }; do + ((n++ == 0)) && test $VERBOSE = true && echo -e "\r[ ]Enabling TeX hash data base." + find $lsr -prune -type d -and -not -fstype nfs > /dev/null 2>&1 || continue + if test $f -nt $lsr/ls-R ; then + texhash $lsr 1>&4 2>&4 + let rc+=$? + fi + done + cfg=$(tcfmgr --cmd find --file updmap.cfg) + if test -e ${cfg} ; then + test $VERBOSE = true && echo -e "\r[ ]Enabling TeX font mappings." + updmap-sys --nohash --nomkmap --syncwithtrees < /dev/null 1>&4 2>&4 + let rc+=$? + enablemaps | \ + while read line ; do + line='^#![[:space:]]*((Mixed)?Map)[[:space:]]*('$line')' + emap=$(sed -n -r "s/$line/\1=\3/p" ${cfg}) + updmap-sys --nohash --nomkmap --enable $emap < /dev/null 1>&4 2>&4 + let rc+=$? + done + updmap-sys < /dev/null 1>&4 2>&4 + let rc+=$? + fi +fi + +# +# If texmf.cnf has changed it may contain changed memory sizes +# of various programs. +# +type -p readlink &> /dev/null || exit 0 +type -p texconfig-sys &> /dev/null || exit 0 + +test -L "$TEXMFCNF" && TEXMFCNF="$(readlink -f "$TEXMFCNF" 2> /dev/null)" + +# +# Configuration broken +# +if test ! -e "$TEXMFCNF" ; then + echo "${0##*/}: Configuration of texlive installation not found." + exit 0 +fi + +init=false +for f in $(find ${WEB2C}/ -name '*.fmt' -name '*.mem' -o -name '*.base') ; do + test -e "$f" || continue + test -L "$f" && continue + test "$TEXMFCNF" -nt "$f" && init=true + test -s "$f" && touch "$f" +done +if test $init = true ; then + test $VERBOSE = true && echo -e "\r[ ]Initialize TeX configuration and font mappings." + updmap-sys --syncwithtrees < /dev/null 1>&4 2>&4 + let rc+=$? + texconfig-sys init < /dev/null 1>&4 2>&4 + let rc+=$? +fi + +# +# These are required. +# +type -p md5sum &> /dev/null || exit 0 + +# +# We need a check for an already modified texlive configuration: +# therefore we use md5 check sums. +# +if test -z "$MD5DIR" ; then + LIBDIR=/var/lib/texmf + MD5DIR=$LIBDIR/md5 +fi +mkdir -p $MD5DIR +test $? -gt 0 && exit 0 + +# +# The main configuration files of TeXLive. +# +type -p fmtutil-sys &> /dev/null || exit 0 + +cnf_mfont=$(tcfmgr --cmd find --file mktex.cnf) + cnf_xdvi=$(tcfmgr --cmd find --file XDvi) +cnf_dvips=$(tcfmgr --cmd find --file config.ps) + cnf_lang=$(TEXMF=$TEXMFSYSCONFIG kpsewhich language.dat 2> /dev/null) + cnf_base=$(TEXMF=$TEXMF kpsewhich language.us 2> /dev/null) + +test -n "${cnf_mfont}" || exit 0 +test -n "${cnf_xdvi}" || exit 0 +test -n "${cnf_dvips}" || exit 0 +test -n "${cnf_lang}" || exit 0 + +md5_mfont=${MD5DIR}${cnf_mfont} + md5_xdvi=${MD5DIR}${cnf_xdvi} +md5_dvips=${MD5DIR}${cnf_dvips} + md5_lang=${MD5DIR}${cnf_lang} + md5_cups=${MD5DIR}/cups + +# +# Is this a full TeXLive system? +# +test -e ${cnf_mfont} || exit 0 # Default MetaFont mode +test -e ${cnf_xdvi} || exit 0 # Default xdvi resolution +test -e ${cnf_dvips} || exit 0 # Default printer mode +test -e ${cnf_lang} || exit 0 # Default hyphenation + +# +# Current MD5 sums +# +set -- $(md5sum < ${cnf_mfont}) ; md5modes="$1" +set -- $(md5sum < ${cnf_xdvi} ) ; md5xdvi="$1" +set -- $(md5sum < ${cnf_dvips}) ; md5dvips="$1" +set -- $(md5sum < ${cnf_lang} ) ; md5lang="$1" + +# +# Previous md5 sums +# +omd5lang=0 +if test -e ${md5_lang} -a -r ${md5_lang} ; then + test ${md5_lang} -nt ${cnf_lang} && md5_nt_lang="yes" + set -- $(cat ${md5_lang}) ; omd5lang="$1" +elif test ! -d ${md5_lang%/*} ; then + mkdir -p ${md5_lang%/*} +fi + +# +# Create new formats for new language.dat if needed +# +if test $omd5lang = 0 -o \ + \( $md5lang != $omd5lang -o "$md5_nt_lang" != "yes" \) +then + test $VERBOSE = true && echo -e "\r[ ]Handle language setups." + set -- $(md5sum < ${cnf_lang}) + echo $1 > ${md5_lang} + fmtutil-sys --byhyphen ${cnf_lang} < /dev/null 1>&4 2>&4 + let rc+=$? +fi + +# +# The main system printer. +# +lp="" +if type -p lpoptions &>/dev/null && lpstat -r &>/dev/null ; then + dev=PS + size=a4 + dpi=300 + color=mono + IFS=$'\n' + lpopt=($(lpoptions -l 2> /dev/null)) + IFS="$OLDIFS" + shopt -s extglob + for line in "${lpopt[@]}" ; do + case "$line" in + PageSize*) + set -- $line + while test -n "$1" ; do + case "$1" in + \**) size="${1:1}"; break + esac + shift + done + ;; + Resolution*) + set -- $line + reg='?(\*)@(+([0-9])|+([0-9])x+([0-9]))dpi' + cur=0 + while test -n "$1" ; do + case "$1" in + $reg) cur=${1%%+([[:alpha:]])} + esac + cur="${cur#\*}" + case "$1" in + *Color*) color=color + esac + shift + test "${cur%x*}" -gt "${dpi%x*}" && dpi=$cur + done + ;; + ColorCorrection*) + set -- $line + while test -n "$1" ; do + case "$1" in + \*RGB|\*CMYK) color=color; break + esac + shift + done + ;; + esac + done + shopt -u extglob + lp="lp|${dev}-$(echo ${size}-auto-${color}-${dpi}|tr '[:upper:]' '[:lower:]')" +elif test -r /etc/printcap -a -d /var/lib/apsfilter/ ; then + lp=$(grep -E '^lp\|' /etc/printcap) +elif test -r /etc/printcap -a -x /usr/lib/lpdfilter/bin/readpc ; then + lp=$(/usr/lib/lpdfilter/bin/readpc lp || true) +fi +test -n "$lp" || exit 0 # No (configured) filter system: nothing to do + +if type -p lpoptions &>/dev/null && lpstat -r &>/dev/null ; then + omd5cups=0 + if test -r ${md5_cups} ; then + set -- $(cat ${md5_cups}) ; omd5cups=$1 + elif test ! -d ${md5_cups%/*} ; then + mkdir -p ${md5_cups%/*} + fi + set -- $(lpoptions -l 2> /dev/null | md5sum) ; md5cups=$1 + if test ${omd5cups} != ${md5cups} ; then + prtcap_nt_mfont="yes" + prtcap_nt_xdvi="yes" + prtcap_nt_dvips="yes" + echo ${md5cups} > ${md5_cups} + fi +else + test /etc/printcap -nt ${cnf_mfont} && prtcap_nt_mfont="yes" + test /etc/printcap -nt ${cnf_xdvi} && prtcap_nt_xdvi="yes" + test /etc/printcap -nt ${cnf_dvips} && prtcap_nt_dvips="yes" +fi + +# +# Previous md5 sums +# +omd5modes=0 + omd5xdvi=0 +omd5dvips=0 +if test -e ${md5_mfont} -a -r ${md5_mfont} ; then + test ${md5_mfont} -nt ${cnf_mfont} && md5_nt_mfont="yes" + set -- $(cat ${md5_mfont}) ; omd5modes="$1" +elif test ! -d ${md5_mfont%/*} ; then + mkdir -p ${md5_mfont%/*} +fi +if test -e ${md5_xdvi} -a -r ${md5_xdvi} ; then + test ${md5_xdvi} -nt ${cnf_xdvi} && md5_nt_xdvi="yes" + set -- $(cat ${md5_xdvi}) ; omd5xdvi="$1" +elif test ! -d ${md5_xdvi%/*} ; then + mkdir -p ${md5_xdvi%/*} +fi +if test -e ${md5_dvips} -a -r ${md5_dvips} ; then + test ${md5_dvips} -nt ${cnf_dvips} && md5_nt_dvips="yes" + set -- $(cat ${md5_dvips}) ; omd5dvips="$1" +elif test ! -d ${md5_dvips%/*} ; then + mkdir -p ${md5_dvips%/*} +fi + +# +# Convert YaST2 configured printer for apsfilter or lpdfilter +# +case "$lp" in + *\|*.upp--*) + lp="" + upp=${lp##*|} + IFS="-$IFS" + for upp in $upp ; do break; done + IFS="$OLDIFS" + if test -s /etc/gs.upp/$upp ; then + while read line ; do + case "$line" in + -sDEVICE=*) dev="${line#*=}" ;; + @*.upp) dev="${line#@}" ;; + -r*) dpi="${line#-r}" ;; + -sPAPERSIZE=*) + psz="${line#*=}" ;; + -sCOLOR=*) col="${line#*=}" ;; + *) ;; + esac + done < /etc/gs.upp/$upp + lp="lp|${dev}-${psz}-auto-${col}-${dpi}" + fi + ;; + *:cm=lpdfilter*:) + entry="$lp" + lp="" + IFS=":" + for e in $entry ; do + case "$e" in + cm=lpdfilter*) eval "${e#cm=lpdfilter}" ;; + esac + done + IFS="$OLDIFS" + if test "$drv" = "upp" -a -s /etc/lpdfilter/lp/upp ; then + while read line ; do + case "$line" in + -sDEVICE=*) drv="${line#*=}" ;; # Overwrite driver! + -r*) dpi="${line#-r}" ;; + -dDEVICEXRESOLUTION=*) + xres="${line#*=}" ;; + -dDEVICEYRESOLUTION=*) + yres="${line#*=}" ;; + -sPAPERSIZE=*) size="${line#*=}" ;; + -sCOLOR=*) color="${line#*=}" ;; + -sPOSTFILTER=\"*\") + eval post="${line#*=}" ;; + @*) upp="${line#@}" ;; + esac + done < /etc/lpdfilter/lp/upp + fi + if test -n "$upp" && type -p gs &> /dev/null ; then + drv=${upp##*/} + upp=$(echo "($upp) findlibfile { pop print } { pop } ifelse" | \ + gs -sDEVICE=nullpage -q -dNOPAUSE - -c quit) + fi + if test -r "$upp" ; then + while read line ; do + case "$line" in + -r*) dpi="${line#-r}" ;; + esac + done < $upp + fi + if test -z "$dpi" ; then + test -n "$xres" && dpi=$xres + test -n "$yres" && dpi=${dpi+"${dpi}x"}$yres + fi + lp="lp|${drv}-${size}-${method}-${color}-${dpi}" + ;; +esac + +# +# Parse the configured system main printer +# Ghostscript/PS <-> Metafont mode and paper size +# (UNTESTED, Sorry I've *not* enough printers around) +# +function get_paper () { + ( + . /etc/sysconfig/language &> /dev/null + h=($(LANG=$RC_LANG locale -k LC_PAPER)) + case "${h[0]}" in + height=297) echo a4 ;; + *) echo letter ;; + esac + ) +} + +case "$lp" in + *-letter-*) XDVISIZE=us ; DVIPSSIZE=letter ;; + *-legal-*) XDVISIZE=legal ; DVIPSSIZE=legal ;; + *-ledger-*) XDVISIZE=a3r ; DVIPSSIZE=ledger ;; + *-tabloid-*) XDVISIZE=a3 ; DVIPSSIZE=tabloid ;; + *-a3-*) XDVISIZE=a3 ; DVIPSSIZE=a3 ;; + *-a4-*) XDVISIZE=a4 ; DVIPSSIZE=a4 ;; + *) + case "$(get_paper)" in + a4) XDVISIZE=a4 ; DVIPSSIZE=a4 ;; + *) XDVISIZE=us ; DVIPSSIZE=letter ;; + esac + ;; +esac + +case "$lp" in + *\|PS*) PRINTER=ljfour ;; + *\|bj10e*) PRINTER=bjtenex ;; + *\|bj200*) PRINTER=bjtzzex ;; + *\|bjc600*) PRINTER=canonbjc ;; + *\|bjc800*) PRINTER=canonbjc ;; + *\|bjc610a*) PRINTER=canonbjc ;; +# *\|bjc610b*) PRINTER=canonbjc ;; + *\|cdeskjet*600) PRINTER=ljfour ;; + *\|deskjet*600) PRINTER=ljfour ;; + *\|cdeskjet*) PRINTER=deskjet ;; + *\|deskjet*) PRINTER=deskjet ;; + *\|cdj6*) PRINTER=ljfour ;; + *\|cdj8*) PRINTER=ljfour ;; + *\|hpdj*) PRINTER=ljfour ;; + *\|cdj*600) PRINTER=ljfour ;; + *\|djet*600) PRINTER=ljfour ;; + *\|cdj*) PRINTER=deskjet ;; + *\|djet*) PRINTER=deskjet ;; + *\|laserjet*) PRINTER=cx ;; + *\|ljetplus*) PRINTER=cx ;; + *\|ljet2*) PRINTER=cx ;; + *\|ljet3*) PRINTER=jetiiisi ;; + *\|ljet4l*) PRINTER=cx ;; + *\|ljet4*) PRINTER=ljfour ;; + *\|lj4*) PRINTER=ljfour ;; + *\|lj5*) PRINTER=ljfive ;; +# *\|lj5*) PRINTER=ljfivemp ;; + *\|stcolor*720) PRINTER=esphi ;; + *\|stcolor*) PRINTER=epstylus ;; + *\|st800*720) PRINTER=esphi ;; + *\|st800*) PRINTER=epstylus ;; + *\|stc800*720) PRINTER=esphi ;; + *\|stc800*) PRINTER=epstylus ;; + *\|stc600*) PRINTER=epscszz ;; + *\|stc_h*) PRINTER=esphi ;; + *\|stc*) PRINTER=epstypro ;; + *) PRINTER=ljfour + prtcap_nt_dvips="manual" ;; +esac + +# +# Run texconfig if no one has update the TeXLive system +# or parts of it. +# +if test $omd5modes = 0 -o \ + \( $md5modes = $omd5modes -a "$prtcap_nt_mfont" = "yes" -a "$md5_nt_mfont" = "yes" \) +then + test $VERBOSE = true && echo -e "\r[ ]Set MetaFont mode." + env -i MKTEXLSR=true PATH=$PATH LANG=$LANG texconfig-sys mode $PRINTER < /dev/null 1>&4 2>&4 + let rc+=$? + set -- $(md5sum < ${cnf_mfont}) + echo $1 > ${md5_mfont} +fi +if test $omd5xdvi = 0 -o \ + \( $md5xdvi = $omd5xdvi -a "$prtcap_nt_xdvi" = "yes" -a "$md5_nt_xdvi" = "yes" \) +then + test $VERBOSE = true && echo -e "\r[ ]Set XDvi paper size." + env -i MKTEXLSR=true PATH=$PATH LANG=$LANG texconfig-sys xdvi paper $XDVISIZE < /dev/null 1>&4 2>&4 + let rc+=$? + set -- $(md5sum < ${cnf_xdvi}) + echo $1 > ${md5_xdvi} +fi +if test $omd5dvips = 0 -o \ + \( $md5dvips = $omd5dvips -a "$prtcap_nt_dvips" = "yes" -a "$md5_nt_dvips" = "yes" \) +then + test $VERBOSE = true && echo -e "\r[ ]Set dvips mode and paper size." + env -i MKTEXLSR=true PATH=$PATH LANG=$LANG texconfig-sys dvips mode $PRINTER < /dev/null 1>&4 2>&4 + let rc+=$? + env -i MKTEXLSR=true PATH=$PATH LANG=$LANG texconfig-sys dvips paper $DVIPSSIZE < /dev/null 1>&4 2>&4 + let rc+=$? + set -- $(md5sum < ${cnf_dvips}) + echo $1 > ${md5_dvips} +fi +if test "$prtcap_nt_dvips" = "manual" -a \ + \( $md5dvips = $omd5dvips -o $omd5dvips = 0 \) +then + echo -e "\n${0##*/}: Unknown default printer, use texconfig to setup dvips manually." + if test -n "$MAIL_REPORTS_TO" ; then + echo "${0##*/}: Unknown default printer, use texconfig to setup dvips manually." | \ + mail -s "${0##*/}" $MAIL_REPORTS_TO + fi +fi + +if test $VERBOSE = true ; then + exec 4>&- +fi +## +exit $rc diff --git a/biblatex-biber-0.9.3.tar.xz b/biblatex-biber-0.9.3.tar.xz new file mode 100644 index 0000000..9471fac --- /dev/null +++ b/biblatex-biber-0.9.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e71b5853f5fd3067d52751eb6469fe2474230c6a20e5991dd53bd53ab713f75e +size 1127689 diff --git a/cnf-to-paths.awk b/cnf-to-paths.awk new file mode 100644 index 0000000..7899692 --- /dev/null +++ b/cnf-to-paths.awk @@ -0,0 +1,33 @@ +/^[ \t]*[A-Z0-9_]+[ \t]*=/ { + ident = $0 + sub(/^[[:blank:]]*/, "", ident) + sub(/[[:blank:]]*=.*/, "", ident) + + val = $0 + sub(/^.*=[[:blank:]]*/, "", val) + sub(/[[:blank:]]*$/, "", val) + gsub(/;/, ":", val) + + VAR[ident] = val +} + +END { + for (ident in VAR) { + val = VAR[ident] + split(val, pieces, /[:,]/) + for (one in pieces) { + match(pieces[one], /\$\{?([[:upper:]]+)\}?/, arr) + if (RSTART == 0) + continue + if (arr[1] ~ /OSFONTDIR/) + continue + if (VAR[arr[1]] ~ /\$/) + continue + gsub(/\$\{?arr[1]\}?/, VAR[arr[1]], val) + } + print "#ifndef DEFAULT_" ident + print "#define DEFAULT_" ident " \"" val "\"" + print "#endif" + print "" + } +} diff --git a/collection-basic.tar.xz b/collection-basic.tar.xz new file mode 100644 index 0000000..c4715af --- /dev/null +++ b/collection-basic.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a926b2665a2ee844545fdc24f8a5f962871e6b39ce453c63f14f010738f128b7 +size 588 diff --git a/collection-bibtexextra.tar.xz b/collection-bibtexextra.tar.xz new file mode 100644 index 0000000..97936c8 --- /dev/null +++ b/collection-bibtexextra.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c96c9311caba04c720482acd22e9cfcea2d00884d2749569d3d258f92faa19d3 +size 732 diff --git a/collection-binextra.tar.xz b/collection-binextra.tar.xz new file mode 100644 index 0000000..b2100a4 --- /dev/null +++ b/collection-binextra.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7724fbc084966f448cc8f6affebce67d7781a0c3e413b50fd34cf13d1ebb6a88 +size 696 diff --git a/collection-context.tar.xz b/collection-context.tar.xz new file mode 100644 index 0000000..72dfd67 --- /dev/null +++ b/collection-context.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1dd7e2f84602fe2603b59cffe0440315f358317a5147a808d39a891e63adb697 +size 532 diff --git a/collection-documentation-arabic.tar.xz b/collection-documentation-arabic.tar.xz new file mode 100644 index 0000000..e60b715 --- /dev/null +++ b/collection-documentation-arabic.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23057cdccb9337dfcad8b10f01eb3cc2d07c161d33c6a45becc54a3c46c96bcb +size 292 diff --git a/collection-documentation-base.tar.xz b/collection-documentation-base.tar.xz new file mode 100644 index 0000000..e98f2aa --- /dev/null +++ b/collection-documentation-base.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a090634ac06af2039e1527d7b9e59cd7c4449fab2f42c6c921c50ff39d7dcae7 +size 304 diff --git a/collection-documentation-bulgarian.tar.xz b/collection-documentation-bulgarian.tar.xz new file mode 100644 index 0000000..eb3b487 --- /dev/null +++ b/collection-documentation-bulgarian.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b4a8d4764d44e9777db1585d720b543b4d9e52d01369652183372c5ae56127f +size 308 diff --git a/collection-documentation-chinese.tar.xz b/collection-documentation-chinese.tar.xz new file mode 100644 index 0000000..e582436 --- /dev/null +++ b/collection-documentation-chinese.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc4310567225b583a8d0e7061113613282a57e0fb65132d3668ea6180832fc8c +size 348 diff --git a/collection-documentation-czechslovak.tar.xz b/collection-documentation-czechslovak.tar.xz new file mode 100644 index 0000000..d0b495b --- /dev/null +++ b/collection-documentation-czechslovak.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e73543c7993eecc871064c5777cc5761dabc40f45b88fc01bf4586799fef44f6 +size 308 diff --git a/collection-documentation-dutch.tar.xz b/collection-documentation-dutch.tar.xz new file mode 100644 index 0000000..5fc8e3a --- /dev/null +++ b/collection-documentation-dutch.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2bc1842967819975b7997035d344b5013ff2e1cf78b30df7543150999d4b2c92 +size 288 diff --git a/collection-documentation-english.tar.xz b/collection-documentation-english.tar.xz new file mode 100644 index 0000000..1046e59 --- /dev/null +++ b/collection-documentation-english.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa3b588359065a29f935a3f11700ebd945b322707c134f146add524cbd91de3b +size 716 diff --git a/collection-documentation-finnish.tar.xz b/collection-documentation-finnish.tar.xz new file mode 100644 index 0000000..d6d24b2 --- /dev/null +++ b/collection-documentation-finnish.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:76682727f95a673b1ba72e730832a1858eb1058329806cbd1824a7b4f47c2fcb +size 288 diff --git a/collection-documentation-french.tar.xz b/collection-documentation-french.tar.xz new file mode 100644 index 0000000..fb8cbcd --- /dev/null +++ b/collection-documentation-french.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:472ba6f1f56d12b185cf5c668290aa92415a9014bb8b891f904a4aa9bb8b1260 +size 360 diff --git a/collection-documentation-german.tar.xz b/collection-documentation-german.tar.xz new file mode 100644 index 0000000..e13c0d9 --- /dev/null +++ b/collection-documentation-german.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad1190c1c22ee9a4bd16a0d5e6306d27dafa5cc549232f181f9fa9970417ed7d +size 488 diff --git a/collection-documentation-italian.tar.xz b/collection-documentation-italian.tar.xz new file mode 100644 index 0000000..577ce9b --- /dev/null +++ b/collection-documentation-italian.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6419e93e3e4271512bd3ea72f4e51874ff29415f61dd6c021e827e129ffe70b +size 344 diff --git a/collection-documentation-japanese.tar.xz b/collection-documentation-japanese.tar.xz new file mode 100644 index 0000000..3fc7362 --- /dev/null +++ b/collection-documentation-japanese.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0d935513c855494b8e184e5a4dd8aa4d82349f3d5dcdb7204bccccd6de49a82 +size 292 diff --git a/collection-documentation-korean.tar.xz b/collection-documentation-korean.tar.xz new file mode 100644 index 0000000..ec4d678 --- /dev/null +++ b/collection-documentation-korean.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7515b5e2f231f74876f03d4a2fb4802a6dc7001af44d3899027e07dfd8ee91d +size 288 diff --git a/collection-documentation-mongolian.tar.xz b/collection-documentation-mongolian.tar.xz new file mode 100644 index 0000000..d846e05 --- /dev/null +++ b/collection-documentation-mongolian.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ecd8dab17f9e63f7dddaf589734a6cbd607c3b26816268c071bd4e1abea54ff4 +size 292 diff --git a/collection-documentation-polish.tar.xz b/collection-documentation-polish.tar.xz new file mode 100644 index 0000000..bbf4f2c --- /dev/null +++ b/collection-documentation-polish.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b7f41bb7f11ef66619990b5d911a86306d9d8d0e2b07c7343d92e6b5e8398f2c +size 316 diff --git a/collection-documentation-portuguese.tar.xz b/collection-documentation-portuguese.tar.xz new file mode 100644 index 0000000..51603ba --- /dev/null +++ b/collection-documentation-portuguese.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0f75b14273f6328cb50b4f120487ceda09d6b88bcd4d6bfceab2ba4f34ce74e +size 332 diff --git a/collection-documentation-russian.tar.xz b/collection-documentation-russian.tar.xz new file mode 100644 index 0000000..2dcced1 --- /dev/null +++ b/collection-documentation-russian.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ad7987296c26af728fe348f486b6180180aeb43e0fcdb7109f73a3910c94f92 +size 304 diff --git a/collection-documentation-serbian.tar.xz b/collection-documentation-serbian.tar.xz new file mode 100644 index 0000000..e7cfc12 --- /dev/null +++ b/collection-documentation-serbian.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a9c93af5f6a5d2c4688986320aa9a976df55df51ec54243ba827fcc28f42d56 +size 292 diff --git a/collection-documentation-slovenian.tar.xz b/collection-documentation-slovenian.tar.xz new file mode 100644 index 0000000..5ba42c3 --- /dev/null +++ b/collection-documentation-slovenian.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3d2025ecb300449865d455dae4940aeb585b249ad2fa7da3f2efebba0031d7b +size 288 diff --git a/collection-documentation-spanish.tar.xz b/collection-documentation-spanish.tar.xz new file mode 100644 index 0000000..4bf7ffd --- /dev/null +++ b/collection-documentation-spanish.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bcad1d2e69ed97302de39b83c83ec8c83a954e3c715b353be0733038f830dbb3 +size 332 diff --git a/collection-documentation-thai.tar.xz b/collection-documentation-thai.tar.xz new file mode 100644 index 0000000..85aa7c7 --- /dev/null +++ b/collection-documentation-thai.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a6a3e0e3091c798e01a4433e260519457dcdbe935c3f812251b68e997dbd91d +size 288 diff --git a/collection-documentation-turkish.tar.xz b/collection-documentation-turkish.tar.xz new file mode 100644 index 0000000..84772ae --- /dev/null +++ b/collection-documentation-turkish.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:76a6b65b1951bd15993da815b6c7629877489ca32e6d027bfbfa88c5d748dff3 +size 288 diff --git a/collection-documentation-ukrainian.tar.xz b/collection-documentation-ukrainian.tar.xz new file mode 100644 index 0000000..22c7e43 --- /dev/null +++ b/collection-documentation-ukrainian.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:300e38046ac0bcdbdc04f1a027ea08ee207bad59170de0cd1fc74f9cae14dab9 +size 292 diff --git a/collection-documentation-vietnamese.tar.xz b/collection-documentation-vietnamese.tar.xz new file mode 100644 index 0000000..0a9dc0f --- /dev/null +++ b/collection-documentation-vietnamese.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0b8af9443410d653e2ba155ba2b4e44e6e06f747bf9548c778f88073f0487de +size 308 diff --git a/collection-fontsextra.tar.xz b/collection-fontsextra.tar.xz new file mode 100644 index 0000000..9763319 --- /dev/null +++ b/collection-fontsextra.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:16ae7efe00521e0108e43e3c136478b88087654b5fdad14fd0a7eb9ff4235a39 +size 1116 diff --git a/collection-fontsrecommended.tar.xz b/collection-fontsrecommended.tar.xz new file mode 100644 index 0000000..ff8d0fd --- /dev/null +++ b/collection-fontsrecommended.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fed2522498ce78bd0a828d6961f81dd197a91597cef9d025e6bc989de644a91f +size 528 diff --git a/collection-fontutils.tar.xz b/collection-fontutils.tar.xz new file mode 100644 index 0000000..9fda83b --- /dev/null +++ b/collection-fontutils.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3fc27d6d09237f844cd17764177b962063c8087ad9a90a61180fe6bb75352d94 +size 524 diff --git a/collection-formatsextra.tar.xz b/collection-formatsextra.tar.xz new file mode 100644 index 0000000..22f9074 --- /dev/null +++ b/collection-formatsextra.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6a0de1483469f211c801983157bbb44c45461e82dbc8cf0b28343d55519ec32 +size 432 diff --git a/collection-games.tar.xz b/collection-games.tar.xz new file mode 100644 index 0000000..fc3e36b --- /dev/null +++ b/collection-games.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5140cb44f6540f9a9820ac22f0a0ceffc93f048ffe64d585fc923e45926a4a2f +size 444 diff --git a/collection-genericextra.tar.xz b/collection-genericextra.tar.xz new file mode 100644 index 0000000..c36adc3 --- /dev/null +++ b/collection-genericextra.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96c81e2c848c5504bd25781e4507a3951e8b628a8dd6288a55a5eedd25894f97 +size 544 diff --git a/collection-genericrecommended.tar.xz b/collection-genericrecommended.tar.xz new file mode 100644 index 0000000..1b059b3 --- /dev/null +++ b/collection-genericrecommended.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cbd895a25dea70e129fbc76ef409b8e3894ff0bc143ee1371824f21388392412 +size 368 diff --git a/collection-htmlxml.tar.xz b/collection-htmlxml.tar.xz new file mode 100644 index 0000000..3588192 --- /dev/null +++ b/collection-htmlxml.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:732269784fa6160b7f8d866da1e6aa8d1bdc5cc7d64a837518f869b943f403cc +size 380 diff --git a/collection-humanities.tar.xz b/collection-humanities.tar.xz new file mode 100644 index 0000000..ecf5cc7 --- /dev/null +++ b/collection-humanities.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef66615adebc9723749a720972ff0eddc1a015e55309bf0fc36376a60e96914a +size 512 diff --git a/collection-langafrican.tar.xz b/collection-langafrican.tar.xz new file mode 100644 index 0000000..a470562 --- /dev/null +++ b/collection-langafrican.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80a850ef837164034550310302fe0718e7b9ff2633fb335e6b839a798c2d0482 +size 336 diff --git a/collection-langarabic.tar.xz b/collection-langarabic.tar.xz new file mode 100644 index 0000000..7ea0609 --- /dev/null +++ b/collection-langarabic.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba9d96ee274fa404401d5cf68e042528313b7c693eda51b64f724f21c662fed7 +size 344 diff --git a/collection-langarmenian.tar.xz b/collection-langarmenian.tar.xz new file mode 100644 index 0000000..c69db1a --- /dev/null +++ b/collection-langarmenian.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b70a93b37a8573c60e919e9d9814872e6c952b4581098ea4f0ccf9a443ef540b +size 300 diff --git a/collection-langcjk.tar.xz b/collection-langcjk.tar.xz new file mode 100644 index 0000000..4cbe36f --- /dev/null +++ b/collection-langcjk.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fce8cf051702e95f234400c8ecfaa1ae96aacc65ad58ab1e18669d9011ee82a7 +size 488 diff --git a/collection-langcroatian.tar.xz b/collection-langcroatian.tar.xz new file mode 100644 index 0000000..dd8228d --- /dev/null +++ b/collection-langcroatian.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:544ed34256ea76abe210d352debeba6b278b48adc319e79ee76e0b2428aac12f +size 316 diff --git a/collection-langcyrillic.tar.xz b/collection-langcyrillic.tar.xz new file mode 100644 index 0000000..2b7fda6 --- /dev/null +++ b/collection-langcyrillic.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5abf348488a00185fbeb807f16c7d5e35766b45c742c5b42ed54c308fa9eef74 +size 392 diff --git a/collection-langczechslovak.tar.xz b/collection-langczechslovak.tar.xz new file mode 100644 index 0000000..7a8d21d --- /dev/null +++ b/collection-langczechslovak.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6624620f28c1dbf5aa6d045c83e7a1f916b966a7dcaa4f2bb2db76350232ea6 +size 348 diff --git a/collection-langdanish.tar.xz b/collection-langdanish.tar.xz new file mode 100644 index 0000000..a7f8883 --- /dev/null +++ b/collection-langdanish.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05e1f850f70ec197ce5d01b4c703a7118e1acee40043121a7800ac4284ffe064 +size 308 diff --git a/collection-langdutch.tar.xz b/collection-langdutch.tar.xz new file mode 100644 index 0000000..a0e7dd8 --- /dev/null +++ b/collection-langdutch.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8eb29326f75697018cc50cccd4ca28a8a9889a300db49b5ff43a3563d800a793 +size 308 diff --git a/collection-langenglish.tar.xz b/collection-langenglish.tar.xz new file mode 100644 index 0000000..b1f4873 --- /dev/null +++ b/collection-langenglish.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de1be31f6e1a3c25eaccc2cf7933f5b36951f3311957990152c441f8000b89a6 +size 316 diff --git a/collection-langfinnish.tar.xz b/collection-langfinnish.tar.xz new file mode 100644 index 0000000..3449727 --- /dev/null +++ b/collection-langfinnish.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc37138566ab9b3602ccb2162f3879d41e8acbae516842ee1a9c5af19fa7a48a +size 316 diff --git a/collection-langfrench.tar.xz b/collection-langfrench.tar.xz new file mode 100644 index 0000000..2d90715 --- /dev/null +++ b/collection-langfrench.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5cfaed9186562b220576ffc1571ed49b8f832042f86eab8a817342e9879bd91c +size 396 diff --git a/collection-langgerman.tar.xz b/collection-langgerman.tar.xz new file mode 100644 index 0000000..5a7b703 --- /dev/null +++ b/collection-langgerman.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca3063dbe85b06a1e3fbcb7e014b793249e9ddae4f1243d37683f6bad0276b63 +size 408 diff --git a/collection-langgreek.tar.xz b/collection-langgreek.tar.xz new file mode 100644 index 0000000..bac3d94 --- /dev/null +++ b/collection-langgreek.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:76c1a03874eeb4fc63e05f6bbbee9e6e22d56bd0a1d227fcb1d008afc317c175 +size 424 diff --git a/collection-langhebrew.tar.xz b/collection-langhebrew.tar.xz new file mode 100644 index 0000000..47eb90f --- /dev/null +++ b/collection-langhebrew.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e28956b3c8392336b21c5db2961bd9aa861a66823f22bfbe084c12c4c72b69c +size 304 diff --git a/collection-langhungarian.tar.xz b/collection-langhungarian.tar.xz new file mode 100644 index 0000000..355320e --- /dev/null +++ b/collection-langhungarian.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5fc7d375d41d779a9f8ce8047b39900e831fe3f58e01063cba2dd8bc1efc7929 +size 316 diff --git a/collection-langindic.tar.xz b/collection-langindic.tar.xz new file mode 100644 index 0000000..5ecaf36 --- /dev/null +++ b/collection-langindic.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dbdf41d933fec0391ec1ad740ac5c66282c16cea4f60ae01fe95ad38689d6078 +size 400 diff --git a/collection-langitalian.tar.xz b/collection-langitalian.tar.xz new file mode 100644 index 0000000..17267d3 --- /dev/null +++ b/collection-langitalian.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:46b1f72b0bb12a412ffccd86df175e8da5b5ae66644bf276792fe8c76d19b711 +size 332 diff --git a/collection-langlatin.tar.xz b/collection-langlatin.tar.xz new file mode 100644 index 0000000..f71d13d --- /dev/null +++ b/collection-langlatin.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b4de8cef443a80cb15e980f5a11f0a06dc5ba46755e14deddc9b69766448bb4 +size 308 diff --git a/collection-langlatvian.tar.xz b/collection-langlatvian.tar.xz new file mode 100644 index 0000000..74203cd --- /dev/null +++ b/collection-langlatvian.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3cc5c83751b7a64c1628621c4ab5c4754803c80c45640f0bcd59dda969115cd +size 308 diff --git a/collection-langlithuanian.tar.xz b/collection-langlithuanian.tar.xz new file mode 100644 index 0000000..10f603c --- /dev/null +++ b/collection-langlithuanian.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d5fa23e8834c133ea4c32bc1436a011b3134b6925312bc05242a66faa18085ab +size 316 diff --git a/collection-langmongolian.tar.xz b/collection-langmongolian.tar.xz new file mode 100644 index 0000000..d97bf95 --- /dev/null +++ b/collection-langmongolian.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e87e5a69150e33b26d9e1c627b62d78bea03e045267e32ab14090e1523389ee +size 324 diff --git a/collection-langnorwegian.tar.xz b/collection-langnorwegian.tar.xz new file mode 100644 index 0000000..69ae376 --- /dev/null +++ b/collection-langnorwegian.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40d26a99d1000c08730f21a724ef1f79340d0bb91dd5c07b98d31fa1a94aca55 +size 308 diff --git a/collection-langother.tar.xz b/collection-langother.tar.xz new file mode 100644 index 0000000..2546ddb --- /dev/null +++ b/collection-langother.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a9673cf955f113a214c25ef57161e8894b4e3d8cf4bdeb2742a765deab577a1 +size 440 diff --git a/collection-langpolish.tar.xz b/collection-langpolish.tar.xz new file mode 100644 index 0000000..06bb14e --- /dev/null +++ b/collection-langpolish.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab31927f5d6302d581453e7211ec9c1173dc64345d48069e1c72db432edbdb2e +size 376 diff --git a/collection-langportuguese.tar.xz b/collection-langportuguese.tar.xz new file mode 100644 index 0000000..b048484 --- /dev/null +++ b/collection-langportuguese.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e0d3a5529a8d76e5af3ef4c7af41986ef99a8db2807a20f5da28f00ae14616b +size 320 diff --git a/collection-langspanish.tar.xz b/collection-langspanish.tar.xz new file mode 100644 index 0000000..30b6fd1 --- /dev/null +++ b/collection-langspanish.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:862d1045b4400fd1ee1734decd9b651449181f9be3efd17b7555fbc672411f18 +size 328 diff --git a/collection-langswedish.tar.xz b/collection-langswedish.tar.xz new file mode 100644 index 0000000..7a59a5e --- /dev/null +++ b/collection-langswedish.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4ad135732b2c2209f94bb896a5c9c21e7bb7b744d12dad5e56b60a5ce4d15fc +size 312 diff --git a/collection-langtibetan.tar.xz b/collection-langtibetan.tar.xz new file mode 100644 index 0000000..4ff5607 --- /dev/null +++ b/collection-langtibetan.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0814625764fb49cb6e33b214cb499299fd6e2f41306f979ff469c2ebb772c26 +size 308 diff --git a/collection-langturkmen.tar.xz b/collection-langturkmen.tar.xz new file mode 100644 index 0000000..7374ebb --- /dev/null +++ b/collection-langturkmen.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b242a4af8dd480de7787d0f07ef669eab9fcacee4a6ca0f797d83cf5d70b017 +size 312 diff --git a/collection-langvietnamese.tar.xz b/collection-langvietnamese.tar.xz new file mode 100644 index 0000000..77534df --- /dev/null +++ b/collection-langvietnamese.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98b7b64f17b7e336ae58392c897f75dcbe027dc7ed0809f1fa9192b30edd88fe +size 308 diff --git a/collection-latex.tar.xz b/collection-latex.tar.xz new file mode 100644 index 0000000..c6a6375 --- /dev/null +++ b/collection-latex.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:68ac49a0e064d4ea24dd809c2423140f5250dceda699013f11985c3e01c5f5a9 +size 496 diff --git a/collection-latexextra.tar.xz b/collection-latexextra.tar.xz new file mode 100644 index 0000000..013d27a --- /dev/null +++ b/collection-latexextra.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc849ac4b2514c587c056466d030b231ae3a4a82d4f6a719060e29b75f702ad2 +size 3840 diff --git a/collection-latexrecommended.tar.xz b/collection-latexrecommended.tar.xz new file mode 100644 index 0000000..7f74634 --- /dev/null +++ b/collection-latexrecommended.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a4bbbc830c9ac7996242a21bff712c6947a385004b608a9a43d6a4a5c18976d1 +size 608 diff --git a/collection-luatex.tar.xz b/collection-luatex.tar.xz new file mode 100644 index 0000000..ae33378 --- /dev/null +++ b/collection-luatex.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c46cede8311ce2c9c70e80a3427bc4e02c7c61cadb9844c4d80d6cfcf0b022d +size 468 diff --git a/collection-mathextra.tar.xz b/collection-mathextra.tar.xz new file mode 100644 index 0000000..f394bd2 --- /dev/null +++ b/collection-mathextra.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:725c45c40e27e694e9779b1e44b7c289e8cf5fb5040eb163b30adf7defe0c165 +size 552 diff --git a/collection-metapost.tar.xz b/collection-metapost.tar.xz new file mode 100644 index 0000000..35c6a47 --- /dev/null +++ b/collection-metapost.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a6a84b4e1ad7f20a645de5762b87a94c3ce059c7595d49989169ceeb989feb7 +size 500 diff --git a/collection-music.tar.xz b/collection-music.tar.xz new file mode 100644 index 0000000..06180f8 --- /dev/null +++ b/collection-music.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa7f025278a8df769dcfe9dee5fd41c397342bb1c55c1f088675e75d06f9c731 +size 356 diff --git a/collection-omega.tar.xz b/collection-omega.tar.xz new file mode 100644 index 0000000..4dda671 --- /dev/null +++ b/collection-omega.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c825d3bc6faaa18cee468e656ad61ba103a73df04f79d4e5a84ab90ac572c365 +size 364 diff --git a/collection-pictures.tar.xz b/collection-pictures.tar.xz new file mode 100644 index 0000000..6f246c3 --- /dev/null +++ b/collection-pictures.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab844017864ac48f66bc7c4de30f46ee905b4735d7f50613c78032eaaeb89eac +size 756 diff --git a/collection-plainextra.tar.xz b/collection-plainextra.tar.xz new file mode 100644 index 0000000..c6f6ace --- /dev/null +++ b/collection-plainextra.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:278f49e7618a8f4f7f8a1fc0d74f621ac86e86ebe10291c76e67969c06efc770 +size 456 diff --git a/collection-pstricks.tar.xz b/collection-pstricks.tar.xz new file mode 100644 index 0000000..29c7d14 --- /dev/null +++ b/collection-pstricks.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d24c9e521a3d1ffe5f592b4139aec0bd03779fd0f9ccf742f04820f3f096181 +size 652 diff --git a/collection-publishers.tar.xz b/collection-publishers.tar.xz new file mode 100644 index 0000000..60835f1 --- /dev/null +++ b/collection-publishers.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b6af7f282a858bced6ba6fbc8c2fcabb29be257e0b585bb8fddc845df66b6d0 +size 812 diff --git a/collection-science.tar.xz b/collection-science.tar.xz new file mode 100644 index 0000000..7ca3425 --- /dev/null +++ b/collection-science.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ac5029a2575f61eda8f74b8329ea7d7eba955f97e136fcd0fad62d3a5d39d69 +size 624 diff --git a/collection-texinfo.tar.xz b/collection-texinfo.tar.xz new file mode 100644 index 0000000..af3b683 --- /dev/null +++ b/collection-texinfo.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d4f897adffc12d0f26b3683941a01d67c01a027f850f60d86d2a75e471584737 +size 396 diff --git a/collection-xetex.tar.xz b/collection-xetex.tar.xz new file mode 100644 index 0000000..f922402 --- /dev/null +++ b/collection-xetex.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc35430219e0b165d700b6d8187b764bda1128bcb80c1a98892afc8baed9ed27 +size 496 diff --git a/dot.dvipsrc b/dot.dvipsrc new file mode 100644 index 0000000..4ad1b42 --- /dev/null +++ b/dot.dvipsrc @@ -0,0 +1,12 @@ +%% How to print, maybe with lp instead lpr, the priner +%% name has to be replaced by a real printer name +%% maybe the printer name found in $PRINTER +%% +%o | lpr -P +%o | lp -P + +%% If your default is A4 uncomment the line with A4 +%% otherwise you may choose Letter as your default. +%% +%t A4 +%t Letter diff --git a/fc-t1-texlive.conf b/fc-t1-texlive.conf new file mode 100644 index 0000000..50cad7a --- /dev/null +++ b/fc-t1-texlive.conf @@ -0,0 +1,14 @@ + + + + + + + + + + + + /usr/share/texmf/fonts/type1 + /usr/local/share/texmf/fonts/type1 + diff --git a/fc-texlive.conf b/fc-texlive.conf new file mode 100644 index 0000000..61b3a7a --- /dev/null +++ b/fc-texlive.conf @@ -0,0 +1,12 @@ + + + + + + + + + + /usr/share/texmf/fonts/opentype + /usr/local/share/texmf/fonts/opentype + diff --git a/fc-truetype-texlive.conf b/fc-truetype-texlive.conf new file mode 100644 index 0000000..0169959 --- /dev/null +++ b/fc-truetype-texlive.conf @@ -0,0 +1,12 @@ + + + + + + + + + + /usr/share/texmf/fonts/truetype + /usr/local/share/texmf/fonts/truetype + diff --git a/nobody.8 b/nobody.8 new file mode 100644 index 0000000..be3ac84 --- /dev/null +++ b/nobody.8 @@ -0,0 +1,63 @@ +'\" -*- coding: UTF-8 -*- +.\" Copyright (C) 2010 Werner Fink +.\" +.\" This program is free software; you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation; either version 2 of the License, or +.\" (at your option) any later version. +.\" +.\" This program is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public License +.\" along with this program; if not, write to the Free Software +.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +.\" +.TH NOBODY 8 "Jul 30, 2010" "" "Linux System Administrator's Manual" +.SH NAME +nobdy \- for user root run a specific program as user nobody +.SH SYNOPSIS +.B nobdy +.RB [ ls | find | false | true ] +.SH DESCRIPTION +.B Nobody +drops its privileges if called by the user +.I root +by switching over to the user +.I nobdy +in a clean environment. +Currently the following programs are supported: +.IP \fBls\fP +\- list directory contents +.IP \fBtrue\fP +\- do nothing, successfully +.IP \fBfalse\fP +\- do nothing, unsuccessfully +.IP \fBfind\fP +\- search for files in a directory hierarchy +.SH NOTES +For the program \fBfind\fP the options +.IR -exec , +.IR -execdir , +.IR -ok , +.I -okdir +are +.B not +supported. +.SH FILES +.IR /bin/ls , +.br +.IR /bin/true , +.br +.IR /bin/false , +.br +.I /usr/bin/find +.SH AUTHOR +2010 Werner Fink +.SH "SEE ALSO" +.BR ls (1), +.BR find (1), +.BR su (1), +.BR sudo (8). diff --git a/nobody.c b/nobody.c new file mode 100644 index 0000000..71d9f87 --- /dev/null +++ b/nobody.c @@ -0,0 +1,180 @@ +/* + * Nobody For user root run a specific program as user nobody + * + * Usage: nobody [ls|find|false|true] + * + * Copyright (C) 2010 Werner Fink + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +extern char **environ; + +/* + * This list is used to authenticate the program running. + * It is fixed at compile time to avoid a full class of + * dangers ... + */ +static struct { + const char *prog; + const char *run; +} *lp, list[] = +{ /* prog run */ + { "ls", "/bin/ls" }, + { "true", "/bin/true" }, + { "false", "/bin/false" }, + { "find", "/usr/bin/find" }, +#ifdef DEBUG + { "id", "/usr/bin/id" }, + { "printenv", "/usr/bin/printenv" }, +#endif + { 0, 0, }}; + +static struct { + const char *name; + const char *value; +} *ep, envp[] = +{ { "TERM", 0 }, + { "PATH", "/bin:/usr/bin" }, + { "POSIXLY_CORRECT",0 }, + { "NLSPATH", 0 }, + { "LANG", 0 }, + { "LC_ALL", 0 }, + { "LC_CTYPE", 0 }, + { "LC_COLLATE", 0 }, + { "LC_MESSAGES", 0 }, + { "COLUMNS", 0 }, + { "TABSIZE", 0 }, + { "TIME_STYLE", 0 }, + { "LS_COLORS", 0 }, + { "LS_BLOCK_SIZE", 0 }, + { "BLOCK_SIZE", 0 }, + { "BLOCKSIZE", 0 }, + { 0, 0 }}; + +int main(int argc, char *argv[]) +{ + char *program_name; + struct passwd *pwd; + uid_t ruid = getuid(); + uid_t euid = geteuid(); + gid_t rgid = getgid(); + + if (argc > 1) + program_name = argv[1]; + else + program_name = "true"; + argv++; + argc--; + + if (*program_name == '/') { + for (lp = list; lp->run && strcmp(program_name, lp->run ); lp++) ; + } else { + for (lp = list; lp->prog && strcmp(program_name, lp->prog); lp++) ; + } + + if (!lp->prog) { + errno = EBADRQC; + fprintf(stderr, "nobody: Usage:\n"); + fprintf(stderr, " nobody ["); + for (lp = list; lp->prog; lp++) + fprintf(stderr, "%s%c", lp->prog, (lp+1)->prog ? '|' : '\0'); + fprintf(stderr, "]\n"); + goto err; + } + + if (ruid == 0 || euid == 0) { + int initgrp = 0; + + if ((pwd = getpwnam("nobody")) == (struct passwd*)0) + goto err; + + if (ruid == 0) { + initgrp = 1; + ruid = pwd->pw_uid; + rgid = pwd->pw_gid; + } else { + pwd->pw_uid = ruid; + pwd->pw_gid = rgid; + } + + if (setregid(rgid, pwd->pw_gid)) + goto err; + if (initgrp && initgroups(pwd->pw_name, rgid)) + goto err; + if (setreuid(ruid, pwd->pw_uid)) + goto err; + + if (initgrp) { + + for (ep = envp; ep->name; ep++) { + if (ep->value) + continue; + ep->value = getenv(ep->name); + } + + clearenv(); + + if (setenv("HOME", pwd->pw_dir, 1) < 0) + goto err; + if (setenv("USER", pwd->pw_name, 1) < 0) + goto err; + if (setenv("LOGNAME", pwd->pw_name, 1) < 0) + goto err; + if (setenv("GROUP", pwd->pw_name, 1) < 0) + goto err; + if (setenv("SHELL", pwd->pw_shell, 1) < 0) + goto err; + + for (ep = envp; ep->name; ep++) { + if (!ep->value) + continue; + setenv(ep->name, ep->value, 1); + } + + if (strcmp(lp->prog, "find") == 0) { + int n; + for (n = 0; n < argc; n++) { + if (!argv[n] || *argv[n] == '\0') + continue; + if (strncmp(argv[n], "-exec", 5) == 0) { + errno = ENOTSUP; + goto err; + } + if (strncmp(argv[n], "-ok", 3) == 0) { + errno = ENOTSUP; + goto err; + } + } + } + } + } + + execve(lp->run, argv, environ); +err: + fprintf(stderr, "nobody: "); + perror(program_name); + return 1; +} diff --git a/rc.config.texlive b/rc.config.texlive new file mode 100644 index 0000000..67a0626 --- /dev/null +++ b/rc.config.texlive @@ -0,0 +1,12 @@ +## Path: Applications/TeX +## Description: +## Type: yesno +## Default: no +## Command: +# +# The automatical font generation of the TeX/LaTeX systems do +# locate the bitmap font into the directory /var/cache/fonts/. +# If CLEAR_TEXMF_FONTS is set to "yes" then this directory +# will be cleared from fonts not used in the last 20 days. +# +CLEAR_TEXMF_FONTS="no" diff --git a/scheme-basic.tar.xz b/scheme-basic.tar.xz new file mode 100644 index 0000000..f1e93e1 --- /dev/null +++ b/scheme-basic.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17a6bc72c3ec6bb503f307217936964391c4c3752bd009b0eb2b38f1c1304aec +size 440 diff --git a/scheme-context.tar.xz b/scheme-context.tar.xz new file mode 100644 index 0000000..5fc474f --- /dev/null +++ b/scheme-context.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e8f952f5f508e92c71d944b50c4bdedfcc1282476a08711450e9125a578a0f4 +size 388 diff --git a/scheme-full.tar.xz b/scheme-full.tar.xz new file mode 100644 index 0000000..ce3a8f1 --- /dev/null +++ b/scheme-full.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab71fad5f7faf7ab9b511b4deeaa972120d877091e655bbf8ced0d0a04234958 +size 780 diff --git a/scheme-gust.tar.xz b/scheme-gust.tar.xz new file mode 100644 index 0000000..bea8929 --- /dev/null +++ b/scheme-gust.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec12ebb635fc6fa558e20633f477c269510ad6e503198c971207feb0c294dadf +size 624 diff --git a/scheme-medium.tar.xz b/scheme-medium.tar.xz new file mode 100644 index 0000000..30436d4 --- /dev/null +++ b/scheme-medium.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:63e7459c12cdc2c802bb86f28d0fb07d7838e1da4e62ecbcdb59aafbff82b38a +size 552 diff --git a/scheme-minimal.tar.xz b/scheme-minimal.tar.xz new file mode 100644 index 0000000..c50edda --- /dev/null +++ b/scheme-minimal.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:723263b980691835c3bb0cfb8b167f49b4c25d40419feeb91a069c952b75ec16 +size 428 diff --git a/scheme-tetex.tar.xz b/scheme-tetex.tar.xz new file mode 100644 index 0000000..781c065 --- /dev/null +++ b/scheme-tetex.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c0453d1a975e2c45b71e71c18ec80c1c67f2b0e272bea7a3e4712f063bdf7acb +size 812 diff --git a/scheme-xml.tar.xz b/scheme-xml.tar.xz new file mode 100644 index 0000000..1346b8b --- /dev/null +++ b/scheme-xml.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c82c4e499b38228ff473d548020c5bc47cb50740f05e414d6c0e3c0617a5e941 +size 460 diff --git a/source-64.dif b/source-64.dif new file mode 100644 index 0000000..603e625 --- /dev/null +++ b/source-64.dif @@ -0,0 +1,26 @@ +--- configure ++++ configure 2009-08-28 15:44:29.774401466 +0000 +@@ -19120,6 +19120,10 @@ rm -f core conftest.err conftest.$ac_obj + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. ++ if test -n "$ARCH_LIB" ; then ++ sys_lib_search_path_spec="/usr/${ARCH_LIB} /${ARCH_LIB}" ++ sys_lib_dlsearch_path_spec="/usr/${ARCH_LIB} /${ARCH_LIB}" ++ fi + dynamic_linker='GNU/Linux ld.so' + ;; + +--- m4/libtool.m4 ++++ m4/libtool.m4 2009-08-28 15:46:57.481902434 +0000 +@@ -2622,6 +2622,10 @@ linux* | k*bsd*-gnu) + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. ++ if test -n "$ARCH_LIB" ; then ++ sys_lib_search_path_spec="/usr/${ARCH_LIB} /${ARCH_LIB}" ++ sys_lib_dlsearch_path_spec="/usr/${ARCH_LIB} /${ARCH_LIB}" ++ fi + dynamic_linker='GNU/Linux ld.so' + ;; + diff --git a/source-a2ping.dif b/source-a2ping.dif new file mode 100644 index 0000000..189a5b2 --- /dev/null +++ b/source-a2ping.dif @@ -0,0 +1,11 @@ +--- texk/texlive/linked_scripts/a2ping/a2ping.pl ++++ texk/texlive/linked_scripts/a2ping/a2ping.pl 2011-10-29 22:06:11.000000000 -0500 +@@ -1677,7 +1677,7 @@ showpage quit + ## print STDERR $res; + error $?==11 ? "segmentation fault in $GS" : "not a GS output from $GS ($?)" + if !defined $res # BUGFIX at Sun Mar 7 18:51:34 CET 2004 +- or $res!~s/\A(?:\w+ Ghostscript \d|Copyright .* artofcode ).*\n// # AFPL Ghostscript 6.50 (2000-12-02) ++ or $res!~s/\A(?:\w+ Ghostscript +\d|Copyright .* artofcode ).*\n// # AFPL Ghostscript 6.50 (2000-12-02) + or $res!~s/.*?^bbox-begin\n//m; + if ($res!~s/\nbbox-success\n\Z(?!\n)/\n/) { + warning # not `error', mpost(1) `prologues:=0; ... btex fonts' output won't compile diff --git a/source-arraysubs.dif b/source-arraysubs.dif new file mode 100644 index 0000000..8b9a6f0 --- /dev/null +++ b/source-arraysubs.dif @@ -0,0 +1,24 @@ +--- texk/afm2pl/afm2pl.c ++++ texk/afm2pl/afm2pl.c 2009-11-11 07:45:42.783429403 +0000 +@@ -2107,7 +2107,7 @@ static void + readargs(int argc, char **argv) + { + register int i; +- int fdims[3]; ++ int fdims[5]; + + /* skip argv[0] and look at the rest. */ + argv++; +--- texk/web2c/bibtex.web ++++ texk/web2c/bibtex.web 2009-11-12 11:50:51.699429941 +0000 +@@ -4315,9 +4315,9 @@ special markers |quote_next_fn| and |end + |wiz_functions| array. + + @d insert_fn_loc(#) == begin +- singl_function[single_ptr] := #; + if (single_ptr = single_fn_space) then + singl_fn_overflow; ++ singl_function[single_ptr] := #; + incr(single_ptr); + end + diff --git a/source-configure.dif b/source-configure.dif new file mode 100644 index 0000000..334cb50 --- /dev/null +++ b/source-configure.dif @@ -0,0 +1,95 @@ +--- configure ++++ configure 2011-09-13 14:13:35.252427069 +0000 +@@ -4688,13 +4688,6 @@ if test "${with_libgs_libdir+set}" = set + fi + + +-## texk/dvisvgm/ac/libgs.ac: configure.ac fragment for the TeX Live subdirectory texk/dvisvgm/ +-## configure checks for dvisvgm and libgs +-if test "x$enable_native_texlive_build:$with_system_libgs" = xyes:yes; then +- as_fn_error $? "you can not use system libraries for a native TeX Live build" "$LINENO" 5 +-fi +- +- + ## texk/gsftopk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/gsftopk/ + ## configure options and TL libraries required for gsftopk + # Check whether --enable-gsftopk was given. +@@ -20437,9 +20430,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test "x$syslib_status" = xno; then + as_fn_error $? "some requested system libraries failed" "$LINENO" 5 + fi +-if test "x$syslib_used:$enable_native_texlive_build" = xyes:yes; then +- as_fn_error $? "you can not use system libraries for a native TeX Live build" "$LINENO" 5 +-fi + CPPFLAGS=$kpse_save_CPPFLAGS + LIBS=$kpse_save_LIBS + +--- configure.ac ++++ configure.ac 2011-09-13 14:11:39.156427284 +0000 +@@ -131,9 +131,6 @@ KPSE_FOR_PKGS([sys_libs], [m4_sinclude([ + if test "x$syslib_status" = xno; then + AC_MSG_ERROR([some requested system libraries failed]) + fi +-if test "x$syslib_used:$enable_native_texlive_build" = xyes:yes; then +- AC_MSG_ERROR([you can not use system libraries for a native TeX Live build]) +-fi + KPSE_RESTORE_FLAGS + + AM_CONDITIONAL([cross], [test "x$cross_compiling" = xyes]) +--- libs/configure ++++ libs/configure 2011-09-13 14:11:51.207926324 +0000 +@@ -4021,13 +4021,6 @@ if test "${with_libgs_libdir+set}" = set + fi + + +-## texk/dvisvgm/ac/libgs.ac: configure.ac fragment for the TeX Live subdirectory texk/dvisvgm/ +-## configure checks for dvisvgm and libgs +-if test "x$enable_native_texlive_build:$with_system_libgs" = xyes:yes; then +- as_fn_error $? "you can not use system libraries for a native TeX Live build" "$LINENO" 5 +-fi +- +- + ## texk/gsftopk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/gsftopk/ + ## configure options and TL libraries required for gsftopk + # Check whether --enable-gsftopk was given. +--- texk/configure ++++ texk/configure 2011-09-13 14:12:16.719926873 +0000 +@@ -4041,13 +4041,6 @@ if test "${with_libgs_libdir+set}" = set + fi + + +-## texk/dvisvgm/ac/libgs.ac: configure.ac fragment for the TeX Live subdirectory texk/dvisvgm/ +-## configure checks for dvisvgm and libgs +-if test "x$enable_native_texlive_build:$with_system_libgs" = xyes:yes; then +- as_fn_error $? "you can not use system libraries for a native TeX Live build" "$LINENO" 5 +-fi +- +- + ## texk/gsftopk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/gsftopk/ + ## configure options and TL libraries required for gsftopk + # Check whether --enable-gsftopk was given. +--- texk/dvisvgm/ac/libgs.ac ++++ texk/dvisvgm/ac/libgs.ac 2011-09-13 14:12:02.947925410 +0000 +@@ -4,6 +4,3 @@ dnl Copyright (C) 2009 Peter Breitenlohn + dnl You may freely use, modify and/or distribute this file. + dnl + ## configure checks for dvisvgm and libgs +-if test "x$enable_native_texlive_build:$with_system_libgs" = xyes:yes; then +- AC_MSG_ERROR([you can not use system libraries for a native TeX Live build]) +-fi +--- utils/configure ++++ utils/configure 2011-09-13 14:12:29.125501986 +0000 +@@ -4018,13 +4018,6 @@ if test "${with_libgs_libdir+set}" = set + fi + + +-## texk/dvisvgm/ac/libgs.ac: configure.ac fragment for the TeX Live subdirectory texk/dvisvgm/ +-## configure checks for dvisvgm and libgs +-if test "x$enable_native_texlive_build:$with_system_libgs" = xyes:yes; then +- as_fn_error $? "you can not use system libraries for a native TeX Live build" "$LINENO" 5 +-fi +- +- + ## texk/gsftopk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/gsftopk/ + ## configure options and TL libraries required for gsftopk + # Check whether --enable-gsftopk was given. diff --git a/source-dvipng.dif b/source-dvipng.dif new file mode 100644 index 0000000..4d7e5e9 --- /dev/null +++ b/source-dvipng.dif @@ -0,0 +1,11 @@ +--- texk/dvipng/dvipng-1.14/vf.c ++++ texk/dvipng/dvipng-1.14/vf.c 2010-04-12 14:35:53.414925428 +0000 +@@ -115,7 +115,7 @@ void InitVF(struct font_entry * tfontp) + tcharptr->tfmw = (int32_t) + ((int64_t) tcharptr->tfmw * tfontp->s / (1 << 20)); + DEBUG_PRINT(DEBUG_VF,(" (%d)",tcharptr->tfmw)); +- if (c >= NFNTCHARS) /* Only positive for now */ ++ if (c < 0 || c >= NFNTCHARS) /* Only positive for now */ + Fatal("VF font %s exceeds char numbering limit",tfontp->name); + tfontp->chr[c] = tcharptr; + tcharptr->data=position; diff --git a/source-dviutils.dif b/source-dviutils.dif new file mode 100644 index 0000000..f0e75d9 --- /dev/null +++ b/source-dviutils.dif @@ -0,0 +1,1392 @@ +--- m4/kpse-kpathsea-flags.m4 ++++ m4/kpse-kpathsea-flags.m4 2010-11-12 11:51:59.947926203 +0000 +@@ -19,7 +19,7 @@ + AC_DEFUN([KPSE_KPATHSEA_FLAGS], + [AC_REQUIRE([KPSE_SAVE_FLAGS])[]dnl + _KPSE_TEXLIB_FLAGS([kpathsea], [kpathsea], [lt], +- [-IBLD/texk -ISRC/texk], [BLD/texk/kpathsea/libkpathsea.la], [], ++ [-IBLD/texk/kpathsea -ISRC/texk/kpathsea -IBLD/texk -ISRC/texk], [BLD/texk/kpathsea/libkpathsea.la], [], + [${top_srcdir}/../kpathsea/*.[ch]], + [${top_builddir}/../kpathsea/paths.h]) + m4_if(m4_index([ $1 ], [ no-debug ]), [-1], +--- texk/seetexk/scaletfm.c ++++ texk/seetexk/scaletfm.c 2009-08-28 14:13:32.873901460 +0000 +@@ -6,7 +6,7 @@ + */ + + #ifndef lint +-static char rcsid[] = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/scaletfm.c,v 3.2 89/11/23 16:34:43 chris Exp $"; ++static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/scaletfm.c,v 3.2 89/11/23 16:34:43 chris Exp $"; + #endif + + #include "types.h" +@@ -87,6 +87,7 @@ ScaleOneWidth(t, z) + * Scale a set of glyphs [l..h) in font f according to f->f_dvimag + * (that is, set g_tfmwidth from g_rawtfmwidth). + */ ++void + ScaleGlyphs(f, l, h) + register struct font *f; + int l, h; +--- texk/seetexk/rstfont.c ++++ texk/seetexk/rstfont.c 2009-08-28 14:13:32.873901460 +0000 +@@ -12,18 +12,22 @@ + */ + + #ifndef lint +-static char rcsid[] = "$Header$"; ++static char rcsid[] __attribute__ ((unused)) = "$Header$"; + #endif + ++#include + #include + #include + #include ++#include + #include + #include "types.h" + #include "error.h" + #include "font.h" + #include "fio.h" + ++extern int FontHasGlyphs(); ++ + /* + * RST (Imagen's font format) font operations. + */ +@@ -77,12 +81,6 @@ struct rst_details { + */ + #define ftord(f) ((struct rst_details *)(f)->f_details) + +-#if !defined( WIN32 ) && !defined( _AMIGA ) +-extern errno; +-char *malloc(); +-long ftell(); +-#endif +- + /* + * Read an RST file. + */ +--- texk/seetexk/search.c ++++ texk/seetexk/search.c 2009-08-28 14:13:32.877901585 +0000 +@@ -19,6 +19,7 @@ + * it runs in increasing-key-value sequence). + */ + ++#include + #include "types.h" + #include "search.h" + +@@ -30,10 +31,6 @@ + + static int DOffset; /* part of alignment code */ + +-#ifndef KPATHSEA +-char *malloc(), *realloc(); +-#endif +- + struct search * + SCreate(unsigned int dsize) + { +--- texk/seetexk/scanpost.c ++++ texk/seetexk/scanpost.c 2009-08-28 14:13:32.873901460 +0000 +@@ -6,7 +6,7 @@ + */ + + #ifndef lint +-static char rcsid[] = "$Header: /usr/local/src/SeeTeX/libtex/RCS/scanpost.c,v 1.2 90/07/10 14:33:23 grunwald Exp Locker: grunwald $"; ++static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/local/src/SeeTeX/libtex/RCS/scanpost.c,v 1.2 90/07/10 14:33:23 grunwald Exp Locker: grunwald $"; + #endif + + /* +@@ -20,7 +20,9 @@ static char rcsid[] = "$Header: /usr/loc + #include "gripes.h" + #include "postamble.h" + +-ScanPostAmble(f, headerfunc, fontfunc) ++extern int FindPostAmble (); ++ ++int ScanPostAmble(f, headerfunc, fontfunc) + register FILE *f; + void (*headerfunc)(); + register void (*fontfunc)(); +--- texk/seetexk/sdecode.c ++++ texk/seetexk/sdecode.c 2009-08-28 14:13:32.873901460 +0000 +@@ -6,7 +6,7 @@ + */ + + #ifndef lint +-static char rcsid[] = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/sdecode.c,v 3.4 89/11/06 15:01:07 chris Exp $"; ++static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/sdecode.c,v 3.4 89/11/06 15:01:07 chris Exp $"; + #endif + + #include +@@ -18,6 +18,7 @@ static char rcsid[] = "$Header: /usr/src + #include "types.h" + #include "error.h" + #include "sdecode.h" ++#include "gripes.h" + + static char cclass[256]; /* XXX assumes 8-bit char */ + #define CCL_SPACE 0x01 /* white space */ +@@ -26,7 +27,7 @@ static char cclass[256]; /* XXX assumes + static int sdset; /* flag says whether cclass[] set up */ + + static void args(), badarg(); +-static int scan(struct decode_info *di, char **fmt, ...), scan_i(), scan_d(); ++static int scan_i(), scan_d(); + + extern char *strsave(); + +@@ -84,6 +85,7 @@ struct decode_info { + char *di_kw; /* the keyword */ + int di_bkw; /* true iff keyword is in static buffer */ + }; ++static int scan(register struct decode_info * di,...); + + /* + * `Edit' the text in the buffer in-place. +@@ -398,7 +400,7 @@ args(tp, di) + register struct decode_info *di; + { + char *fmt; +- int n, room, f1; ++ int n = 0, room, f1; + i32 *ip, i[4]; + double d[2]; + +@@ -600,17 +602,14 @@ out: + + #else + static int +-scan(va_alist) +- va_dcl ++scan(register struct decode_info * di,...) + { +- register struct decode_info *di; + register char *fmt; + register int c; + char **fmtp; + va_list ap; + +- va_start(ap); +- di = va_arg(ap, struct decode_info *); ++ va_start(ap, di); + fmtp = va_arg(ap, char **); + fmt = *fmtp; + while ((c = *fmt++) != 0) { +--- texk/seetexk/a4toa5 ++++ texk/seetexk/a4toa5 2010-11-12 11:50:39.552426619 +0000 +@@ -0,0 +1,26 @@ ++#!/bin/csh -f ++# 1993 (c) Werner Fink ++# ++ ++if (${#argv} <= 1) then ++ echo " ${0}: Usage: infile outfile" ++ exit ++endif ++ ++set NumP=`mydvichk $1 | sed -e 's/totalpages=//g'` ++ ++if (${NumP} % 2) then ++ echo " Odd number of pages --- this doesn't work" ++ echo " Please use odd2even: This gives an additional first pages" ++ echo " Or" ++ echo " use dvibook: It sort the pages in book form" ++ exit ++endif ++ ++echo "${0}: For Printing: dvips -t landscape outfile" ++echo "${0}: For Viewing: xdvi -paper a4r outfile" ++ ++# ++#exec dvitodvi -q '2:707@0(-5.5mm,-10mm)+1(204mm,-10mm)' $1 $2 ++# ++exec dvitodvi -q '2:707@0(-5.5mm,-10mm)+1(190mm,-10mm)' $1 $2 +--- texk/seetexk/bcopy.c ++++ texk/seetexk/bcopy.c 2009-08-28 14:13:32.721901870 +0000 +@@ -1,5 +1,6 @@ ++#ifndef __GNUC__ + #ifndef lint +-static char rcsid[] = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/bcopy.c,v 3.1 89/08/22 21:42:07 chris Exp $"; ++static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/bcopy.c,v 3.1 89/08/22 21:42:07 chris Exp $"; + #endif + + /* +@@ -7,13 +8,12 @@ static char rcsid[] = "$Header: /usr/src + * This should be rewritten to be as fast as possible for your + * machine. + */ +-void bcopy(from, to, count) +- register char *from, *to; ++char *bcopy(from, to, count) ++ char *from, *to; + register int count; + { +- + if (from == to) +- return; ++ return from; + if (from > to) { + while (--count >= 0) + *to++ = *from++; +@@ -23,4 +23,6 @@ void bcopy(from, to, count) + while (--count >= 0) + *--to = *--from; + } ++ return from; + } ++#endif +--- texk/seetexk/bzero.c ++++ texk/seetexk/bzero.c 2009-08-28 14:13:32.721901870 +0000 +@@ -1,5 +1,5 @@ + #ifndef lint +-static char rcsid[] = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/bzero.c,v 3.1 89/08/22 21:42:12 chris Exp $"; ++static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/bzero.c,v 3.1 89/08/22 21:42:12 chris Exp $"; + #endif + + /* +@@ -7,7 +7,7 @@ static char rcsid[] = "$Header: /usr/src + * This should be rewritten to be as fast as possible for your + * machine. + */ +-bzero(addr, count) ++void bzero(addr, count) + register char *addr; + register int count; + { +--- texk/seetexk/configure ++++ texk/seetexk/configure 2009-09-04 13:23:18.898401799 +0000 +@@ -14169,7 +14169,7 @@ if test "x$with_kpathsea_libdir" != x && + KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS" + fi + else +- KPATHSEA_INCLUDES=`echo '-IBLD/texk -ISRC/texk' | sed \ ++ KPATHSEA_INCLUDES=`echo '-IBLD/texk/kpathsea -ISRC/texk/kpathsea -IBLD/texk -ISRC/texk' | sed \ + -e "s,SRC/,$kpse_SRC/,g" \ + -e "s,BLD/,$kpse_BLD/,g"` + KPATHSEA_LIBS=`echo 'BLD/texk/kpathsea/libkpathsea.la' | sed \ +--- texk/seetexk/conv.c ++++ texk/seetexk/conv.c 2009-08-28 14:13:32.721901870 +0000 +@@ -6,7 +6,7 @@ + */ + + #ifndef lint +-static char rcsid[] = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/conv.c,v 3.1 89/08/22 21:48:01 chris Exp $"; ++static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/conv.c,v 3.1 89/08/22 21:48:01 chris Exp $"; + #endif + + /* +--- texk/seetexk/dvi_draw.c ++++ texk/seetexk/dvi_draw.c 2009-08-28 14:13:32.721901870 +0000 +@@ -57,11 +57,12 @@ + * it's worth it. + */ + +-static char *rcsid="$Header: /usr/local/src/Uiuctex/libtex/RCS/dvi_draw.c,v 1.3 88/02/19 17:00:34 grunwald Exp Locker: grunwald $" ; ++static char *rcsid __attribute__ ((unused)) ="$Header: /usr/local/src/Uiuctex/libtex/RCS/dvi_draw.c,v 1.3 88/02/19 17:00:34 grunwald Exp Locker: grunwald $" ; + + #include + #include + #include ++#include + + #define MAXPOINTS 300 /* Max points in a path */ + #define TWOPI (3.14159265359*2.0) +@@ -85,6 +86,7 @@ extern void dot_at(), line_btw(), do_att + + extern int dviDPI, currentShrink, shrinkFactor[]; + ++void draw_ellipse(); + + /* + * Issue warning/error messages +@@ -160,7 +162,7 @@ int dotted; + int i, numdots, x0, y0, x1, y1; + int cx0, cy0, cx1, cy1; + float inchesperdash; +- double d, spacesize, a, b, dx, dy, milliperdash; ++ double d, spacesize, a, b = 0.0, dx, dy, milliperdash; + + if (sscanf(cp, " %f ", &inchesperdash) != 1) { + Warning("illegal format for dotted/dashed line: %s", cp); +@@ -298,13 +300,10 @@ char *cp; + */ + void flush_spline() + { +- int xp, yp, N, lastx=(-1), lasty; ++ int xp, yp, N, lastx=(-1), lasty = -1; + int t1, t2, t3, steps, j; + register int i, w; + +-#ifdef lint +- lasty = -1; +-#endif + N = path_len + 1; + xx[0] = xx[1]; yy[0] = yy[1]; + xx[N] = xx[N-1]; yy[N] = yy[N-1]; +@@ -362,7 +361,7 @@ void blacken_last() + /* + * Draw an ellipse with the indicated center and radices. + */ +-draw_ellipse(xc, yc, xr, yr) ++void draw_ellipse(xc, yc, xr, yr) + int xc, yc, xr, yr; + { + double angle, theta; +--- texk/seetexk/dvibook.c ++++ texk/seetexk/dvibook.c 2009-08-28 14:13:32.721901870 +0000 +@@ -27,6 +27,7 @@ extern char *optarg; + extern int optind; + #endif + ++#include + #include "types.h" + #include "dviclass.h" + #include "dvicodes.h" +@@ -35,6 +36,8 @@ extern int optind; + #include "gripes.h" + #include "search.h" + #include ++#include ++#include + #include + #include "seek.h" + +@@ -101,9 +104,6 @@ i32 Count[10]; /* the 10 \count variabl + /* save some string space: we use this a lot */ + char writeerr[] = "error writing DVI file"; + +-#ifndef KPATHSEA +-char *malloc(), *realloc(); +-#endif + /* + * You may get lint warnings about sprintf's return value. + * Older versions of 4BSD have `char *sprintf()'. ANSI and +--- texk/seetexk/dviconcat.c ++++ texk/seetexk/dviconcat.c 2009-08-28 14:31:09.497902049 +0000 +@@ -25,6 +25,8 @@ extern char *optarg; + extern int optind; + #endif + ++#include ++#include + #include "types.h" + #include "dviclass.h" + #include "dvicodes.h" +@@ -87,15 +89,9 @@ i16 DVIStackSize; /* max of all stack s + char writeerr[] = "error writing DVI file"; + + static void HandleDVIFile(void); +-#ifdef _AMIGA + #define bcmp(s1, s2, len) memcmp(s1, s2, len) + #define bzero(s, len) memset(s, '\0', len) + #define index(s, c) strchr(s, c) +-#endif /* _AMIGA */ +- +-#ifndef KPATHSEA +-char *malloc(), *realloc(); +-#endif + + /* extern int getopt(int, char **, char*); */ + +--- texk/seetexk/dviselect.c ++++ texk/seetexk/dviselect.c 2009-08-28 14:32:32.286401443 +0000 +@@ -38,7 +38,10 @@ extern int optind; + #include "gripes.h" + #include "search.h" + #include ++#include + #include ++#include ++#include + + #define white(x) ((x) == ' ' || (x) == '\t' || (x) == ',') + +@@ -148,15 +151,9 @@ static int ParsePages(char *); + static void HandleDVIFile(void); + static void PutFontSelector(i32); + +-#ifdef _AMIGA + #define bcmp(s1, s2, len) memcmp(s1, s2, len) + #define bzero(s, len) memset(s, '\0', len) + #define index(s, c) strchr(s, c) +-#endif /* _AMIGA */ +- +-#ifndef KPATHSEA +-char *malloc(), *realloc(); +-#endif /* not KPATHSEA */ + + /* + * You may get lint warnings about sprintf's return value. +@@ -550,7 +547,7 @@ Usage: %s [-s] [-i infile] [-o outfile] + static struct pagelist * + InstallPL(struct pagesel *ps, int n, int absolute) + { +- register struct pagelist *pl; ++ struct pagelist *pl; + + pl = (struct pagelist *)malloc(sizeof *pl); + if (pl == NULL) +--- texk/seetexk/dvistate.c ++++ texk/seetexk/dvistate.c 2009-08-28 14:13:32.729901520 +0000 +@@ -6,7 +6,7 @@ + */ + + #ifndef lint +-static char rcsid[] = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/dvistate.c,v 1.1 89/08/22 21:49:03 chris Exp $"; ++static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/dvistate.c,v 1.1 89/08/22 21:49:03 chris Exp $"; + #endif + + /* +@@ -14,6 +14,7 @@ static char rcsid[] = "$Header: /usr/src + */ + + #include ++#include + #include "types.h" + #include "conv.h" + #include "dvicodes.h" +@@ -35,10 +36,6 @@ static int s_errs; + + static void pre(), post(), fntdef(); + +-#if !defined( WIN32 ) && !defined( _AMIGA ) +-char *malloc(); +-#endif +- + /* + * Read through the postamble and the preamble and set up the + * global DVI state. Each font is passed to (*fontfn)(). +--- texk/seetexk/dvistuff.c ++++ texk/seetexk/dvistuff.c 2009-08-28 14:13:32.729901520 +0000 +@@ -32,17 +32,23 @@ + */ + + #include ++#include ++#include + #include + + #include "dvistuff.h" /* includes types & fonts */ + +-static char *rcsid="$Header: /home/reed/grunwald/Iptex/drivers/RCS/dvistuff.c,v 1.17 88/07/07 23:25:32 grunwald Exp Locker: grunwald $" ; ++static char *rcsid __attribute__ ((unused)) ="$Header: /home/reed/grunwald/Iptex/drivers/RCS/dvistuff.c,v 1.17 88/07/07 23:25:32 grunwald Exp Locker: grunwald $" ; + + #include "dviclass.h" + #include "dvicodes.h" + #include "postamble.h" + #include "search.h" + #include "fio.h" ++#include "error.h" ++#include "gripes.h" ++ ++extern void SkipFontDef(); + + int dviHH = -1; /* current horizontal position, in DEVs */ + int dviVV = -1; /* current vertical position, in DEVs */ +@@ -244,7 +250,7 @@ register struct PostAmbleFont *p; + register struct fontinfo *fi; + register struct font *f; + +- char *fname; ++ char *fname = NULL; + int def = S_CREATE | S_EXCL; + + fi = (struct fontinfo *) SSearch(FontFinder, p->paf_DVIFontIndex, +@@ -573,7 +579,7 @@ dviPreparePage(page) + int page; + { + register int c; +- register i32 p; ++ register i32 p = 0; + int advance; + + if (page < 0) { +@@ -1139,7 +1145,7 @@ int shrinkW; + printf("New glyph:\n"); + seeGlyph(shrunkRaster, shrunkHeight, shrunkBytesWide); + } +-#endif UNDEF ++#endif /* UNDEF */ + + ngly = (struct glyph *) malloc(sizeof(struct glyph)); + bzero(ngly, sizeof(struct glyph)); +@@ -1187,4 +1193,4 @@ int w; + } + + +-#endif UNDEF ++#endif /* UNDEF */ +--- texk/seetexk/dvistuff.h ++++ texk/seetexk/dvistuff.h 2009-08-28 14:13:32.729901520 +0000 +@@ -31,7 +31,7 @@ + * + */ + +-static char *dvistuff_header_rcsid="$Header: /home/reed/grunwald/Iptex/drivers/RCS/dvistuff.h,v 1.11 89/02/15 16:31:56 grunwald Exp $" ; ++static char *dvistuff_header_rcsid __attribute__ ((unused)) ="$Header: /home/reed/grunwald/Iptex/drivers/RCS/dvistuff.h,v 1.11 89/02/15 16:31:56 grunwald Exp $" ; + + /* + * Include the following from the CTex distribution +--- texk/seetexk/dvitodvi.c ++++ texk/seetexk/dvitodvi.c 2009-08-28 14:13:32.729901520 +0000 +@@ -27,6 +27,7 @@ extern char *optarg; + extern int optind; + #endif + ++#include + #include "types.h" + #include "dviclass.h" + #include "dvicodes.h" +@@ -35,6 +36,8 @@ extern int optind; + #include "gripes.h" + #include "search.h" + #include ++#include ++#include + #include + + #define white(x) ((x) == ' ' || (x) == '\t' || (x) == ',') +@@ -71,6 +74,7 @@ struct fontinfo { + i32 Width; /* width of page */ + i32 Height; /* height of page */ + i32 Magnification; /* Magnification of pages */ ++i32 MyMag; + int Modulo; /* page spec modulo */ + struct pagespec *PageSpecs; /* page specification list */ + +@@ -105,9 +109,6 @@ i32 Count[10]; /* the 10 \count variabl + + /* save some string space: we use this a lot */ + char writeerr[] = "error writing DVI file"; +-#ifndef KPATHSEA +-char *malloc(), *realloc(); +-#endif + + static void WriteFont(struct fontinfo *fi); + static void PutFontSelector(i32 index); +@@ -168,6 +169,15 @@ scale(i32 whole, int num, int den, i32 s + return (v) ; + } + ++i32 myscale(i32 whole, i32 verus, i32 sf) ++{ ++ i32 v; ++ ++ v = (i32) (( (double)whole * ( (double)sf / (double)verus ) ) + 0.5 ); ++ return(v); ++} ++ ++ + struct pagespec { + int reversed, pageno, add; + i32 xoff, yoff; +@@ -275,6 +285,8 @@ parsedimen(char **sp) + fac = Height; + s++; + } ++ if (MyMag) ++ fac = myscale(fac,MyMag,1000); + whole = scale(whole, num, den, fac) ; + *sp = s; + return (neg ? -whole : whole); +@@ -473,9 +485,15 @@ HandlePostAmble(void) + PutLong(outf, Denominator); + PutLong(outf, DVIMag); + c = GetLong(inf); +- PutLong(outf, c); /* tallest page height */ ++ if ( c >= Height ) ++ PutLong(outf, c); /* tallest page height */ ++ else ++ PutLong(outf, Height); + c = GetLong(inf); +- PutLong(outf, c); /* widest page width */ ++ if ( c >= Width ) ++ PutLong(outf, c); /* widest page width */ ++ else ++ PutLong(outf, Width); + c = GetWord(inf)+1; + PutWord(outf, c); /* DVI stack size */ + PutWord(outf, NumberOfOutputPages); +@@ -568,7 +586,8 @@ HandlePreAmble(void) + DVIFileName, DVI_VERSION); + Numerator = GetLong(inf); + Denominator = GetLong(inf); +- DVIMag = GetLong(inf) * Magnification / 1000; ++ MyMag = GetLong(inf); ++ DVIMag = MyMag * Magnification / 1000; + putbyte(outf, DVI_PRE); + putbyte(outf, DVI_VERSION); + PutLong(outf, Numerator); +@@ -595,6 +614,7 @@ main(int argc, char **argv) + Width = 0; + Height = 0; + Magnification = 1000; ++ MyMag = 0; + Modulo = 1; + + ProgName = *argv; +@@ -691,12 +711,16 @@ Usage: %s [-q] [-i infile] [-o outfile] + if (fseek(inf, 16L, 1) == -1) + error(1, -1, "can't seek postamble"); + if (Height == 0) /* get height from postamble */ +- Height = GetLong(inf); ++ Height = myscale(GetLong(inf),1000,MyMag); + else + (void) GetLong(inf); /* ignore height */ + if (Width == 0) /* get width from postamble */ +- Width = GetLong(inf); ++ Width = myscale(GetLong(inf),1000,MyMag); ++ else ++ (void) GetLong(inf); + PageSpecs = ParseSpecs(specstring, 1); ++ Height = myscale(Height,MyMag,1000); ++ Width = myscale(Width,MyMag,1000); + + HandleDVIFile(); + HandlePostAmble(); +--- texk/seetexk/error.c ++++ texk/seetexk/error.c 2010-11-12 11:52:47.916425348 +0000 +@@ -10,7 +10,12 @@ + * optionally quit. + * + */ ++#include + #include ++#include ++#include ++#include ++#include + + #ifdef HAVE_CONFIG_H + #include +@@ -22,20 +27,11 @@ + + extern char *ProgName; /* program name from argv[0] */ + +-#include +-#ifndef errno +-extern int errno; +-#endif +- + static FILE *trap_file; /* error diversion file, if any */ + static void (*trap_fn)(int, const char *); /* trap function */ + static char *trap_buf; /* buffer for trapped error strings */ + static int trap_size; /* size of trap_buf */ + +-#ifndef KPATHSEA +-extern char *malloc(), *realloc(); +-#endif +- + #if !defined (HAVE_STRERROR) && !defined (strerror) + static char * + strerror (int errnum) +--- texk/seetexk/findpost.c ++++ texk/seetexk/findpost.c 2009-08-28 14:13:32.729901520 +0000 +@@ -6,7 +6,7 @@ + */ + + #ifndef lint +-static char rcsid[] = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/findpost.c,v 2.3 89/08/22 21:50:11 chris Exp $"; ++static char rcsid[] __attribute__ ((unused))= "$Header: /usr/src/local/tex/local/mctex/lib/RCS/findpost.c,v 2.3 89/08/22 21:50:11 chris Exp $"; + #endif + + /* +@@ -35,7 +35,7 @@ static char rcsid[] = "$Header: /usr/src + long ftell(); /* should be declared in stdio.h */ + #endif + +-FindPostAmble(f) ++int FindPostAmble(f) + register FILE *f; + { + register long offset; +--- texk/seetexk/font.c ++++ texk/seetexk/font.c 2009-08-28 14:13:32.777901505 +0000 +@@ -6,7 +6,7 @@ + */ + + #ifndef lint +-static char rcsid[] = "$Header: /homes/grunwald/Src/SeeTeX/libtex/RCS/font.c,v 1.2 1992/07/22 16:26:02 grunwald Exp grunwald $"; ++static char rcsid[] __attribute__ ((unused)) = "$Header: /homes/grunwald/Src/SeeTeX/libtex/RCS/font.c,v 1.2 1992/07/22 16:26:02 grunwald Exp grunwald $"; + #endif + + /* +@@ -17,13 +17,21 @@ static char rcsid[] = "$Header: /homes/g + */ + + #include ++#include ++#include + #include + #include ++#include ++#include ++#include ++#include + #include "types.h" + #include "conv.h" + #include "error.h" + #include "font.h" + ++extern int split(); ++ + /* + * Define the default configuration file. + * Also define the maximum path name length. +@@ -75,8 +83,7 @@ static struct font *getafont(char *nm, i + /* + * Imports. + */ +-extern int errno; +-char *getenv(), *malloc(), *strncpy(), *strsave(); ++char *strsave(); + + /* + * You may get warnings from lint about sprintf(), which is of type +@@ -149,7 +156,7 @@ readconf(char *name) + register FILE *f; /* config file */ + register int c; /* char and word counter */ + int isenv; /* true => doing `fontenv', not `font' */ +- char *env; /* value from getenv() */ ++ char *env = NULL; /* value from getenv() */ + struct fontconf proto; /* prototype fontconf */ + char *v[20]; /* word vector */ + char line[BUFSIZ]; /* input line */ +@@ -331,7 +338,7 @@ badcf(char *why) + static void + basify(char *s, char *buf, int size) + { +- register char *p, *endp; ++ register char *p, *endp = NULL; + register int n; + + for (p = s; *p; p++) +--- texk/seetexk/font_subr.c ++++ texk/seetexk/font_subr.c 2009-08-28 14:13:32.829901219 +0000 +@@ -6,23 +6,24 @@ + */ + + #ifndef lint +-static char rcsid[] = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/font_subr.c,v 2.8 89/10/30 04:08:52 chris Exp $"; ++static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/font_subr.c,v 2.8 89/10/30 04:08:52 chris Exp $"; + #endif + + /* + * Subroutines common to all fonts. + */ + ++#include ++#include ++#include + #include "types.h" + #include "error.h" + #include "font.h" + + static struct glyph *freeglyphs; + +-#if !defined( WIN32 ) && !defined( _AMIGA ) +-char *malloc(); +-extern errno; +-#endif ++extern void ScaleGlyphs(register struct font *f, int l, int h); ++extern void SetRotation(register struct glyph *g, int r); + + /* + * Set up the font structures to note that a font has glyphs in +@@ -31,6 +32,7 @@ extern errno; + * SHOULD I ALLOW ADDITIONS TO THE RANGE VIA SUBSEQUENT CALLS TO + * FontHasGlyphs? + */ ++int + FontHasGlyphs(f, low, high) + register struct font *f; + register int low, high; +--- texk/seetexk/gfclass.c ++++ texk/seetexk/gfclass.c 2009-08-28 14:13:32.829901219 +0000 +@@ -6,7 +6,7 @@ + */ + + #ifndef lint +-static char rcsid[] = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/gfclass.c,v 2.3 89/08/22 21:52:30 chris Exp $"; ++static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/gfclass.c,v 2.3 89/08/22 21:52:30 chris Exp $"; + #endif + + /* +--- texk/seetexk/gffont.c ++++ texk/seetexk/gffont.c 2009-08-28 14:13:32.829901219 +0000 +@@ -6,12 +6,15 @@ + */ + + #ifndef lint +-static char rcsid[] = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/gffont.c,v 2.9 89/09/02 17:16:17 chris Exp $"; ++static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/gffont.c,v 2.9 89/09/02 17:16:17 chris Exp $"; + #endif + + #include ++#include + #include + #include ++#include ++#include + #include "types.h" + #include "error.h" + #include "font.h" +@@ -19,6 +22,8 @@ static char rcsid[] = "$Header: /usr/src + #include "gfclass.h" + #include "num.h" + ++extern int FontHasGlyphs(); ++ + /* + * GF font operations. + * +@@ -75,11 +80,6 @@ struct gf_details { + * Get the gf_details from font f. + */ + #define ftogd(f) ((struct gf_details *)(f)->f_details) +- +-#if !defined( WIN32 ) && !defined( _AMIGA ) +-extern int errno; +-extern char *malloc(); +-#endif + char *copyit(); + + /* +@@ -394,7 +394,7 @@ drawchar(p, abbrev, globalb, gfname) + register i32 m; /* m register (column) */ + register char *colp; /* pointer to byte corresponding to m */ + register int c; /* temporary */ +- register i32 i; /* temporary */ ++ register i32 i = 0; /* temporary */ + register int black; /* true when paint_switch==black */ + register i32 n; /* n register (row) */ + int stride; /* multiplier to convert linear to 2d array */ +@@ -794,7 +794,7 @@ gf_getgly(f, l, h) + register i32 c; + register int i; + register i32 thisboc; +- int abbrev; ++ int abbrev = 0; + struct gf_details *gd = ftogd(f); + + /* +@@ -926,8 +926,8 @@ gf_rasterise(f, l, h) + struct font *f; + int l, h; + { +- + panic("gf_rasterise(%s, %d, %d)", f->f_path, l, h); ++ /* NOTREACHED */ + } + + /* +--- texk/seetexk/gripes.h ++++ texk/seetexk/gripes.h 2010-11-12 11:55:39.148426060 +0000 +@@ -13,16 +13,17 @@ extern const char *DVIFileName; + * Declarations for the various gripes. + */ + +-void GripeOutOfMemory(int n, const char *why); ++#define __NR__ __attribute__ ((noreturn)) ++void GripeOutOfMemory(int n, const char *why) __NR__; + void GripeCannotGetFont(const char *name, i32 mag, i32 dsz, const char *dev, const char *fullname); + void GripeDifferentChecksums(const char *font, i32 tfmsum, i32 fontsum); +-void GripeMissingFontsPreventOutput(int n); +-void GripeNoSuchFont(i32 n); +-void GripeFontAlreadyDefined(i32 n); +-void GripeUnexpectedDVIEOF(void); +-void GripeUnexpectedOp(const char *s); +-void GripeMissingOp(const char *s); +-void GripeCannotFindPostamble(void); +-void GripeMismatchedValue(const char *s); +-void GripeUndefinedOp(int n); ++void GripeMissingFontsPreventOutput(int n) __NR__; ++void GripeNoSuchFont(i32 n) __NR__; ++void GripeFontAlreadyDefined(i32 n) __NR__; ++void GripeUnexpectedDVIEOF(void) __NR__; ++void GripeUnexpectedOp(const char *s) __NR__; ++void GripeMissingOp(const char *s) __NR__; ++void GripeCannotFindPostamble(void) __NR__; ++void GripeMismatchedValue(const char *s) __NR__; ++void GripeUndefinedOp(int n) __NR__; + void GripeBadGlyph(i32 c, struct font *f); +--- texk/seetexk/gripes0.c ++++ texk/seetexk/gripes0.c 2009-08-28 14:38:06.501901818 +0000 +@@ -10,14 +10,12 @@ + */ + + #include ++#include ++#include + #include "types.h" + #include "error.h" + #include "gripes.h" + +-#ifndef WIN32 +-extern int errno; +-#endif +- + /* + * Cannot allocate memory. + */ +@@ -26,7 +24,7 @@ GripeOutOfMemory(int n, const char *why) + { + + error(1, -1, "ran out of memory allocating %d bytes for %s", n, why); +- /* NOTREACHED */ ++ exit(-1); /* NOTREACHED */ + } + + /* +@@ -71,7 +69,7 @@ WARNING: TeX and I have different checks + \t\"%s\"\n\ + \tPlease notify your TeX maintainer\n\ + \t(TFM checksum = 0%lo, my checksum = 0%lo)", +- font, (long)tfmsum, (long)fontsum); ++ font ? font : "", (long)tfmsum, (long)fontsum); + } + + /* +@@ -84,5 +82,5 @@ GripeMissingFontsPreventOutput(int n) + + error(1, 0, "%d missing font%s prevent%s output (sorry)", n, + n > 1 ? s : &s[1], n == 1 ? s : &s[1]); +- /* NOTREACHED */ ++ exit(0); /* NOTREACHED */ + } +--- texk/seetexk/gripes1.c ++++ texk/seetexk/gripes1.c 2009-08-28 14:13:32.869901244 +0000 +@@ -10,6 +10,7 @@ + */ + + #include ++#include + #include "types.h" + #include "error.h" + #include "font.h" +@@ -25,7 +26,7 @@ dfn(void) + /* + * Save string space by declaring these here. + */ +-#if __STDC__ >= 1 ++#if 0 + static const char dfl[] = "DVI file"; + static const char areyousure[] = "(are you sure %s is a %s?)"; + #else +@@ -42,7 +43,7 @@ GripeNoSuchFont(i32 n) + + error(0, 0, "%s wants font %ld, which it never defined", dfl, (long)n); + error(1, 0, areyousure, dfn(), dfl); +- /* NOTREACHED */ ++ exit (0); /* NOTREACHED */ + } + + /* +@@ -54,7 +55,7 @@ GripeFontAlreadyDefined(i32 n) + + error(0, 0, "%s redefines font %ld", dfl, n); + error(1, 0, areyousure, dfn(), dfl); +- /* NOTREACHED */ ++ exit (0); /* NOTREACHED */ + } + + /* +@@ -77,7 +78,7 @@ GripeUnexpectedOp(const char *s) + + error(0, 0, "unexpected %s in %s", s, dfl); + error(1, 0, areyousure, dfn(), dfl); +- /* NOTREACHED */ ++ exit (0); /* NOTREACHED */ + } + + /* +@@ -89,7 +90,7 @@ GripeMissingOp(const char *s) + + error(0, 0, "missing %s in %s", s, dfl); + error(1, 0, areyousure, dfn(), dfl); +- /* NOTREACHED */ ++ exit (0); /* NOTREACHED */ + } + + /* +@@ -101,7 +102,7 @@ GripeCannotFindPostamble(void) + + error(0, 0, "cannot find postamble"); + error(1, 0, areyousure, dfn(), dfl); +- /* NOTREACHED */ ++ exit (0); /* NOTREACHED */ + } + + /* +@@ -113,7 +114,7 @@ GripeMismatchedValue(const char *s) + + error(0, 0, "mismatched %s in %s", s, dfl); + error(1, 0, areyousure, dfn(), dfl); +- /* NOTREACHED */ ++ exit (0); /* NOTREACHED */ + } + + /* +@@ -125,7 +126,7 @@ GripeUndefinedOp(int n) + + error(0, 0, "undefined DVI opcode %d", n); + error(1, 0, areyousure, dfn(), dfl); +- /* NOTREACHED */ ++ exit (0); /* NOTREACHED */ + } + + /* +--- texk/seetexk/mydvichk ++++ texk/seetexk/mydvichk 2010-11-12 11:50:39.783926350 +0000 +@@ -0,0 +1,12 @@ ++#!/bin/csh -f ++# 1993 (c) Werner Fink ++# ++dvitype ${1} < ++# ++ ++if (${#argv} <= 1) then ++ echo " ${0}: Usage: infile outfile" ++ exit ++endif ++ ++set NumP=`mydvichk $1 | sed -e 's/totalpages=//g'` ++ ++if (${NumP} % 2) then ++ dviselect -s '=1' $1 | \ ++ dvibook -q | \ ++ dviselect -s '=1' | \ ++ dviconcat -o $2 - $1 >& /dev/null ++ echo " ${0}: ready" ++else ++ echo " ${0}: even number of pages --- nothing to do" ++endif ++ ++exit 0 +--- texk/seetexk/pkfont.c ++++ texk/seetexk/pkfont.c 2009-08-28 14:13:32.873901460 +0000 +@@ -6,17 +6,22 @@ + */ + + #ifndef lint +-static char rcsid[] = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/pkfont.c,v 2.10 89/08/22 21:54:49 chris Exp $"; ++static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/pkfont.c,v 2.10 89/08/22 21:54:49 chris Exp $"; + #endif + + #include ++#include + #include + #include ++#include ++#include + #include "types.h" + #include "error.h" + #include "font.h" + #include "num.h" + ++extern int FontHasGlyphs(); ++ + /* + * PK font operations. + * +@@ -127,11 +132,6 @@ struct pk_details { + + static int scan_characters(); + +-#if !defined( WIN32 ) && !defined( _AMIGA ) +-extern int errno; +-char *malloc(); +-#endif +- + /* + * PK subroutines. + */ +--- texk/seetexk/pxlfont.c ++++ texk/seetexk/pxlfont.c 2009-08-28 14:13:32.873901460 +0000 +@@ -6,18 +6,22 @@ + */ + + #ifndef lint +-static char rcsid[] = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/pxlfont.c,v 2.5 89/08/22 21:55:34 chris Exp $"; ++static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/pxlfont.c,v 2.5 89/08/22 21:55:34 chris Exp $"; + #endif + + #include ++#include + #include + #include ++#include + #include + #include "types.h" + #include "error.h" + #include "font.h" + #include "fio.h" + ++extern int FontHasGlyphs(); ++ + /* + * PXL font operations. + */ +@@ -63,11 +67,6 @@ struct pxl_details { + */ + #define ftopd(f) ((struct pxl_details *) (f)->f_details) + +-extern errno; +-#ifndef KPATHSEA +-char *malloc(); +-#endif +- + /* + * Read a PXL file. + */ +--- texk/seetexk/rotate.c ++++ texk/seetexk/rotate.c 2009-08-28 14:13:32.873901460 +0000 +@@ -6,7 +6,7 @@ + */ + + #ifndef lint +-static char rcsid[] = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/rotate.c,v 2.4 89/08/22 21:56:05 chris Exp $"; ++static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/rotate.c,v 2.4 89/08/22 21:56:05 chris Exp $"; + #endif + + /* +@@ -16,17 +16,14 @@ static char rcsid[] = "$Header: /usr/src + * from being rotated of course!). + */ + ++#include ++#include + #include "types.h" + #include "error.h" + #include "font.h" + + static void RotateClockwise(); + +-#if !defined( WIN32 ) && !defined( _AMIGA ) +-extern int errno; +-char *malloc(); +-#endif +- + /* + * Rounding, but by powers of two only. + */ +@@ -131,7 +128,7 @@ RotateClockwise(glyph) + * the old raster, can discard the original i and j. + */ + { +- register int mapj, c, k, mapi; ++ register int mapj, c = 0, k, mapi; + + mapi = oheight; + owidth *= nplus; +--- texk/seetexk/seek.c ++++ texk/seetexk/seek.c 2009-08-28 14:13:32.877901585 +0000 +@@ -32,6 +32,10 @@ + #endif + + #include ++#include ++#include ++#include ++#include + #include "types.h" /* for BSD_FILE_SYSTEM */ + #include "seek.h" + #include "tempfile.h" +@@ -44,12 +48,7 @@ + #endif + #include + +-#ifndef KPATHSEA +-long lseek(); +-char *malloc(); +- +-extern int errno; +-#endif ++extern int MakeRWTempFile(); + + /* + * Make and return a version of `f' on which fseek works (unconditionally). +--- texk/seetexk/skip.c ++++ texk/seetexk/skip.c 2009-08-28 14:13:32.877901585 +0000 +@@ -6,7 +6,7 @@ + */ + + #ifndef lint +-static char rcsid[] = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/skip.c,v 3.1 89/08/22 21:45:13 chris Exp $"; ++static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/skip.c,v 3.1 89/08/22 21:45:13 chris Exp $"; + #endif + + #include +@@ -16,7 +16,7 @@ static char rcsid[] = "$Header: /usr/src + /* + * Skip a font definition. The font number has already been consumed. + */ +-SkipFontDef(fp) ++void SkipFontDef(fp) + register FILE *fp; + { + register int i; +--- texk/seetexk/split.c ++++ texk/seetexk/split.c 2009-08-28 14:13:32.881901811 +0000 +@@ -6,7 +6,7 @@ + */ + + #ifndef lint +-static char rcsid[] = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/split.c,v 3.1 89/08/22 21:59:36 chris Exp $"; ++static char rcsid[] __attribute__((unused)) = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/split.c,v 3.1 89/08/22 21:59:36 chris Exp $"; + #endif + + #include +@@ -44,7 +44,7 @@ split(s, w, nw) + register int c; + register char *canon = s; + register int wleft = nw; +- enum lexstate state, prebkstate; ++ enum lexstate state, prebkstate = S_BLANK; + + /* + * Start out in the `blank' state (outside a word). Handle +--- texk/seetexk/strsave.c ++++ texk/seetexk/strsave.c 2009-08-28 14:13:32.905901116 +0000 +@@ -9,13 +9,14 @@ + * Save a string in managed memory. + */ + +-#if !defined( WIN32 ) && !defined( _AMIGA ) +-char *malloc(), *realloc(); +-extern int errno; +-#endif +- ++#include ++#include ++#include + #include "types.h" /* for bcopy */ + #include "error.h" ++#ifndef bcopy ++#define bcopy(from, to, len) memmove(to, from, len) ++#endif + + char * + strsave(s) +--- texk/seetexk/tempfile.c ++++ texk/seetexk/tempfile.c 2009-08-28 14:13:32.905901116 +0000 +@@ -10,6 +10,7 @@ + #endif + + #include ++#include + #include + + #ifdef HAVE_UNISTD_H +@@ -24,9 +25,7 @@ + #include "types.h" + #else + #include +- +-char *getenv(); +- ++#include + #endif + + #include "tempfile.h" +--- texk/seetexk/tfm.c ++++ texk/seetexk/tfm.c 2009-08-28 14:13:32.913901063 +0000 +@@ -6,7 +6,7 @@ + */ + + #ifndef lint +-static char rcsid[] = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/tfm.c,v 3.1 89/08/22 22:00:12 chris Exp $"; ++static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/tfm.c,v 3.1 89/08/22 22:00:12 chris Exp $"; + #endif + + /* +@@ -16,17 +16,15 @@ static char rcsid[] = "$Header: /usr/src + * finish + */ + ++#include + #include ++#include + #include "types.h" + #include "fio.h" + #include "tfm.h" + + static int trd_header(), trd_ci(), trd_fix(); + +-#if !defined( WIN32 ) && !defined( _AMIGA ) +-char *malloc(); +-#endif +- + #define ALLOC(n, type) ((type *)malloc((unsigned)((n) * sizeof(type)))) + + int +--- texk/seetexk/tfmfont.c ++++ texk/seetexk/tfmfont.c 2009-08-28 14:13:32.913901063 +0000 +@@ -6,16 +6,24 @@ + */ + + #ifndef lint +-static char rcsid[] = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/tfmfont.c,v 3.4 89/11/29 02:29:58 chris Exp $"; ++static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/src/local/tex/local/mctex/lib/RCS/tfmfont.c,v 3.4 89/11/29 02:29:58 chris Exp $"; + #endif + + #include ++#include + #include + #include ++#include ++#include + #include "types.h" + #include "conv.h" + #include "font.h" + #include "tfm.h" ++#include "error.h" ++#include "gripes.h" ++ ++extern int FontHasGlyphs(); ++extern int readtfmfile(); + + /* + * TFM font operations. This defines three fonts: +@@ -63,11 +71,6 @@ struct tfm_details { + + static int do_read(); + +-#if !defined( WIN32 ) && !defined( _AMIGA ) +-extern int errno; +-char *malloc(); +-#endif +- + /* + * Read a Box font. + */ +--- texk/seetexk/types.h ++++ texk/seetexk/types.h 2009-08-28 14:13:32.921901032 +0000 +@@ -43,8 +43,9 @@ + * + * (The bcopy provided in lib/bcopy.c does handle overlap.) + */ +-/* #define BLOCK_COPY(from, to, len) memmove(to, from, len) */ +-#define BLOCK_COPY(from, to, len) bcopy(from, to, len) ++#include ++#define BLOCK_COPY(from, to, len) memmove(to, from, len) ++/* #define BLOCK_COPY(from, to, len) bcopy(from, to, len) */ + + /* + * Define void as int if your compiler does not support void, diff --git a/source-lacheck.dif b/source-lacheck.dif new file mode 100644 index 0000000..5c1ca89 --- /dev/null +++ b/source-lacheck.dif @@ -0,0 +1,10 @@ +--- texk/lacheck/lacheck-1.26/lacheck.l ++++ texk/lacheck/lacheck-1.26/lacheck.l 2008-03-05 13:59:37.000000000 +0000 +@@ -117,6 +117,7 @@ + + #include + #include ++#include + + #if defined(WIN32) && !defined(__MINGW32__) + #include diff --git a/source-luatex.dif b/source-luatex.dif new file mode 100644 index 0000000..1ae7f9d --- /dev/null +++ b/source-luatex.dif @@ -0,0 +1,9936 @@ +--- texk/web2c/luatexdir/ChangeLog ++++ texk/web2c/luatexdir/ChangeLog 2011-10-13 07:39:33.000000000 +0000 +@@ -1,4 +1,34 @@ ++2011-10-04 Peter Breitenlohner ++ ++ * am/libluatex.am: Avoid to `clean' ../mplibdir/lmplib.c. ++ ++ * am/txt2zlib.am (noinst_PROGRAMS): Conditionally add txt2zlib, ++ such that txt2zlib$(EXEEXT) gets cleaned. ++ ++2011-09-30 Peter Breitenlohner ++ ++ * tex/printing.w (print_file_line): Bug fix: avoid uninitialized ++ lineno - from ../tex.ch. ++ * tex/inputstack.w: Slightly reformulate printing of current ++ line - from ../etexdir/etex.ch. ++ ++2011-08-04 Magnus Granberg ++ ++ * luatex.c: Do not #include empty file . ++ ++2011-06-17 Peter Breitenlohner ++ ++ Reduce memory leaks. ++ * lua/lkpselib.c (do_lua_kpathsea_lookup): Free string no longer ++ used. ++ ++2011-06-16 Peter Breitenlohner ++ ++ lua/lkpselib.c (find_dpi): Allow find_suffix() to return a ++ const string. ++ + 2011-05-19 Taco Hoekwater ++ + * lua/ltexlib.c: fix a bug on negative catcode table arguments. + * luatex.c, NEWS: luatex is now version 0.70.1 + * luatex_svnversion.h: updated to reflect latest luatex revision (4277) +--- texk/web2c/luatexdir/Makefile.in ++++ texk/web2c/luatexdir/Makefile.in 2011-10-13 07:39:33.000000000 +0000 +@@ -0,0 +1,149 @@ ++# Makefile for luatex. ++# Public domain. ++# $Id: Makefile.in 4214 2011-04-27 21:53:38Z hhenkel $ ++ ++kpse_include ../make/common.mk ++kpse_include ../make/programs.mk ++kpse_include ../make/library.mk ++ ++kpathsea_srcdir_parent = $(srcdir)/../.. ++kpathsea_dir_parent = ../.. ++ ++ALL_CXXFLAGS = @CXXFLAGS@ @DEFS@ $(XXCFLAGS) \ ++ -I. -I$(srcdir) \ ++ -I$(kpathsea_dir_parent) -I$(kpathsea_srcdir_parent) \ ++ @LIBXPDFCPPFLAGS@ \ ++ -I$(LIBOBSDCOMPATDIR) -I$(LIBOBSDCOMPATDIR)/.. \ ++ -I$(LIBOBSDCOMPATFSRCDIR) -I$(LIBOBSDCOMPATFSRCDIR)/.. \ ++ -I$(LIBPNGSRCDIR) -I$(ZLIBSRCDIR) \ ++ -DPDF_PARSER_ONLY -DDISABLE_OUTLINE -I../../../../src/libs/obsdcompat ++CXX = @CXX@ ++ ++CTANGLE = ../ctangle ++ ++.SUFFIXES: .cc .o ++.cc.o: ++ $(CXX) $(ALL_CXXFLAGS) -c $< -o $@ ++ ++# XCFLAGS=-Wstrict-prototypes -Wmissing-prototypes ++ ++LIBPNGDIR=../../../libs/libpng ++LIBPNGSRCDIR=$(srcdir)/$(LIBPNGDIR) ++ ++ZLIBDIR=../../../libs/zlib ++ZLIBSRCDIR=$(srcdir)/$(ZLIBDIR) ++ ++LIBXPDFDIR=../../../libs/xpdf ++LIBXPDFSRCDIR=$(srcdir)/$(LIBXPDFDIR) ++ ++LIBMD5DIR=../../../libs/md5 ++LIBMD5SRCDIR=$(srcdir)/$(LIBMD5DIR) ++ ++LIBOBSDCOMPATDIR=../../../libs/obsdcompat ++LIBOBSDCOMPATSRCDIR=$(srcdir)/$(LIBOBSDCOMPATDIR) ++ ++XCPPFLAGS=-I.. -I$(srcdir)/.. -I../.. -I$(srcdir)/../.. -I$(LIBMD5DIR) \ ++ -I$(LIBMD5SRCDIR) @LIBPNGCPPFLAGS@ @ZLIBCPPFLAGS@ \ ++ -I$(LIBXPDFDIR) -I$(LIBXPDFDIR)/.. -I$(LIBXPDFSRCDIR) -I$(LIBXPDFSRCDIR)/.. \ ++ -I$(LIBOBSDCOMPATDIR) -I$(LIBOBSDCOMPATDIR)/.. -I$(LIBOBSDCOMPATSRCDIR) \ ++ -I$(LIBOBSDCOMPATSRCDIR)/.. -DpdfTeX ++ ++ ++OBJS = \ ++font/mapfile.o \ ++font/pkin.o \ ++font/subfont.o \ ++font/tounicode.o \ ++font/vfpacket.o \ ++font/writeenc.o \ ++font/writefont.o \ ++font/writet1.o \ ++font/writet3.o \ ++font/writettf.o \ ++font/writetype0.o \ ++font/writetype2.o \ ++font/writecff.o \ ++font/tt_glyf.o \ ++font/tt_table.o \ ++font/sfnt.o \ ++font/texfont.o \ ++font/tfmofm.o \ ++font/vfovf.o \ ++font/luafont.o \ ++font/dofont.o \ ++image/pdftoepdf.o \ ++image/writeimg.o \ ++image/writejbig2.o \ ++image/writejpg.o \ ++image/writepng.o \ ++lua/loslibext.o \ ++lua/lcallbacklib.o \ ++lua/lkpselib.o \ ++lua/llualib.o \ ++lua/lnodelib.o \ ++lua/lpdflib.o \ ++lua/lstatslib.o \ ++lua/ltexiolib.o \ ++lua/ltexlib.o \ ++lua/ltokenlib.o \ ++lua/lfontlib.o \ ++lua/texluac.o \ ++lua/luainit.o \ ++lua/luastuff.o \ ++lua/luatex.o \ ++lua/luatoken.o \ ++lua/luanode.o \ ++lua/llanglib.o \ ++lua/limglib.o \ ++lua/luagen.o \ ++lang/hnjalloc.o \ ++lang/hyphen.o \ ++lang/texlang.o \ ++ocp/readocp.o \ ++pdf/pdfpage.o \ ++pdf/pdfpagetree.o \ ++tex/linebreak.o \ ++tex/postlinebreak.o \ ++tex/texnodes.o \ ++tex/textoken.o \ ++tex/texpdf.o \ ++tex/math.o \ ++tex/mlist.o \ ++tex/primitive.o \ ++tex/texdeffont.o \ ++tex/filename.o \ ++managed-sa.o \ ++mathcodes.o \ ++textcodes.o \ ++utils/avl.o \ ++utils/avlstuff.o \ ++utils/utils.o \ ++utils/writezip.o \ ++utils/synctex.o ++ ++all: libpdf.a makecpool ++ ++libpdf.a: $(OBJS) ++ rm -f $@ ++ $(AR) $(ARFLAGS) $@ $(OBJS) ++ $(RANLIB) $@ ++ ++makecpool: makecpool.o ++ $(link_command) makecpool.o ++ ++kpse_include ../make/clean.mk ++ ++clean:: ++ rm -f libpdf.a ++ ++depend: ++ rm -f $(OBJS) $(srcdir)/depend.mk ++ for a in $(OBJS); do \ ++ env XXCFLAGS="-MM -MT \$$@" XCFLAGS="-MM -MT \$$@" $(MAKE) -k $$a; \ ++ touch $$a; \ ++ grep -a -v "^$(CC)\|$(CXX)\|$(AR)\|make" $$a | \ ++ sed 's: [^ ]*/\.\./libs/[^ ]*::g' >> $(srcdir)/depend.mk; \ ++ done; \ ++ rm -f $(OBJS) ++ ++kpse_include luatexdir/depend.mk +--- texk/web2c/luatexdir/luatex.c ++++ texk/web2c/luatexdir/luatex.c 2011-10-13 07:39:33.000000000 +0000 +@@ -15,16 +15,16 @@ + #include "luatex_svnversion.h" + + static const char _svn_version[] = +- "$Id: luatex.c 4276 2011-05-19 05:11:57Z taco $ " +- "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.70.1/source/texk/web2c/luatexdir/luatex.c $"; ++ "$Id: luatex.c 4356 2011-10-05 21:59:13Z hhenkel $ " ++ "$URL: http://foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/luatex.c $"; + + #define TeX + + int luatex_svn = luatex_svn_revision; +-int luatex_version = 70; /* \.{\\luatexversion} */ +-int luatex_revision = '1'; /* \.{\\luatexrevision} */ ++int luatex_version = 71; /* \.{\\luatexversion} */ ++int luatex_revision = '0'; /* \.{\\luatexrevision} */ + int luatex_date_info = -extra_version_info; /* the compile date is negated */ +-const char *luatex_version_string = "beta-0.70.1"; ++const char *luatex_version_string = "beta-0.71.0"; + const char *engine_name = "luatex"; /* the name of this engine */ + + #include +@@ -32,7 +32,6 @@ const char *engine_name = "luatex"; + #include + #include + #include +-#include + #ifdef WIN32 + #include + #endif +--- texk/web2c/luatexdir/ptexlib.h ++++ texk/web2c/luatexdir/ptexlib.h 2011-10-13 07:39:33.000000000 +0000 +@@ -1,7 +1,7 @@ + /* ptexlib.h + + Copyright 1996-2006 Han The Thanh +- Copyright 2006-2009 Taco Hoekwater ++ Copyright 2006-2011 Taco Hoekwater + + This file is part of LuaTeX. + +@@ -37,7 +37,6 @@ extern double rint(double x); + extern char **suffixlist; /* in luainit.w */ + # endif + +- + /* Replicate these here. They are hardcoded anyway */ + + # define eTeX_version_string "2.2" /* current \eTeX\ version */ +@@ -47,7 +46,7 @@ extern char **suffixlist; /* in lu + + # define Omega_version_string "1.15" /* \.{\\OmegaVersion} */ + # define Omega_version 1 /* \.{\\Omegaversion} */ +-# define Omega_minor_version 15 /* \.{\\Omegaminorversion} */ ++# define Omega_minor_version 15/* \.{\\Omegaminorversion} */ + # define Omega_revision ".15" /* \.{\\Omegarevision} */ + + # define Aleph_version_string "0.0" /* \.{\\AlephVersion} */ +@@ -67,7 +66,8 @@ extern char **suffixlist; /* in lu + + /* Not all systems define it. */ + # ifndef M_PI +-# define M_PI 3.14159265358979323846 /* pi */ ++# define M_PI 3.14159265358979323846 ++ /* pi */ + # endif + + # ifdef WIN32 +@@ -174,7 +174,7 @@ size_t T##_limit + # include "image/writeimg.h" + # include "openbsd-compat.h" + # include "dvi/dvigen.h" +-# include "pdf/pagetree.h" ++# include "pdf/pdfpagetree.h" + # include "pdf/pdfgen.h" + # include "pdf/pdfpage.h" + # include "pdf/pdftables.h" +@@ -333,6 +333,7 @@ typedef enum { + find_pk_file_callback, read_pk_file_callback, + show_error_hook_callback, + process_input_buffer_callback, process_output_buffer_callback, ++ process_jobname_callback, + start_page_number_callback, stop_page_number_callback, + start_run_callback, stop_run_callback, + define_font_callback, +@@ -420,7 +421,7 @@ extern void topenin(void); + extern str_number getjobname(str_number); + extern str_number makefullnamestring(void); + +-#include ++# include + + extern PDF static_pdf; + +--- texk/web2c/luatexdir/am/libluatex.am ++++ texk/web2c/luatexdir/am/libluatex.am 2011-10-13 07:39:28.000000000 +0000 +@@ -1,6 +1,6 @@ + ## texk/web2c/luatexdir/am/libluatex.am: Makefile fragment for libluatex. + ## +-## Copyright (C) 2009 - 2011 Peter Breitenlohner ++## Copyright (C) 2009-2011 Peter Breitenlohner + ## You may freely use, modify and/or distribute this file. + + ## libluatex +@@ -210,8 +210,8 @@ libluatex_a_SOURCES += \ + ## + luatex_pdf_ctangle = CWEBINPUTS=$(srcdir)/luatexdir/pdf $(ctangle) + +-pagetree.c: ctangle$(EXEEXT) luatexdir/pdf/pagetree.w +- $(luatex_pdf_ctangle) pagetree.w ++pdfpagetree.c: ctangle$(EXEEXT) luatexdir/pdf/pdfpagetree.w ++ $(luatex_pdf_ctangle) pdfpagetree.w + pdfaction.c: ctangle$(EXEEXT) luatexdir/pdf/pdfaction.w + $(luatex_pdf_ctangle) pdfaction.w + pdfannot.c: ctangle$(EXEEXT) luatexdir/pdf/pdfannot.w +@@ -257,7 +257,7 @@ pdfthread.c: ctangle$(EXEEXT) luatexdir/ + pdfxform.c: ctangle$(EXEEXT) luatexdir/pdf/pdfxform.w + $(luatex_pdf_ctangle) pdfxform.w + +-libluatex_web += luatexdir/pdf/pagetree.w luatexdir/pdf/pdfaction.w luatexdir/pdf/pdfannot.w ++libluatex_web += luatexdir/pdf/pdfpagetree.w luatexdir/pdf/pdfaction.w luatexdir/pdf/pdfannot.w + libluatex_web += luatexdir/pdf/pdfcolorstack.w luatexdir/pdf/pdfdest.w + libluatex_web += luatexdir/pdf/pdffont.w luatexdir/pdf/pdfgen.w luatexdir/pdf/pdfglyph.w + libluatex_web += luatexdir/pdf/pdfimage.w luatexdir/pdf/pdflink.w luatexdir/pdf/pdflistout.w +@@ -267,13 +267,13 @@ libluatex_web += luatexdir/pdf/pdfsavere + libluatex_web += luatexdir/pdf/pdfshipout.w luatexdir/pdf/pdftables.w + libluatex_web += luatexdir/pdf/pdfthread.w luatexdir/pdf/pdfxform.w + +-nodist_libluatex_a_SOURCES += pagetree.c pdfaction.c pdfannot.c pdfcolorstack.c pdfdest.c pdffont.c ++nodist_libluatex_a_SOURCES += pdfpagetree.c pdfaction.c pdfannot.c pdfcolorstack.c pdfdest.c pdffont.c + nodist_libluatex_a_SOURCES += pdfgen.c pdfglyph.c pdfimage.c pdflink.c pdflistout.c pdfliteral.c + nodist_libluatex_a_SOURCES += pdfluaapi.c pdfobj.c pdfoutline.c pdfpage.c pdfrule.c pdfsaverestore.c + nodist_libluatex_a_SOURCES += pdfsetmatrix.c pdfshipout.c pdftables.c pdfthread.c pdfxform.c + + libluatex_a_SOURCES += \ +- luatexdir/pdf/pagetree.h \ ++ luatexdir/pdf/pdfpagetree.h \ + luatexdir/pdf/pdfaction.h \ + luatexdir/pdf/pdfannot.h \ + luatexdir/pdf/pdfcolorstack.h \ +@@ -481,9 +481,9 @@ libluatex_a_SOURCES += \ + synctexdir/synctex.c \ + synctexdir/synctex.h + +-## from mplibdir ++## from ../mplibdir + ## +-nodist_libluatex_a_SOURCES += \ ++libluatex_a_SOURCES += \ + mplibdir/lmplib.c + + $(libluatex_a_OBJECTS): libff.a libmplib.a +--- texk/web2c/luatexdir/am/txt2zlib.am ++++ texk/web2c/luatexdir/am/txt2zlib.am 2011-10-13 07:39:28.000000000 +0000 +@@ -3,6 +3,11 @@ + ## Copyright (C) 2010, 2011 Hartmut Henkel + ## You may freely use, modify and/or distribute this file. + ++if LUATEX ++if !cross ++noinst_PROGRAMS += txt2zlib ++endif !cross ++endif LUATEX + EXTRA_PROGRAMS += txt2zlib + + nodist_txt2zlib_SOURCES = txt2zlib.c +--- texk/web2c/luatexdir/dvi/dvigen.h ++++ texk/web2c/luatexdir/dvi/dvigen.h 2011-10-13 07:39:27.000000000 +0000 +@@ -175,7 +175,6 @@ this is essentially the depth of |push| + + extern scaled_whd rule; + extern scaledpos dvi; +-extern scaledpos cur_page_size; /* width and height of page being shipped */ + + extern void expand_macros_in_tokenlist(halfword p); + extern void write_out(halfword p); +--- texk/web2c/luatexdir/dvi/dvigen.w ++++ texk/web2c/luatexdir/dvi/dvigen.w 2011-10-13 07:39:27.000000000 +0000 +@@ -1040,8 +1040,6 @@ void prune_movements(int l) + + scaledpos dvi; /* a \.{DVI} position in page coordinates, in sync with DVI file */ + +-scaledpos cur_page_size; +- + @ When |hlist_out| is called, its duty is to output the box represented + by the |hlist_node| pointed to by |temp_ptr|. The reference point of that + box has coordinates |(cur.h,cur.v)|. +--- texk/web2c/luatexdir/font/luafont.w ++++ texk/web2c/luatexdir/font/luafont.w 2011-10-13 07:39:33.000000000 +0000 +@@ -1,6 +1,6 @@ + % luafont.w + % +-% Copyright 2006-2010 Taco Hoekwater ++% Copyright 2006-2011 Taco Hoekwater + % + % This file is part of LuaTeX. + % +@@ -570,16 +570,29 @@ static int count_hash_items(lua_State * + @ @c + #define streq(a,b) (strcmp(a,b)==0) + +-#define append_packet(k) { cpackets[np++] = (eight_bits)(k); } ++#define append_packet(k) { *(cp++) = (eight_bits) (k); } + +-#define do_store_four(l) { \ +- append_packet((l&0xFF000000)>>24); \ +- append_packet((l&0x00FF0000)>>16); \ +- append_packet((l&0x0000FF00)>>8); \ +- append_packet((l&0x000000FF)); } ++#define do_store_four(l) { \ ++ append_packet((l & 0xFF000000) >> 24); \ ++ append_packet((l & 0x00FF0000) >> 16); \ ++ append_packet((l & 0x0000FF00) >> 8); \ ++ append_packet((l & 0x000000FF)); \ ++} + +-/* +-*/ ++@ @c ++static void append_float(eight_bits ** cpp, float a) ++{ ++ unsigned int i; ++ eight_bits *cp = *cpp; ++ union U { ++ float a; ++ eight_bits b[sizeof(float)]; ++ } u; ++ u.a = a; ++ for (i = 0; i < sizeof(float); i++) ++ append_packet(u.b[i]); ++ *cpp = cp; ++} + + #define lua_roundnumber(a,b) (int)floor((double)lua_tonumber(L,-1)+0.5) + +@@ -757,6 +770,8 @@ make_luaS_index(horiz_variants); + make_luaS_index(vert_variants); + make_luaS_index(mathkern); + make_luaS_index(commands); ++make_luaS_index(scale); ++make_luaS_index(lua); + + static void init_font_string_pointers(lua_State * L) + { +@@ -817,7 +832,8 @@ static void init_font_string_pointers(lu + init_luaS_index(vert_variants); + init_luaS_index(mathkern); + init_luaS_index(commands); +- ++ init_luaS_index(scale); ++ init_luaS_index(lua); + } + + static int count_char_packet_bytes(lua_State * L) +@@ -849,10 +865,12 @@ static int count_char_packet_bytes(lua_S + l++; + } else if (luaS_ptr_eq(s, rule)) { + l += 9; +- } else if (luaS_ptr_eq(s, right) || +- luaS_ptr_eq(s, node) || luaS_ptr_eq(s, down)) { ++ } else if (luaS_ptr_eq(s, right) || luaS_ptr_eq(s, node) ++ || luaS_ptr_eq(s, down) || luaS_ptr_eq(s, image)) { + l += 5; +- } else if (luaS_ptr_eq(s, special)) { ++ } else if (luaS_ptr_eq(s, scale)) { ++ l += sizeof(float) + 1; ++ } else if (luaS_ptr_eq(s, special) || luaS_ptr_eq(s, lua)) { + size_t len; + lua_rawgeti(L, -2, 2); + if (lua_isstring(L, -1)) { +@@ -860,13 +878,11 @@ static int count_char_packet_bytes(lua_S + lua_pop(L, 1); + if (len > 0) { + l = (int) (l + 5 + (int) len); +- } ++ } + } else { + lua_pop(L, 1); + fprintf(stdout, "invalid packet special!\n"); + } +- } else if (luaS_ptr_eq(s, image)) { +- l += 5; + } else { + fprintf(stdout, "unknown packet command %s!\n", s); + } +@@ -880,8 +896,6 @@ static int count_char_packet_bytes(lua_S + return l; + } + +- +- + static scaled sp_to_dvi(halfword sp, halfword atsize) + { + double result, mult; +@@ -898,9 +912,8 @@ read_char_packets(lua_State * L, int *l_ + size_t l; + int cmd; + const char *s; +- eight_bits *cpackets; ++ eight_bits *cpackets, *cp; + int ff = 0; +- int np = 0; + int max_f = 0; + int pc = count_char_packet_bytes(L); + if (pc <= 0) +@@ -910,7 +923,7 @@ read_char_packets(lua_State * L, int *l_ + while (l_fonts[(max_f + 1)] != 0) + max_f++; + +- cpackets = xmalloc((unsigned) (pc + 1)); ++ cp = cpackets = xmalloc((unsigned) (pc + 1)); + for (i = 1; i <= (int) lua_objlen(L, -1); i++) { + lua_rawgeti(L, -1, i); + if (lua_istable(L, -1)) { +@@ -958,6 +971,10 @@ read_char_packets(lua_State * L, int *l_ + cmd = packet_special_code; + } else if (luaS_ptr_eq(s, image)) { + cmd = packet_image_code; ++ } else if (luaS_ptr_eq(s, scale)) { ++ cmd = packet_scale_code; ++ } else if (luaS_ptr_eq(s, lua)) { ++ cmd = packet_lua_code; + } + + switch (cmd) { +@@ -1006,6 +1023,7 @@ read_char_packets(lua_State * L, int *l_ + lua_pop(L, 2); + break; + case packet_special_code: ++ case packet_lua_code: + append_packet(cmd); + lua_rawgeti(L, -2, 2); + s = luaL_checklstring(L, -1, &l); +@@ -1037,6 +1055,12 @@ read_char_packets(lua_State * L, int *l_ + break; + case packet_nop_code: + break; ++ case packet_scale_code: ++ append_packet(cmd); ++ lua_rawgeti(L, -2, 2); ++ append_float(&cp, (float) luaL_checknumber(L, -1)); ++ lua_pop(L, 1); ++ break; + default: + fprintf(stdout, + "Unknown char packet code %s (char %d in font %s)\n", +@@ -1056,7 +1080,6 @@ read_char_packets(lua_State * L, int *l_ + return; + } + +- + @ @c + static void read_lua_cidinfo(lua_State * L, int f) + { +@@ -1478,7 +1501,7 @@ font_char_from_lua(lua_State * L, intern + + + +-@ The caller has to fix the state of the lua stack when there is an error! ++@ The caller has to fix the state of the lua stack when there is an error! + + @c + int font_from_lua(lua_State * L, int f) +@@ -2194,7 +2217,7 @@ static halfword handle_lig_word(halfword + return cur; + } + +-@ Return value is the new tail, head should be a dummy ++@ Return value is the new tail, head should be a dummy + + @c + halfword handle_ligaturing(halfword head, halfword tail) +--- texk/web2c/luatexdir/font/luatexfont.h ++++ texk/web2c/luatexdir/font/luatexfont.h 2011-10-13 07:39:33.000000000 +0000 +@@ -1,6 +1,6 @@ + /* luatexfont.h --- General font definitions + +- Copyright 2008-2010 Taco Hoekwater ++ Copyright 2008-2011 Taco Hoekwater + + This file is part of LuaTeX. + +@@ -150,6 +150,10 @@ void replace_packet_fonts(internal_font_ + int *new_fontid, int count); + int *packet_local_fonts(internal_font_number f, int *num); + ++int packet_cur_s; /* current |do_vf_packet()| recursion level */ ++int packet_stack_ptr; /* pointer into |packet_stack| */ ++vf_struct *new_vfstruct(void); ++ + /* writecff.c */ + void writetype1w(PDF pdf, fd_entry * fd); + +--- texk/web2c/luatexdir/font/texfont.h ++++ texk/web2c/luatexdir/font/texfont.h 2011-10-13 07:39:33.000000000 +0000 +@@ -599,7 +599,9 @@ typedef enum { packet_char_code, + packet_rule_code, + packet_node_code, + packet_nop_code, +- packet_end_code ++ packet_end_code, ++ packet_scale_code, ++ packet_lua_code, + } packet_command_codes; + + extern scaled store_scaled_f(scaled sq, int fw); +--- texk/web2c/luatexdir/font/tounicode.w ++++ texk/web2c/luatexdir/font/tounicode.w 2011-10-13 07:39:33.000000000 +0000 +@@ -343,8 +343,11 @@ int write_tounicode(PDF pdf, char **glyp + else + strcat(buf, builtin_suffix); /* ".enc" not present, this is a builtin + encoding so the name is eg "cmr10-builtin" */ +- objnum = pdf_new_objnum(pdf); +- pdf_begin_dict(pdf, objnum, 0); ++ objnum = pdf_create_obj(pdf, obj_type_others, 0); ++ pdf_begin_obj(pdf, objnum, OBJSTM_NEVER); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_streaminfo(pdf); ++ pdf_end_dict(pdf); + pdf_begin_stream(pdf); + pdf_printf(pdf, "%%!PS-Adobe-3.0 Resource-CMap\n"@/ + "%%%%DocumentNeededResources: ProcSet (CIDInit)\n"@/ +@@ -467,6 +470,7 @@ int write_tounicode(PDF pdf, char **glyp + "CMapName currentdict /CMap defineresource pop\n" + "end\n" "end\n" "%%%%EndResource\n" "%%%%EOF\n"); + pdf_end_stream(pdf); ++ pdf_end_obj(pdf); + return objnum; + } + +@@ -487,8 +491,11 @@ int write_cid_tounicode(PDF pdf, fo_entr + (fo->fd->subset_tag != NULL ? fo->fd->subset_tag : "UCS"), + fo->fd->fontname); + +- objnum = pdf_new_objnum(pdf); +- pdf_begin_dict(pdf, objnum, 0); ++ objnum = pdf_create_obj(pdf, obj_type_others, 0); ++ pdf_begin_obj(pdf, objnum, OBJSTM_NEVER); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_streaminfo(pdf); ++ pdf_end_dict(pdf); + pdf_begin_stream(pdf); + pdf_printf(pdf, "%%!PS-Adobe-3.0 Resource-CMap\n"@/ + "%%%%DocumentNeededResources: ProcSet (CIDInit)\n"@/ +@@ -624,5 +631,6 @@ int write_cid_tounicode(PDF pdf, fo_entr + "CMapName currentdict /CMap defineresource pop\n" + "end\n" "end\n" "%%%%EndResource\n" "%%%%EOF\n"); + pdf_end_stream(pdf); ++ pdf_end_obj(pdf); + return objnum; + } +--- texk/web2c/luatexdir/font/vfpacket.w ++++ texk/web2c/luatexdir/font/vfpacket.w 2011-10-13 07:39:33.000000000 +0000 +@@ -1,224 +1,254 @@ + % vfpacket.w +- ++% + % Copyright 1996-2006 Han The Thanh + % Copyright 2006-2011 Taco Hoekwater +- ++% + % This file is part of LuaTeX. +- ++% + % LuaTeX is free software; you can redistribute it and/or modify it under + % the terms of the GNU General Public License as published by the Free + % Software Foundation; either version 2 of the License, or (at your + % option) any later version. +- ++% + % LuaTeX is distributed in the hope that it will be useful, but WITHOUT + % ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + % FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + % License for more details. +- ++% + % You should have received a copy of the GNU General Public License along + % with LuaTeX; if not, see . + + @ @c +-#include "ptexlib.h" +- + static const char _svn_version[] = +- "$Id: vfpacket.w 4098 2011-04-07 21:01:11Z hhenkel $ " +- "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/font/vfpacket.w $"; +- +- +-@ The |do_vf_packet| procedure is called in order to interpret the +- character packet for a virtual character. Such a packet may contain +- the instruction to typeset a character from the same or an other +- virtual font; in such cases |do_vf_packet| calls itself +- recursively. The recursion level, i.e., the number of times this has +- happened, is kept in the global variable |packet_cur_s| and should +- not exceed |packet_max_recursion|. +- +-@c +-#define packet_max_recursion 100 +- +-typedef unsigned char packet_stack_index; /* an index into the stack */ +- +-typedef struct packet_stack_record { +- scaled stack_h; +- scaled stack_v; +-} packet_stack_record; +- +- +-static packet_stack_index packet_cur_s = 0; /* current recursion level */ +-static packet_stack_record packet_stack[packet_max_recursion]; +-static packet_stack_index packet_stack_ptr = 0; /* pointer into |packet_stack| */ ++ "$Id: vfpacket.w 4341 2011-07-28 21:24:31Z hhenkel $ " ++ "$URL: http://foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/font/vfpacket.w $"; + ++#include "ptexlib.h" + +-@ Some macros for processing character packets. ++@ Some macros for processing character packets. + @c +-#define do_packet_byte() vf_packets[cur_packet_byte++] ++#define packet_number(fw) { \ ++ fw = *(vfp++); \ ++ fw = fw * 256 + *(vfp++); \ ++ fw = fw * 256 + *(vfp++); \ ++ fw = fw * 256 + *(vfp++); \ ++} + +-#define packet_number(fw) { \ +- fw = do_packet_byte(); \ +- fw = fw*256 + do_packet_byte(); \ +- fw = fw*256 + do_packet_byte(); \ +- fw = fw*256 + do_packet_byte(); } +- +-#define packet_scaled(a,fs) { int fw; \ +- fw = do_packet_byte(); \ +- if (fw>127) fw = fw - 256; \ +- fw = fw*256 + do_packet_byte(); \ +- fw = fw*256 + do_packet_byte(); \ +- fw = fw*256 + do_packet_byte(); \ +- a = store_scaled_f(fw, fs); } ++#define packet_scaled(a, fs) { \ ++ int fw; \ ++ fw = *(vfp++); \ ++ if (fw > 127) \ ++ fw = fw - 256; \ ++ fw = fw * 256 + *(vfp++); \ ++ fw = fw * 256 + *(vfp++); \ ++ fw = fw * 256 + *(vfp++); \ ++ a = store_scaled_f(fw, fs); \ ++} + ++@ @c ++vf_struct *new_vfstruct(void) ++{ ++ vf_struct *vp = (vf_struct *) xmalloc(sizeof(vf_struct)); ++ vp->packet_stack_level = vp->packet_stack_minlevel = 0; ++ vp->packet_stack = ++ (packet_stack_record *) xmalloc(packet_stack_size * ++ sizeof(packet_stack_record)); ++ vp->lf = 0; ++ vp->fs_f = 0; ++ vp->packet_cur_s = 0; ++ vp->refpos = NULL; ++ vp->vflua = false; ++ return vp; ++} + +-@ count the number of bytes in a command packet ++@ Count the number of bytes in a command packet. + @c + int vf_packet_bytes(charinfo * co) + { +- eight_bits *vf_packets; +- int cur_packet_byte; ++ eight_bits *vf_packets, *vfp; + unsigned k; + int cmd; + +- vf_packets = get_charinfo_packets(co); ++ vfp = vf_packets = get_charinfo_packets(co); + if (vf_packets == NULL) { + return 0; + } +- cur_packet_byte = 0; +- while ((cmd = vf_packets[cur_packet_byte]) != packet_end_code) { +- cur_packet_byte++; ++ while ((cmd = *(vfp++)) != packet_end_code) { + switch (cmd) { ++ case packet_nop_code: ++ case packet_pop_code: ++ case packet_push_code: ++ break; + case packet_char_code: +- case packet_font_code: +- case packet_right_code: + case packet_down_code: ++ case packet_font_code: ++ case packet_image_code: + case packet_node_code: +- cur_packet_byte += 4; +- break; +- case packet_push_code: +- case packet_pop_code: ++ case packet_right_code: ++ vfp += 4; + break; + case packet_rule_code: +- cur_packet_byte += 8; ++ vfp += 8; + break; + case packet_special_code: + packet_number(k); /* +4 */ +- cur_packet_byte = (cur_packet_byte + (int) k); +- break; +- case packet_image_code: +- cur_packet_byte += 4; +- break; +- case packet_nop_code: ++ vfp += (int) k; + break; + default: + pdf_error("vf", "invalid DVI command (1)"); + } + }; +- return (cur_packet_byte + 1); ++ return (vfp - vf_packets); + } + +- +-@ typeset the \.{DVI} commands in the +- character packet for character |c| in current font |f| ++@ Typeset the \.{DVI} commands in the character packet ++ for character |c| in current font |f|. + @c + const char *packet_command_names[] = { + "char", "font", "pop", "push", "special", "image", +- "right", "down", "rule", "node", "nop", "end", NULL ++ "right", "down", "rule", "node", "nop", "end", "scale", "lua", NULL + }; + ++@ @c ++static float packet_float(eight_bits ** vfpp) ++{ ++ unsigned int i; ++ union U { ++ float a; ++ eight_bits b[sizeof(float)]; ++ } u; ++ eight_bits *vfp = *vfpp; ++ for (i = 0; i < sizeof(float); i++) ++ u.b[i] = *(vfp++); ++ *vfpp = vfp; ++ return u.a; ++} + ++@ The |do_vf_packet| procedure is called in order to interpret the ++ character packet for a virtual character. Such a packet may contain ++ the instruction to typeset a character from the same or an other ++ virtual font; in such cases |do_vf_packet| calls itself ++ recursively. The recursion level, i.e., the number of times this has ++ happened, is kept in the global variable |packet_cur_s| and should ++ not exceed |packet_max_recursion|. ++@c + void do_vf_packet(PDF pdf, internal_font_number vf_f, int c) + { +- internal_font_number lf; +- charinfo *co; +- scaledpos cur = { 0, 0 }, size; +- eight_bits *vf_packets; +- int cur_packet_byte; +- int cmd, fs_f; +- scaled i; ++ eight_bits *vfp; ++ posstructure *save_posstruct, localpos; ++ vf_struct *save_vfstruct, localvfstruct, *vp; ++ int cmd; + unsigned k; ++ scaledpos size; ++ scaled i; + str_number s; ++ float f; ++ packet_stack_record *mat_p; + +- posstructure localpos; /* the position structure local within this function */ +- posstructure *refpos; /* the list origin pos. on the page, provided by the caller */ +- +- lf = 0; /* for -Wall */ +- packet_cur_s++; +- if (packet_cur_s >= packet_max_recursion) +- overflow("max level recursion of virtual fonts", packet_max_recursion); +- co = get_charinfo(vf_f, c); +- vf_packets = get_charinfo_packets(co); +- if (vf_packets == NULL) { +- packet_cur_s--; +- return; +- } ++ vfp = get_charinfo_packets(get_charinfo(vf_f, c)); ++ assert(vfp != NULL); + +- refpos = pdf->posstruct; ++ save_posstruct = pdf->posstruct; + pdf->posstruct = &localpos; /* use local structure for recursion */ +- localpos.pos = refpos->pos; ++ localpos.pos = save_posstruct->pos; + localpos.dir = dir_TLT; /* invariably for vf */ + +- cur_packet_byte = 0; +- fs_f = font_size(vf_f); +- while ((cmd = vf_packets[cur_packet_byte]) != packet_end_code) { +- cur_packet_byte++; ++ save_vfstruct = pdf->vfstruct; ++ vp = pdf->vfstruct = &localvfstruct; ++ localvfstruct = *save_vfstruct; ++ ++ vp->packet_stack_minlevel = ++(vp->packet_stack_level); ++ vp->lf = 0; ++ vp->fs_f = font_size(vf_f); ++ vp->packet_cur_s++; ++ if (vp->packet_cur_s == packet_max_recursion) ++ overflow("max level recursion of virtual fonts", packet_max_recursion); ++ vp->refpos = save_posstruct; ++ vp->vflua = false; ++ ++ mat_p = &(vp->packet_stack[vp->packet_stack_level]); ++ mat_p->c0 = 1.0; ++ mat_p->c1 = 0.0; ++ mat_p->c2 = 0.0; ++ mat_p->c3 = 1.0; ++ mat_p->pos.h = 0; ++ mat_p->pos.v = 0; ++ ++ while ((cmd = *(vfp++)) != packet_end_code) { + #ifdef DEBUG +- if (cmd>packet_end_code) { +- fprintf(stdout, "do_vf_packet(%i,%i) command code = illegal \n", vf_f,c); +- } else { +- fprintf(stdout, "do_vf_packet(%i,%i) command code = %s\n",vf_f, c, packet_command_names[cmd]); +- } ++ if (cmd > packet_end_code) { ++ fprintf(stdout, "do_vf_packet(%i,%i) command code = illegal \n", ++ vf_f, c); ++ } else { ++ fprintf(stdout, "do_vf_packet(%i,%i) command code = %s\n", vf_f, c, ++ packet_command_names[cmd]); ++ } + #endif + switch (cmd) { + case packet_font_code: +- packet_number(lf); ++ packet_number(vp->lf); + break; + case packet_push_code: +- packet_stack[packet_stack_ptr].stack_h = cur.h; +- packet_stack[packet_stack_ptr].stack_v = cur.v; +- packet_stack_ptr++; ++ vp->packet_stack_level++; ++ if (vp->packet_stack_level == packet_stack_size) ++ pdf_error("vf", "packet_stack_level overflow"); ++ vp->packet_stack[vp->packet_stack_level] = *mat_p; ++ mat_p = &(vp->packet_stack[vp->packet_stack_level]); + break; + case packet_pop_code: +- packet_stack_ptr--; +- cur.h = packet_stack[packet_stack_ptr].stack_h; +- cur.v = packet_stack[packet_stack_ptr].stack_v; ++ if (vp->packet_stack_level == vp->packet_stack_minlevel) ++ pdf_error("vf", "packet_stack_level underflow"); ++ vp->packet_stack_level--; ++ mat_p = &(vp->packet_stack[vp->packet_stack_level]); + break; + case packet_char_code: + packet_number(k); +- if (!char_exists(lf, (int) k)) { +- char_warning(lf, (int) k); +- } else { +- if (has_packet(lf, (int) k)) +- do_vf_packet(pdf, lf, (int) k); ++ if (!char_exists(vp->lf, (int) k)) ++ char_warning(vp->lf, (int) k); ++ else { ++ if (has_packet(vp->lf, (int) k)) ++ do_vf_packet(pdf, vp->lf, (int) k); + else +- backend_out[glyph_node] (pdf, lf, (int) k); ++ backend_out[glyph_node] (pdf, vp->lf, (int) k); + } +- cur.h = cur.h + char_width(lf, (int) k); ++ mat_p->pos.h += char_width(vp->lf, (int) k); + break; + case packet_rule_code: +- packet_scaled(size.v, fs_f); /* height (where is depth?) */ +- packet_scaled(size.h, fs_f); ++ packet_scaled(size.v, vp->fs_f); /* height (where is depth?) */ ++ packet_scaled(size.h, vp->fs_f); + if (size.h > 0 && size.v > 0) + pdf_place_rule(pdf, 0, size); /* the 0 is unused */ +- cur.h = cur.h + size.h; ++ mat_p->pos.h += size.h; + break; + case packet_right_code: +- packet_scaled(i, fs_f); +- cur.h = cur.h + i; ++ packet_scaled(i, vp->fs_f); ++ mat_p->pos.h += i; + break; + case packet_down_code: +- packet_scaled(i, fs_f); +- cur.v = cur.v + i; ++ packet_scaled(i, vp->fs_f); ++ mat_p->pos.v += i; + break; + case packet_special_code: + packet_number(k); +- str_room((unsigned) k); ++ str_room(k); + while (k > 0) { + k--; +- append_char(do_packet_byte()); ++ append_char(*(vfp++)); + } + s = make_string(); + pdf_literal(pdf, s, scan_special, false); + flush_str(s); + break; ++ case packet_lua_code: ++ packet_number(k); ++ vp->vflua = true; ++ if (luaL_loadbuffer ++ (Luas, (const char *) vfp, (size_t) k, "packet_lua_code") ++ || lua_pcall(Luas, 0, LUA_MULTRET, 0)) ++ lua_error(Luas); ++ vp->vflua = false; ++ vfp += k; ++ break; + case packet_image_code: + packet_number(k); + vf_out_image(pdf, k); +@@ -229,34 +259,40 @@ void do_vf_packet(PDF pdf, internal_font + break; + case packet_nop_code: + break; ++ case packet_scale_code: ++ f = packet_float(&vfp); ++ mat_p->c0 = mat_p->c0 * f; ++ mat_p->c3 = mat_p->c3 * f; ++ /* pdf->pstruct->scale = f; *//* scale is still NOP */ ++ pdf->pstruct->need_tm = true; ++ pdf->pstruct->need_tf = true; ++ break; + default: + pdf_error("vf", "invalid DVI command (2)"); + } +- synch_pos_with_cur(&localpos, refpos, cur); /* trivial case, always TLT */ ++ synch_pos_with_cur(&localpos, save_posstruct, mat_p->pos); /* trivial case, always TLT */ + } +- packet_cur_s--; +- pdf->posstruct = refpos; ++ pdf->posstruct = save_posstruct; ++ pdf->vfstruct = save_vfstruct; + } + + @ @c + int *packet_local_fonts(internal_font_number f, int *num) + { +- int c, cmd, cur_packet_byte, lf, k, l, i; ++ int c, cmd, lf, k, l, i; + int localfonts[256] = { 0 }; + int *lfs; + charinfo *co; + +- eight_bits *vf_packets; ++ eight_bits *vf_packets, *vfp; + k = 0; + for (c = font_bc(f); c <= font_ec(f); c++) { + if (quick_char_exists(f, c)) { + co = get_charinfo(f, c); +- vf_packets = get_charinfo_packets(co); ++ vfp = vf_packets = get_charinfo_packets(co); + if (vf_packets == NULL) + continue; +- cur_packet_byte = 0; +- while ((cmd = vf_packets[cur_packet_byte]) != packet_end_code) { +- cur_packet_byte++; ++ while ((cmd = *(vfp++)) != packet_end_code) { + switch (cmd) { + case packet_font_code: + packet_number(lf); +@@ -269,26 +305,23 @@ int *packet_local_fonts(internal_font_nu + localfonts[k++] = lf; + } + break; +- case packet_push_code: +- case packet_pop_code: + case packet_nop_code: ++ case packet_pop_code: ++ case packet_push_code: + break; + case packet_char_code: +- case packet_right_code: + case packet_down_code: ++ case packet_image_code: + case packet_node_code: +- cur_packet_byte += 4; ++ case packet_right_code: ++ vfp += 4; + break; + case packet_rule_code: +- cur_packet_byte += 8; ++ vfp += 8; + break; + case packet_special_code: + packet_number(i); +- while (i-- > 0) +- (void) do_packet_byte(); +- break; +- case packet_image_code: +- cur_packet_byte += 4; ++ vfp += i; + break; + default: + pdf_error("vf", "invalid DVI command (3)"); +@@ -305,26 +338,22 @@ int *packet_local_fonts(internal_font_nu + return NULL; + } + +- + @ @c + void + replace_packet_fonts(internal_font_number f, int *old_fontid, + int *new_fontid, int count) + { +- int c, cmd, cur_packet_byte, lf, k, l; ++ int c, cmd, lf, k, l; + charinfo *co; +- eight_bits *vf_packets; ++ eight_bits *vf_packets, *vfp; + +- k = 0; + for (c = font_bc(f); c <= font_ec(f); c++) { + if (quick_char_exists(f, c)) { + co = get_charinfo(f, c); +- vf_packets = get_charinfo_packets(co); ++ vfp = vf_packets = get_charinfo_packets(co); + if (vf_packets == NULL) + continue; +- cur_packet_byte = 0; +- while ((cmd = vf_packets[cur_packet_byte]) != packet_end_code) { +- cur_packet_byte++; ++ while ((cmd = *(vfp++)) != packet_end_code) { + switch (cmd) { + case packet_font_code: + packet_number(lf); +@@ -335,36 +364,32 @@ replace_packet_fonts(internal_font_numbe + } + if (l < count) { + k = new_fontid[l]; +- vf_packets[(cur_packet_byte - 4)] = (eight_bits) ++ *(vfp - 4) = (eight_bits) + ((k & 0xFF000000) >> 24); +- vf_packets[(cur_packet_byte - 3)] = (eight_bits) ++ *(vfp - 3) = (eight_bits) + ((k & 0x00FF0000) >> 16); +- vf_packets[(cur_packet_byte - 2)] = (eight_bits) ++ *(vfp - 2) = (eight_bits) + ((k & 0x0000FF00) >> 8); +- vf_packets[(cur_packet_byte - 1)] = +- (eight_bits) (k & 0x000000FF); ++ *(vfp - 1) = (eight_bits) (k & 0x000000FF); + } + break; +- case packet_push_code: +- case packet_pop_code: + case packet_nop_code: ++ case packet_pop_code: ++ case packet_push_code: + break; + case packet_char_code: +- case packet_right_code: + case packet_down_code: ++ case packet_image_code: + case packet_node_code: +- cur_packet_byte += 4; ++ case packet_right_code: ++ vfp += 4; + break; + case packet_rule_code: +- cur_packet_byte += 8; ++ vfp += 8; + break; + case packet_special_code: + packet_number(k); +- while (k-- > 0) +- (void) do_packet_byte(); +- break; +- case packet_image_code: +- cur_packet_byte += 4; ++ vfp += k; + break; + default: + pdf_error("vf", "invalid DVI command (4)"); +--- texk/web2c/luatexdir/font/writecff.w ++++ texk/web2c/luatexdir/font/writecff.w 2011-10-13 07:39:33.000000000 +0000 +@@ -2990,7 +2990,7 @@ static void write_fontfile(PDF pdf, cff_ + cff_release_index(topdict); + + for (i = 0; i < offset; i++) +- fb_putchar(pdf, dest[i]); ++ strbuf_putchar(pdf->fb, dest[i]); + + xfree(dest); + return; +@@ -3168,7 +3168,7 @@ void write_cff(PDF pdf, cff_font * cffon + each (set) bit is a (present) CID. */ + if (1) { + int cid; +- cidset = pdf_new_objnum(pdf); ++ cidset = pdf_create_obj(pdf, obj_type_others, 0); + if (cidset != 0) { + size_t l = (last_cid/8)+1; + char *stream = xmalloc(l); +@@ -3179,10 +3179,14 @@ void write_cff(PDF pdf, cff_font * cffon + stream[(cid / 8)] |= (1 << (7 - (cid % 8))); + } + } +- pdf_begin_dict(pdf, cidset, 0); ++ pdf_begin_obj(pdf, cidset, OBJSTM_NEVER); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_streaminfo(pdf); ++ pdf_end_dict(pdf); + pdf_begin_stream(pdf); + pdf_out_block(pdf, stream, l); + pdf_end_stream(pdf); ++ pdf_end_obj(pdf); + } + } + +@@ -3372,23 +3376,25 @@ void write_cid_cff(PDF pdf, cff_font * c + } + + /* CIDSet: a table of bits indexed by cid, bytes with high order bit first, +- each (set) bit is a (present) CID. */ ++ each (set) bit is a (present) CID. */ + if (1) { +- cidset = pdf_new_objnum(pdf); +- if (cidset != 0) { +- size_t l = (last_cid/8)+1; +- char *stream = xmalloc(l); +- memset(stream, 0, l); +- for (cid = 1; cid <= (long) last_cid; cid++) { +- if (CIDToGIDMap[2 * cid] || CIDToGIDMap[2 * cid + 1]) { +- stream[(cid / 8)] |= (1 << (7 - (cid % 8))); +- } +- } +- pdf_begin_dict(pdf, cidset, 0); +- pdf_begin_stream(pdf); +- pdf_out_block(pdf, stream, l); +- pdf_end_stream(pdf); +- } ++ cidset = pdf_create_obj(pdf, obj_type_others, 0); ++ if (cidset != 0) { ++ size_t l = (last_cid / 8) + 1; ++ char *stream = xmalloc(l); ++ memset(stream, 0, l); ++ for (cid = 1; cid <= (long) last_cid; cid++) { ++ if (CIDToGIDMap[2 * cid] || CIDToGIDMap[2 * cid + 1]) { ++ stream[(cid / 8)] |= (1 << (7 - (cid % 8))); ++ } ++ } ++ pdf_begin_obj(pdf, cidset, OBJSTM_NEVER); ++ pdf_begin_dict(pdf); ++ pdf_begin_stream(pdf); ++ pdf_out_block(pdf, stream, l); ++ pdf_end_stream(pdf); ++ pdf_end_obj(pdf); ++ } + } + + +@@ -3551,7 +3557,7 @@ void writetype1w(PDF pdf, fd_entry * fd) + write_cff(pdf, cff, fd); + } else { + for (i = 0; i < tfm_size; i++) +- fb_putchar(pdf, tfm_buffer[i]); ++ strbuf_putchar(pdf->fb, tfm_buffer[i]); + } + fd->ff_found = 1; + } else { +--- texk/web2c/luatexdir/font/writeenc.w ++++ texk/web2c/luatexdir/font/writeenc.w 2011-10-13 07:39:33.000000000 +0000 +@@ -1,7 +1,7 @@ + % writeenc.w +-% ++ + % Copyright 1996-2006 Han The Thanh +-% Copyright 2006-2008 Taco Hoekwater ++% Copyright 2006-2011 Taco Hoekwater + + % This file is part of LuaTeX. + +@@ -89,31 +89,32 @@ fe_entry *get_fe_entry(char *s) + + @ @c + static void write_enc(PDF pdf, char **glyph_names, struct avl_table *tx_tree, +- int fe_objnum) ++ int fe_objnum) + { + int i_old, *p; + struct avl_traverser t; + assert(glyph_names != NULL); + assert(tx_tree != NULL); + assert(fe_objnum != 0); +- pdf_begin_dict(pdf, fe_objnum, 1); +- pdf_puts(pdf, "/Type /Encoding\n"); +- pdf_puts(pdf, "/Differences ["); ++ pdf_begin_obj(pdf, fe_objnum, OBJSTM_ALWAYS); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_name(pdf, "Type", "Encoding"); ++ pdf_add_name(pdf, "Differences"); ++ pdf_begin_array(pdf); + avl_t_init(&t, tx_tree); + for (i_old = -2, p = (int *) avl_t_first(&t, tx_tree); p != NULL; + p = (int *) avl_t_next(&t)) { +- if (*p == i_old + 1) /* no gap */ +- pdf_printf(pdf, "/%s", glyph_names[*p]); ++ if (*p == i_old + 1) /* consecutive */ ++ pdf_add_name(pdf, glyph_names[*p]); + else { +- if (i_old == -2) +- pdf_printf(pdf, "%i/%s", *p, glyph_names[*p]); +- else +- pdf_printf(pdf, " %i/%s", *p, glyph_names[*p]); ++ pdf_add_int(pdf, *p); ++ pdf_add_name(pdf, glyph_names[*p]); + } + i_old = *p; + } +- pdf_puts(pdf, "]\n"); ++ pdf_end_array(pdf); + pdf_end_dict(pdf); ++ pdf_end_obj(pdf); + } + + static void write_fontencoding(PDF pdf, fe_entry * fe) +@@ -135,7 +136,7 @@ void write_fontencodings(PDF pdf) + write_fontencoding(pdf, fe); + } + +-@ cleaning up... ++@ cleaning up... + @c + + static void destroy_fe_entry(void *pa, void *pb) +--- texk/web2c/luatexdir/font/writefont.w ++++ texk/web2c/luatexdir/font/writefont.w 2011-10-13 07:39:33.000000000 +0000 +@@ -177,15 +177,16 @@ static void write_fontmetrics(PDF pdf, f + { + int i; + fix_fontmetrics(fd); +- pdf_printf(pdf, "/%s [%i %i %i %i]\n", font_key[FONTBBOX1_CODE].pdfname, +- (int) fd->font_dim[FONTBBOX1_CODE].val, ++ pdf_add_name(pdf, font_key[FONTBBOX1_CODE].pdfname); ++ pdf_begin_array(pdf); ++ pdf_printf(pdf, "%i %i %i %i", (int) fd->font_dim[FONTBBOX1_CODE].val, + (int) fd->font_dim[FONTBBOX2_CODE].val, + (int) fd->font_dim[FONTBBOX3_CODE].val, + (int) fd->font_dim[FONTBBOX4_CODE].val); ++ pdf_end_array(pdf); + for (i = 0; i < GEN_KEY_NUM; i++) + if (fd->font_dim[i].set) +- pdf_printf(pdf, "/%s %i\n", font_key[i].pdfname, +- fd->font_dim[i].val); ++ pdf_dict_add_int(pdf, font_key[i].pdfname, fd->font_dim[i].val); + } + + @ +@@ -200,15 +201,22 @@ static void preset_fontname(fo_entry * f + fo->fd->fontname = xstrdup(fo->fm->tfm_name); + } + +-static void write_fontname(PDF pdf, fd_entry * fd, const char *key) ++static void pdf_dict_add_fontname(PDF pdf, const char *key, fd_entry * fd) + { ++ char *s; ++ size_t l1 = 0, l2; + assert(fd->fontname != NULL); +- pdf_puts(pdf, "/"); +- if (key != NULL) +- pdf_printf(pdf, "%s /", key); ++ assert(key != NULL); + if (fd->subset_tag != NULL) +- pdf_printf(pdf, "%s+", fd->subset_tag); +- pdf_printf(pdf, "%s\n", fd->fontname); ++ l1 = strlen(fd->subset_tag); ++ l2 = strlen(fd->fontname); ++ s = xmalloc(l1 + l2 + 2); ++ if (l1 > 0) ++ snprintf(s, l1 + l2 + 2, "%s+%s", fd->subset_tag, fd->fontname); ++ else ++ snprintf(s, l2 + 1, "%s", fd->fontname); ++ pdf_dict_add_name(pdf, key, s); ++ xfree(s); + } + + @ +@@ -360,15 +368,15 @@ static void write_charwidth_array(PDF pd + struct avl_traverser t; + assert(fo->tx_tree != NULL); + assert(fo->cw_objnum == 0); +- fo->cw_objnum = pdf_new_objnum(pdf); +- pdf_begin_obj(pdf, fo->cw_objnum, 1); ++ fo->cw_objnum = pdf_create_obj(pdf, obj_type_others, 0); ++ pdf_begin_obj(pdf, fo->cw_objnum, OBJSTM_ALWAYS); + avl_t_init(&t, fo->tx_tree); + fip = (int *) avl_t_first(&t, fo->tx_tree); + assert(fip != NULL); +- pdf_puts(pdf, "["); ++ pdf_begin_array(pdf); + for (ip = fip, j = *ip; ip != NULL; ip = (int *) avl_t_next(&t)) { + if (ip != fip) +- pdf_puts(pdf, " "); ++ pdf_out(pdf, ' '); + i = *ip; + while (j < i - 1) { + pdf_puts(pdf, "0 "); +@@ -377,7 +385,7 @@ static void write_charwidth_array(PDF pd + j = i; + pdf_print_charwidth(pdf, f, i); + } +- pdf_puts(pdf, "]\n"); ++ pdf_end_array(pdf); + pdf_end_obj(pdf); + } + +@@ -440,30 +448,35 @@ static void write_fontfile(PDF pdf, fd_e + if (!fd->ff_found) + return; + assert(fd->ff_objnum == 0); +- fd->ff_objnum = pdf_new_objnum(pdf); +- pdf_begin_dict(pdf, fd->ff_objnum, 0); /* font file stream */ ++ fd->ff_objnum = pdf_create_obj(pdf, obj_type_others, 0); ++ pdf_begin_obj(pdf, fd->ff_objnum, OBJSTM_NEVER); /* font file stream */ ++ pdf_begin_dict(pdf); + if (is_cidkeyed(fd->fm)) { + /* No subtype is used for TrueType-based OpenType fonts */ + if (is_opentype(fd->fm) || is_type1(fd->fm)) +- pdf_puts(pdf, "/Subtype /CIDFontType0C\n"); ++ pdf_dict_add_name(pdf, "Subtype", "CIDFontType0C"); + #if 0 +- else +- pdf_puts(pdf,"/Subtype /OpenType\n"); ++ else ++ pdf_dict_add_name(pdf, "Subtype", "OpenType"); + #endif + } else { +- if (is_type1(fd->fm)) +- pdf_printf(pdf, "/Length1 %i\n/Length2 %i\n/Length3 %i\n", +- (int) t1_length1, (int) t1_length2, (int) t1_length3); +- else if (is_truetype(fd->fm)) +- pdf_printf(pdf, "/Length1 %i\n", (int) ttf_length); ++ if (is_type1(fd->fm)) { ++ pdf_dict_add_int(pdf, "Length1", (int) t1_length1); ++ pdf_dict_add_int(pdf, "Length2", (int) t1_length2); ++ pdf_dict_add_int(pdf, "Length3", (int) t1_length3); ++ } else if (is_truetype(fd->fm)) ++ pdf_dict_add_int(pdf, "Length1", (int) ttf_length); + else if (is_opentype(fd->fm)) +- pdf_puts(pdf, "/Subtype /Type1C\n"); ++ pdf_dict_add_name(pdf, "Subtype", "Type1C"); + else + assert(0); + } ++ pdf_dict_add_streaminfo(pdf); ++ pdf_end_dict(pdf); + pdf_begin_stream(pdf); +- fb_flush(pdf); ++ strbuf_flush(pdf, pdf->fb); + pdf_end_stream(pdf); ++ pdf_end_obj(pdf); + } + + @ +@@ -495,14 +508,15 @@ static void write_fontdescriptor(PDF pdf + struct avl_traverser t; + int fd_flags; + assert(fd != NULL && fd->fm != NULL); +- cidset = 0; /* possibly updated by |write_fontfile| */ ++ cidset = 0; /* possibly updated by |write_fontfile| */ + if (is_fontfile(fd->fm) && is_included(fd->fm)) + write_fontfile(pdf, fd); /* this will set |fd->ff_found| if font file is found */ + if (fd->fd_objnum == 0) +- fd->fd_objnum = pdf_new_objnum(pdf); +- pdf_begin_dict(pdf, fd->fd_objnum, 1); +- pdf_puts(pdf, "/Type /FontDescriptor\n"); +- write_fontname(pdf, fd, "FontName"); ++ fd->fd_objnum = pdf_create_obj(pdf, obj_type_others, 0); ++ pdf_begin_obj(pdf, fd->fd_objnum, OBJSTM_ALWAYS); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_name(pdf, "Type", "FontDescriptor"); ++ pdf_dict_add_fontname(pdf, "FontName", fd); + if (fd->fm->fd_flags != FD_FLAGS_NOT_SET_IN_MAPLINE) + fd_flags = (int) fd->fm->fd_flags; + else if (fd->ff_found) +@@ -517,16 +531,16 @@ static void write_fontdescriptor(PDF pdf + fd->fm->ps_name != NULL ? fd->fm->ps_name : "No name given", + fd->fm->tfm_name, fd_flags); + } +- pdf_printf(pdf, "/Flags %i\n", fd_flags); ++ pdf_dict_add_int(pdf, "Flags", fd_flags); + write_fontmetrics(pdf, fd); + if (fd->ff_found) { + if (is_cidkeyed(fd->fm)) { + if (is_type1(fd->fm)) +- pdf_printf(pdf, "/FontFile3 %i 0 R\n", (int) fd->ff_objnum); ++ pdf_dict_add_ref(pdf, "FontFile3", (int) fd->ff_objnum); + else if (is_truetype(fd->fm)) +- pdf_printf(pdf, "/FontFile2 %i 0 R\n", (int) fd->ff_objnum); ++ pdf_dict_add_ref(pdf, "FontFile2", (int) fd->ff_objnum); + else if (is_opentype(fd->fm)) +- pdf_printf(pdf, "/FontFile3 %i 0 R\n", (int) fd->ff_objnum); ++ pdf_dict_add_ref(pdf, "FontFile3", (int) fd->ff_objnum); + else + assert(0); + } else { +@@ -534,29 +548,32 @@ static void write_fontdescriptor(PDF pdf + /* /CharSet is optional; names may appear in any order */ + assert(fd->gl_tree != NULL); + avl_t_init(&t, fd->gl_tree); +- pdf_puts(pdf, "/CharSet ("); ++ pdf_add_name(pdf, "CharSet"); ++ pdf_out(pdf, '('); + for (glyph = (char *) avl_t_first(&t, fd->gl_tree); + glyph != NULL; glyph = (char *) avl_t_next(&t)) +- pdf_printf(pdf, "/%s", glyph); +- pdf_puts(pdf, ")\n"); ++ pdf_add_name(pdf, glyph); ++ pdf_out(pdf, ')'); ++ pdf->cave = 0; + } + if (is_type1(fd->fm)) +- pdf_printf(pdf, "/FontFile %i 0 R\n", (int) fd->ff_objnum); ++ pdf_dict_add_ref(pdf, "FontFile", (int) fd->ff_objnum); + else if (is_truetype(fd->fm)) +- pdf_printf(pdf, "/FontFile2 %i 0 R\n", (int) fd->ff_objnum); ++ pdf_dict_add_ref(pdf, "FontFile2", (int) fd->ff_objnum); + else if (is_opentype(fd->fm)) +- pdf_printf(pdf, "/FontFile3 %i 0 R\n", (int) fd->ff_objnum); ++ pdf_dict_add_ref(pdf, "FontFile3", (int) fd->ff_objnum); + else + assert(0); + } + } +- if (cidset !=0) +- pdf_printf(pdf, "/CIDSet %i 0 R\n", cidset); ++ if (cidset != 0) ++ pdf_dict_add_ref(pdf, "CIDSet", cidset); + /* TODO: Other optional keys for CID fonts. + The most interesting one is + \.{/Style << /Panose <12-byte string>>>} + */ + pdf_end_dict(pdf); ++ pdf_end_obj(pdf); + } + + static void write_fontdescriptors(PDF pdf) +@@ -591,34 +608,36 @@ static void write_fontdictionary(PDF pdf + fo->fm->tfm_name); + } + } +- pdf_begin_dict(pdf, fo->fo_objnum, 1); +- pdf_puts(pdf, "/Type /Font\n"); +- pdf_puts(pdf, "/Subtype /"); ++ pdf_begin_obj(pdf, fo->fo_objnum, OBJSTM_ALWAYS); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_name(pdf, "Type", "Font"); + if (is_type1(fo->fm)) +- pdf_printf(pdf, "%s\n", "Type1"); ++ pdf_dict_add_name(pdf, "Subtype", "Type1"); + else if (is_truetype(fo->fm)) +- pdf_printf(pdf, "%s\n", "TrueType"); ++ pdf_dict_add_name(pdf, "Subtype", "TrueType"); + else if (is_opentype(fo->fm)) +- pdf_printf(pdf, "%s\n", "Type1"); ++ pdf_dict_add_name(pdf, "Subtype", "Type1"); + else + assert(0); + assert(fo->fd != NULL && fo->fd->fd_objnum != 0); +- write_fontname(pdf, fo->fd, "BaseFont"); +- pdf_printf(pdf, "/FontDescriptor %i 0 R\n", (int) fo->fd->fd_objnum); ++ pdf_dict_add_fontname(pdf, "BaseFont", fo->fd); ++ pdf_dict_add_ref(pdf, "FontDescriptor", (int) fo->fd->fd_objnum); + assert(fo->cw_objnum != 0); +- pdf_printf(pdf, "/FirstChar %i\n/LastChar %i\n/Widths %i 0 R\n", +- (int) fo->first_char, (int) fo->last_char, (int) fo->cw_objnum); ++ pdf_dict_add_int(pdf, "FirstChar", (int) fo->first_char); ++ pdf_dict_add_int(pdf, "LastChar", (int) fo->last_char); ++ pdf_dict_add_ref(pdf, "Widths", (int) fo->cw_objnum); + if ((is_type1(fo->fm) || is_opentype(fo->fm)) && fo->fe != NULL + && fo->fe->fe_objnum != 0) +- pdf_printf(pdf, "/Encoding %i 0 R\n", (int) fo->fe->fe_objnum); ++ pdf_dict_add_ref(pdf, "Encoding", (int) fo->fe->fe_objnum); + if (fo->tounicode_objnum != 0) +- pdf_printf(pdf, "/ToUnicode %i 0 R\n", (int) fo->tounicode_objnum); ++ pdf_dict_add_ref(pdf, "ToUnicode", (int) fo->tounicode_objnum); + if (pdf_font_attr(fo->tex_font) != get_nullstr() && + pdf_font_attr(fo->tex_font) != 0) { + pdf_print(pdf, pdf_font_attr(fo->tex_font)); +- pdf_puts(pdf, "\n"); ++ pdf_out(pdf, '\n'); + } + pdf_end_dict(pdf); ++ pdf_end_obj(pdf); + } + + static void write_fontdictionaries(PDF pdf) +@@ -661,7 +680,7 @@ static void create_fontdictionary(PDF pd + fo->fe = get_fe_entry(fo->fm->encname); /* returns |NULL| if .enc file couldn't be opened */ + if (fo->fe != NULL && (is_type1(fo->fm) || is_opentype(fo->fm))) { + if (fo->fe->fe_objnum == 0) +- fo->fe->fe_objnum = pdf_new_objnum(pdf); /* then it will be written out */ ++ fo->fe->fe_objnum = pdf_create_obj(pdf, obj_type_others, 0); /* then it will be written out */ + /* mark encoding pairs used by TeX to optimize encoding vector */ + fo->fe->tx_tree = mark_chars(fo, fo->fe->tx_tree, f); + } +@@ -901,24 +920,28 @@ static void write_cid_charwidth_array(PD + struct avl_traverser t; + + assert(fo->cw_objnum == 0); +- fo->cw_objnum = pdf_new_objnum(pdf); +- pdf_begin_obj(pdf, fo->cw_objnum, 1); ++ fo->cw_objnum = pdf_create_obj(pdf, obj_type_others, 0); ++ pdf_begin_obj(pdf, fo->cw_objnum, OBJSTM_ALWAYS); + avl_t_init(&t, fo->fd->gl_tree); + glyph = (glw_entry *) avl_t_first(&t, fo->fd->gl_tree); + assert(glyph != NULL); + i = (int) glyph->id; +- pdf_printf(pdf, "[ %i [", i); ++ pdf_begin_array(pdf); ++ pdf_add_int(pdf, i); ++ pdf_begin_array(pdf); + for (; glyph != NULL; glyph = (glw_entry *) avl_t_next(&t)) { + j = glyph->wd; + if (glyph->id > (unsigned) (i + 1)) { +- pdf_printf(pdf, "] %i [", glyph->id); ++ pdf_end_array(pdf); ++ pdf_add_int(pdf, glyph->id); ++ pdf_begin_array(pdf); + j = glyph->wd; + } + if (glyph->id == (unsigned) (i + 1)) +- pdf_puts(pdf, " "); ++ pdf_out(pdf, ' '); + + if (j < 0) { +- pdf_puts(pdf, "-"); ++ pdf_out(pdf, '-'); + j = -j; + } + +@@ -928,7 +951,8 @@ static void write_cid_charwidth_array(PD + + i = (int) glyph->id; + } +- pdf_puts(pdf, "]]\n"); ++ pdf_end_array(pdf); ++ pdf_end_array(pdf); + pdf_end_obj(pdf); + } + +@@ -965,44 +989,53 @@ void write_cid_fontdictionary(PDF pdf, f + + fo->tounicode_objnum = write_cid_tounicode(pdf, fo, f); + +- pdf_begin_dict(pdf, fo->fo_objnum, 1); +- pdf_puts(pdf, "/Type /Font\n"); +- pdf_puts(pdf, "/Subtype /Type0\n"); +- pdf_puts(pdf, "/Encoding /Identity-H\n"); +- write_fontname(pdf, fo->fd, "BaseFont"); +- i = pdf_new_objnum(pdf); +- pdf_printf(pdf, "/DescendantFonts [%i 0 R]\n", i); ++ pdf_begin_obj(pdf, fo->fo_objnum, OBJSTM_ALWAYS); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_name(pdf, "Type", "Font"); ++ pdf_dict_add_name(pdf, "Subtype", "Type0"); ++ pdf_dict_add_name(pdf, "Encoding", "Identity-H"); ++ pdf_dict_add_fontname(pdf, "BaseFont", fo->fd); ++ i = pdf_create_obj(pdf, obj_type_others, 0); ++ pdf_add_name(pdf, "DescendantFonts"); ++ pdf_begin_array(pdf); ++ pdf_add_ref(pdf, i); ++ pdf_end_array(pdf); + /* todo: the ToUnicode CMap */ + if (fo->tounicode_objnum != 0) +- pdf_printf(pdf, "/ToUnicode %i 0 R\n", (int) fo->tounicode_objnum); +- ++ pdf_dict_add_ref(pdf, "ToUnicode", (int) fo->tounicode_objnum); + pdf_end_dict(pdf); ++ pdf_end_obj(pdf); + +- pdf_begin_dict(pdf, i, 1); +- pdf_puts(pdf, "/Type /Font\n"); ++ pdf_begin_obj(pdf, i, OBJSTM_ALWAYS); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_name(pdf, "Type", "Font"); + if (is_opentype(fo->fm) || is_type1(fo->fm)) { +- pdf_puts(pdf, "/Subtype /CIDFontType0\n"); ++ pdf_dict_add_name(pdf, "Subtype", "CIDFontType0"); + } else { +- pdf_puts(pdf, "/Subtype /CIDFontType2\n"); +- pdf_printf(pdf, "/CIDToGIDMap /Identity\n"); ++ pdf_dict_add_name(pdf, "Subtype", "CIDFontType2"); ++ pdf_dict_add_name(pdf, "CIDToGIDMap", "Identity"); + } +- write_fontname(pdf, fo->fd, "BaseFont"); +- pdf_printf(pdf, "/FontDescriptor %i 0 R\n", (int) fo->fd->fd_objnum); +- pdf_printf(pdf, "/W %i 0 R\n", (int) fo->cw_objnum); +- pdf_printf(pdf, "/CIDSystemInfo <<\n"); +- pdf_printf(pdf, "/Registry (%s)\n", +- (font_cidregistry(f) ? font_cidregistry(f) : "Adobe")); +- pdf_printf(pdf, "/Ordering (%s)\n", +- (font_cidordering(f) ? font_cidordering(f) : "Identity")); +- pdf_printf(pdf, "/Supplement %u\n", (unsigned int) font_cidsupplement(f)); +- pdf_printf(pdf, ">>\n"); ++ pdf_dict_add_fontname(pdf, "BaseFont", fo->fd); ++ pdf_dict_add_ref(pdf, "FontDescriptor", (int) fo->fd->fd_objnum); ++ pdf_dict_add_ref(pdf, "W", (int) fo->cw_objnum); ++ pdf_add_name(pdf, "CIDSystemInfo"); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_string(pdf, "Registry", ++ (font_cidregistry(f) ? font_cidregistry(f) : "Adobe")); ++ pdf_dict_add_string(pdf, "Ordering", ++ (font_cidordering(f) ? font_cidordering(f) : ++ "Identity")); ++ pdf_dict_add_int(pdf, "Supplement", (int) font_cidsupplement(f)); ++ pdf_end_dict(pdf); + + /* I doubt there is anything useful that could be written here */ + #if 0 +- if (pdf_font_attr(fo->tex_font) != get_nullstr()) { +- pdf_print(pdf_font_attr(fo->tex_font)); +- pdf_puts(pdf,"\n"); +- } ++ if (pdf_font_attr(fo->tex_font) != get_nullstr()) { ++ pdf_out(pdf, '\n'); ++ pdf_print(pdf_font_attr(fo->tex_font)); ++ pdf_out(pdf, '\n'); ++ } + #endif + pdf_end_dict(pdf); ++ pdf_end_obj(pdf); + } +--- texk/web2c/luatexdir/font/writet1.w ++++ texk/web2c/luatexdir/font/writet1.w 2011-10-13 07:39:33.000000000 +0000 +@@ -32,8 +32,8 @@ static const char _svn_version[] = + #define get_length3() t1_length3 = fixedcontent? t1_offset() - t1_save_offset : 0 + #define save_offset() t1_save_offset = t1_offset() + +-#define t1_putchar(A) fb_putchar(pdf,(A)) +-#define t1_offset() fb_offset(pdf) ++#define t1_putchar(A) strbuf_putchar(pdf->fb, (A)) ++#define t1_offset() strbuf_offset(pdf->fb) + #define out_eexec_char t1_putchar + + #define end_last_eexec_line() \ +@@ -41,8 +41,6 @@ static const char _svn_version[] = + #define t1_char(c) c + #define embed_all_glyphs(tex_font) fm_cur->all_glyphs + #define extra_charset() fm_cur->charset +-#define update_subset_tag() \ +- strncpy(pdf->fb_array + t1_fontname_offset, fm_cur->subset_tag, 6) + #define fixedcontent false + + int t1_length1, t1_length2, t1_length3; +@@ -52,7 +50,6 @@ static int t1_fontname_offset; + static unsigned char *t1_buffer = NULL; + static int t1_size = 0; + static int t1_curbyte = 0; +- + @ @c + #define t1_read_file() \ + readbinfile(t1_file,&t1_buffer,&t1_size) +@@ -1364,7 +1361,8 @@ static void t1_subset_ascii_part(PDF pdf + } + make_subset_tag(fd_cur); + assert(t1_fontname_offset != 0); +- strncpy(pdf->fb_array + t1_fontname_offset, fd_cur->subset_tag, 6); ++ strncpy((char *) pdf->fb->data + t1_fontname_offset, fd_cur->subset_tag, ++ 6); + } + /* now really all glyphs needed from this font are in the |fd_cur->gl_tree| */ + if (t1_encoding == ENC_STANDARD) +@@ -1387,7 +1385,7 @@ static void t1_subset_ascii_part(PDF pdf + destroy_t1_glyph_tree(gl_tree); + if (j == 0) + /* We didn't mark anything for the Encoding array. +- We add \.{dup 0 /.notdef put} for compatibility with Acrobat 5.0. */ ++ We add \.{dup 0 /.notdef put} for compatibility with Acrobat 5.0. */ + t1_puts(pdf, "dup 0 /.notdef put\n"); + t1_puts(pdf, "readonly def\n"); + } +--- texk/web2c/luatexdir/font/writet3.w ++++ texk/web2c/luatexdir/font/writet3.w 2011-10-13 07:39:33.000000000 +0000 +@@ -1,7 +1,7 @@ + % writet3.w + + % Copyright 1996-2006 Han The Thanh +-% Copyright 2006-2010 Taco Hoekwater ++% Copyright 2006-2011 Taco Hoekwater + + % This file is part of LuaTeX. + +@@ -98,6 +98,7 @@ static boolean writepk(PDF pdf, internal + kpse_glyph_file_type font_ret; + int llx, lly, urx, ury; + int cw, rw, i, j; ++ pdffloat pf; + halfword *row; + char *name; + char *ftemp = NULL; +@@ -187,9 +188,14 @@ static boolean writepk(PDF pdf, internal + ury = cd.cheight + lly; + update_bbox(llx, lly, urx, ury, t3_glyph_num == 0); + t3_glyph_num++; +- t3_char_procs[cd.charcode] = pdf_new_dict(pdf, obj_type_others, 0, 0); ++ t3_char_procs[cd.charcode] = pdf_create_obj(pdf, obj_type_others, 0); ++ pdf_begin_obj(pdf, t3_char_procs[cd.charcode], OBJSTM_NEVER); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_streaminfo(pdf); ++ pdf_end_dict(pdf); + pdf_begin_stream(pdf); +- pdf_print_real(pdf, (int) t3_char_widths[cd.charcode], 2); ++ setpdffloat(pf, (int) t3_char_widths[cd.charcode], 2); ++ print_pdffloat(pdf, pf); + pdf_printf(pdf, " 0 %i %i %i %i d1\n", + (int) llx, (int) lly, (int) urx, (int) ury); + if (is_null_glyph) +@@ -215,6 +221,7 @@ static boolean writepk(PDF pdf, internal + pdf_puts(pdf, "\nEI\nQ\n"); + end_stream: + pdf_end_stream(pdf); ++ pdf_end_obj(pdf); + } + xfree(cd.raster); + cur_file_name = NULL; +@@ -225,11 +232,12 @@ static boolean writepk(PDF pdf, internal + @c + void writet3(PDF pdf, internal_font_number f) + { +- + int i; ++ char s[32]; + int wptr, eptr, cptr; + int first_char, last_char; + int pk_font_scale; ++ pdffloat pf; + boolean is_notdef; + + t3_glyph_num = 0; +@@ -253,77 +261,123 @@ void writet3(PDF pdf, internal_font_numb + if (pdf_char_marked(f, i)) + break; + last_char = i; +- pdf_begin_dict(pdf, pdf_font_num(f), 1); /* Type 3 font dictionary */ +- pdf_puts(pdf, "/Type /Font\n/Subtype /Type3\n"); +- pdf_printf(pdf, "/Name /F%i\n", (int) f); ++ ++ /* Type 3 font dictionary */ ++ pdf_begin_obj(pdf, pdf_font_num(f), OBJSTM_ALWAYS); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_name(pdf, "Type", "Font"); ++ pdf_dict_add_name(pdf, "Subtype", "Type3"); ++ snprintf(s, 31, "F%i", (int) f); ++ pdf_dict_add_name(pdf, "Name", s); + if (pdf_font_attr(f) != get_nullstr() && pdf_font_attr(f) != 0) { ++ pdf_out(pdf, '\n'); + pdf_print(pdf, pdf_font_attr(f)); +- pdf_puts(pdf, "\n"); ++ pdf_out(pdf, '\n'); + } + if (is_pk_font) { + pk_font_scale = + get_pk_font_scale(f, pdf->decimal_digits, pdf->pk_scale_factor); +- pdf_puts(pdf, "/FontMatrix ["); +- pdf_print_real(pdf, pk_font_scale, 5); ++ pdf_add_name(pdf, "FontMatrix"); ++ pdf_begin_array(pdf); ++ setpdffloat(pf, pk_font_scale, 5); ++ print_pdffloat(pdf, pf); + pdf_puts(pdf, " 0 0 "); +- pdf_print_real(pdf, pk_font_scale, 5); +- pdf_puts(pdf, " 0 0]\n"); +- } else +- pdf_printf(pdf, "/FontMatrix [%g 0 0 %g 0 0]\n", ++ print_pdffloat(pdf, pf); ++ pdf_puts(pdf, " 0 0"); ++ pdf_end_array(pdf); ++ } else { ++ pdf_add_name(pdf, "FontMatrix"); ++ pdf_begin_array(pdf); ++ pdf_printf(pdf, "%g 0 0 %g 0 0", + (double) t3_font_scale, (double) t3_font_scale); +- pdf_printf(pdf, "/%s [ %i %i %i %i ]\n", +- font_key[FONTBBOX1_CODE].pdfname, +- (int) t3_b0, (int) t3_b1, (int) t3_b2, (int) t3_b3); +- pdf_printf(pdf, "/Resources << /ProcSet [ /PDF %s] >>\n", +- t3_image_used ? "/ImageB " : ""); +- pdf_printf(pdf, "/FirstChar %i\n/LastChar %i\n", first_char, last_char); +- wptr = pdf_new_objnum(pdf); +- eptr = pdf_new_objnum(pdf); +- cptr = pdf_new_objnum(pdf); +- pdf_printf(pdf, "/Widths %i 0 R\n/Encoding %i 0 R\n/CharProcs %i 0 R\n", +- (int) wptr, (int) eptr, (int) cptr); ++ pdf_end_array(pdf); ++ } ++ pdf_add_name(pdf, font_key[FONTBBOX1_CODE].pdfname); ++ pdf_begin_array(pdf); ++ pdf_add_int(pdf, (int) t3_b0); ++ pdf_add_int(pdf, (int) t3_b1); ++ pdf_add_int(pdf, (int) t3_b2); ++ pdf_add_int(pdf, (int) t3_b3); ++ pdf_end_array(pdf); ++ pdf_add_name(pdf, "Resources"); ++ pdf_begin_dict(pdf); ++ pdf_add_name(pdf, "ProcSet"); ++ pdf_begin_array(pdf); ++ pdf_add_name(pdf, "PDF"); ++ if (t3_image_used) ++ pdf_add_name(pdf, "ImageB"); ++ pdf_end_array(pdf); ++ pdf_end_dict(pdf); ++ pdf_dict_add_int(pdf, "FirstChar", first_char); ++ pdf_dict_add_int(pdf, "LastChar", last_char); ++ wptr = pdf_create_obj(pdf, obj_type_others, 0); ++ eptr = pdf_create_obj(pdf, obj_type_others, 0); ++ cptr = pdf_create_obj(pdf, obj_type_others, 0); ++ pdf_dict_add_ref(pdf, "Widths", (int) wptr); ++ pdf_dict_add_ref(pdf, "Encoding", (int) eptr); ++ pdf_dict_add_ref(pdf, "CharProcs", (int) cptr); + pdf_end_dict(pdf); +- pdf_begin_obj(pdf, wptr, 1); /* chars width array */ +- pdf_puts(pdf, "["); ++ pdf_end_obj(pdf); ++ ++ /* chars width array */ ++ pdf_begin_obj(pdf, wptr, OBJSTM_ALWAYS); ++ pdf_begin_array(pdf); + if (is_pk_font) + for (i = first_char; i <= last_char; i++) { +- pdf_print_real(pdf, (int) t3_char_widths[i], 2); +- pdf_puts(pdf, " "); ++ setpdffloat(pf, (int) t3_char_widths[i], 2); ++ print_pdffloat(pdf, pf); ++ pdf_out(pdf, ' '); + } else + for (i = first_char; i <= last_char; i++) +- pdf_printf(pdf, "%i ", (int) t3_char_widths[i]); +- pdf_puts(pdf, "]\n"); ++ pdf_add_int(pdf, (int) t3_char_widths[i]); ++ pdf_end_array(pdf); + pdf_end_obj(pdf); +- pdf_begin_dict(pdf, eptr, 1); /* encoding dictionary */ +- pdf_printf(pdf, "/Type /Encoding\n/Differences [%i", first_char); ++ ++ /* encoding dictionary */ ++ pdf_begin_obj(pdf, eptr, OBJSTM_ALWAYS); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_name(pdf, "Type", "Encoding"); ++ pdf_add_name(pdf, "Differences"); ++ pdf_begin_array(pdf); ++ pdf_add_int(pdf, first_char); + if (t3_char_procs[first_char] == 0) { +- pdf_printf(pdf, "/%s", notdef); ++ pdf_add_name(pdf, notdef); + is_notdef = true; + } else { +- pdf_printf(pdf, "/a%i", first_char); ++ snprintf(s, 31, "a%i", first_char); ++ pdf_add_name(pdf, s); + is_notdef = false; + } + for (i = first_char + 1; i <= last_char; i++) { + if (t3_char_procs[i] == 0) { + if (!is_notdef) { +- pdf_printf(pdf, " %i/%s", i, notdef); ++ pdf_add_int(pdf, i); ++ pdf_add_name(pdf, notdef); + is_notdef = true; + } + } else { + if (is_notdef) { +- pdf_printf(pdf, " %i", i); ++ pdf_add_int(pdf, i); + is_notdef = false; + } +- pdf_printf(pdf, "/a%i", i); ++ snprintf(s, 31, "a%i", i); ++ pdf_add_name(pdf, s); + } + } +- pdf_puts(pdf, "]\n"); ++ pdf_end_array(pdf); + pdf_end_dict(pdf); +- pdf_begin_dict(pdf, cptr, 1); /* CharProcs dictionary */ ++ pdf_end_obj(pdf); ++ ++ /* CharProcs dictionary */ ++ pdf_begin_obj(pdf, cptr, OBJSTM_ALWAYS); ++ pdf_begin_dict(pdf); + for (i = first_char; i <= last_char; i++) +- if (t3_char_procs[i] != 0) +- pdf_printf(pdf, "/a%i %i 0 R\n", (int) i, (int) t3_char_procs[i]); ++ if (t3_char_procs[i] != 0) { ++ snprintf(s, 31, "a%i", (int) i); ++ pdf_dict_add_ref(pdf, s, (int) t3_char_procs[i]); ++ } + pdf_end_dict(pdf); ++ pdf_end_obj(pdf); + if (tracefilenames) + tex_printf(">"); + cur_file_name = NULL; +--- texk/web2c/luatexdir/font/writettf.w ++++ texk/web2c/luatexdir/font/writettf.w 2011-10-13 07:39:33.000000000 +0000 +@@ -24,15 +24,15 @@ + #include + + static const char _svn_version[] = +- "$Id: writettf.w 3789 2010-08-02 19:59:49Z oneiros $ " +-"$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/font/writettf.w $"; ++ "$Id: writettf.w 4296 2011-06-15 18:33:05Z hhenkel $ " ++"$URL: http://foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/font/writettf.w $"; + + #define DEFAULT_NTABS 14 + #define NEW_CMAP_SIZE 2 + +-#define ttf_putchar(A) fb_putchar(pdf,(A)) +-#define ttf_offset() fb_offset(pdf) +-#define ttf_seek_outbuf(A) fb_seek(pdf,(A)) ++#define ttf_putchar(A) strbuf_putchar(pdf->fb, (A)) ++#define ttf_offset() strbuf_offset(pdf->fb) ++#define ttf_seek_outbuf(A) strbuf_seek(pdf->fb, (A)) + + unsigned char *ttf_buffer = NULL; + int ttf_size = 0; +@@ -1260,7 +1260,7 @@ static void ttf_write_dirtab(PDF pdf) + /* adjust checkSumAdjustment */ + tmp_ulong = 0; + checksum = 0; +- for (p = pdf->fb_array, i = 0; i < (unsigned) save_offset;) { ++ for (p = (char *) pdf->fb->data, i = 0; i < (unsigned) save_offset;) { + tmp_ulong = (tmp_ulong << 8) + (TTF_ULONG) * p++; + i++; + if (i % 4 == 0) { +--- texk/web2c/luatexdir/font/writetype0.w ++++ texk/web2c/luatexdir/font/writetype0.w 2011-10-13 07:39:33.000000000 +0000 +@@ -48,7 +48,8 @@ void writetype0(PDF pdf, fd_entry * fd) + cur_file_name = + luatex_find_file(fd_cur->fm->ff_name, find_opentype_file_callback); + if (cur_file_name == NULL) { +- pdftex_fail("cannot find OpenType font file for reading (%s)", fd_cur->fm->ff_name); ++ pdftex_fail("cannot find OpenType font file for reading (%s)", ++ fd_cur->fm->ff_name); + } + callback_id = callback_defined(read_opentype_file_callback); + if (callback_id > 0) { +@@ -56,11 +57,13 @@ void writetype0(PDF pdf, fd_entry * fd) + &file_opened, &ttf_buffer, &ttf_size) && + file_opened && ttf_size > 0) { + } else { +- pdftex_fail("cannot open OpenType font file for reading (%s)", cur_file_name); ++ pdftex_fail("cannot open OpenType font file for reading (%s)", ++ cur_file_name); + } + } else { + if (!otf_open(cur_file_name)) { +- pdftex_fail("cannot open OpenType font file for reading (%s)", cur_file_name); ++ pdftex_fail("cannot open OpenType font file for reading (%s)", ++ cur_file_name); + } + ttf_read_file(); + ttf_close(); +@@ -93,14 +96,14 @@ void writetype0(PDF pdf, fd_entry * fd) + if (!is_subsetted(fd_cur->fm)) { + /* not subsetted, just do a copy */ + for (i = (long) tab->length; i > 0; i--) +- fb_putchar(pdf, (eight_bits) ttf_getnum(1)); ++ strbuf_putchar(pdf->fb, (unsigned char) ttf_getnum(1)); + } else { + if (cff != NULL) { + if (cff_is_cidfont(cff)) { + write_cid_cff(pdf, cff, fd_cur); + #if 0 +- for (i = tab->length; i > 0; i--) +- fb_putchar (ttf_getnum(1)); ++ for (i = tab->length; i > 0; i--) ++ strbuf_putchar(pdf->fb, (unsigned char) ttf_getnum(1)); + #endif + } else { + write_cff(pdf, cff, fd_cur); +@@ -108,7 +111,7 @@ void writetype0(PDF pdf, fd_entry * fd) + } else { + /* not understood, just do a copy */ + for (i = (long) tab->length; i > 0; i--) +- fb_putchar(pdf, (eight_bits) ttf_getnum(1)); ++ strbuf_putchar(pdf->fb, (unsigned char) ttf_getnum(1)); + } + } + xfree(dir_tab); +--- texk/web2c/luatexdir/font/writetype2.w ++++ texk/web2c/luatexdir/font/writetype2.w 2011-10-13 07:39:33.000000000 +0000 +@@ -1,6 +1,6 @@ +-% writetype0.w ++% writetype2.w + % +-% Copyright 2006-2010 Taco Hoekwater ++% Copyright 2006-2011 Taco Hoekwater + % + % This file is part of LuaTeX. + % +@@ -38,11 +38,11 @@ unsigned long cidtogid_obj = 0; + + @ low-level helpers + @c +-#define test_loc(l) \ +- if ((f->loc+l)>f->buflen) { \ +- fprintf (stderr,"File ended prematurely\n"); \ +- uexit(1); \ +- } ++#define test_loc(l) \ ++ if ((f->loc + l) > f->buflen) { \ ++ fprintf(stderr, "File ended prematurely\n"); \ ++ uexit(1); \ ++ } + + + BYTE get_unsigned_byte(sfnt * f) +@@ -378,56 +378,65 @@ void make_tt_subset(PDF pdf, fd_entry * + + /* squeeze in the cidgidmap */ + if (cidtogidmap != NULL) { +- cidtogid_obj = (unsigned long) pdf_new_objnum(pdf); +- pdf_begin_dict(pdf, (int) cidtogid_obj, 0); +- pdf_printf(pdf, "/Length %i\n", ((last_cid + 1) * 2)); ++ cidtogid_obj = (unsigned long) pdf_create_obj(pdf, obj_type_others, 0); ++ pdf_begin_obj(pdf, (int) cidtogid_obj, OBJSTM_NEVER); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_int(pdf, "Length", ((last_cid + 1) * 2)); + pdf_end_dict(pdf); +- pdf_printf(pdf, "stream\n"); ++ assert(0); /* code unused */ ++ pdf_begin_stream(pdf); + pdf_room(pdf, (int) ((last_cid + 1) * 2)); + for (i = 0; i < ((int) (last_cid + 1) * 2); i++) { + pdf_quick_out(pdf, cidtogidmap[i]); + } +- pdf_printf(pdf, "\nendstream\n"); ++ pdf_end_stream(pdf); ++ pdf_end_obj(pdf); + } + + /* the tff subset */ + for (i = 0; i < (int) (fontfile->length); i++) +- fb_putchar(pdf, fontfile->data[i]); ++ strbuf_putchar(pdf->fb, fontfile->data[i]); + + pdf_release_obj(fontfile); + + /* CIDSet: a table of bits indexed by cid, bytes with high order bit first, +- each (set) bit is a (present) CID. */ ++ each (set) bit is a (present) CID. */ + if (is_subsetted(fd->fm)) { +- cidset = pdf_new_objnum(pdf); +- if (cidset != 0) { +- size_t l = (last_cid/8)+1; +- char *stream = xmalloc(l); +- memset(stream, 0, l); +- for (cid = 1; cid <= (long) last_cid; cid++) { +- if (used_chars[cid]) { +- stream[(cid / 8)] |= (1 << (7 - (cid % 8))); +- } +- } +- pdf_begin_dict(pdf, cidset, 0); +- pdf_begin_stream(pdf); +- pdf_out_block(pdf, stream, l); +- pdf_end_stream(pdf); +- } ++ cidset = pdf_create_obj(pdf, obj_type_others, 0); ++ if (cidset != 0) { ++ size_t l = (last_cid / 8) + 1; ++ char *stream = xmalloc(l); ++ memset(stream, 0, l); ++ for (cid = 1; cid <= (long) last_cid; cid++) { ++ if (used_chars[cid]) { ++ stream[(cid / 8)] |= (1 << (7 - (cid % 8))); ++ } ++ } ++ pdf_begin_obj(pdf, cidset, OBJSTM_NEVER); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_streaminfo(pdf); ++ pdf_end_dict(pdf); ++ pdf_begin_stream(pdf); ++ pdf_out_block(pdf, stream, l); ++ pdf_end_stream(pdf); ++ pdf_end_obj(pdf); ++ } + } + + /* TODO other stuff that needs fixing: */ + + /* DW, W, DW2, and W2 */ + #if 0 +- if (opt_flags & CIDFONT_FORCE_FIXEDPITCH) { +- pdf_add_dict(font->fontdict, +- pdf_new_name("DW"), pdf_new_number(1000.0)); +- } else { +- add_TTCIDHMetrics(font->fontdict, glyphs, used_chars, cidtogidmap, last_cid); +- if (v_used_chars) +- add_TTCIDVMetrics(font->fontdict, glyphs, used_chars, cidtogidmap, last_cid); +- } ++ if (opt_flags & CIDFONT_FORCE_FIXEDPITCH) { ++ pdf_add_dict(font->fontdict, ++ pdf_new_name("DW"), pdf_new_number(1000.0)); ++ } else { ++ add_TTCIDHMetrics(font->fontdict, glyphs, used_chars, cidtogidmap, ++ last_cid); ++ if (v_used_chars) ++ add_TTCIDVMetrics(font->fontdict, glyphs, used_chars, cidtogidmap, ++ last_cid); ++ } + #endif + + xfree(used_chars); +--- texk/web2c/luatexdir/image/epdf.h ++++ texk/web2c/luatexdir/image/epdf.h 2011-10-13 07:39:27.000000000 +0000 +@@ -1,7 +1,7 @@ + /* epdf.h + + Copyright 1996-2006 Han The Thanh +- Copyright 2006-2010 Taco Hoekwater ++ Copyright 2006-2011 Taco Hoekwater + This file is part of LuaTeX. + + LuaTeX is free software; you can redistribute it and/or modify it under +@@ -33,6 +33,7 @@ + # include + # include + # include ++# include + # include + # include + # include +@@ -80,39 +81,62 @@ extern "C" { + # include "lua51/lua.h" + # include "lua51/lauxlib.h" + +- /* pdfgen.c */ ++ /* pdfgen.w */ ++ extern int ten_pow[10]; + __attribute__ ((format(printf, 2, 3))) + extern void pdf_printf(PDF, const char *fmt, ...); +- extern void pdf_begin_obj(PDF, int, bool); ++ extern void pdf_begin_obj(PDF, int, int); + extern void pdf_end_obj(PDF); ++ extern void pdf_begin_dict(PDF); ++ extern void pdf_end_dict(PDF); ++ extern void pdf_begin_array(PDF); ++ extern void pdf_end_array(PDF); ++ extern void pdf_add_null(PDF); ++ extern void pdf_add_bool(PDF, int i); ++ extern void pdf_add_int(PDF, int i); ++ extern void pdf_add_ref(PDF, int num); ++ extern void pdf_add_name(PDF, const char *name); ++ extern void pdf_dict_add_streaminfo(PDF); + extern void pdf_begin_stream(PDF); + extern void pdf_end_stream(PDF); + extern void pdf_room(PDF, int); + extern void pdf_out_block(PDF pdf, const char *s, size_t n); + +-# define pdf_out(B, A) do { pdf_room(B, 1); B->buf[B->ptr++] = A; } while (0) ++ extern void pdf_dict_add_int(PDF, const char *key, int i); ++ extern void pdf_dict_add_ref(PDF, const char *key, int num); ++ extern void pdf_dict_add_name(PDF, const char *key, const char *val); ++ extern void pdf_dict_add_streaminfo(PDF); ++ ++# define pdf_out(pdf, A) do { pdf_room(pdf, 1); *(pdf->buf->p++) = A; } while (0) ++# define pdf_quick_out(pdf,A) *(pdf->buf->p++)=(unsigned char)(A) + # define pdf_puts(pdf, s) pdf_out_block((pdf), (s), strlen(s)) + +- /* pdftables.c */ +- extern int pdf_new_objnum(PDF); ++ /* pdfpage.w */ ++ extern void print_pdffloat(PDF pdf, pdffloat f); ++ ++ /* pdftables.w */ ++ extern int pdf_create_obj(PDF pdf, int t, int i); + + /* pdftoepdf.cc */ + extern void read_pdf_info(image_dict *, int, int, img_readtype_e); + extern void write_epdf(PDF, image_dict *); + extern void unrefPdfDocument(char *); + extern void epdf_free(void); ++ extern void copyReal(PDF pdf, double d); + +- /* utils.c */ ++ extern int poppler_version_major(void); ++ extern int poppler_version_minor(void); ++ extern int poppler_version_micro(void); ++ ++ /* utils.w */ + __attribute__ ((format(printf, 1, 2))) + extern void pdftex_warn(const char *fmt, ...); + __attribute__ ((noreturn, format(printf, 1, 2))) + extern void pdftex_fail(const char *fmt, ...); + extern char *convertStringToPDFString(char *in, int len); +- extern char *stripzeros(char *a); + +- /* lepdflib.c */ ++ /* lepdflib.w */ + int luaopen_epdf(lua_State * L); +- + }; + + /**********************************************************************/ +--- texk/web2c/luatexdir/image/image.h ++++ texk/web2c/luatexdir/image/image.h 2011-10-13 07:39:27.000000000 +0000 +@@ -32,8 +32,8 @@ + + extern int do_zround(double r); /* from utils.w */ + extern scaled one_hundred_bp; /* from pdfgen.w */ +-# define bp2int(p) do_zround(p * (one_hundred_bp / 100.0)) +-# define int2bp(i) (i * 100.0 / one_hundred_bp) ++# define bp2sp(p) do_zround(p * (one_hundred_bp / 100.0)) ++# define sp2bp(i) (i * 100.0 / one_hundred_bp) + + # define TYPE_IMG "image" + # define TYPE_IMG_DICT "image-dict" +--- texk/web2c/luatexdir/image/pdftoepdf.cc ++++ texk/web2c/luatexdir/image/pdftoepdf.cc 2011-10-13 07:39:27.000000000 +0000 +@@ -1,7 +1,7 @@ + /* pdftoepdf.cc + + Copyright 1996-2006 Han The Thanh +- Copyright 2006-2010 Taco Hoekwater ++ Copyright 2006-2011 Taco Hoekwater + + This file is part of LuaTeX. + +@@ -29,11 +29,6 @@ static const char _svn_version[] = + // This file is mostly C and not very much C++; it's just used to interface + // the functions of xpdf, which happens to be written in C++. + +-// The prefix "PTEX" for the PDF keys is special to pdfTeX; +-// this has been registered with Adobe by Hans Hagen. +- +-#define pdfkeyprefix "PTEX" +- + static GBool isInit = gFalse; + + //********************************************************************** +@@ -253,7 +248,7 @@ static int addInObj(PDF pdf, PdfDocument + n = new InObj; + n->ref = ref; + n->next = NULL; +- n->num = pdf_new_objnum(pdf); ++ n->num = pdf_create_obj(pdf, obj_type_others, 0); + addObjMap(pdf_doc, ref, n->num); + if (pdf_doc->inObjList == NULL) + pdf_doc->inObjList = n; +@@ -269,7 +264,7 @@ static int addInObj(PDF pdf, PdfDocument + } + + //********************************************************************** +-// Function converts double to string; very small and very large numbers ++// Function converts double to pdffloat; very small and very large numbers + // are NOT converted to scientific notation. + // n must be a number or real conforming to the implementation limits + // of PDF as specified in appendix C.1 of the PDF Ref. +@@ -278,57 +273,24 @@ static int addInObj(PDF pdf, PdfDocument + // maximum value of reals is +2^15 + // smalles values of reals is 1/(2^16) + +-static char *convertNumToPDF(double n) ++static pdffloat conv_double_to_pdffloat(double n) + { +- static const int precision = 6; +- static const int fact = (int) 1E6; // must be 10^precision +- static const double epsilon = 0.5E-6; // 2epsilon must be 10^-precision +- static char buf[64]; +- // handle very small values: return 0 +- if (fabs(n) < epsilon) { +- buf[0] = '0'; +- buf[1] = '\0'; +- } else { +- char ints[64]; +- int bindex = 0, sindex = 0; +- int ival, fval; +- // handle the sign part if n is negative +- if (n < 0) { +- buf[bindex++] = '-'; +- n = -n; +- } +- n += epsilon; // for rounding +- // handle the integer part, simply with sprintf +- ival = (int) floor(n); +- n -= ival; +- sprintf(ints, "%d", ival); +- while (ints[sindex] != 0) +- buf[bindex++] = ints[sindex++]; +- // handle the fractional part up to 'precision' digits +- fval = (int) floor(n * fact); +- if (fval) { +- // set a dot +- buf[bindex++] = '.'; +- sindex = bindex + precision; +- buf[sindex--] = '\0'; +- // fill up trailing zeros with the string terminator NULL +- while (((fval % 10) == 0) && (sindex >= bindex)) { +- buf[sindex--] = '\0'; +- fval /= 10; +- } +- // fill up the fractional part back to front +- while (sindex >= bindex) { +- buf[sindex--] = (fval % 10) + '0'; +- fval /= 10; +- } +- } else +- buf[bindex++] = '\0'; +- } +- return (char *) buf; ++ pdffloat a; ++ a.e = 6; ++ a.m = lround(n * ten_pow[a.e]); ++ return a; + } + + static void copyObject(PDF, PdfDocument *, Object *); + ++void copyReal(PDF pdf, double d) ++{ ++ if (pdf->cave) ++ pdf_out(pdf, ' '); ++ print_pdffloat(pdf, conv_double_to_pdffloat(d)); ++ pdf->cave = true; ++} ++ + static void copyString(PDF pdf, GooString * string) + { + char *p; +@@ -336,8 +298,10 @@ static void copyString(PDF pdf, GooStrin + size_t i, l; + p = string->getCString(); + l = (size_t) string->getLength(); ++ if (pdf->cave) ++ pdf_out(pdf, ' '); + if (strlen(p) == l) { +- pdf_puts(pdf, "("); ++ pdf_out(pdf, '('); + for (; *p != 0; p++) { + c = (unsigned char) *p; + if (c == '(' || c == ')' || c == '\\') +@@ -347,20 +311,21 @@ static void copyString(PDF pdf, GooStrin + else + pdf_out(pdf, c); + } +- pdf_puts(pdf, ")"); ++ pdf_out(pdf, ')'); + } else { +- pdf_puts(pdf, "<"); ++ pdf_out(pdf, '<'); + for (i = 0; i < l; i++) { + c = (unsigned char) string->getChar(i); + pdf_printf(pdf, "%.2x", (int) c); + } +- pdf_puts(pdf, ">"); ++ pdf_out(pdf, '>'); + } ++ pdf->cave = true; + } + + static void copyName(PDF pdf, char *s) + { +- pdf_puts(pdf, "/"); ++ pdf_out(pdf, '/'); + for (; *s != 0; s++) { + if (isdigit(*s) || isupper(*s) || islower(*s) || *s == '_' || + *s == '.' || *s == '-' || *s == '+') +@@ -368,72 +333,74 @@ static void copyName(PDF pdf, char *s) + else + pdf_printf(pdf, "#%.2X", *s & 0xFF); + } ++ pdf->cave = true; + } + + static void copyArray(PDF pdf, PdfDocument * pdf_doc, Array * array) + { + int i, l; + Object obj1; +- pdf_puts(pdf, "["); ++ pdf_begin_array(pdf); + for (i = 0, l = array->getLength(); i < l; ++i) { + array->getNF(i, &obj1); +- if (!obj1.isName()) +- pdf_puts(pdf, " "); + copyObject(pdf, pdf_doc, &obj1); + obj1.free(); + } +- pdf_puts(pdf, "]"); ++ pdf_end_array(pdf); + } + + static void copyDict(PDF pdf, PdfDocument * pdf_doc, Dict * dict) + { + int i, l; + Object obj1; +- pdf_puts(pdf, "<<"); ++ pdf_begin_dict(pdf); + for (i = 0, l = dict->getLength(); i < l; ++i) { + copyName(pdf, dict->getKey(i)); +- pdf_puts(pdf, " "); + dict->getValNF(i, &obj1); + copyObject(pdf, pdf_doc, &obj1); + obj1.free(); +- pdf_puts(pdf, "\n"); + } +- pdf_puts(pdf, ">>"); ++ pdf_end_dict(pdf); + } + + static void copyStreamStream(PDF pdf, Stream * str) + { +- int c; ++ int c, i, len = 1024; + str->reset(); ++ i = len; + while ((c = str->getChar()) != EOF) { +- pdf_out(pdf, c); +- pdf->last_byte = c; ++ if (i == len) { ++ pdf_room(pdf, len); ++ i = 0; ++ } ++ pdf_quick_out(pdf, c); ++ i++; + } + } + + static void copyStream(PDF pdf, PdfDocument * pdf_doc, Stream * stream) + { + copyDict(pdf, pdf_doc, stream->getDict()); +- pdf_puts(pdf, "stream\n"); ++ pdf_begin_stream(pdf); ++ assert(pdf->zip_write_state == NO_ZIP); + copyStreamStream(pdf, stream->getUndecodedStream()); +- if (pdf->last_byte != '\n') +- pdf_puts(pdf, "\n"); +- pdf_puts(pdf, "endstream"); // can't simply write pdf_end_stream() ++ pdf_end_stream(pdf); + } + + static void copyObject(PDF pdf, PdfDocument * pdf_doc, Object * obj) + { + switch (obj->getType()) { + case objBool: +- pdf_printf(pdf, "%s", obj->getBool()? "true" : "false"); ++ pdf_add_bool(pdf, (int) obj->getBool()); + break; + case objInt: +- pdf_printf(pdf, "%i", obj->getInt()); ++ pdf_add_int(pdf, obj->getInt()); + break; + case objReal: +- pdf_printf(pdf, "%s", convertNumToPDF(obj->getReal())); ++ copyReal(pdf, obj->getReal()); + break; + // not needed: ++ // case objNum: + // GBool isNum() { return type == objInt || type == objReal; } + case objString: + copyString(pdf, obj->getString()); +@@ -442,7 +409,7 @@ static void copyObject(PDF pdf, PdfDocum + copyName(pdf, obj->getName()); + break; + case objNull: +- pdf_puts(pdf, "null"); ++ pdf_add_null(pdf); + break; + case objArray: + copyArray(pdf, pdf_doc, obj->getArray()); +@@ -454,7 +421,7 @@ static void copyObject(PDF pdf, PdfDocum + copyStream(pdf, pdf_doc, obj->getStream()); + break; + case objRef: +- pdf_printf(pdf, "%d 0 R", addInObj(pdf, pdf_doc, obj->getRef())); ++ pdf_add_ref(pdf, addInObj(pdf, pdf_doc, obj->getRef())); + break; + case objCmd: + case objError: +@@ -473,18 +440,18 @@ static void copyObject(PDF pdf, PdfDocum + static void writeRefs(PDF pdf, PdfDocument * pdf_doc) + { + InObj *r, *n; +- XRef *xref; + Object obj1; +- xref = pdf_doc->doc->getXRef(); ++ XRef *xref; ++ PDFDoc *doc = pdf_doc->doc; ++ xref = doc->getXRef(); + for (r = pdf_doc->inObjList; r != NULL;) { + xref->fetch(r->ref.num, r->ref.gen, &obj1); + if (obj1.isStream()) +- pdf_begin_obj(pdf, r->num, 0); ++ pdf_begin_obj(pdf, r->num, OBJSTM_NEVER); + else + pdf_begin_obj(pdf, r->num, 2); // \pdfobjcompresslevel = 2 is for this + copyObject(pdf, pdf_doc, &obj1); + obj1.free(); +- pdf_puts(pdf, "\n"); + pdf_end_obj(pdf); + n = r->next; + delete r; +@@ -530,6 +497,7 @@ read_pdf_info(image_dict * idict, int mi + int pdf_inclusion_errorlevel, img_readtype_e readtype) + { + PdfDocument *pdf_doc; ++ PDFDoc *doc; + Page *page; + int rotate; + PDFRectangle *pagebox; +@@ -546,12 +514,13 @@ read_pdf_info(image_dict * idict, int mi + } + // open PDF file + pdf_doc = refPdfDocument(img_filepath(idict), FE_FAIL); ++ doc = pdf_doc->doc; + // check PDF version + // this works only for PDF 1.x -- but since any versions of PDF newer + // than 1.x will not be backwards compatible to PDF 1.x, pdfTeX will + // then have to changed drastically anyway. +- pdf_major_version_found = pdf_doc->doc->getPDFMajorVersion(); +- pdf_minor_version_found = pdf_doc->doc->getPDFMinorVersion(); ++ pdf_major_version_found = doc->getPDFMajorVersion(); ++ pdf_minor_version_found = doc->getPDFMinorVersion(); + if ((pdf_major_version_found > 1) + || (pdf_minor_version_found > minor_pdf_version_wanted)) { + const char *msg = +@@ -564,17 +533,16 @@ read_pdf_info(image_dict * idict, int mi + minor_pdf_version_wanted); + } + } +- img_totalpages(idict) = pdf_doc->doc->getCatalog()->getNumPages(); ++ img_totalpages(idict) = doc->getCatalog()->getNumPages(); + if (img_pagename(idict)) { + // get page by name + GooString name(img_pagename(idict)); +- LinkDest *link = pdf_doc->doc->findDest(&name); ++ LinkDest *link = doc->findDest(&name); + if (link == NULL || !link->isOk()) + pdftex_fail("PDF inclusion: invalid destination <%s>", + img_pagename(idict)); + Ref ref = link->getPageRef(); +- img_pagenum(idict) = +- pdf_doc->doc->getCatalog()->findPage(ref.num, ref.gen); ++ img_pagenum(idict) = doc->getCatalog()->findPage(ref.num, ref.gen); + if (img_pagenum(idict) == 0) + pdftex_fail("PDF inclusion: destination is not a page <%s>", + img_pagename(idict)); +@@ -587,7 +555,7 @@ read_pdf_info(image_dict * idict, int mi + (int) img_pagenum(idict)); + } + // get the required page +- page = pdf_doc->doc->getCatalog()->getPage(img_pagenum(idict)); ++ page = doc->getCatalog()->getPage(img_pagenum(idict)); + + // get the pagebox coordinates (media, crop,...) to use. + pagebox = get_pagebox(page, img_pagebox(idict)); +@@ -606,10 +574,10 @@ read_pdf_info(image_dict * idict, int mi + ysize = pagebox->y1 - pagebox->y2; + } + // The following 4 parameters are raw. Do _not_ modify by /Rotate! +- img_xsize(idict) = bp2int(xsize); +- img_ysize(idict) = bp2int(ysize); +- img_xorig(idict) = bp2int(xorig); +- img_yorig(idict) = bp2int(yorig); ++ img_xsize(idict) = bp2sp(xsize); ++ img_ysize(idict) = bp2sp(ysize); ++ img_xorig(idict) = bp2sp(xorig); ++ img_yorig(idict) = bp2sp(yorig); + + // Handle /Rotate parameter. Only multiples of 90 deg. are allowed + // (PDF Ref. v1.3, p. 78). +@@ -649,13 +617,14 @@ read_pdf_info(image_dict * idict, int mi + void write_epdf(PDF pdf, image_dict * idict) + { + PdfDocument *pdf_doc; ++ PDFDoc *doc; + Page *page; + Ref *pageref; + Dict *pageDict; + Object obj1, contents, pageobj, pagesobj1, pagesobj2, *op1, *op2, *optmp; + PDFRectangle *pagebox; + int i, l; +- float bbox[4]; ++ double bbox[4]; + char s[256]; + const char *pagedictkeys[] = + { "Group", "LastModified", "Metadata", "PieceInfo", "Resources", +@@ -665,36 +634,43 @@ void write_epdf(PDF pdf, image_dict * id + + // open PDF file + pdf_doc = refPdfDocument(img_filepath(idict), FE_FAIL); +- page = pdf_doc->doc->getCatalog()->getPage(img_pagenum(idict)); +- pageref = pdf_doc->doc->getCatalog()->getPageRef(img_pagenum(idict)); ++ doc = pdf_doc->doc; ++ page = doc->getCatalog()->getPage(img_pagenum(idict)); ++ pageref = doc->getCatalog()->getPageRef(img_pagenum(idict)); + assert(pageref != NULL); // was checked already in read_pdf_info() +- pdf_doc->doc->getXRef()->fetch(pageref->num, pageref->gen, &pageobj); ++ doc->getXRef()->fetch(pageref->num, pageref->gen, &pageobj); + pageDict = pageobj.getDict(); + + // write the Page header +- pdf_puts(pdf, "/Type /XObject\n/Subtype /Form\n"); ++ pdf_begin_obj(pdf, img_objnum(idict), OBJSTM_NEVER); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_name(pdf, "Type", "XObject"); ++ pdf_dict_add_name(pdf, "Subtype", "Form"); ++ + if (img_attr(idict) != NULL && strlen(img_attr(idict)) > 0) +- pdf_printf(pdf, "%s\n", img_attr(idict)); +- pdf_puts(pdf, "/FormType 1\n"); ++ pdf_printf(pdf, "\n%s\n", img_attr(idict)); ++ pdf_dict_add_int(pdf, "FormType", 1); + + // write additional information +- pdf_printf(pdf, "/%s.FileName (%s)\n", pdfkeyprefix, ++ snprintf(s, 30, "%s.FileName", pdfkeyprefix); ++ pdf_add_name(pdf, s); ++ pdf_printf(pdf, " (%s)", + convertStringToPDFString(pdf_doc->file_path, + strlen(pdf_doc->file_path))); +- pdf_printf(pdf, "/%s.PageNumber %i\n", pdfkeyprefix, +- (int) img_pagenum(idict)); +- pdf_doc->doc->getDocInfoNF(&obj1); ++ snprintf(s, 30, "%s.PageNumber", pdfkeyprefix); ++ pdf_dict_add_int(pdf, s, (int) img_pagenum(idict)); ++ doc->getDocInfoNF(&obj1); + if (obj1.isRef()) { + // the info dict must be indirect (PDF Ref p. 61) +- pdf_printf(pdf, "/%s.InfoDict ", pdfkeyprefix); +- pdf_printf(pdf, "%d 0 R\n", addInObj(pdf, pdf_doc, obj1.getRef())); ++ snprintf(s, 30, "%s.InfoDict", pdfkeyprefix); ++ pdf_dict_add_ref(pdf, s, addInObj(pdf, pdf_doc, obj1.getRef())); + } + obj1.free(); + if (img_is_bbox(idict)) { +- bbox[0] = int2bp(img_bbox(idict)[0]); +- bbox[1] = int2bp(img_bbox(idict)[1]); +- bbox[2] = int2bp(img_bbox(idict)[2]); +- bbox[3] = int2bp(img_bbox(idict)[3]); ++ bbox[0] = sp2bp(img_bbox(idict)[0]); ++ bbox[1] = sp2bp(img_bbox(idict)[1]); ++ bbox[2] = sp2bp(img_bbox(idict)[2]); ++ bbox[3] = sp2bp(img_bbox(idict)[3]); + } else { + // get the pagebox coordinates (media, crop,...) to use. + pagebox = get_pagebox(page, img_pagebox(idict)); +@@ -703,9 +679,13 @@ void write_epdf(PDF pdf, image_dict * id + bbox[2] = pagebox->x2; + bbox[3] = pagebox->y2; + } +- sprintf(s, "/BBox [%.8f %.8f %.8f %.8f]\n", bbox[0], bbox[1], bbox[2], +- bbox[3]); +- pdf_puts(pdf, stripzeros(s)); ++ pdf_add_name(pdf, "BBox"); ++ pdf_begin_array(pdf); ++ copyReal(pdf, bbox[0]); ++ copyReal(pdf, bbox[1]); ++ copyReal(pdf, bbox[2]); ++ copyReal(pdf, bbox[3]); ++ pdf_end_array(pdf); + // The /Matrix calculation is replaced by transforms in out_img(). + + // Now all relevant parts of the Page dictionary are copied: +@@ -720,7 +700,7 @@ void write_epdf(PDF pdf, image_dict * id + for (i = 0; pagedictkeys[i] != NULL; i++) { + pageDict->lookupNF((char *) pagedictkeys[i], &obj1); + if (!obj1.isNull()) { +- pdf_printf(pdf, "/%s ", pagedictkeys[i]); ++ pdf_add_name(pdf, pagedictkeys[i]); + copyObject(pdf, pdf_doc, &obj1); // preserves indirection + } + obj1.free(); +@@ -739,7 +719,7 @@ void write_epdf(PDF pdf, image_dict * id + obj1.free(); + op1->dictLookupNF((char *) "Resources", &obj1); + if (!obj1.isNull()) { +- pdf_puts(pdf, "/Resources "); ++ pdf_add_name(pdf, (const char *) "Resources"); + copyObject(pdf, pdf_doc, &obj1); + break; + } +@@ -761,9 +741,9 @@ void write_epdf(PDF pdf, image_dict * id + // Variant A: get stream and recompress under control + // of \pdfcompresslevel + // +- // pdfbeginstream(); ++ // pdf_begin_stream(); + // copyStreamStream(contents->getStream()); +- // pdfendstream(); ++ // pdf_end_stream(); + + // Variant B: copy stream without recompressing + // +@@ -774,28 +754,29 @@ void write_epdf(PDF pdf, image_dict * id + obj1.free(); + contents.streamGetDict()->lookup((char *) "Length", &obj1); + assert(!obj1.isNull()); +- pdf_puts(pdf, "/Length "); ++ pdf_add_name(pdf, (const char *) "Length"); + copyObject(pdf, pdf_doc, &obj1); + obj1.free(); +- pdf_puts(pdf, "\n"); + contents.streamGetDict()->lookup((char *) "Filter", &obj1); + if (!obj1.isNull()) { +- pdf_puts(pdf, "/Filter "); ++ pdf_add_name(pdf, (const char *) "Filter"); + copyObject(pdf, pdf_doc, &obj1); + obj1.free(); +- pdf_puts(pdf, "\n"); + contents.streamGetDict()->lookup((char *) "DecodeParms", &obj1); + if (!obj1.isNull()) { +- pdf_puts(pdf, "/DecodeParms "); ++ pdf_add_name(pdf, (const char *) "DecodeParms"); + copyObject(pdf, pdf_doc, &obj1); +- pdf_puts(pdf, "\n"); + } + } + obj1.free(); +- pdf_puts(pdf, ">>\nstream\n"); ++ pdf_end_dict(pdf); ++ pdf_begin_stream(pdf); + copyStreamStream(pdf, contents.getStream()->getBaseStream()); + pdf_end_stream(pdf); ++ pdf_end_obj(pdf); + } else if (contents.isArray()) { ++ pdf_dict_add_streaminfo(pdf); ++ pdf_end_dict(pdf); + pdf_begin_stream(pdf); + for (i = 0, l = contents.arrayGetLength(); i < l; ++i) { + copyStreamStream(pdf, (contents.arrayGet(i, &obj1))->getStream()); +@@ -803,13 +784,17 @@ void write_epdf(PDF pdf, image_dict * id + if (i < (l - 1)) { + // put a space between streams to be on the safe side (streams + // should have a trailing space here, but one never knows) +- pdf_puts(pdf, " "); ++ pdf_out(pdf, ' '); + } + } + pdf_end_stream(pdf); ++ pdf_end_obj(pdf); + } else { // the contents are optional, but we need to include an empty stream ++ pdf_dict_add_streaminfo(pdf); ++ pdf_end_dict(pdf); + pdf_begin_stream(pdf); + pdf_end_stream(pdf); ++ pdf_end_obj(pdf); + } + // write out all indirect objects + writeRefs(pdf, pdf_doc); +@@ -880,3 +865,20 @@ void epdf_free() + delete globalParams; + isInit = gFalse; + } ++ ++//********************************************************************** ++ ++int poppler_version_major(void) ++{ ++ return (POPPLER_VERSION_MAJOR); ++} ++ ++int poppler_version_minor(void) ++{ ++ return (POPPLER_VERSION_MINOR); ++} ++ ++int poppler_version_micro(void) ++{ ++ return (POPPLER_VERSION_MICRO); ++} +--- texk/web2c/luatexdir/image/pdftoepdf.h ++++ texk/web2c/luatexdir/image/pdftoepdf.h 2011-10-13 07:39:27.000000000 +0000 +@@ -1,7 +1,7 @@ + /* pdftoepdf.h + + Copyright 1996-2006 Han The Thanh +- Copyright 2006-2009 Taco Hoekwater ++ Copyright 2006-2011 Taco Hoekwater + + This file is part of LuaTeX. + +@@ -29,6 +29,11 @@ void read_pdf_info(image_dict *, int, in + void unrefPdfDocument(char *); + void write_epdf(PDF, image_dict *); + void epdf_check_mem(void); ++void copyReal(PDF pdf, double d); ++ ++int poppler_version_major(void); ++int poppler_version_minor(void); ++int poppler_version_micro(void); + + /* epdf.c --- this should go in an own header file */ + +--- texk/web2c/luatexdir/image/writeimg.h ++++ texk/web2c/luatexdir/image/writeimg.h 2011-10-13 07:39:27.000000000 +0000 +@@ -1,7 +1,7 @@ + /* writeimg.h + + Copyright 1996-2006 Han The Thanh +- Copyright 2006-2009 Taco Hoekwater ++ Copyright 2006-2011 Taco Hoekwater + + This file is part of LuaTeX. + +@@ -48,5 +48,6 @@ void idict_to_array(image_dict *); + void dumpimagemeta(void); + void undumpimagemeta(PDF, int, int); + scaled_whd scan_alt_rule(void); ++size_t read_file_to_buf(PDF pdf, FILE * f, size_t len); + + #endif /* WRITEIMG_H */ +--- texk/web2c/luatexdir/image/writeimg.w ++++ texk/web2c/luatexdir/image/writeimg.w 2011-10-13 07:39:27.000000000 +0000 +@@ -1,7 +1,7 @@ + % writeimg.w + + % Copyright 1996-2006 Han The Thanh +-% Copyright 2006-2010 Taco Hoekwater ++% Copyright 2006-2011 Taco Hoekwater + + % This file is part of LuaTeX. + +@@ -66,10 +66,10 @@ static const char _svn_version[] = + (http://www.libpng.org/pub/png): + + 3.1. PNG file signature +- ++ + The first eight bytes of a PNG file always contain the following + (decimal) values: +- ++ + 137 80 78 71 13 10 26 10 + + Translation to C: |"\x89PNG\r\n\x1A\n"| +@@ -92,7 +92,7 @@ static const char _svn_version[] = + Status: Final Committee Draft + + D.4.1, ID string +- ++ + This is an 8-byte sequence containing 0x97 0x4A 0x42 0x32 0x0D 0x0A + 0x1A 0x0A. + +@@ -318,7 +318,7 @@ void read_img(PDF pdf, + IMG_CLOSEINBETWEEN); + break; + case IMG_TYPE_PNG: +- read_png_info(pdf, idict, IMG_CLOSEINBETWEEN); ++ read_png_info(idict, IMG_CLOSEINBETWEEN); + break; + case IMG_TYPE_JPG: + read_jpg_info(pdf, idict, IMG_CLOSEINBETWEEN); +@@ -366,7 +366,7 @@ static image_dict *read_image(PDF pdf, c + return idict; + } + +-@ scans PDF pagebox specification ++@ scans PDF pagebox specification + @c + static pdfboxspec_e scan_pdf_box_spec(void) + { +@@ -617,7 +617,6 @@ void write_img(PDF pdf, image_dict * idi + @c + void pdf_write_image(PDF pdf, int n) + { +- pdf_begin_dict(pdf, n, 0); + if (pdf->draftmode == 0) + write_img(pdf, idict_array[obj_data_ptr(pdf, n)]); + } +@@ -634,21 +633,29 @@ void check_pdfstream_dict(image_dict * i + @ @c + void write_pdfstream(PDF pdf, image_dict * idict) + { +- char s[256]; + assert(img_pdfstream_ptr(idict) != NULL); + assert(img_is_bbox(idict)); +- pdf_puts(pdf, "/Type /XObject\n/Subtype /Form\n"); ++ pdf_begin_obj(pdf, img_objnum(idict), OBJSTM_NEVER); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_name(pdf, "Type", "XObject"); ++ pdf_dict_add_name(pdf, "Subtype", "Form"); + if (img_attr(idict) != NULL && strlen(img_attr(idict)) > 0) +- pdf_printf(pdf, "%s\n", img_attr(idict)); +- pdf_puts(pdf, "/FormType 1\n"); +- sprintf(s, "/BBox [%.8f %.8f %.8f %.8f]\n", int2bp(img_bbox(idict)[0]), +- int2bp(img_bbox(idict)[1]), int2bp(img_bbox(idict)[2]), +- int2bp(img_bbox(idict)[3])); +- pdf_printf(pdf, stripzeros(s)); ++ pdf_printf(pdf, "\n%s\n", img_attr(idict)); ++ pdf_dict_add_int(pdf, "FormType", 1); ++ pdf_add_name(pdf, "BBox"); ++ pdf_begin_array(pdf); ++ copyReal(pdf, sp2bp(img_bbox(idict)[0])); ++ copyReal(pdf, sp2bp(img_bbox(idict)[1])); ++ copyReal(pdf, sp2bp(img_bbox(idict)[2])); ++ copyReal(pdf, sp2bp(img_bbox(idict)[3])); ++ pdf_end_array(pdf); ++ pdf_dict_add_streaminfo(pdf); ++ pdf_end_dict(pdf); + pdf_begin_stream(pdf); + if (img_pdfstream_stream(idict) != NULL) + pdf_puts(pdf, img_pdfstream_stream(idict)); + pdf_end_stream(pdf); ++ pdf_end_obj(pdf); + } + + @ @c +@@ -809,7 +816,7 @@ void undumpimagemeta(PDF pdf, int pdfver + } + } + +-@ scans rule spec to |alt_rule| ++@ scans rule spec to |alt_rule| + @c + scaled_whd scan_alt_rule(void) + { +@@ -835,3 +842,21 @@ scaled_whd scan_alt_rule(void) + } + return alt_rule; + } ++ ++@ copy file of arbitrary size to PDF buffer and flush as needed ++@c ++size_t read_file_to_buf(PDF pdf, FILE * f, size_t len) ++{ ++ size_t i, j, k = 0; ++ while (len > 0) { ++ i = (size_t) (len > pdf->buf->size) ? (size_t) pdf->buf->size : len; ++ pdf_room(pdf, (int) i); ++ j = fread(pdf->buf->p, 1, i, f); ++ pdf->buf->p += j; ++ k += j; ++ len -= j; ++ if (i != j) ++ break; ++ } ++ return k; ++} +--- texk/web2c/luatexdir/image/writejbig2.w ++++ texk/web2c/luatexdir/image/writejbig2.w 2011-10-13 07:39:27.000000000 +0000 +@@ -714,40 +714,52 @@ static void rd_jbig2_info(FILEINFO * fip + } + + @ @c +-static void wr_jbig2(PDF pdf, FILEINFO * fip, unsigned long page) ++static void wr_jbig2(PDF pdf, image_dict * idict, FILEINFO * fip, ++ unsigned long page) + { + LITEM *slip; + PAGEINFO *pip; + SEGINFO *sip; + unsigned long i; + if (page > 0) { ++ assert(idict != NULL); + pip = find_pageinfo(&(fip->pages), page); + assert(pip != NULL); +- pdf_puts(pdf, "/Type /XObject\n/Subtype /Image\n"); +- pdf_printf(pdf, "/Width %i\n", pip->width); +- pdf_printf(pdf, "/Height %i\n", pip->height); +- pdf_puts(pdf, "/ColorSpace /DeviceGray\n"); +- pdf_puts(pdf, "/BitsPerComponent 1\n"); +- pdf_printf(pdf, "/Length %lu\n", +- getstreamlen(pip->segments.first, true)); +- pdf_puts(pdf, "/Filter [/JBIG2Decode]\n"); ++ pdf_begin_obj(pdf, img_objnum(idict), OBJSTM_NEVER); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_name(pdf, "Type", "XObject"); ++ pdf_dict_add_name(pdf, "Subtype", "Image"); ++ pdf_dict_add_int(pdf, "Width", pip->width); ++ pdf_dict_add_int(pdf, "Height", pip->height); ++ pdf_dict_add_name(pdf, "ColorSpace", "DeviceGray"); ++ pdf_dict_add_int(pdf, "BitsPerComponent", 1); ++ pdf_dict_add_int(pdf, "Length", ++ getstreamlen(pip->segments.first, true)); ++ pdf_dict_add_name(pdf, "Filter", "JBIG2Decode"); + if (fip->page0.last != NULL) { + if (fip->pdfpage0objnum == 0) { + fip->pdfpage0objnum = + (unsigned long) pdf_create_obj(pdf, obj_type_others, 0); + } +- pdf_printf(pdf, "/DecodeParms [<< /JBIG2Globals %lu 0 R >>]\n", +- fip->pdfpage0objnum); ++ pdf_add_name(pdf, "DecodeParms"); ++ pdf_begin_array(pdf); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_ref(pdf, "JBIG2Globals", fip->pdfpage0objnum); ++ pdf_end_dict(pdf); ++ pdf_end_array(pdf); + } ++ pdf_end_dict(pdf); + } else { ++ assert(idict == NULL); + pip = find_pageinfo(&(fip->page0), page); + assert(pip != NULL); +- pdf_begin_dict(pdf, (int) fip->pdfpage0objnum, 0); +- pdf_printf(pdf, "/Length %lu\n", +- getstreamlen(pip->segments.first, false)); ++ pdf_begin_obj(pdf, (int) fip->pdfpage0objnum, OBJSTM_NEVER); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_int(pdf, "Length", ++ getstreamlen(pip->segments.first, false)); ++ pdf_end_dict(pdf); + } +- pdf_puts(pdf, ">>\n"); +- pdf_puts(pdf, "stream\n"); ++ pdf_begin_stream(pdf); + fip->file = xfopen(fip->filepath, FOPEN_RBIN_MODE); + for (slip = pip->segments.first; slip != NULL; slip = slip->next) { /* loop over page segments */ + sip = slip->d; +@@ -761,6 +773,7 @@ static void wr_jbig2(PDF pdf, FILEINFO * + } + } + pdf_end_stream(pdf); ++ pdf_end_obj(pdf); + xfclose(fip->file, fip->filepath); + } + +@@ -822,7 +835,7 @@ void write_jbig2(PDF pdf, image_dict * i + assert(fip->phase == HAVEINFO); /* don't write before |rd_jbig2_info()| call */ + pip = find_pageinfo(&(fip->pages), (unsigned long) img_pagenum(idict)); + assert(pip != NULL); +- wr_jbig2(pdf, fip, pip->pagenum); ++ wr_jbig2(pdf, idict, fip, pip->pagenum); + img_file(idict) = NULL; + } + +@@ -836,7 +849,7 @@ void flush_jbig2_page0_objects(PDF pdf) + for (fip = avl_t_first(&t, file_tree); fip != NULL; + fip = avl_t_next(&t)) { + if (fip->page0.last != NULL) +- wr_jbig2(pdf, fip, 0); ++ wr_jbig2(pdf, NULL, fip, 0); /* NULL: page0 */ + } + } + } +--- texk/web2c/luatexdir/image/writejp2.w ++++ texk/web2c/luatexdir/image/writejp2.w 2011-10-13 07:39:27.000000000 +0000 +@@ -261,22 +261,27 @@ static void reopen_jp2(image_dict * idic + void write_jp2(PDF pdf, image_dict * idict) + { + long unsigned l; +- FILE *f; + assert(idict != NULL); + if (img_file(idict) == NULL) + reopen_jp2(idict); +- xfseek(img_file(idict), 0, SEEK_SET, img_filepath(idict)); + assert(img_jp2_ptr(idict) != NULL); +- pdf_puts(pdf, "/Type /XObject\n/Subtype /Image\n"); ++ pdf_begin_obj(pdf, img_objnum(idict), OBJSTM_NEVER); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_name(pdf, "Type", "XObject"); ++ pdf_dict_add_name(pdf, "Subtype", "Image"); + if (img_attr(idict) != NULL && strlen(img_attr(idict)) > 0) +- pdf_printf(pdf, "%s\n", img_attr(idict)); +- pdf_printf(pdf, "/Width %i\n/Height %i\n/Length %i\n", +- (int) img_xsize(idict), +- (int) img_ysize(idict), (int) img_jp2_ptr(idict)->length); +- pdf_puts(pdf, "/Filter /JPXDecode\n>>\nstream\n"); +- for (l = (long unsigned int) img_jp2_ptr(idict)->length, f = +- img_file(idict); l > 0; l--) +- pdf_out(pdf, xgetc(f)); ++ pdf_printf(pdf, "\n%s\n", img_attr(idict)); ++ pdf_dict_add_int(pdf, "Width", (int) img_xsize(idict)); ++ pdf_dict_add_int(pdf, "Height", (int) img_ysize(idict)); ++ pdf_dict_add_int(pdf, "Length", (int) img_jp2_ptr(idict)->length); ++ pdf_dict_add_name(pdf, "Filter", "JPXDecode"); ++ pdf_end_dict(pdf); ++ pdf_begin_stream(pdf); ++ l = (long unsigned int) img_jp2_ptr(idict)->length; ++ xfseek(img_file(idict), 0, SEEK_SET, img_filepath(idict)); ++ if (read_file_to_buf(pdf, img_file(idict), l) != l) ++ pdftex_fail("writejp2: fread failed"); + pdf_end_stream(pdf); ++ pdf_end_obj(pdf); + close_and_cleanup_jp2(idict); + } +--- texk/web2c/luatexdir/image/writejpg.w ++++ texk/web2c/luatexdir/image/writejpg.w 2011-10-13 07:39:27.000000000 +0000 +@@ -1,7 +1,7 @@ + % writejpg.w + + % Copyright 1996-2006 Han The Thanh +-% Copyright 2006-2010 Taco Hoekwater ++% Copyright 2006-2011 Taco Hoekwater + + % This file is part of LuaTeX. + +@@ -249,41 +249,59 @@ static void reopen_jpg(PDF pdf, image_di + @ @c + void write_jpg(PDF pdf, image_dict * idict) + { +- long unsigned l; +- FILE *f; ++ size_t l; + assert(idict != NULL); + if (img_file(idict) == NULL) + reopen_jpg(pdf, idict); + assert(img_jpg_ptr(idict) != NULL); +- pdf_puts(pdf, "/Type /XObject\n/Subtype /Image\n"); ++ pdf_begin_obj(pdf, img_objnum(idict), OBJSTM_NEVER); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_name(pdf, "Type", "XObject"); ++ pdf_dict_add_name(pdf, "Subtype", "Image"); + if (img_attr(idict) != NULL && strlen(img_attr(idict)) > 0) +- pdf_printf(pdf, "%s\n", img_attr(idict)); +- pdf_printf(pdf, "/Width %i\n/Height %i\n/BitsPerComponent %i\n/Length %i\n", +- (int) img_xsize(idict), +- (int) img_ysize(idict), +- (int) img_colordepth(idict), (int) img_jpg_ptr(idict)->length); +- pdf_puts(pdf, "/ColorSpace "); ++ pdf_printf(pdf, "\n%s\n", img_attr(idict)); ++ pdf_dict_add_int(pdf, "Width", (int) img_xsize(idict)); ++ pdf_dict_add_int(pdf, "Height", (int) img_ysize(idict)); ++ pdf_dict_add_int(pdf, "BitsPerComponent", (int) img_colordepth(idict)); ++ pdf_dict_add_int(pdf, "Length", (int) img_jpg_ptr(idict)->length); + if (img_colorspace(idict) != 0) { +- pdf_printf(pdf, "%i 0 R\n", (int) img_colorspace(idict)); ++ pdf_dict_add_ref(pdf, "ColorSpace", (int) img_colorspace(idict)); + } else { + switch (img_jpg_color(idict)) { + case JPG_GRAY: +- pdf_puts(pdf, "/DeviceGray\n"); ++ pdf_dict_add_name(pdf, "ColorSpace", "DeviceGray"); + break; + case JPG_RGB: +- pdf_puts(pdf, "/DeviceRGB\n"); ++ pdf_dict_add_name(pdf, "ColorSpace", "DeviceRGB"); + break; + case JPG_CMYK: +- pdf_puts(pdf, "/DeviceCMYK\n/Decode [1 0 1 0 1 0 1 0]\n"); ++ pdf_dict_add_name(pdf, "ColorSpace", "DeviceCMYK"); ++ pdf_add_name(pdf, "Decode"); ++ pdf_begin_array(pdf); ++ pdf_add_int(pdf, 1); ++ pdf_add_int(pdf, 0); ++ pdf_add_int(pdf, 1); ++ pdf_add_int(pdf, 0); ++ pdf_add_int(pdf, 1); ++ pdf_add_int(pdf, 0); ++ pdf_add_int(pdf, 1); ++ pdf_add_int(pdf, 0); ++ pdf_end_array(pdf); + break; + default: + pdftex_fail("Unsupported color space %i", + (int) img_jpg_color(idict)); + } + } +- pdf_puts(pdf, "/Filter /DCTDecode\n>>\nstream\n"); +- for (l = img_jpg_ptr(idict)->length, f = img_file(idict); l > 0; l--) +- pdf_out(pdf, xgetc(f)); ++ pdf_dict_add_name(pdf, "Filter", "DCTDecode"); ++ pdf_end_dict(pdf); ++ pdf_begin_stream(pdf); ++ assert(pdf->zip_write_state == NO_ZIP); ++ l = (size_t) img_jpg_ptr(idict)->length; ++ xfseek(img_file(idict), 0, SEEK_SET, img_filepath(idict)); ++ if (read_file_to_buf(pdf, img_file(idict), l) != l) ++ pdftex_fail("writejpg: fread failed"); + pdf_end_stream(pdf); ++ pdf_end_obj(pdf); + close_and_cleanup_jpg(idict); + } +--- texk/web2c/luatexdir/image/writepng.h ++++ texk/web2c/luatexdir/image/writepng.h 2011-10-13 07:39:27.000000000 +0000 +@@ -1,7 +1,7 @@ + /* writepng.h + + Copyright 1996-2006 Han The Thanh +- Copyright 2006-2009 Taco Hoekwater ++ Copyright 2006-2011 Taco Hoekwater + + This file is part of LuaTeX. + +@@ -18,14 +18,14 @@ + You should have received a copy of the GNU General Public License along + with LuaTeX; if not, see . */ + +-/* $Id: writepng.h 2580 2009-06-23 15:55:52Z taco $ */ ++/* $Id: writepng.h 4227 2011-04-30 07:11:25Z oneiros $ */ + + #ifndef WRITEPNG_H + # define WRITEPNG_H + + # include "image.h" + +-void read_png_info(PDF, image_dict *, img_readtype_e); ++void read_png_info(image_dict *, img_readtype_e); + void write_additional_png_objects(PDF); + void write_png(PDF, image_dict *); + +--- texk/web2c/luatexdir/image/writepng.w ++++ texk/web2c/luatexdir/image/writepng.w 2011-10-13 07:39:27.000000000 +0000 +@@ -1,7 +1,7 @@ + % writepng.w + + % Copyright 1996-2006 Han The Thanh +-% Copyright 2006-2010 Taco Hoekwater ++% Copyright 2006-2011 Taco Hoekwater + + % This file is part of LuaTeX. + +@@ -45,7 +45,7 @@ static void close_and_cleanup_png(image_ + } + + @ @c +-void read_png_info(PDF pdf, image_dict * idict, img_readtype_e readtype) ++void read_png_info(image_dict * idict, img_readtype_e readtype) + { + png_structp png_p; + png_infop info_p; +@@ -100,139 +100,153 @@ void read_png_info(PDF pdf, image_dict * + } + + @ @c +-#define write_gray_pixel_16(r) \ +- if (j % 4 == 0||j % 4 == 1) pdf_quick_out(pdf,*r++); \ +- else smask[smask_ptr++] = *r++ +- +-#define write_gray_pixel_8(r) \ +- if (j % 2 == 0) pdf_quick_out(pdf,*r++); \ +- else smask[smask_ptr++] = *r++ +- +-#define write_rgb_pixel_16(r) \ +- if (!(j % 8 == 6||j % 8 == 7)) pdf_quick_out(pdf,*r++); \ +- else smask[smask_ptr++] = *r++ +- +-#define write_rgb_pixel_8(r) \ +- if (j % 4 != 3) pdf_quick_out(pdf,*r++); \ +- else smask[smask_ptr++] = *r++ ++#define write_gray_pixel_16(r) \ ++ if (j % 4 == 0 || j % 4 == 1) \ ++ pdf_quick_out(pdf, *r++); \ ++ else \ ++ smask[smask_ptr++] = *r++ \ ++ ++#define write_gray_pixel_8(r) \ ++ if (j % 2 == 0) \ ++ pdf_quick_out(pdf, *r++); \ ++ else \ ++ smask[smask_ptr++] = *r++ ++ ++#define write_rgb_pixel_16(r) \ ++ if (!(j % 8 == 6 || j % 8 == 7)) \ ++ pdf_quick_out(pdf, *r++); \ ++ else \ ++ smask[smask_ptr++] = *r++ ++ ++#define write_rgb_pixel_8(r) \ ++ if (j % 4 != 3) \ ++ pdf_quick_out(pdf, *r++); \ ++ else \ ++ smask[smask_ptr++] = *r++ + + #define write_simple_pixel(r) pdf_quick_out(pdf,*r++) + +-#define write_noninterlaced(outmac) \ +- for (i = 0; i < (int)png_get_image_height (png_p, info_p); i++) { \ +- png_read_row(png_p, row, NULL); \ +- r = row; \ +- k = (int)png_get_rowbytes(png_p, info_p); \ +- while(k > 0) { \ +- l = (k > pdf->buf_size)? pdf->buf_size : k; \ +- pdf_room(pdf,l); \ +- for (j = 0; j < l; j++) { \ +- outmac; \ +- } \ +- k -= l; \ +- } \ +- } ++#define write_noninterlaced(outmac) \ ++ for (i = 0; i < (int) png_get_image_height(png_p, info_p); i++) { \ ++ png_read_row(png_p, row, NULL); \ ++ r = row; \ ++ k = (size_t) png_get_rowbytes(png_p, info_p); \ ++ while (k > 0) { \ ++ l = (k > pdf->buf->size) ? pdf->buf->size : k; \ ++ pdf_room(pdf, l); \ ++ for (j = 0; j < l; j++) { \ ++ outmac; \ ++ } \ ++ k -= l; \ ++ } \ ++ } ++ ++#define write_interlaced(outmac) \ ++ for (i = 0; i < (int) png_get_image_height(png_p, info_p); i++) { \ ++ row = rows[i]; \ ++ k = (size_t) png_get_rowbytes(png_p, info_p); \ ++ while (k > 0) { \ ++ l = (k > pdf->buf->size) ? pdf->buf->size : k; \ ++ pdf_room(pdf, l); \ ++ for (j = 0; j < l; j++) { \ ++ outmac; \ ++ } \ ++ k -= l; \ ++ } \ ++ xfree(rows[i]); \ ++ } + +-#define write_interlaced(outmac) \ +- for (i = 0; i < (int)png_get_image_height (png_p, info_p); i++) { \ +- row = rows[i]; \ +- k = (int)png_get_rowbytes(png_p, info_p); \ +- while(k > 0) { \ +- l = (k > pdf->buf_size)?pdf->buf_size: k;\ +- pdf_room(pdf,l); \ +- for (j = 0; j < l; j++) { \ +- outmac; \ +- } \ +- k -= l; \ +- } \ +- xfree(rows[i]); \ +- } ++@ @c ++static void write_palette_streamobj(PDF pdf, int palette_objnum, ++ png_colorp palette, int num_palette) ++{ ++ int i; ++ if (palette_objnum == 0) ++ return; ++ assert(palette != NULL); ++ pdf_begin_obj(pdf, palette_objnum, OBJSTM_NEVER); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_streaminfo(pdf); ++ pdf_end_dict(pdf); ++ pdf_begin_stream(pdf); ++ for (i = 0; i < num_palette; i++) { ++ pdf_room(pdf, 3); ++ pdf_quick_out(pdf, palette[i].red); ++ pdf_quick_out(pdf, palette[i].green); ++ pdf_quick_out(pdf, palette[i].blue); ++ } ++ pdf_end_stream(pdf); ++ pdf_end_obj(pdf); ++} + + @ @c +-static void write_png_palette(PDF pdf, image_dict * idict) ++static void write_smask_streamobj(PDF pdf, image_dict * idict, int smask_objnum, ++ png_bytep smask, int smask_size) + { +- int i, j, k, l; ++ int i; + png_structp png_p = img_png_png_ptr(idict); + png_infop info_p = img_png_info_ptr(idict); +- png_bytep row, r, *rows; +- int palette_objnum = 0; +- png_colorp palette; +- int num_palette; +- +- png_get_PLTE(png_p, info_p, &palette, &num_palette); +- +- if (img_colorspace(idict) != 0) { +- pdf_printf(pdf, "%i 0 R\n", (int) img_colorspace(idict)); +- } else { +- palette_objnum = pdf_create_obj(pdf, obj_type_others, 0); +- pdf_printf(pdf, "[/Indexed /DeviceRGB %i %i 0 R]\n", +- (int) (num_palette - 1), (int) palette_objnum); +- } ++ png_byte bitdepth = png_get_bit_depth(png_p, info_p); ++ pdf_begin_obj(pdf, smask_objnum, OBJSTM_NEVER); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_name(pdf, "Type", "XObject"); ++ pdf_dict_add_name(pdf, "Subtype", "Image"); ++ if (img_attr(idict) != NULL && strlen(img_attr(idict)) > 0) ++ pdf_printf(pdf, "\n%s\n", img_attr(idict)); ++ pdf_dict_add_int(pdf, "Width", (int) png_get_image_width(png_p, info_p)); ++ pdf_dict_add_int(pdf, "Height", (int) png_get_image_height(png_p, info_p)); ++ pdf_dict_add_int(pdf, "BitsPerComponent", (bitdepth == 16 ? 8 : bitdepth)); ++ pdf_dict_add_name(pdf, "ColorSpace", "DeviceGray"); ++ pdf_dict_add_streaminfo(pdf); ++ pdf_end_dict(pdf); + pdf_begin_stream(pdf); +- if (png_get_interlace_type(png_p, info_p) == PNG_INTERLACE_NONE) { +- row = xtalloc(png_get_rowbytes(png_p, info_p), png_byte); +- write_noninterlaced(write_simple_pixel(r)); +- xfree(row); +- } else { +- if (png_get_image_height (png_p, info_p) * png_get_rowbytes(png_p, info_p) >= 10240000L) +- pdftex_warn +- ("large interlaced PNG might cause out of memory (use non-interlaced PNG to fix this)"); +- rows = xtalloc(png_get_image_height (png_p, info_p), png_bytep); +- for (i = 0; (unsigned) i < png_get_image_height (png_p, info_p); i++) +- rows[i] = xtalloc(png_get_rowbytes(png_p, info_p), png_byte); +- png_read_image(png_p, rows); +- write_interlaced(write_simple_pixel(row)); +- xfree(rows); ++ for (i = 0; i < smask_size; i++) { ++ if (i % 8 == 0) ++ pdf_room(pdf, 8); ++ pdf_quick_out(pdf, smask[i]); ++ if (bitdepth == 16) ++ i++; + } + pdf_end_stream(pdf); +- if (palette_objnum > 0) { +- pdf_begin_dict(pdf, palette_objnum, 0); +- pdf_begin_stream(pdf); +- for (i = 0; i < num_palette; i++) { +- pdf_room(pdf, 3); +- pdf_quick_out(pdf, palette[i].red); +- pdf_quick_out(pdf, palette[i].green); +- pdf_quick_out(pdf, palette[i].blue); +- } +- pdf_end_stream(pdf); +- } ++ pdf_end_obj(pdf); + } + + @ @c + static void write_png_gray(PDF pdf, image_dict * idict) + { +- int i, j, k, l; ++ int i; ++ size_t j, k, l; + png_structp png_p = img_png_png_ptr(idict); + png_infop info_p = img_png_info_ptr(idict); + png_bytep row, r, *rows; +- if (img_colorspace(idict) != 0) { +- pdf_printf(pdf, "%i 0 R\n", (int) img_colorspace(idict)); +- } else { +- pdf_puts(pdf, "/DeviceGray\n"); +- } ++ pdf_dict_add_streaminfo(pdf); ++ pdf_end_dict(pdf); + pdf_begin_stream(pdf); + if (png_get_interlace_type(png_p, info_p) == PNG_INTERLACE_NONE) { + row = xtalloc(png_get_rowbytes(png_p, info_p), png_byte); + write_noninterlaced(write_simple_pixel(r)); + xfree(row); + } else { +- if (png_get_image_height (png_p, info_p) * png_get_rowbytes(png_p, info_p) >= 10240000L) ++ if (png_get_image_height(png_p, info_p) * ++ png_get_rowbytes(png_p, info_p) >= 10240000L) + pdftex_warn + ("large interlaced PNG might cause out of memory (use non-interlaced PNG to fix this)"); +- rows = xtalloc(png_get_image_height (png_p, info_p), png_bytep); +- for (i = 0; (unsigned) i < png_get_image_height (png_p, info_p); i++) ++ rows = xtalloc(png_get_image_height(png_p, info_p), png_bytep); ++ for (i = 0; i < (int) png_get_image_height(png_p, info_p); i++) + rows[i] = xtalloc(png_get_rowbytes(png_p, info_p), png_byte); + png_read_image(png_p, rows); + write_interlaced(write_simple_pixel(row)); + xfree(rows); + } + pdf_end_stream(pdf); ++ pdf_end_obj(pdf); + } + + @ @c + static void write_png_gray_alpha(PDF pdf, image_dict * idict) + { +- int i, j, k, l; ++ int i; ++ size_t j, k, l; + png_structp png_p = img_png_png_ptr(idict); + png_infop info_p = img_png_info_ptr(idict); + png_bytep row, r, *rows; +@@ -240,34 +254,35 @@ static void write_png_gray_alpha(PDF pdf + png_bytep smask; + int smask_ptr = 0; + int smask_size = 0; +- png_byte bitdepth; +- if (img_colorspace(idict) != 0) { +- pdf_printf(pdf, "%i 0 R\n", (int) img_colorspace(idict)); +- } else { +- pdf_puts(pdf, "/DeviceGray\n"); +- } + smask_objnum = pdf_create_obj(pdf, obj_type_others, 0); +- pdf_printf(pdf, "/SMask %i 0 R\n", (int) smask_objnum); +- smask_size = (int) ((png_get_rowbytes(png_p, info_p) / 2) * png_get_image_height (png_p, info_p)); ++ pdf_dict_add_ref(pdf, "SMask", (int) smask_objnum); ++ smask_size = ++ (int) ((png_get_rowbytes(png_p, info_p) / 2) * ++ png_get_image_height(png_p, info_p)); + smask = xtalloc((unsigned) smask_size, png_byte); ++ pdf_dict_add_streaminfo(pdf); ++ pdf_end_dict(pdf); + pdf_begin_stream(pdf); + if (png_get_interlace_type(png_p, info_p) == PNG_INTERLACE_NONE) { + row = xtalloc(png_get_rowbytes(png_p, info_p), png_byte); +- if ((png_get_bit_depth(png_p, info_p) == 16) && (pdf->image_hicolor != 0)) { ++ if ((png_get_bit_depth(png_p, info_p) == 16) ++ && (pdf->image_hicolor != 0)) { + write_noninterlaced(write_gray_pixel_16(r)); + } else { + write_noninterlaced(write_gray_pixel_8(r)); + } + xfree(row); + } else { +- if (png_get_image_height (png_p, info_p) * png_get_rowbytes(png_p, info_p) >= 10240000L) ++ if (png_get_image_height(png_p, info_p) * ++ png_get_rowbytes(png_p, info_p) >= 10240000L) + pdftex_warn + ("large interlaced PNG might cause out of memory (use non-interlaced PNG to fix this)"); +- rows = xtalloc(png_get_image_height (png_p, info_p), png_bytep); +- for (i = 0; (unsigned) i < png_get_image_height (png_p, info_p); i++) ++ rows = xtalloc(png_get_image_height(png_p, info_p), png_bytep); ++ for (i = 0; i < (int) png_get_image_height(png_p, info_p); i++) + rows[i] = xtalloc(png_get_rowbytes(png_p, info_p), png_byte); + png_read_image(png_p, rows); +- if ((png_get_bit_depth(png_p, info_p) == 16) && (pdf->image_hicolor != 0)) { ++ if ((png_get_bit_depth(png_p, info_p) == 16) ++ && (pdf->image_hicolor != 0)) { + write_interlaced(write_gray_pixel_16(row)); + } else { + write_interlaced(write_gray_pixel_8(row)); +@@ -275,65 +290,16 @@ static void write_png_gray_alpha(PDF pdf + xfree(rows); + } + pdf_end_stream(pdf); +- pdf_flush(pdf); +- /* now write the Smask object */ +- bitdepth = png_get_bit_depth (png_p, info_p); +- pdf_begin_dict(pdf, smask_objnum, 0); +- pdf_puts(pdf, "/Type /XObject\n/Subtype /Image\n"); +- if (img_attr(idict) != NULL && strlen(img_attr(idict)) > 0) +- pdf_printf(pdf, "%s\n", img_attr(idict)); +- pdf_printf(pdf, "/Width %i\n/Height %i\n/BitsPerComponent %i\n", +- (int) png_get_image_width (png_p, info_p), +- (int) png_get_image_height (png_p, info_p), +- (bitdepth == 16 ? 8 : bitdepth)); +- pdf_puts(pdf, "/ColorSpace /DeviceGray\n"); +- pdf_begin_stream(pdf); +- for (i = 0; i < smask_size; i++) { +- if (i % 8 == 0) +- pdf_room(pdf, 8); +- pdf_quick_out(pdf, smask[i]); +- if (bitdepth == 16) +- i++; +- } +- pdf_end_stream(pdf); ++ pdf_end_obj(pdf); ++ write_smask_streamobj(pdf, idict, smask_objnum, smask, smask_size); + xfree(smask); + } + + @ @c +-static void write_png_rgb(PDF pdf, image_dict * idict) +-{ +- int i, j, k, l; +- png_structp png_p = img_png_png_ptr(idict); +- png_infop info_p = img_png_info_ptr(idict); +- png_bytep row, r, *rows; +- if (img_colorspace(idict) != 0) { +- pdf_printf(pdf, "%i 0 R\n", (int) img_colorspace(idict)); +- } else { +- pdf_puts(pdf, "/DeviceRGB\n"); +- } +- pdf_begin_stream(pdf); +- if (png_get_interlace_type(png_p, info_p) == PNG_INTERLACE_NONE) { +- row = xtalloc(png_get_rowbytes(png_p, info_p), png_byte); +- write_noninterlaced(write_simple_pixel(r)); +- xfree(row); +- } else { +- if (png_get_image_height (png_p, info_p) * png_get_rowbytes(png_p, info_p) >= 10240000L) +- pdftex_warn +- ("large interlaced PNG might cause out of memory (use non-interlaced PNG to fix this)"); +- rows = xtalloc(png_get_image_height (png_p, info_p), png_bytep); +- for (i = 0; (unsigned) i < png_get_image_height (png_p, info_p); i++) +- rows[i] = xtalloc(png_get_rowbytes(png_p, info_p), png_byte); +- png_read_image(png_p, rows); +- write_interlaced(write_simple_pixel(row)); +- xfree(rows); +- } +- pdf_end_stream(pdf); +-} +- +-@ @c + static void write_png_rgb_alpha(PDF pdf, image_dict * idict) + { +- int i, j, k, l; ++ int i; ++ size_t j, k, l; + png_structp png_p = img_png_png_ptr(idict); + png_infop info_p = img_png_info_ptr(idict); + png_bytep row, r, *rows; +@@ -341,34 +307,35 @@ static void write_png_rgb_alpha(PDF pdf, + png_bytep smask; + int smask_ptr = 0; + int smask_size = 0; +- png_byte bitdepth; +- if (img_colorspace(idict) != 0) { +- pdf_printf(pdf, "%i 0 R\n", (int) img_colorspace(idict)); +- } else { +- pdf_puts(pdf, "/DeviceRGB\n"); +- } + smask_objnum = pdf_create_obj(pdf, obj_type_others, 0); +- pdf_printf(pdf, "/SMask %i 0 R\n", (int) smask_objnum); +- smask_size = (int) ((png_get_rowbytes (png_p, info_p) / 4) * png_get_image_height (png_p, info_p)); ++ pdf_dict_add_ref(pdf, "SMask", (int) smask_objnum); ++ smask_size = ++ (int) ((png_get_rowbytes(png_p, info_p) / 4) * ++ png_get_image_height(png_p, info_p)); + smask = xtalloc((unsigned) smask_size, png_byte); ++ pdf_dict_add_streaminfo(pdf); ++ pdf_end_dict(pdf); + pdf_begin_stream(pdf); + if (png_get_interlace_type(png_p, info_p) == PNG_INTERLACE_NONE) { + row = xtalloc(png_get_rowbytes(png_p, info_p), png_byte); +- if ((png_get_bit_depth(png_p, info_p) == 16) && (pdf->image_hicolor != 0)) { ++ if ((png_get_bit_depth(png_p, info_p) == 16) ++ && (pdf->image_hicolor != 0)) { + write_noninterlaced(write_rgb_pixel_16(r)); + } else { + write_noninterlaced(write_rgb_pixel_8(r)); + } + xfree(row); + } else { +- if (png_get_image_height (png_p, info_p) * png_get_rowbytes(png_p, info_p) >= 10240000L) ++ if (png_get_image_height(png_p, info_p) * ++ png_get_rowbytes(png_p, info_p) >= 10240000L) + pdftex_warn + ("large interlaced PNG might cause out of memory (use non-interlaced PNG to fix this)"); +- rows = xtalloc(png_get_image_height (png_p, info_p), png_bytep); +- for (i = 0; (unsigned) i < png_get_image_height (png_p, info_p); i++) ++ rows = xtalloc(png_get_image_height(png_p, info_p), png_bytep); ++ for (i = 0; i < (int) png_get_image_height(png_p, info_p); i++) + rows[i] = xtalloc(png_get_rowbytes(png_p, info_p), png_byte); + png_read_image(png_p, rows); +- if ((png_get_bit_depth(png_p, info_p) == 16) && (pdf->image_hicolor != 0)) { ++ if ((png_get_bit_depth(png_p, info_p) == 16) ++ && (pdf->image_hicolor != 0)) { + write_interlaced(write_rgb_pixel_16(row)); + } else { + write_interlaced(write_rgb_pixel_8(row)); +@@ -376,47 +343,29 @@ static void write_png_rgb_alpha(PDF pdf, + xfree(rows); + } + pdf_end_stream(pdf); +- pdf_flush(pdf); +- /* now write the Smask object */ +- if (smask_objnum > 0) { +- bitdepth = png_get_bit_depth (png_p, info_p); +- pdf_begin_dict(pdf, smask_objnum, 0); +- pdf_puts(pdf, "/Type /XObject\n/Subtype /Image\n"); +- if (img_attr(idict) != NULL && strlen(img_attr(idict)) > 0) +- pdf_printf(pdf, "%s\n", img_attr(idict)); +- pdf_printf(pdf, "/Width %i\n/Height %i\n/BitsPerComponent %i\n", +- (int) png_get_image_width (png_p, info_p), +- (int) png_get_image_height (png_p, info_p), +- (bitdepth == 16 ? 8 : bitdepth)); +- pdf_puts(pdf, "/ColorSpace /DeviceGray\n"); +- pdf_begin_stream(pdf); +- for (i = 0; i < smask_size; i++) { +- if (i % 8 == 0) +- pdf_room(pdf, 8); +- pdf_quick_out(pdf, smask[i]); +- if (bitdepth == 16) +- i++; +- } +- xfree(smask); +- pdf_end_stream(pdf); +- } ++ pdf_end_obj(pdf); ++ write_smask_streamobj(pdf, idict, smask_objnum, smask, smask_size); ++ xfree(smask); + } + +-@ The |copy_png| function is from Hartmut Henkel. The goal is to use +-pdf's native FlateDecode support if that is possible. +- +-Only a subset of the png files allows this, but when possible it +-greatly improves inclusion speed. +- +-Code cheerfully gleaned from Thomas Merz' PDFlib, +-file |p_png.c| "SPNG - Simple PNG" +- ++@ The |copy_png| code is cheerfully gleaned from Thomas Merz' PDFlib, ++file |p_png.c| ``SPNG - Simple PNG''. ++The goal is to use pdf's native FlateDecode support, if that is possible. ++Only a subset of the png files allows this, but for these it greatly ++improves inclusion speed. ++ ++In the ``PNG Copy'' mode only the IDAT chunks are copied; ++all other chunks from the PNG file are discarded. ++If there are any other chunks in the PNG file, ++which might influence the visual appearance of the image, ++or if image processing like gamma change is requested, ++the ``PNG Copy'' function must be skipped; therefore the lengthy tests. + + @c +-static int spng_getint(FILE * fp) ++static int spng_getint(FILE * f) + { + unsigned char buf[4]; +- if (fread(buf, 1, 4, fp) != 4) ++ if (fread(buf, 1, 4, f) != 4) + pdftex_fail("writepng: reading chunk type failed"); + return ((((((int) buf[0] << 8) + buf[1]) << 8) + buf[2]) << 8) + buf[3]; + } +@@ -426,22 +375,22 @@ static int spng_getint(FILE * fp) + + static void copy_png(PDF pdf, image_dict * idict) + { ++ int type, streamlength = 0, idat = 0; ++ size_t len; ++ boolean endflag = false; ++ FILE *f; + png_structp png_p; + png_infop info_p; +- FILE *fp; +- int i, len, type, streamlength = 0; +- boolean endflag = false; +- int idat = 0; /* flag to check continuous IDAT chunks sequence */ + assert(idict != NULL); + png_p = img_png_png_ptr(idict); + info_p = img_png_info_ptr(idict); +- fp = (FILE *) png_get_io_ptr(png_p); ++ f = (FILE *) png_get_io_ptr(png_p); + /* 1st pass to find overall stream /Length */ +- if (fseek(fp, 8, SEEK_SET) != 0) +- pdftex_fail("writepng: fseek in PNG file failed"); ++ if (fseek(f, 8, SEEK_SET) != 0) ++ pdftex_fail("writepng: fseek in PNG file failed (1)"); + do { +- len = spng_getint(fp); +- type = spng_getint(fp); ++ len = spng_getint(f); ++ type = spng_getint(f); + switch (type) { + case SPNG_CHUNK_IEND: + endflag = true; +@@ -449,64 +398,64 @@ static void copy_png(PDF pdf, image_dict + case SPNG_CHUNK_IDAT: + streamlength += len; + default: +- if (fseek(fp, len + 4, SEEK_CUR) != 0) +- pdftex_fail("writepng: fseek in PNG file failed"); ++ if (fseek(f, len + 4, SEEK_CUR) != 0) ++ pdftex_fail("writepng: fseek in PNG file failed (2)"); + } + } while (endflag == false); +- pdf_printf(pdf, "/Length %d\n" +- "/Filter/FlateDecode\n" +- "/DecodeParms<<" +- "/Colors %d" +- "/Columns %u" +- "/BitsPerComponent %i" +- "/Predictor 10>>\n>>\nstream\n", streamlength, +- png_get_color_type (png_p, info_p) == 2 ? 3 : 1, +- png_get_image_width (png_p, info_p), +- png_get_bit_depth (png_p, info_p)); ++ pdf_dict_add_int(pdf, "Length", streamlength); ++ pdf_dict_add_name(pdf, "Filter", "FlateDecode"); ++ pdf_add_name(pdf, "DecodeParms"); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_int(pdf, "Colors", ++ png_get_color_type(png_p, ++ info_p) == PNG_COLOR_TYPE_RGB ? 3 : 1); ++ pdf_dict_add_int(pdf, "Columns", png_get_image_width(png_p, info_p)); ++ pdf_dict_add_int(pdf, "BitsPerComponent", png_get_bit_depth(png_p, info_p)); ++ pdf_dict_add_int(pdf, "Predictor", 10); ++ pdf_end_dict(pdf); ++ pdf_end_dict(pdf); ++ pdf_begin_stream(pdf); ++ assert(pdf->zip_write_state == NO_ZIP); /* the PNG stream is already compressed */ + /* 2nd pass to copy data */ + endflag = false; +- if (fseek(fp, 8, SEEK_SET) != 0) +- pdftex_fail("writepng: fseek in PNG file failed"); ++ if (fseek(f, 8, SEEK_SET) != 0) ++ pdftex_fail("writepng: fseek in PNG file failed (3)"); + do { +- len = spng_getint(fp); +- type = spng_getint(fp); ++ len = spng_getint(f); ++ type = spng_getint(f); + switch (type) { + case SPNG_CHUNK_IDAT: /* do copy */ + if (idat == 2) + pdftex_fail("writepng: IDAT chunk sequence broken"); + idat = 1; +- while (len > 0) { +- i = (len > pdf->buf_size) ? pdf->buf_size : len; +- pdf_room(pdf, i); +- fread(&pdf->buf[pdf->ptr], 1, (size_t) i, fp); +- pdf->ptr += i; +- len -= i; +- } +- if (fseek(fp, 4, SEEK_CUR) != 0) +- pdftex_fail("writepng: fseek in PNG file failed"); ++ if (read_file_to_buf(pdf, f, len) != len) ++ pdftex_fail("writepng: fread failed"); ++ if (fseek(f, 4, SEEK_CUR) != 0) ++ pdftex_fail("writepng: fseek in PNG file failed (4)"); + break; + case SPNG_CHUNK_IEND: /* done */ +- pdf_end_stream(pdf); + endflag = true; + break; + default: + if (idat == 1) + idat = 2; +- if (fseek(fp, len + 4, SEEK_CUR) != 0) +- pdftex_fail("writepng: fseek in PNG file failed"); ++ if (fseek(f, len + 4, SEEK_CUR) != 0) ++ pdftex_fail("writepng: fseek in PNG file failed (5)"); + } + } while (endflag == false); ++ pdf_end_stream(pdf); ++ pdf_end_obj(pdf); + } + + @ @c +-static void reopen_png(PDF pdf, image_dict * idict) ++static void reopen_png(image_dict * idict) + { + int width, height, xres, yres; + width = img_xsize(idict); /* do consistency check */ + height = img_ysize(idict); + xres = img_xres(idict); + yres = img_yres(idict); +- read_png_info(pdf, idict, IMG_KEEPOPEN); ++ read_png_info(idict, IMG_KEEPOPEN); + if (width != img_xsize(idict) || height != img_ysize(idict) + || xres != img_xres(idict) || yres != img_yres(idict)) + pdftex_fail("writepng: image dimensions have changed"); +@@ -517,29 +466,24 @@ static boolean last_png_needs_page_group + + void write_png(PDF pdf, image_dict * idict) + { ++#ifndef PNG_FP_1 ++ /* for libpng < 1.5.0 */ ++# define PNG_FP_1 100000 ++#endif ++ int num_palette, palette_objnum = 0; + boolean png_copy = true; + double gamma = 0.0; + png_fixed_point int_file_gamma = 0; +-#ifndef PNG_FP_1 +- /* for libpng < 1.5.0 */ +-#define PNG_FP_1 100000 +-#endif +- int i; +- int palette_objnum = 0; + png_structp png_p; + png_infop info_p; ++ png_colorp palette; + assert(idict != NULL); + last_png_needs_page_group = false; + if (img_file(idict) == NULL) +- reopen_png(pdf, idict); ++ reopen_png(idict); + assert(img_png_ptr(idict) != NULL); + png_p = img_png_png_ptr(idict); + info_p = img_png_info_ptr(idict); +- if (pdf->minor_version < 5) +- pdf->image_hicolor = 0; +- pdf_puts(pdf, "/Type /XObject\n/Subtype /Image\n"); +- if (img_attr(idict) != NULL && strlen(img_attr(idict)) > 0) +- pdf_printf(pdf, "%s\n", img_attr(idict)); + /* simple transparency support */ + if (png_get_valid(png_p, info_p, PNG_INFO_tRNS)) { + png_set_tRNS_to_alpha(png_p); +@@ -575,11 +519,44 @@ void write_png(PDF pdf, image_dict * idi + (void) png_set_interlace_handling(png_p); + png_read_update_info(png_p, info_p); + +- pdf_printf(pdf, "/Width %i\n/Height %i\n/BitsPerComponent %i\n", +- (int) png_get_image_width(png_p, info_p), +- (int) png_get_image_height(png_p, info_p), +- (int) png_get_bit_depth(png_p, info_p)); +- pdf_puts(pdf, "/ColorSpace "); ++ pdf_begin_obj(pdf, img_objnum(idict), OBJSTM_NEVER); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_name(pdf, "Type", "XObject"); ++ pdf_dict_add_name(pdf, "Subtype", "Image"); ++ if (img_attr(idict) != NULL && strlen(img_attr(idict)) > 0) ++ pdf_printf(pdf, "\n%s\n", img_attr(idict)); ++ pdf_dict_add_int(pdf, "Width", (int) png_get_image_width(png_p, info_p)); ++ pdf_dict_add_int(pdf, "Height", (int) png_get_image_height(png_p, info_p)); ++ pdf_dict_add_int(pdf, "BitsPerComponent", ++ (int) png_get_bit_depth(png_p, info_p)); ++ if (img_colorspace(idict) != 0) { ++ pdf_dict_add_ref(pdf, "ColorSpace", (int) img_colorspace(idict)); ++ } else { ++ switch (png_get_color_type(png_p, info_p)) { ++ case PNG_COLOR_TYPE_PALETTE: ++ png_get_PLTE(png_p, info_p, &palette, &num_palette); ++ palette_objnum = pdf_create_obj(pdf, obj_type_others, 0); ++ pdf_add_name(pdf, "ColorSpace"); ++ pdf_begin_array(pdf); ++ pdf_add_name(pdf, "Indexed"); ++ pdf_add_name(pdf, "DeviceRGB"); /* base; PDFRef. 4.5.5 */ ++ pdf_add_int(pdf, (int) (num_palette - 1)); /* hival */ ++ pdf_add_ref(pdf, (int) palette_objnum); /* lookup */ ++ pdf_end_array(pdf); ++ break; ++ case PNG_COLOR_TYPE_GRAY: ++ case PNG_COLOR_TYPE_GRAY_ALPHA: ++ pdf_dict_add_name(pdf, "ColorSpace", "DeviceGray"); ++ break; ++ case PNG_COLOR_TYPE_RGB: ++ case PNG_COLOR_TYPE_RGB_ALPHA: ++ pdf_dict_add_name(pdf, "ColorSpace", "DeviceRGB"); ++ break; ++ default: ++ pdftex_fail("unsupported type of color_type <%i>", ++ png_get_color_type(png_p, info_p)); ++ } ++ } + if (png_copy && pdf->minor_version > 1 + && png_get_interlace_type(png_p, info_p) == PNG_INTERLACE_NONE + && (png_get_color_type(png_p, info_p) == PNG_COLOR_TYPE_GRAY +@@ -594,43 +571,11 @@ void write_png(PDF pdf, image_dict * idi + && !png_get_valid(png_p, info_p, PNG_INFO_bKGD) + && !png_get_valid(png_p, info_p, PNG_INFO_hIST) + && !png_get_valid(png_p, info_p, PNG_INFO_tRNS) +- && !png_get_valid(png_p, info_p, PNG_INFO_sPLT) +- ) { +- /* Copy PNG */ +- png_colorp palette; +- int num_palette; +- +- png_get_PLTE(png_p, info_p, &palette, &num_palette); +- if (img_colorspace(idict) != 0) { +- pdf_printf(pdf, "%i 0 R\n", (int) img_colorspace(idict)); +- } else { +- switch (png_get_color_type(png_p, info_p)) { +- case PNG_COLOR_TYPE_PALETTE: +- palette_objnum = pdf_create_obj(pdf, obj_type_others, 0); +- pdf_printf(pdf, "[/Indexed /DeviceRGB %i %i 0 R]\n", +- num_palette - 1, (int) palette_objnum); +- break; +- case PNG_COLOR_TYPE_GRAY: +- pdf_puts(pdf, "/DeviceGray\n"); +- break; +- default: /* RGB */ +- pdf_puts(pdf, "/DeviceRGB\n"); +- }; +- } ++ && !png_get_valid(png_p, info_p, PNG_INFO_sPLT)) { ++ /* PNG copy */ + if (tracefilenames) + tex_printf(" (PNG copy)"); + copy_png(pdf, idict); +- if (palette_objnum > 0) { +- pdf_begin_dict(pdf, palette_objnum, 0); +- pdf_begin_stream(pdf); +- for (i = 0; i < num_palette; i++) { +- pdf_room(pdf, 3); +- pdf_quick_out(pdf, palette[i].red); +- pdf_quick_out(pdf, palette[i].green); +- pdf_quick_out(pdf, palette[i].blue); +- } +- pdf_end_stream(pdf); +- } + } else { + if (0) { + tex_printf(" *** PNG copy skipped because: "); +@@ -667,9 +612,8 @@ void write_png(PDF pdf, image_dict * idi + } + switch (png_get_color_type(png_p, info_p)) { + case PNG_COLOR_TYPE_PALETTE: +- write_png_palette(pdf, idict); +- break; + case PNG_COLOR_TYPE_GRAY: ++ case PNG_COLOR_TYPE_RGB: + write_png_gray(pdf, idict); + break; + case PNG_COLOR_TYPE_GRAY_ALPHA: +@@ -679,22 +623,18 @@ void write_png(PDF pdf, image_dict * idi + } else + write_png_gray(pdf, idict); + break; +- case PNG_COLOR_TYPE_RGB: +- write_png_rgb(pdf, idict); +- break; + case PNG_COLOR_TYPE_RGB_ALPHA: + if (pdf->minor_version >= 4) { + write_png_rgb_alpha(pdf, idict); + last_png_needs_page_group = true; + } else +- write_png_rgb(pdf, idict); ++ write_png_gray(pdf, idict); + break; + default: +- pdftex_fail("unsupported type of color_type <%i>", +- png_get_color_type(png_p, info_p)); ++ assert(0); + } + } +- pdf_flush(pdf); ++ write_palette_streamobj(pdf, palette_objnum, palette, num_palette); + close_and_cleanup_png(idict); + } + +@@ -709,7 +649,7 @@ void write_additional_png_objects(PDF pd + (void) pdf; + (void) transparent_page_group; + (void) transparent_page_group_was_written; +- return; /* this interferes with current macro-based usage and cannot be configured */ ++ return; /* this interferes with current macro-based usage and cannot be configured */ + #if 0 + if (last_png_needs_page_group) { + if (!transparent_page_group_was_written && transparent_page_group > 1) { +@@ -719,9 +659,13 @@ void write_additional_png_objects(PDF pd + if (pdf->compress_level == 0) { + pdf_puts(pdf, "%PTEX Group needed for transparent pngs\n"); + } +- pdf_puts +- (pdf, +- "<>\n"); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_name(pdf, "Type", "Group"); ++ pdf_dict_add_name(pdf, "S", "Transparency"); ++ pdf_dict_add_name(pdf, "CS", "DeviceRGB"); ++ pdf_dict_add_bool(pdf, "I", 1); ++ pdf_dict_add_bool(pdf, "K", 1); ++ pdf_end_dict(pdf); + pdf_end_obj(pdf); + } + } +--- texk/web2c/luatexdir/lua/lcallbacklib.c ++++ texk/web2c/luatexdir/lua/lcallbacklib.c 2011-10-13 07:39:27.000000000 +0000 +@@ -47,6 +47,7 @@ static const char *const callbacknames[] + "find_pk_file", "read_pk_file", + "show_error_hook", + "process_input_buffer", "process_output_buffer", ++ "process_jobname", + "start_page_number", "stop_page_number", + "start_run", "stop_run", + "define_font", +--- texk/web2c/luatexdir/lua/lepdflib.cc ++++ texk/web2c/luatexdir/lua/lepdflib.cc 2011-10-13 07:39:27.000000000 +0000 +@@ -54,10 +54,11 @@ static const char *ErrorCodeNames[] = { + #define M_Annots "Annots" + #define M_Array "Array" + #define M_Catalog "Catalog" +-#define M_EmbFile "EmbFile" + #define M_Dict "Dict" ++#define M_EmbFile "EmbFile" + #define M_GooString "GooString" + #define M_LinkDest "LinkDest" ++#define M_Link "Link" + #define M_Links "Links" + #define M_Object "Object" + #define M_Page "Page" +@@ -65,8 +66,8 @@ static const char *ErrorCodeNames[] = { + #define M_PDFRectangle "PDFRectangle" + #define M_Ref "Ref" + #define M_Stream "Stream" +-#define M_XRef "XRef" + #define M_XRefEntry "XRefEntry" ++#define M_XRef "XRef" + + //********************************************************************** + +@@ -89,9 +90,13 @@ new_poppler_userdata(AnnotBorder); + new_poppler_userdata(Annots); + new_poppler_userdata(Array); + new_poppler_userdata(Catalog); +-new_poppler_userdata(EmbFile); + new_poppler_userdata(Dict); ++#if POPPLER_VERSION_MAJOR == 0 && (POPPLER_VERSION_MINOR < 17 || \ ++ ( POPPLER_VERSION_MINOR == 17 && POPPLER_VERSION_MICRO < 2)) ++new_poppler_userdata(EmbFile); ++#endif + //new_poppler_userdata(GooString); ++new_poppler_userdata(Link); + new_poppler_userdata(LinkDest); + new_poppler_userdata(Links); + new_poppler_userdata(Object); +@@ -100,7 +105,7 @@ new_poppler_userdata(PDFRectangle); + new_poppler_userdata(Ref); + new_poppler_userdata(Stream); + new_poppler_userdata(XRef); +-//new_poppler_userdata(XRefEntry); ++new_poppler_userdata(XRefEntry); + + //********************************************************************** + +@@ -393,7 +398,11 @@ static int m_Annot__gc(lua_State * L) + printf("\n===== Annot GC ===== uin=<%p>\n", uin); + #endif + if (uin->atype == ALLOC_LEPDF) ++#if POPPLER_VERSION_MAJOR == 0 && POPPLER_VERSION_MINOR < 17 + delete(Annot *) uin->d; ++#else ++ ((Annot *) uin->d)->decRefCnt(); ++#endif + return 0; + } + +@@ -410,6 +419,8 @@ static const struct luaL_Reg Annot_m[] = + //********************************************************************** + // AnnotBorderStyle + ++#if POPPLER_VERSION_MAJOR == 0 && POPPLER_VERSION_MINOR < 17 ++ + m_poppler_get_DOUBLE(AnnotBorderStyle, getWidth); + + m_poppler__tostring(AnnotBorderStyle); +@@ -420,9 +431,9 @@ static int m_Annots__gc(lua_State * L) + uin = (udstruct *) luaL_checkudata(L, 1, M_Annots); + if (uin->pd != NULL && uin->pd->pc != uin->pc) + pdfdoc_changed_error(L); +-#ifdef DEBUG ++# ifdef DEBUG + printf("\n===== Annots GC ===== uin=<%p>\n", uin); +-#endif ++# endif + if (uin->atype == ALLOC_LEPDF) + delete(Annots *) uin->d; + return 0; +@@ -435,6 +446,8 @@ static const struct luaL_Reg AnnotBorder + {NULL, NULL} // sentinel + }; + ++#endif ++ + //********************************************************************** + // Annots + +@@ -684,6 +697,8 @@ static int m_Catalog_findDest(lua_State + m_poppler_get_poppler(Catalog, Object, getDests); + m_poppler_get_INT(Catalog, numEmbeddedFiles); + ++#if POPPLER_VERSION_MAJOR == 0 && (POPPLER_VERSION_MINOR < 17 || \ ++ ( POPPLER_VERSION_MINOR == 17 && POPPLER_VERSION_MICRO < 2)) + static int m_Catalog_embeddedFile(lua_State * L) + { + EmbFile *ef; +@@ -707,6 +722,7 @@ static int m_Catalog_embeddedFile(lua_St + lua_pushnil(L); + return 1; + } ++#endif + + m_poppler_get_INT(Catalog, numJS); + +@@ -749,7 +765,9 @@ static const struct luaL_Reg Catalog_m[] + {"findDest", m_Catalog_findDest}, + {"getDests", m_Catalog_getDests}, + {"numEmbeddedFiles", m_Catalog_numEmbeddedFiles}, ++#if POPPLER_VERSION_MAJOR == 0 && POPPLER_VERSION_MINOR < 17 + {"embeddedFile", m_Catalog_embeddedFile}, ++#endif + {"numJS", m_Catalog_numJS}, + {"getJS", m_Catalog_getJS}, + {"getOutline", m_Catalog_getOutline}, +@@ -761,6 +779,9 @@ static const struct luaL_Reg Catalog_m[] + //********************************************************************** + // EmbFile + ++#if POPPLER_VERSION_MAJOR == 0 && (POPPLER_VERSION_MINOR < 17 || \ ++ ( POPPLER_VERSION_MINOR == 17 && POPPLER_VERSION_MICRO < 2)) ++ + m_poppler_get_GOOSTRING(EmbFile, name); + m_poppler_get_GOOSTRING(EmbFile, description); + m_poppler_get_INT(EmbFile, size); +@@ -778,6 +799,7 @@ static int m_EmbFile_streamObject(lua_St + uout = new_Object_userdata(L); + uout->d = new Object(); // automatic init to type "none" + ((EmbFile *) uin->d)->streamObject().copy((Object *) uout->d); ++ uout->atype = ALLOC_LEPDF; + uout->pc = uin->pc; + uout->pd = uin->pd; + return 1; +@@ -801,6 +823,8 @@ static const struct luaL_Reg EmbFile_m[] + {NULL, NULL} // sentinel + }; + ++#endif ++ + //********************************************************************** + // Dict + +@@ -1032,6 +1056,38 @@ static const struct luaL_Reg GooString_m + }; + + //********************************************************************** ++// Link ++ ++#if 0 ++m_poppler_get_BOOL(Link, isOk); ++ ++static int m_Link_inRect(lua_State * L) ++{ ++ udstruct *uin; ++ double x, y; ++ uin = (udstruct *) luaL_checkudata(L, 1, M_Link); ++ if (uin->pd != NULL && uin->pd->pc != uin->pc) ++ pdfdoc_changed_error(L); ++ x = luaL_checknumber(L, 2); ++ y = luaL_checknumber(L, 3); ++ if (((Link *) uin->d)->inRect(x, y)) ++ lua_pushboolean(L, 1); ++ else ++ lua_pushboolean(L, 0); ++ return 1; ++} ++ ++m_poppler__tostring(Link); ++ ++static const struct luaL_Reg Link_m[] = { ++ {"isOk", m_Link_isOk}, ++ {"inRect", m_Link_inRect}, ++ {"__tostring", m_Link__tostring}, ++ {NULL, NULL} // sentinel ++}; ++#endif ++ ++//********************************************************************** + // LinkDest + + static const char *LinkDestKindNames[] = +@@ -1115,9 +1171,39 @@ static const struct luaL_Reg LinkDest_m[ + //********************************************************************** + // Links + ++m_poppler_get_INT(Links, getNumLinks); ++ ++#if 0 ++static int m_Links_getLink(lua_State * L) ++{ ++ Link *link; ++ int i, len; ++ udstruct *uin, *uout; ++ uin = (udstruct *) luaL_checkudata(L, 1, M_Links); ++ if (uin->pd != NULL && uin->pd->pc != uin->pc) ++ pdfdoc_changed_error(L); ++ i = luaL_checkint(L, 2); ++ len = ((Links *) uin->d)->getNumLinks(); ++ if (i > 0 && i <= len) { ++ link = ((Links *) uin->d)->getLink(i - 1); ++ if (link != NULL) { ++ uout = new_Link_userdata(L); ++ uout->d = link; ++ uout->pc = uin->pc; ++ uout->pd = uin->pd; ++ } else ++ lua_pushnil(L); ++ } else ++ lua_pushnil(L); ++ return 1; ++} ++#endif ++ + m_poppler__tostring(Links); + + static const struct luaL_Reg Links_m[] = { ++ {"getNumLinks", m_Links_getNumLinks}, ++ //{"getLink", m_Links_getLink}, + {"__tostring", m_Links__tostring}, + {NULL, NULL} // sentinel + }; +@@ -2256,19 +2342,23 @@ static int m_PDFDoc_findPage(lua_State * + + static int m_PDFDoc_getLinks(lua_State * L) + { +- int i; ++ int i, pages; + Links *links; + udstruct *uin, *uout; + uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc); + if (uin->pd != NULL && uin->pd->pc != uin->pc) + pdfdoc_changed_error(L); + i = luaL_checkint(L, 2); +- links = ((PdfDocument *) uin->d)->doc->getLinks(i); +- if (links != NULL) { +- uout = new_Links_userdata(L); +- uout->d = links; +- uout->pc = uin->pc; +- uout->pd = uin->pd; ++ pages = ((PdfDocument *) uin->d)->doc->getNumPages(); ++ if (i > 0 && i <= pages) { ++ links = ((PdfDocument *) uin->d)->doc->getLinks(i); ++ if (links != NULL) { ++ uout = new_Links_userdata(L); ++ uout->d = links; ++ uout->pc = uin->pc; ++ uout->pd = uin->pd; ++ } else ++ lua_pushnil(L); + } else + lua_pushnil(L); + return 1; +@@ -2347,6 +2437,8 @@ static int m_PDFDoc_getDocInfoNF(lua_Sta + m_PDFDoc_INT(getPDFMajorVersion); + m_PDFDoc_INT(getPDFMinorVersion); + ++m_poppler__tostring(PDFDoc); ++ + static int m_PDFDoc__gc(lua_State * L) + { + udstruct *uin; +@@ -2390,6 +2482,7 @@ static const struct luaL_Reg PDFDoc_m[] + {"getDocInfoNF", m_PDFDoc_getDocInfoNF}, + {"getPDFMajorVersion", m_PDFDoc_getPDFMajorVersion}, + {"getPDFMinorVersion", m_PDFDoc_getPDFMinorVersion}, ++ {"__tostring", m_PDFDoc__tostring}, + {"__gc", m_PDFDoc__gc}, // finalizer + {NULL, NULL} // sentinel + }; +@@ -2625,12 +2718,47 @@ static int m_XRef_fetch(lua_State * L) + m_poppler_get_OBJECT(XRef, getDocInfo); + m_poppler_get_OBJECT(XRef, getDocInfoNF); + m_poppler_get_INT(XRef, getNumObjects); +-// getLastXRefPos + m_poppler_get_INT(XRef, getRootNum); + m_poppler_get_INT(XRef, getRootGen); + // getStreamEnd ++ ++static int m_XRef_getNumEntry(lua_State * L) ++{ ++ int i, offset; ++ udstruct *uin; ++ uin = (udstruct *) luaL_checkudata(L, 1, M_XRef); ++ if (uin->pd != NULL && uin->pd->pc != uin->pc) ++ pdfdoc_changed_error(L); ++ offset = luaL_checkint(L, 2); ++ i = ((XRef *) uin->d)->getNumEntry(offset); ++ if (i >= 0) ++ lua_pushinteger(L, i); ++ else ++ lua_pushnil(L); ++ return 1; ++} ++ + m_poppler_get_INT(XRef, getSize); +-// getEntry ++ ++static int m_XRef_getEntry(lua_State * L) ++{ ++ int i, size; ++ udstruct *uin, *uout; ++ uin = (udstruct *) luaL_checkudata(L, 1, M_XRef); ++ if (uin->pd != NULL && uin->pd->pc != uin->pc) ++ pdfdoc_changed_error(L); ++ i = luaL_checkint(L, 2); ++ size = ((XRef *) uin->d)->getSize(); ++ if (i > 0 && i <= size) { ++ uout = new_XRefEntry_userdata(L); ++ uout->d = ((XRef *) uin->d)->getEntry(i); ++ uout->pc = uin->pc; ++ uout->pd = uin->pd; ++ } else ++ lua_pushnil(L); ++ return 1; ++} ++ + m_poppler_get_poppler(XRef, Object, getTrailerDict); + + m_poppler__tostring(XRef); +@@ -2652,11 +2780,12 @@ static const struct luaL_Reg XRef_m[] = + {"getDocInfo", m_XRef_getDocInfo}, + {"getDocInfoNF", m_XRef_getDocInfoNF}, + {"getNumObjects", m_XRef_getNumObjects}, +- // + {"getRootNum", m_XRef_getRootNum}, + {"getRootGen", m_XRef_getRootGen}, +- // ++ // {"getStreamEnd", m_XRef_getStreamEnd}, ++ {"getNumEntry", m_XRef_getNumEntry}, + {"getSize", m_XRef_getSize}, ++ {"getEntry", m_XRef_getEntry}, + {"getTrailerDict", m_XRef_getTrailerDict}, + {"__tostring", m_XRef__tostring}, + {NULL, NULL} // sentinel +@@ -2665,7 +2794,10 @@ static const struct luaL_Reg XRef_m[] = + //********************************************************************** + // XRefEntry + ++m_poppler__tostring(XRefEntry); ++ + static const struct luaL_Reg XRefEntry_m[] = { ++ {"__tostring", m_XRefEntry__tostring}, + {NULL, NULL} // sentinel + }; + +@@ -2683,13 +2815,20 @@ int luaopen_epdf(lua_State * L) + { + register_meta(Annot); + // TODO register_meta(AnnotBorder); ++#if POPPLER_VERSION_MAJOR == 0 && POPPLER_VERSION_MINOR < 17 + register_meta(AnnotBorderStyle); ++#endif + register_meta(Annots); + register_meta(Array); + register_meta(Catalog); +- register_meta(EmbFile); + register_meta(Dict); ++#if POPPLER_VERSION_MAJOR == 0 && (POPPLER_VERSION_MINOR < 17 || \ ++ ( POPPLER_VERSION_MINOR == 17 && POPPLER_VERSION_MICRO < 2)) ++ register_meta(EmbFile); ++#endif ++ + register_meta(GooString); ++ //register_meta(Link); + register_meta(LinkDest); + register_meta(Links); + register_meta(Object); +--- texk/web2c/luatexdir/lua/lfontlib.c ++++ texk/web2c/luatexdir/lua/lfontlib.c 2011-10-13 07:39:27.000000000 +0000 +@@ -1,6 +1,6 @@ + /* lfontlib.c +- +- Copyright 2006-2010 Taco Hoekwater ++ ++ Copyright 2006-2011 Taco Hoekwater + + This file is part of LuaTeX. + +@@ -17,20 +17,19 @@ + You should have received a copy of the GNU General Public License along + with LuaTeX; if not, see . */ + ++static const char _svn_version[] = ++ "$Id: lfontlib.c 4341 2011-07-28 21:24:31Z hhenkel $ " ++ "$URL: http://foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/lua/lfontlib.c $"; ++ + #include "lua/luatex-api.h" + #include "ptexlib.h" + +- +-static const char _svn_version[] = +- "$Id: lfontlib.c 3551 2010-03-26 14:43:50Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/lua/lfontlib.c $"; +- + #define TIMERS 0 + + #if TIMERS + # include + #endif + +- + static int get_fontid(void) + { + if (font_tables == NULL || font_tables[0] == NULL) { +@@ -83,8 +82,7 @@ static int font_read_vf(lua_State * L) + lua_number2int(i, lua_tonumber(L, 2)); + return make_vf_table(L, cnom, (scaled) i); + } else { +- luaL_error(L, +- "expected an integer size as second argument"); ++ luaL_error(L, "expected an integer size as second argument"); + return 2; + } + } +@@ -178,7 +176,7 @@ static int setfont(lua_State * L) + font_from_lua(L, i); + } else { + luaL_error(L, +- "that font has been accessed already, changing it is forbidden"); ++ "that font has been accessed already, changing it is forbidden"); + } + } else { + luaL_error(L, "that integer id is not a valid font"); +@@ -288,3 +286,184 @@ int luaopen_font(lua_State * L) + make_table(L, "fonts", "getfont", "setfont"); + return 1; + } ++ ++/**********************************************************************/ ++/* "vf" library: Lua functions within virtual fonts */ ++ ++static int l_vf_char(lua_State * L) ++{ ++ int k; ++ vf_struct *vsp = static_pdf->vfstruct; ++ packet_stack_record *mat_p; ++ if (!vsp->vflua) ++ pdf_error("vf", "vf.char() outside virtual font"); ++ k = (int) luaL_checkinteger(L, 1); ++ if (!char_exists(vsp->lf, (int) k)) { ++ char_warning(vsp->lf, (int) k); ++ } else { ++ if (has_packet(vsp->lf, (int) k)) ++ do_vf_packet(static_pdf, vsp->lf, (int) k); ++ else ++ backend_out[glyph_node] (static_pdf, vsp->lf, (int) k); ++ } ++ mat_p = &(vsp->packet_stack[vsp->packet_stack_level]); ++ mat_p->pos.h += char_width(vsp->lf, (int) k); ++ synch_pos_with_cur(static_pdf->posstruct, vsp->refpos, mat_p->pos); ++ return 0; ++} ++ ++static int l_vf_down(lua_State * L) ++{ ++ scaled i; ++ vf_struct *vsp = static_pdf->vfstruct; ++ packet_stack_record *mat_p; ++ if (!vsp->vflua) ++ pdf_error("vf", "vf.down() outside virtual font"); ++ i = (scaled) luaL_checkinteger(L, 1); ++ i = store_scaled_f(i, vsp->fs_f); ++ mat_p = &(vsp->packet_stack[vsp->packet_stack_level]); ++ mat_p->pos.v += i; ++ synch_pos_with_cur(static_pdf->posstruct, vsp->refpos, mat_p->pos); ++ return 0; ++} ++ ++static int l_vf_fontid(lua_State * L) ++{ ++ vf_struct *vsp = static_pdf->vfstruct; ++ if (!vsp->vflua) ++ pdf_error("vf", "vf.fontid() outside virtual font"); ++ vsp->lf = (int) luaL_checkinteger(L, 1); ++ return 0; ++} ++ ++static int l_vf_image(lua_State * L) ++{ ++ int k; ++ vf_struct *vsp = static_pdf->vfstruct; ++ if (!vsp->vflua) ++ pdf_error("vf", "vf.image() outside virtual font"); ++ k = (int) luaL_checkinteger(L, 1); ++ vf_out_image(static_pdf, k); ++ return 0; ++} ++ ++static int l_vf_node(lua_State * L) ++{ ++ int k; ++ vf_struct *vsp = static_pdf->vfstruct; ++ if (!vsp->vflua) ++ pdf_error("vf", "vf.node() outside virtual font"); ++ k = (int) luaL_checkinteger(L, 1); ++ hlist_out(static_pdf, (halfword) k); ++ return 0; ++} ++ ++static int l_vf_nop(lua_State * L) ++{ ++ vf_struct *vsp = static_pdf->vfstruct; ++ if (!vsp->vflua) ++ pdf_error("vf", "vf.nop() outside virtual font"); ++ return 0; ++} ++ ++static int l_vf_pop(lua_State * L) ++{ ++ vf_struct *vsp = static_pdf->vfstruct; ++ packet_stack_record *mat_p; ++ if (!vsp->vflua) ++ pdf_error("vf", "vf.pop() outside virtual font"); ++ if (vsp->packet_stack_level == vsp->packet_stack_minlevel) ++ pdf_error("vf", "packet_stack_level underflow"); ++ vsp->packet_stack_level--; ++ mat_p = &(vsp->packet_stack[vsp->packet_stack_level]); ++ synch_pos_with_cur(static_pdf->posstruct, vsp->refpos, mat_p->pos); ++ return 0; ++} ++ ++static int l_vf_push(lua_State * L) ++{ ++ vf_struct *vsp = static_pdf->vfstruct; ++ packet_stack_record *mat_p; ++ if (!vsp->vflua) ++ pdf_error("vf", "vf.push() outside virtual font"); ++ mat_p = &(vsp->packet_stack[vsp->packet_stack_level]); ++ vsp->packet_stack_level++; ++ if (vsp->packet_stack_level == packet_stack_size) ++ pdf_error("vf", "packet_stack_level overflow"); ++ vsp->packet_stack[vsp->packet_stack_level] = *mat_p; ++ mat_p = &(vsp->packet_stack[vsp->packet_stack_level]); ++ return 0; ++} ++ ++static int l_vf_right(lua_State * L) ++{ ++ scaled i; ++ vf_struct *vsp = static_pdf->vfstruct; ++ packet_stack_record *mat_p; ++ if (!vsp->vflua) ++ pdf_error("vf", "vf.right() outside virtual font"); ++ mat_p = &(vsp->packet_stack[vsp->packet_stack_level]); ++ i = (scaled) luaL_checkinteger(L, 1); ++ i = store_scaled_f(i, vsp->fs_f); ++ mat_p->pos.h += i; ++ synch_pos_with_cur(static_pdf->posstruct, vsp->refpos, mat_p->pos); ++ return 0; ++} ++ ++static int l_vf_rule(lua_State * L) ++{ ++ scaledpos size; ++ vf_struct *vsp = static_pdf->vfstruct; ++ packet_stack_record *mat_p; ++ if (!vsp->vflua) ++ pdf_error("vf", "vf.rule() outside virtual font"); ++ size.h = (scaled) luaL_checkinteger(L, 1); ++ size.v = (scaled) luaL_checkinteger(L, 2); ++ size.h = store_scaled_f(size.h, vsp->fs_f); ++ size.v = store_scaled_f(size.v, vsp->fs_f); ++ if (size.h > 0 && size.v > 0) ++ pdf_place_rule(static_pdf, 0, size); /* the 0 is unused */ ++ mat_p = &(vsp->packet_stack[vsp->packet_stack_level]); ++ mat_p->pos.h += size.h; ++ synch_pos_with_cur(static_pdf->posstruct, vsp->refpos, mat_p->pos); ++ return 0; ++} ++ ++static int l_vf_special(lua_State * L) ++{ ++ const_lstring st; ++ int texstr; ++ vf_struct *vsp = static_pdf->vfstruct; ++ if (!vsp->vflua) ++ pdf_error("vf", "vf.special() outside virtual font"); ++ st.s = lua_tolstring(L, 1, &(st.l)); ++ texstr = maketexlstring(st.s, st.l); ++ pdf_literal(static_pdf, texstr, scan_special, false); ++ flush_str(texstr); ++ return 0; ++} ++ ++static const struct luaL_reg vflib[] = { ++ {"char", l_vf_char}, ++ {"down", l_vf_down}, ++ /* {"font", l_vf_font}, */ ++ {"fontid", l_vf_fontid}, ++ {"image", l_vf_image}, ++ /* {"lua", l_vf_lua}, */ ++ {"node", l_vf_node}, ++ {"nop", l_vf_nop}, ++ {"pop", l_vf_pop}, ++ {"push", l_vf_push}, ++ {"right", l_vf_right}, ++ {"rule", l_vf_rule}, ++ /* {"scale", l_vf_scale}, */ ++ /* {"slot", l_vf_slot}, */ ++ {"special", l_vf_special}, ++ {NULL, NULL} /* sentinel */ ++}; ++ ++int luaopen_vf(lua_State * L) ++{ ++ luaL_register(L, "vf", vflib); ++ return 1; ++} +--- texk/web2c/luatexdir/lua/limglib.c ++++ texk/web2c/luatexdir/lua/limglib.c 2011-10-13 07:39:27.000000000 +0000 +@@ -585,7 +585,6 @@ static void write_image_or_node(lua_Stat + tail_append(n); + break; /* image */ + case WR_IMMEDIATEWRITE: +- pdf_begin_dict(static_pdf, img_objnum(ad), 0); + write_img(static_pdf, ad); + break; /* image */ + case WR_NODE: /* image */ +--- texk/web2c/luatexdir/lua/lkpselib.c ++++ texk/web2c/luatexdir/lua/lkpselib.c 2011-10-13 07:39:27.000000000 +0000 +@@ -331,7 +331,7 @@ static int lua_kpathsea_var_value(lua_St + static unsigned find_dpi(const_string s) + { + unsigned dpi_number = 0; +- string extension = find_suffix(s); ++ const_string extension = find_suffix(s); + + if (extension != NULL) + sscanf(extension, "%u", &dpi_number); +@@ -622,13 +622,16 @@ static int do_lua_kpathsea_lookup(lua_St + case kpse_any_glyph_format: + { + kpse_glyph_file_type glyph_ret; ++ string temp = remove_suffix (name); + /* Try to extract the resolution from the name. */ + unsigned local_dpi = find_dpi(name); + if (!local_dpi) + local_dpi = (unsigned) dpi; + ret = +- kpathsea_find_glyph(kpse, remove_suffix(name), local_dpi, ++ kpathsea_find_glyph(kpse, temp, local_dpi, + fmt, &glyph_ret); ++ if (temp != name) ++ free (temp); + } + break; + +--- texk/web2c/luatexdir/lua/lnodelib.c ++++ texk/web2c/luatexdir/lua/lnodelib.c 2011-10-13 07:39:27.000000000 +0000 +@@ -2781,7 +2781,7 @@ static int lua_nodelib_setfield(lua_Stat + height(n) = (halfword) lua_tointeger(L, 3); + break; + case 7: +- box_dir(n) = (halfword) lua_tointeger(L, 3); ++ box_dir(n) = nodelib_getdir(L, 3); + break; + case 8: + glue_shrink(n) = (halfword) lua_tointeger(L, 3); +--- texk/web2c/luatexdir/lua/lpdflib.c ++++ texk/web2c/luatexdir/lua/lpdflib.c 2011-10-13 07:39:27.000000000 +0000 +@@ -1,6 +1,6 @@ + /* lpdflib.c + +- Copyright 2006-2010 Taco Hoekwater ++ Copyright 2006-2011 Taco Hoekwater + + This file is part of LuaTeX. + +@@ -119,11 +119,11 @@ static int l_immediateobj(lua_State * L) + case 1: + if (!lua_isstring(L, first_arg)) + luaL_error(L, "pdf.immediateobj() 1st argument must be string"); +- pdf_begin_obj(static_pdf, k, 1); ++ pdf_begin_obj(static_pdf, k, OBJSTM_ALWAYS); + st1.s = lua_tolstring(L, first_arg, &st1.l); + pdf_out_block(static_pdf, st1.s, st1.l); + if (st1.s[st1.l - 1] != '\n') +- pdf_puts(static_pdf, "\n"); ++ pdf_out(static_pdf, '\n'); + pdf_end_obj(static_pdf); + break; + case 2: +@@ -138,15 +138,16 @@ static int l_immediateobj(lua_State * L) + if (n == first_arg + 2) + luaL_error(L, + "pdf.immediateobj() 3rd argument forbidden in file mode"); +- pdf_begin_obj(static_pdf, k, 1); ++ pdf_begin_obj(static_pdf, k, OBJSTM_ALWAYS); + buf.s = fread_to_buf(L, st2.s, &buf.l); + pdf_out_block(static_pdf, (const char *) buf.s, buf.l); + if (buf.s[buf.l - 1] != '\n') +- pdf_puts(static_pdf, "\n"); ++ pdf_out(static_pdf, '\n'); + xfree(buf.s); + pdf_end_obj(static_pdf); + } else { +- pdf_begin_dict(static_pdf, k, 0); /* 0 = not an object stream candidate! */ ++ pdf_begin_obj(static_pdf, k, OBJSTM_NEVER); /* not an object stream candidate! */ ++ pdf_begin_dict(static_pdf); + if (n == first_arg + 2) { /* write attr text */ + if (!lua_isstring(L, first_arg + 2)) + luaL_error(L, +@@ -154,8 +155,10 @@ static int l_immediateobj(lua_State * L) + st3.s = lua_tolstring(L, first_arg + 2, &st3.l); + pdf_out_block(static_pdf, st3.s, st3.l); + if (st3.s[st3.l - 1] != '\n') +- pdf_puts(static_pdf, "\n"); ++ pdf_out(static_pdf, '\n'); + } ++ pdf_dict_add_streaminfo(static_pdf); ++ pdf_end_dict(static_pdf); + pdf_begin_stream(static_pdf); + if (st1.l == 6 && strncmp((const char *) st1.s, "stream", 6) == 0) { + pdf_out_block(static_pdf, st2.s, st2.l); +@@ -168,6 +171,7 @@ static int l_immediateobj(lua_State * L) + } else + luaL_error(L, "pdf.immediateobj() invalid argument"); + pdf_end_stream(static_pdf); ++ pdf_end_obj(static_pdf); + } + break; + default: +@@ -217,9 +221,9 @@ static const parm_struct pdf_parms[] = { + + static int table_obj(lua_State * L) + { +- int k, type; ++ int k, type, obj_compression; + int compress_level = -1; /* unset */ +- int os_level = 1; /* default: put non-stream objects into object streams */ ++ int os_threshold = OBJSTM_ALWAYS; /* default: put non-stream objects into object streams */ + int saved_compress_level = static_pdf->compress_level; + const_lstring attr, st; + lstring buf; +@@ -332,10 +336,14 @@ static int table_obj(lua_State * L) + "pdf.obj(): \"objcompression\" key not allowed for stream object"); + if (!lua_isboolean(L, -1)) /* !b t */ + luaL_error(L, "pdf.obj(): \"objcompression\" must be boolean"); +- os_level = lua_toboolean(L, -1); /* 0 or 1 */ +- /* 0: never compress; 1: depends then on \pdfobjcompresslevel */ ++ obj_compression = lua_toboolean(L, -1); /* 0 or 1 */ ++ /* OBJSTM_NEVER: never into object stream; OBJSTM_ALWAYS: depends then on \pdfobjcompresslevel */ ++ if (obj_compression > 0) ++ os_threshold = OBJSTM_ALWAYS; ++ else ++ os_threshold = OBJSTM_NEVER; + if (immediate == 0) +- obj_obj_pdfoslevel(static_pdf, k) = os_level; ++ obj_obj_objstm_threshold(static_pdf, k) = os_threshold; + } + lua_pop(L, 1); /* t */ + +@@ -354,7 +362,7 @@ static int table_obj(lua_State * L) + switch (type) { + case P_RAW: + if (immediate == 1) +- pdf_begin_obj(static_pdf, k, os_level); ++ pdf_begin_obj(static_pdf, k, os_threshold); + if (!lua_isnil(L, -2)) { /* file-s? string-s? t */ + /* from string */ + lua_pop(L, 1); /* string-s? t */ +@@ -365,7 +373,7 @@ static int table_obj(lua_State * L) + st.s = lua_tolstring(L, -1, &st.l); + pdf_out_block(static_pdf, st.s, st.l); + if (st.s[st.l - 1] != '\n') +- pdf_puts(static_pdf, "\n"); ++ pdf_out(static_pdf, '\n'); + } else + obj_obj_data(static_pdf, k) = luaL_ref(L, LUA_REGISTRYINDEX); /* t */ + } else { +@@ -378,7 +386,7 @@ static int table_obj(lua_State * L) + buf.s = fread_to_buf(L, st.s, &buf.l); + pdf_out_block(static_pdf, (const char *) buf.s, buf.l); + if (buf.s[buf.l - 1] != '\n') +- pdf_puts(static_pdf, "\n"); ++ pdf_out(static_pdf, '\n'); + xfree(buf.s); + } else { + set_obj_obj_is_file(static_pdf, k); +@@ -390,14 +398,17 @@ static int table_obj(lua_State * L) + break; + case P_STREAM: + if (immediate == 1) { +- pdf_begin_dict(static_pdf, k, 0); /* 0 = not an object stream candidate! */ ++ pdf_begin_obj(static_pdf, k, OBJSTM_NEVER); /* 0 = not an object stream candidate! */ ++ pdf_begin_dict(static_pdf); + if (attr.s != NULL) { + pdf_out_block(static_pdf, attr.s, attr.l); + if (attr.s[attr.l - 1] != '\n') +- pdf_puts(static_pdf, "\n"); ++ pdf_out(static_pdf, '\n'); + } + if (compress_level > -1) + static_pdf->compress_level = compress_level; ++ pdf_dict_add_streaminfo(static_pdf); ++ pdf_end_dict(static_pdf); + pdf_begin_stream(static_pdf); + } else { + set_obj_obj_is_stream(static_pdf, k); +@@ -430,8 +441,10 @@ static int table_obj(lua_State * L) + obj_obj_data(static_pdf, k) = luaL_ref(L, LUA_REGISTRYINDEX); /* nil t */ + } + } +- if (immediate == 1) ++ if (immediate == 1) { + pdf_end_stream(static_pdf); ++ pdf_end_obj(static_pdf); ++ } + break; + default: + assert(0); +@@ -738,7 +751,7 @@ static int l_pageref(lua_State * L) + n = (int) luaL_checkinteger(L, 1); + if (n <= 0) + luaL_error(L, "pdf.pageref() needs page number > 0"); +- n = get_obj(static_pdf, obj_type_page, n, false); ++ n = pdf_get_obj(static_pdf, obj_type_page, n, false); + lua_pushnumber(L, n); + return 1; + } +--- texk/web2c/luatexdir/lua/lstatslib.c ++++ texk/web2c/luatexdir/lua/lstatslib.c 2011-10-13 07:39:27.000000000 +0000 +@@ -1,6 +1,6 @@ + /* lstatslib.c +- +- Copyright 2006-2009 Taco Hoekwater ++ ++ Copyright 2006-2011 Taco Hoekwater + + This file is part of LuaTeX. + +@@ -88,21 +88,21 @@ static lua_Number get_pdf_gone(void) + static lua_Number get_pdf_ptr(void) + { + if (static_pdf != NULL) +- return (lua_Number) static_pdf->ptr; ++ return (lua_Number) (static_pdf->buf->p - static_pdf->buf->data); + return (lua_Number) 0; + } + + static lua_Number get_pdf_os_cntr(void) + { + if (static_pdf != NULL) +- return (lua_Number) static_pdf->os_cntr; ++ return (lua_Number) static_pdf->os->ostm_ctr; + return (lua_Number) 0; + } + + static lua_Number get_pdf_os_objidx(void) + { + if (static_pdf != NULL) +- return (lua_Number) static_pdf->os_idx; ++ return (lua_Number) static_pdf->os->idx; + return (lua_Number) 0; + } + +@@ -174,12 +174,12 @@ static struct statistic stats[] = { + {"luatex_revision", 'S', (void *) &luatexrevision}, + {"ini_version", 'b', &ini_version}, + /* +- * mem stat ++ * mem stat + */ + {"var_used", 'g', &var_used}, + {"dyn_used", 'g', &dyn_used}, +- /* +- * traditional tex stats ++ /* ++ * traditional tex stats + */ + {"str_ptr", 'g', &str_ptr}, + {"init_str_ptr", 'g', &init_str_ptr}, +--- texk/web2c/luatexdir/lua/luastuff.w ++++ texk/web2c/luatexdir/lua/luastuff.w 2011-10-13 07:39:27.000000000 +0000 +@@ -236,6 +236,7 @@ void luainterpreter(void) + luaopen_font(L); + luaopen_lang(L); + luaopen_mplib(L); ++ luaopen_vf(L); + + /* |luaopen_pdf(L);| */ + /* environment table at |LUA_ENVIRONINDEX| needs to load this way: */ +--- texk/web2c/luatexdir/lua/luatex-api.h ++++ texk/web2c/luatexdir/lua/luatex-api.h 2011-10-13 07:39:27.000000000 +0000 +@@ -94,6 +94,7 @@ extern int luaopen_lua(lua_State * L, ch + extern int luaopen_stats(lua_State * L); + + extern int luaopen_font(lua_State * L); ++extern int luaopen_vf(lua_State * L); + extern int font_to_lua(lua_State * L, int f); + extern int font_from_lua(lua_State * L, int f); /* return is boolean */ + +--- texk/web2c/luatexdir/luascripts/pdflua.c ++++ texk/web2c/luatexdir/luascripts/pdflua.c 2011-10-13 07:39:28.000000000 +0000 +@@ -20,26 +20,25 @@ + + #include "ptexlib.h" + +-static const Byte compr[259] = { +- 0x78, 0x9c, 0xad, 0x51, 0xc1, 0x4a, 0xc4, 0x30, 0x10, 0xbd, 0xe7, 0x2b, 0xe6, 0xd0, 0x83, 0xc2, +- 0x36, 0x49, 0x57, 0x59, 0x69, 0xc1, 0x0f, 0x10, 0x3c, 0x09, 0x5e, 0xbc, 0xa5, 0xe9, 0xb4, 0x0d, +- 0x0d, 0x49, 0x98, 0x24, 0xae, 0x8b, 0xf8, 0xef, 0xa6, 0x50, 0x74, 0x55, 0xbc, 0x6d, 0x98, 0x84, +- 0xc7, 0xbc, 0x97, 0x79, 0x0f, 0xa6, 0xae, 0xa1, 0x7a, 0x18, 0x3a, 0x08, 0xc3, 0x68, 0xb3, 0xe2, +- 0xe5, 0xc2, 0x4d, 0x7b, 0xdb, 0xc2, 0x5e, 0x36, 0xb2, 0x6e, 0x9a, 0x5a, 0xde, 0x81, 0x94, 0x9d, +- 0x6c, 0xbb, 0xa6, 0x7d, 0x81, 0x79, 0x46, 0xb7, 0xa0, 0x85, 0x8a, 0xd5, 0xe5, 0xdb, 0xf3, 0xd3, +- 0x63, 0x07, 0x73, 0x4a, 0xa1, 0x13, 0x62, 0xf4, 0xd9, 0x0d, 0x74, 0xe2, 0x31, 0x07, 0xb4, 0xa8, +- 0xf9, 0x48, 0x22, 0xbe, 0x3a, 0x51, 0xc6, 0x25, 0x7c, 0x13, 0x49, 0x4d, 0x51, 0xf4, 0x98, 0x54, +- 0x2d, 0xf9, 0xe1, 0xc0, 0xa5, 0x88, 0x3e, 0x93, 0x46, 0x51, 0xb8, 0x45, 0x1c, 0xb1, 0xdf, 0xeb, +- 0x4d, 0x39, 0x18, 0x5a, 0x51, 0xd4, 0x64, 0x42, 0x8a, 0xe2, 0x2c, 0x54, 0xc5, 0x56, 0xcf, 0x34, +- 0x9b, 0x08, 0xa5, 0x50, 0x91, 0x3d, 0xc1, 0xd1, 0xd3, 0x02, 0xc6, 0x41, 0x20, 0x3f, 0x11, 0xc6, +- 0xc8, 0x39, 0x5f, 0x55, 0x97, 0x39, 0x8c, 0xf5, 0x38, 0x19, 0x17, 0xd4, 0x84, 0x70, 0x0f, 0x63, +- 0x76, 0x3a, 0x19, 0xef, 0xae, 0xd4, 0x35, 0x43, 0x37, 0xb0, 0xf5, 0xf9, 0x8f, 0xf2, 0x39, 0x85, +- 0x52, 0x85, 0x8d, 0x89, 0xf0, 0x87, 0x64, 0x53, 0x5c, 0x2e, 0xa3, 0xf5, 0x5a, 0xd9, 0x6d, 0x79, +- 0xc5, 0xe8, 0x9d, 0x01, 0x9c, 0xc7, 0xfe, 0xc2, 0xbb, 0x42, 0x7c, 0x47, 0xde, 0xd0, 0xda, 0xfc, +- 0x1b, 0xf6, 0x57, 0x67, 0xc7, 0x3e, 0x18, 0x23, 0x4c, 0x99, 0xdc, 0xe6, 0xc3, 0x3e, 0x01, 0x6c, +- 0x2e, 0xa2, 0xa9 ++static const Byte compr[250] = { ++ 0x78, 0x9c, 0xad, 0x51, 0xc1, 0x4a, 0xc4, 0x30, 0x14, 0xbc, 0xbf, 0xaf, 0x78, 0x87, 0x1e, 0x14, ++ 0xb6, 0x49, 0xba, 0x0a, 0xd2, 0x82, 0x1f, 0x20, 0x78, 0x12, 0xbc, 0x78, 0xeb, 0xa6, 0xaf, 0x6d, ++ 0x68, 0x48, 0xc2, 0x4b, 0xe2, 0xba, 0x88, 0xff, 0x6e, 0x0a, 0x45, 0x57, 0xc5, 0xdb, 0x86, 0x97, ++ 0x30, 0xcc, 0x4c, 0x32, 0x03, 0xa9, 0x6b, 0xac, 0x1e, 0x86, 0x0e, 0xc3, 0x30, 0xda, 0xdc, 0x8b, ++ 0xb2, 0xf1, 0xa6, 0xbd, 0x6d, 0x71, 0xaf, 0x1a, 0x55, 0x37, 0x4d, 0xad, 0xee, 0x50, 0xa9, 0x4e, ++ 0xb5, 0x5d, 0xd3, 0xbe, 0xe0, 0x3c, 0x93, 0x5b, 0xc8, 0x62, 0x05, 0x75, 0xb9, 0xf6, 0xfc, 0xf4, ++ 0xd8, 0xe1, 0x9c, 0x52, 0xe8, 0xa4, 0x1c, 0x7d, 0x76, 0x03, 0x9f, 0x44, 0xcc, 0x81, 0x2c, 0x69, ++ 0x31, 0xb2, 0x8c, 0xaf, 0x4e, 0x96, 0xe7, 0x12, 0xbd, 0xc9, 0xc4, 0xd9, 0x2d, 0x32, 0xfa, 0xcc, ++ 0x9a, 0x64, 0x21, 0x16, 0x79, 0xa4, 0xc3, 0x5e, 0x6f, 0xf2, 0x60, 0x78, 0x45, 0x51, 0xb3, 0x09, ++ 0x29, 0xca, 0xb3, 0x26, 0x15, 0xac, 0x41, 0x69, 0x36, 0x11, 0xcb, 0x50, 0xcf, 0xf6, 0x84, 0x47, ++ 0xcf, 0x0b, 0x1a, 0x87, 0x81, 0xfd, 0xc4, 0x14, 0xa3, 0x10, 0x62, 0x75, 0x5d, 0x66, 0x01, 0x1c, ++ 0x68, 0x32, 0x2e, 0xf4, 0x13, 0xe1, 0x3d, 0x8e, 0xd9, 0xe9, 0x64, 0xbc, 0xbb, 0xea, 0xaf, 0x81, ++ 0xdc, 0x00, 0xeb, 0xf1, 0x9f, 0xe4, 0x73, 0x0a, 0x65, 0x8a, 0x1a, 0x13, 0xd3, 0x0f, 0xcb, 0xe6, ++ 0xb8, 0x5c, 0x47, 0xeb, 0x75, 0x6f, 0xb7, 0x1f, 0x2b, 0x41, 0xef, 0x80, 0x78, 0x5e, 0xfb, 0x0b, ++ 0xef, 0x8a, 0xf0, 0x5d, 0x79, 0x43, 0x2b, 0xf9, 0xb7, 0xec, 0x2f, 0x66, 0x07, 0x1f, 0x00, 0x4c, ++ 0x29, 0xb3, 0xdb, 0x72, 0xe0, 0x13, 0x6d, 0xe3, 0xa0, 0x0e + }; + +-static const zlib_struct compr_struct = { 564, 259, compr }; ++static const zlib_struct compr_struct = { 553, 250, compr }; + + const zlib_struct *pdflua_zlib_struct_ptr = &compr_struct; +--- texk/web2c/luatexdir/pdf/pdfaction.w ++++ texk/web2c/luatexdir/pdf/pdfaction.w 2011-10-13 07:39:33.000000000 +0000 +@@ -1,6 +1,6 @@ + % pdfaction.w +-% +-% Copyright 2009-2010 Taco Hoekwater ++ ++% Copyright 2009-2011 Taco Hoekwater + + % This file is part of LuaTeX. + +@@ -47,7 +47,7 @@ void delete_action_node(halfword a) + free_node(a, pdf_action_size); + } + +-@ read an action specification ++@ read an action specification + @c + halfword scan_action(PDF pdf) + { +@@ -130,78 +130,83 @@ void write_action(PDF pdf, halfword p) + char *s; + int d = 0; + if (pdf_action_type(p) == pdf_action_user) { +- pdf_print_toks_ln(pdf, pdf_action_tokens(p)); ++ pdf_out(pdf, '\n'); ++ pdf_print_toks(pdf, pdf_action_tokens(p)); ++ pdf_out(pdf, '\n'); + return; + } +- pdf_printf(pdf, "<< "); ++ pdf_begin_dict(pdf); + if (pdf_action_file(p) != null) { +- pdf_printf(pdf, "/F "); ++ pdf_add_name(pdf, "F"); ++ pdf_out(pdf, ' '); + s = tokenlist_to_cstring(pdf_action_file(p), true, NULL); + pdf_print_str(pdf, s); + xfree(s); +- pdf_printf(pdf, " "); ++ pdf_out(pdf, ' '); + if (pdf_action_new_window(p) > pdf_window_notset) { +- pdf_printf(pdf, "/NewWindow "); + if (pdf_action_new_window(p) == pdf_window_new) +- pdf_printf(pdf, "true "); ++ pdf_dict_add_bool(pdf, "NewWindow", 1); + else +- pdf_printf(pdf, "false "); ++ pdf_dict_add_bool(pdf, "NewWindow", 0); + } + } + switch (pdf_action_type(p)) { + case pdf_action_page: ++ pdf_dict_add_name(pdf, "S", "GoTo"); + if (pdf_action_file(p) == null) { +- pdf_printf(pdf, "/S /GoTo /D ["); +- pdf_print_int(pdf, +- get_obj(pdf, obj_type_page, pdf_action_id(p), false)); +- pdf_printf(pdf, " 0 R"); ++ pdf_add_name(pdf, "D"); ++ pdf_begin_array(pdf); ++ pdf_add_ref(pdf, ++ pdf_get_obj(pdf, obj_type_page, pdf_action_id(p), ++ false)); + } else { +- pdf_printf(pdf, "/S /GoToR /D ["); ++ pdf_add_name(pdf, "D"); ++ pdf_begin_array(pdf); + pdf_print_int(pdf, pdf_action_id(p) - 1); + } + { + char *tokstr = + tokenlist_to_cstring(pdf_action_tokens(p), true, NULL); +- pdf_printf(pdf, " %s]", tokstr); ++ pdf_printf(pdf, " %s", tokstr); ++ pdf_end_array(pdf); + xfree(tokstr); + } + break; + case pdf_action_goto: + if (pdf_action_file(p) == null) { +- pdf_printf(pdf, "/S /GoTo "); +- d = get_obj(pdf, obj_type_dest, pdf_action_id(p), +- pdf_action_named_id(p)); +- } else { +- pdf_printf(pdf, "/S /GoToR "); +- } ++ pdf_dict_add_name(pdf, "S", "GoTo"); ++ d = pdf_get_obj(pdf, obj_type_dest, pdf_action_id(p), ++ pdf_action_named_id(p)); ++ } else ++ pdf_dict_add_name(pdf, "S", "GoToR"); + if (pdf_action_named_id(p) > 0) { + char *tokstr = tokenlist_to_cstring(pdf_action_id(p), true, NULL); +- pdf_str_entry(pdf, "D", tokstr); ++ pdf_dict_add_string(pdf, "D", tokstr); + xfree(tokstr); + } else if (pdf_action_file(p) == null) { +- pdf_indirect(pdf, "D", d); ++ pdf_dict_add_ref(pdf, "D", d); + } else { + pdf_error("ext4", + "`goto' option cannot be used with both `file' and `num'"); + } + break; + case pdf_action_thread: +- pdf_printf(pdf, "/S /Thread "); ++ pdf_dict_add_name(pdf, "S", "Thread"); + if (pdf_action_file(p) == null) { +- d = get_obj(pdf, obj_type_thread, pdf_action_id(p), +- pdf_action_named_id(p)); ++ d = pdf_get_obj(pdf, obj_type_thread, pdf_action_id(p), ++ pdf_action_named_id(p)); + if (pdf_action_named_id(p) > 0) { + char *tokstr = + tokenlist_to_cstring(pdf_action_id(p), true, NULL); +- pdf_str_entry(pdf, "D", tokstr); ++ pdf_dict_add_string(pdf, "D", tokstr); + xfree(tokstr); + } else if (pdf_action_file(p) == null) { +- pdf_indirect(pdf, "D", d); ++ pdf_dict_add_ref(pdf, "D", d); + } else { +- pdf_int_entry(pdf, "D", pdf_action_id(p)); ++ pdf_dict_add_int(pdf, "D", pdf_action_id(p)); + } + } + break; + } +- pdf_printf(pdf, " >>\n"); ++ pdf_end_dict(pdf); + } +--- texk/web2c/luatexdir/pdf/pdfannot.w ++++ texk/web2c/luatexdir/pdf/pdfannot.w 2011-10-13 07:39:33.000000000 +0000 +@@ -1,6 +1,6 @@ + % pdfannot.w + +-% Copyright 2009-2010 Taco Hoekwater ++% Copyright 2009-2011 Taco Hoekwater + + % This file is part of LuaTeX. + +@@ -36,7 +36,7 @@ void do_annot(PDF pdf, halfword p, halfw + if (doing_leaders) + return; + if (is_obj_scheduled(pdf, pdf_annot_objnum(p))) { +- k = pdf_create_obj(pdf, obj_type_annot, pdf->obj_ptr + 1); ++ k = pdf_create_obj(pdf, obj_type_annot, 0); + obj_annot_ptr(pdf, pdf_annot_objnum(p)) = p; + pdf_annot_objnum(p) = k; + } +@@ -73,7 +73,7 @@ void scan_annot(PDF pdf) + { + int k; + if (scan_keyword("reserveobjnum")) { +- k = pdf_create_obj(pdf, obj_type_annot, pdf->obj_ptr + 1); ++ k = pdf_create_obj(pdf, obj_type_annot, 0); + /* Scan an optional space */ + get_x_token(); + if (cur_cmd != spacer_cmd) +@@ -86,7 +86,7 @@ void scan_annot(PDF pdf) + if (obj_annot_ptr(pdf, k) != 0) + pdf_error("ext1", "annot object in use"); + } else { +- k = pdf_create_obj(pdf, obj_type_annot, pdf->obj_ptr + 1); ++ k = pdf_create_obj(pdf, obj_type_annot, 0); + } + new_annot_whatsit(pdf_annot_node); + obj_annot_ptr(pdf, k) = tail; +--- texk/web2c/luatexdir/pdf/pdfcolorstack.w ++++ texk/web2c/luatexdir/pdf/pdfcolorstack.w 2011-10-13 07:39:33.000000000 +0000 +@@ -1,6 +1,6 @@ + % pdfcolorstack.w + % +-% Copyright 2009-2010 Taco Hoekwater ++% Copyright 2009-2011 Taco Hoekwater + + % This file is part of LuaTeX. + +@@ -204,9 +204,8 @@ static int colorstackpush(int colstack_n + if (global_shipping_mode == SHIPPING_PAGE) { + if (colstack->page_used == colstack->page_size) { + colstack->page_size += STACK_INCREMENT; +- colstack->page_stack = xretalloc(colstack->page_stack, +- (unsigned) colstack->page_size, +- char *); ++ xretalloc(colstack->page_stack, (unsigned) colstack->page_size, ++ char *); + } + colstack->page_stack[colstack->page_used++] = colstack->page_current; + str = makecstring(s); +@@ -219,9 +218,8 @@ static int colorstackpush(int colstack_n + } else { + if (colstack->form_used == colstack->form_size) { + colstack->form_size += STACK_INCREMENT; +- colstack->form_stack = xretalloc(colstack->form_stack, +- (unsigned) colstack->form_size, +- char *); ++ xretalloc(colstack->form_stack, (unsigned) colstack->form_size, ++ char *); + } + colstack->form_stack[colstack->form_used++] = colstack->form_current; + str = makecstring(s); +--- texk/web2c/luatexdir/pdf/pdfdest.w ++++ texk/web2c/luatexdir/pdf/pdfdest.w 2011-10-13 07:39:33.000000000 +0000 +@@ -1,6 +1,6 @@ + % pdfdest.w + +-% Copyright 2009-2010 Taco Hoekwater ++% Copyright 2009-2011 Taco Hoekwater + + % This file is part of LuaTeX. + +@@ -92,7 +92,7 @@ void do_dest(PDF pdf, halfword p, halfwo + pdf_error("ext4", "destinations cannot be inside an XForm"); + if (doing_leaders) + return; +- k = get_obj(pdf, obj_type_dest, pdf_dest_id(p), pdf_dest_named_id(p)); ++ k = pdf_get_obj(pdf, obj_type_dest, pdf_dest_id(p), pdf_dest_named_id(p)); + if (obj_dest_ptr(pdf, k) != null) { + warn_dest_dup(pdf_dest_id(p), (small_number) pdf_dest_named_id(p), + "ext4", "has been already used, duplicate ignored"); +@@ -146,65 +146,63 @@ void write_out_pdf_mark_destinations(PDF + } else { + int i; + i = obj_dest_ptr(pdf, k->info); ++ pdf_begin_obj(pdf, k->info, OBJSTM_ALWAYS); + if (pdf_dest_named_id(i) > 0) { +- pdf_begin_dict(pdf, k->info, 1); +- pdf_printf(pdf, "/D "); +- } else { +- pdf_begin_obj(pdf, k->info, 1); ++ pdf_begin_dict(pdf); ++ pdf_add_name(pdf, "D"); + } +- pdf_out(pdf, '['); +- pdf_print_int(pdf, pdf->last_page); +- pdf_printf(pdf, " 0 R "); ++ pdf_begin_array(pdf); ++ pdf_add_ref(pdf, pdf->last_page); + switch (pdf_dest_type(i)) { + case pdf_dest_xyz: +- pdf_printf(pdf, "/XYZ "); +- pdf_print_mag_bp(pdf, pdf_ann_left(i)); +- pdf_out(pdf, ' '); +- pdf_print_mag_bp(pdf, pdf_ann_top(i)); +- pdf_out(pdf, ' '); ++ pdf_add_name(pdf, "XYZ"); ++ pdf_add_mag_bp(pdf, pdf_ann_left(i)); ++ pdf_add_mag_bp(pdf, pdf_ann_top(i)); + if (pdf_dest_xyz_zoom(i) == null) { +- pdf_printf(pdf, "null"); ++ pdf_add_null(pdf); + } else { ++ if (pdf->cave == 1) ++ pdf_out(pdf, ' '); + pdf_print_int(pdf, pdf_dest_xyz_zoom(i) / 1000); + pdf_out(pdf, '.'); + pdf_print_int(pdf, (pdf_dest_xyz_zoom(i) % 1000)); ++ pdf->cave = 1; + } + break; + case pdf_dest_fit: +- pdf_printf(pdf, "/Fit"); ++ pdf_add_name(pdf, "Fit"); + break; + case pdf_dest_fith: +- pdf_printf(pdf, "/FitH "); +- pdf_print_mag_bp(pdf, pdf_ann_top(i)); ++ pdf_add_name(pdf, "FitH"); ++ pdf_add_mag_bp(pdf, pdf_ann_top(i)); + break; + case pdf_dest_fitv: +- pdf_printf(pdf, "/FitV "); +- pdf_print_mag_bp(pdf, pdf_ann_left(i)); ++ pdf_add_name(pdf, "FitV"); ++ pdf_add_mag_bp(pdf, pdf_ann_left(i)); + break; + case pdf_dest_fitb: +- pdf_printf(pdf, "/FitB"); ++ pdf_add_name(pdf, "FitB"); + break; + case pdf_dest_fitbh: +- pdf_printf(pdf, "/FitBH "); +- pdf_print_mag_bp(pdf, pdf_ann_top(i)); ++ pdf_add_name(pdf, "FitBH"); ++ pdf_add_mag_bp(pdf, pdf_ann_top(i)); + break; + case pdf_dest_fitbv: +- pdf_printf(pdf, "/FitBV "); +- pdf_print_mag_bp(pdf, pdf_ann_left(i)); ++ pdf_add_name(pdf, "FitBV"); ++ pdf_add_mag_bp(pdf, pdf_ann_left(i)); + break; + case pdf_dest_fitr: +- pdf_printf(pdf, "/FitR "); +- pdf_print_rect_spec(pdf, i); ++ pdf_add_name(pdf, "FitR"); ++ pdf_add_rect_spec(pdf, i); + break; + default: + pdf_error("ext5", "unknown dest type"); + break; + } +- pdf_printf(pdf, "]\n"); ++ pdf_end_array(pdf); + if (pdf_dest_named_id(i) > 0) + pdf_end_dict(pdf); +- else +- pdf_end_obj(pdf); ++ pdf_end_obj(pdf); + } + k = k->link; + } +@@ -307,7 +305,6 @@ void sort_dest_names(PDF pdf) + sizeof(dest_name_entry), dest_cmp); + } + +- + @ Output the name tree. The tree nature of the destination list forces the + storing of intermediate data in |obj_info| and |obj_aux| fields, which + is further uglified by the fact that |obj_tab| entries do not accept char +@@ -343,21 +340,20 @@ int output_name_tree(PDF pdf) + } + set_obj_link(pdf, names_tail, 0); + /* Output the current node in this level */ +- pdf_begin_dict(pdf, l, 1); ++ pdf_begin_obj(pdf, l, OBJSTM_ALWAYS); ++ pdf_begin_dict(pdf); + j = 0; + if (is_names) { + set_obj_start(pdf, l, pdf->dest_names[k].objname); +- pdf_printf(pdf, "/Names ["); ++ pdf_add_name(pdf, "Names"); ++ pdf_begin_array(pdf); + do { +- pdf_print_str(pdf, pdf->dest_names[k].objname); +- pdf_out(pdf, ' '); +- pdf_print_int(pdf, pdf->dest_names[k].objnum); +- pdf_printf(pdf, " 0 R "); ++ pdf_add_string(pdf, pdf->dest_names[k].objname); ++ pdf_add_ref(pdf, pdf->dest_names[k].objnum); + j++; + k++; + } while (j != name_tree_kids_max && k != pdf->dest_names_ptr); +- pdf_remove_last_space(pdf); +- pdf_printf(pdf, "]\n"); ++ pdf_end_array(pdf); + set_obj_stop(pdf, l, pdf->dest_names[k - 1].objname); /* for later */ + if (k == pdf->dest_names_ptr) { + is_names = false; +@@ -367,48 +363,48 @@ int output_name_tree(PDF pdf) + + } else { + set_obj_start(pdf, l, obj_start(pdf, k)); +- pdf_printf(pdf, "/Kids ["); ++ pdf_add_name(pdf, "Kids"); ++ pdf_begin_array(pdf); + do { +- pdf_print_int(pdf, k); +- pdf_printf(pdf, " 0 R "); ++ pdf_add_ref(pdf, k); + set_obj_stop(pdf, l, obj_stop(pdf, k)); + k = obj_link(pdf, k); + j++; + } while (j != name_tree_kids_max && k != b + && obj_link(pdf, k) != 0); +- pdf_remove_last_space(pdf); +- pdf_printf(pdf, "]\n"); ++ pdf_end_array(pdf); + if (k == b) + b = 0; + } +- pdf_printf(pdf, "/Limits ["); +- pdf_print_str(pdf, obj_start(pdf, l)); +- pdf_out(pdf, ' '); +- pdf_print_str(pdf, obj_stop(pdf, l)); +- pdf_printf(pdf, "]\n"); ++ pdf_add_name(pdf, "Limits"); ++ pdf_begin_array(pdf); ++ pdf_add_string(pdf, obj_start(pdf, l)); ++ pdf_add_string(pdf, obj_stop(pdf, l)); ++ pdf_end_array(pdf); + pdf_end_dict(pdf); +- +- ++ pdf_end_obj(pdf); + } while (b != 0); + + if (k == l) { + dests = l; + goto DONE; + } +- + } + + DONE: + if ((dests != 0) || (pdf_names_toks != null)) { +- m = pdf_new_dict(pdf, obj_type_others, 0, 1); ++ m = pdf_create_obj(pdf, obj_type_others, 0); ++ pdf_begin_obj(pdf, m, OBJSTM_ALWAYS); ++ pdf_begin_dict(pdf); + if (dests != 0) +- pdf_indirect_ln(pdf, "Dests", dests); ++ pdf_dict_add_ref(pdf, "Dests", dests); + if (pdf_names_toks != null) { +- pdf_print_toks_ln(pdf, pdf_names_toks); ++ pdf_print_toks(pdf, pdf_names_toks); + delete_token_ref(pdf_names_toks); + pdf_names_toks = null; + } + pdf_end_dict(pdf); ++ pdf_end_obj(pdf); + return m; + } else { + return 0; +--- texk/web2c/luatexdir/pdf/pdffont.w ++++ texk/web2c/luatexdir/pdf/pdffont.w 2011-10-13 07:39:33.000000000 +0000 +@@ -37,7 +37,7 @@ fonts too. Information about virtual fon + \.{DVI}-related programs. + + Whenever we want to write out a character in a font to PDF output, we +-should check whether the used character is a virtual or read character. ++should check whether the used character is a virtual or real character. + The |has_packet()| C macro checks for this condition. + + +--- texk/web2c/luatexdir/pdf/pdfgen.h ++++ texk/web2c/luatexdir/pdf/pdfgen.h 2011-10-13 07:39:33.000000000 +0000 +@@ -1,6 +1,6 @@ + /* pdfgen.h + +- Copyright 2009-2010 Taco Hoekwater ++ Copyright 2009-2011 Taco Hoekwater + + This file is part of LuaTeX. + +@@ -28,7 +28,7 @@ + # define PROCSET_IMAGE_C (1 << 3) + # define PROCSET_IMAGE_I (1 << 4) + +-# define inf_pdf_mem_size 10000 /* min size of the |mem| array */ ++# define inf_pdf_mem_size 10000/* min size of the |mem| array */ + # define sup_pdf_mem_size 10000000 /* max size of the |mem| array */ + + extern PDF static_pdf; +@@ -43,25 +43,22 @@ output file in initialization to ensure + written bytes. + */ + +-# define inf_pdf_op_buf_size 16384 /* size of the PDF output buffer */ +-# define sup_pdf_op_buf_size 16384 /* size of the PDF output buffer */ +-# define inf_pdf_os_buf_size 1 /* initial value of |pdf_os_buf_size| */ +-# define sup_pdf_os_buf_size 5000000 /* arbitrary upper hard limit of |pdf_os_buf_size| */ +-# define max_single_pdf_print 8192 /* Max size that can be get from pdf_room() at once. +- the value is on the conservative side, but should be +- large enough to cover most uses */ +-# define pdf_os_max_objs 100 /* maximum number of objects in object stream */ ++# define inf_pdfout_buf_size 16384 /* initial value of |pdf->buf| size */ ++# define sup_pdfout_buf_size 16384 /* arbitrary upper hard limit of |pdf->buf| size */ ++# define inf_objstm_buf_size 1 /* initial value of |os->buf[OBJSTM_BUF]| size */ ++# define sup_objstm_buf_size 5000000 /* arbitrary upper hard limit of |os->buf[OBJSTM_BUF]| size */ ++ ++# define PDF_OS_MAX_OBJS 100 /* maximum number of objects in object stream */ + + # define inf_obj_tab_size 1000 /* min size of the cross-reference table for PDF output */ + # define sup_obj_tab_size 8388607 /* max size of the cross-reference table for PDF output */ + + /* The following macros are similar as for \.{DVI} buffer handling */ + +-# define pdf_offset(pdf) (pdf->gone + pdf->ptr) ++# define pdf_offset(pdf) (pdf->gone + pdf->buf->p - pdf->buf->data) + /* the file offset of last byte in PDF + buffer that |pdf_ptr| points to */ +-# define pdf_save_offset(pdf) pdf->save_offset=(pdf->gone + pdf->ptr) +-# define pdf_saved_offset(pdf) pdf->save_offset ++# define pdf_save_offset(pdf) pdf->save_offset = (pdf->gone + pdf->buf->p - pdf->buf->data) + + # define set_ff(A) do { \ + if (pdf_font_num(A) < 0) \ +@@ -70,12 +67,6 @@ written bytes. + ff = A; \ + } while (0) + +-typedef enum { +- no_zip = 0, /* no \.{ZIP} compression */ +- zip_writing = 1, /* \.{ZIP} compression being used */ +- zip_finish = 2 /* finish \.{ZIP} compression */ +-} zip_write_states; +- + typedef enum { NOT_SHIPPING, SHIPPING_PAGE, SHIPPING_FORM } shipping_mode_e; + + extern int pdf_output_option; +@@ -96,19 +87,10 @@ extern void pdf_room(PDF, int); + extern void fix_pdf_minorversion(PDF); + + /* output a byte to PDF buffer without checking of overflow */ +-# define pdf_quick_out(pdf,A) pdf->buf[pdf->ptr++]=(unsigned char)A ++# define pdf_quick_out(pdf,A) * (pdf->buf->p++) = (unsigned char) (A) + + /* do the same as |pdf_quick_out| and flush the PDF buffer if necessary */ +-# define pdf_out(pdf,A) do { pdf_room(pdf,1); pdf_quick_out(pdf,A); } while (0) +- +-# if 0 +-/* see function pdf_out_block() */ +-# define pdf_out_block_macro(pdf,A,n) do { \ +- pdf_room(pdf,(int)(n)); \ +- (void)memcpy((pdf->buf+pdf->ptr),(A),(size_t)(n)); \ +- pdf->ptr+=(int)(n); \ +- } while (0) +-# endif ++# define pdf_out(pdf,A) do { pdf_room(pdf, 1); pdf_quick_out(pdf, A); } while (0) + + /* + Basic printing procedures for PDF output are very similiar to \TeX\ basic +@@ -116,39 +98,52 @@ printing ones but the output is going to + suffix |_ln| append a new-line character to the PDF output. + */ + +-# define pdf_newline_char 10 /* new-line character '\n' for UNIX platforms */ +- +-/* output a new-line character to PDF buffer */ +-# define pdf_print_nl(pdf) pdf_out(pdf,pdf_newline_char) +- + /* print out a string to PDF buffer followed by a new-line character */ + # define pdf_print_ln(pdf,A) do { \ + pdf_print(pdf,A); \ +- pdf_print_nl(pdf); \ ++ pdf_out(pdf, '\n'); \ + } while (0) + + /* print out an integer to PDF buffer followed by a new-line character */ +-# define pdf_print_int_ln(pdf,A) do { \ +- pdf_print_int(pdf,A); \ +- pdf_print_nl(pdf); \ ++# define pdf_print_int_ln(pdf,A) do { \ ++ pdf_print_int(pdf,A); \ ++ pdf_out(pdf, '\n'); \ + } while (0) + + extern __attribute__ ((format(printf, 2, 3))) + void pdf_printf(PDF, const char *, ...); + +-extern void pdf_print_char(PDF, int); +-extern void pdf_print_wide_char(PDF, int); + extern void pdf_print(PDF, str_number); + extern void pdf_print_int(PDF, longinteger); +-extern void pdf_print_real(PDF, int, int); ++extern void print_pdffloat(PDF pdf, pdffloat f); + extern void pdf_print_str(PDF, const char *); + ++extern void pdf_add_null(PDF); ++extern void pdf_add_bool(PDF, int i); ++extern void pdf_add_int(PDF, int i); ++extern void pdf_add_ref(PDF, int num); ++extern void pdf_add_string(PDF, const char *s); ++extern void pdf_add_name(PDF, const char *name); ++ ++extern void pdf_dict_add_bool(PDF, const char *key, int i); ++extern void pdf_dict_add_int(PDF, const char *key, int i); ++extern void pdf_dict_add_ref(PDF, const char *key, int num); ++extern void pdf_dict_add_name(PDF, const char *key, const char *val); ++extern void pdf_dict_add_string(PDF pdf, const char *key, const char *val); ++extern void pdf_dict_add_streaminfo(PDF); ++ + extern void pdf_begin_stream(PDF); + extern void pdf_end_stream(PDF); +-extern void pdf_remove_last_space(PDF); + +-extern void pdf_print_bp(PDF, scaled); +-extern void pdf_print_mag_bp(PDF, scaled); ++extern void pdf_add_bp(PDF, scaled); ++extern void pdf_add_mag_bp(PDF, scaled); ++ ++extern strbuf_s *new_strbuf(size_t size, size_t limit); ++extern void strbuf_seek(strbuf_s * b, off_t offset); ++extern size_t strbuf_offset(strbuf_s * b); ++extern void strbuf_putchar(strbuf_s * b, unsigned char c); ++extern void strbuf_flush(PDF pdf, strbuf_s * b); ++extern void strbuf_free(strbuf_s * b); + + /* This is for the resource lists */ + +@@ -164,36 +159,23 @@ extern void pdf_out_block(PDF pdf, const + pdf_puts(pdf, pdf->resname_prefix); \ + } while (0) + +-extern void pdf_int_entry(PDF, const char *, int); +-extern void pdf_int_entry_ln(PDF, const char *, int); +-extern void pdf_indirect(PDF, const char *, int); +-extern void pdf_indirect_ln(PDF, const char *, int); + extern void pdf_print_str_ln(PDF, const char *); +-extern void pdf_str_entry(PDF, const char *, const char *); +-extern void pdf_str_entry_ln(PDF, const char *, const char *); + + extern void pdf_print_toks(PDF, halfword); +-extern void pdf_print_toks_ln(PDF, halfword); + +-extern void pdf_print_rect_spec(PDF, halfword); ++extern void pdf_add_rect_spec(PDF, halfword); + extern void pdf_rectangle(PDF, halfword); + + extern void pdf_begin_obj(PDF, int, int); +-extern int pdf_new_obj(PDF, int, int, int); + extern void pdf_end_obj(PDF); + +-extern void pdf_begin_dict(PDF, int, int); +-extern int pdf_new_dict(PDF, int, int, int); ++extern void pdf_begin_dict(PDF); + extern void pdf_end_dict(PDF); ++extern void pdf_begin_array(PDF); ++extern void pdf_end_array(PDF); + + extern void remove_pdffile(PDF); + +-extern int fb_offset(PDF); +-extern void fb_flush(PDF); +-extern void fb_putchar(PDF, eight_bits); +-extern void fb_seek(PDF, int); +-extern void fb_free(PDF); +- + extern void zip_free(PDF); + + /* functions that do not output stuff */ +@@ -213,6 +195,7 @@ extern char *get_resname_prefix(PDF); + extern void pdf_begin_page(PDF pdf); + extern void pdf_end_page(PDF pdf); + extern void print_pdf_table_string(PDF pdf, const char *s); ++extern int get_pdf_table_bool(PDF, const char *, int); + + extern void fix_o_mode(PDF pdf); + extern void ensure_output_state(PDF pdf, output_state s); +--- texk/web2c/luatexdir/pdf/pdfgen.w ++++ texk/web2c/luatexdir/pdf/pdfgen.w 2011-10-13 07:39:33.000000000 +0000 +@@ -1,6 +1,6 @@ + % pdfgen.w + +-% Copyright 2009-2010 Taco Hoekwater ++% Copyright 2009-2011 Taco Hoekwater + + % This file is part of LuaTeX. + +@@ -38,8 +38,6 @@ static const char _svn_version[] = + + PDF static_pdf = NULL; + +-static char *jobname_cstr = NULL; +- + @ commandline interface + @c + int pdf_output_option; +@@ -54,26 +52,113 @@ halfword pdf_names_toks; /* addit + halfword pdf_trailer_toks; /* additional keys of Trailer dictionary */ + shipping_mode_e global_shipping_mode = NOT_SHIPPING; /* set to |shipping_mode| when |ship_out| starts */ + +-@ |init_pdf_struct()| is called early, only once, from maincontrol.w ++@ Create a new buffer |strbuf_s| of size |size| and maximum allowed size |limit|. ++Initialize it and set |p| to begin of data. ++@c ++strbuf_s *new_strbuf(size_t size, size_t limit) ++{ ++ strbuf_s *b; ++ assert(limit >= size); ++ b = xtalloc(1, strbuf_s); ++ b->size = size; ++ b->limit = limit; ++ if (size > 0) ++ b->p = b->data = xtalloc(b->size, unsigned char); ++ else ++ b->p = b->data = NULL; /* for other alloc */ ++ return b; ++} + ++@ Check that |n| bytes more fit into buffer; increase it if required. ++@c ++static void strbuf_room(strbuf_s * b, size_t n) ++{ ++ unsigned int a; ++ size_t l = (size_t) (b->p - b->data); ++ if (n > b->limit - l) ++ overflow("PDF buffer", (unsigned) b->size); ++ if (n + l > b->size) { ++ a = (unsigned int) (b->size >> 2); ++ if (n + l > b->size + a) ++ b->size = n + l; ++ else if (b->size < b->limit - a) ++ b->size = b->size + a; ++ else ++ b->size = b->limit; ++ b->data = xreallocarray(b->data, unsigned char, (unsigned) b->size); ++ b->p = b->data + l; ++ } ++} ++ ++@ Seek to position |offset| within buffer. Position must be valid. ++@c ++void strbuf_seek(strbuf_s * b, off_t offset) ++{ ++ assert(offset >= 0 && offset < (off_t) b->size); ++ b->p = b->data + offset; ++} ++ ++@ Get the current buffer fill level, the number of characters. ++@c ++size_t strbuf_offset(strbuf_s * b) ++{ ++ return (size_t) (b->p - b->data); ++} ++ ++@ Put one character into buffer. Make room before if needed. ++@c ++void strbuf_putchar(strbuf_s * b, unsigned char c) ++{ ++ if ((size_t) (b->p - b->data + 1) > b->size) ++ strbuf_room(b, 1); ++ *b->p++ = c; ++} ++ ++@ Dump filled buffer part to PDF. ++@c ++void strbuf_flush(PDF pdf, strbuf_s * b) ++{ ++ pdf_out_block(pdf, (const char *) b->data, strbuf_offset(b)); ++ strbuf_seek(b, 0); ++} ++ ++@ Free all dynamically allocated buffer structures. ++@c ++void strbuf_free(strbuf_s * b) ++{ ++ xfree(b->data); ++ xfree(b); ++} ++ ++@ |init_pdf_struct()| is called early, only once, from maincontrol.w + @c + PDF init_pdf_struct(PDF pdf) + { ++ os_struct *os; + assert(pdf == NULL); + pdf = xtalloc(1, pdf_output_file); + memset(pdf, 0, sizeof(pdf_output_file)); ++ pdf->job_name = makecstring(job_name); + + pdf->o_mode = OMODE_NONE; /* will be set by |fix_o_mode()| */ + pdf->o_state = ST_INITIAL; + +- pdf->os_obj = xtalloc(pdf_os_max_objs, os_obj_data); +- pdf->os_buf_size = inf_pdf_os_buf_size; +- pdf->os_buf = xtalloc(pdf->os_buf_size, unsigned char); +- pdf->op_buf_size = inf_pdf_op_buf_size; +- pdf->op_buf = xtalloc(pdf->op_buf_size, unsigned char); ++ /* init PDF and object stream writing */ ++ pdf->os = os = xtalloc(1, os_struct); ++ os->buf[PDFOUT_BUF] = new_strbuf(inf_pdfout_buf_size, sup_pdfout_buf_size); ++ os->buf[OBJSTM_BUF] = new_strbuf(inf_objstm_buf_size, sup_objstm_buf_size); ++ os->buf[LUASTM_BUF] = new_strbuf(0, 0); ++ os->obj = xtalloc(PDF_OS_MAX_OBJS, os_obj_data); ++ os->cur_objstm = 0; ++ os->trigger_luastm = false; ++ ++ os->curbuf = PDFOUT_BUF; ++ pdf->buf = os->buf[os->curbuf]; + +- pdf->buf_size = pdf->op_buf_size; +- pdf->buf = pdf->op_buf; ++ pdf->fb = new_strbuf(1, 100000000); ++ ++ pdf->stream_deflate = false; ++ pdf->stream_writing = false; + + /* Sometimes it is neccesary to allocate memory for PDF output that cannot + be deallocated then, so we use |mem| for this purpose. */ +@@ -112,26 +197,9 @@ PDF init_pdf_struct(PDF pdf) + init_pdf_pagecalculations(pdf); + pdf->pdflua_ref = new_pdflua(); + +- return pdf; +-} +- +-@ @c +-static void pdf_shipout_begin(void) +-{ +- pos_stack_used = 0; /* start with empty stack */ +- +- if (global_shipping_mode == SHIPPING_PAGE) { +- colorstackpagestart(); +- } +-} ++ pdf->vfstruct = new_vfstruct(); + +-static void pdf_shipout_end(void) +-{ +- if (pos_stack_used > 0) { +- pdftex_fail("%u unmatched \\pdfsave after %s shipout", +- (unsigned int) pos_stack_used, +- ((global_shipping_mode == SHIPPING_PAGE) ? "page" : "form")); +- } ++ return pdf; + } + + @ We use |pdf_get_mem| to allocate memory in |mem|. +@@ -144,7 +212,7 @@ int pdf_get_mem(PDF pdf, int s) + if (s > sup_pdf_mem_size - pdf->mem_ptr) + overflow("PDF memory size (pdf_mem_size)", (unsigned) pdf->mem_size); + if (pdf->mem_ptr + s > pdf->mem_size) { +- a = pdf->mem_size / 5; ++ a = pdf->mem_size >> 2; + if (pdf->mem_ptr + s > pdf->mem_size + a) { + pdf->mem_size = pdf->mem_ptr + s; + } else if (pdf->mem_size < sup_pdf_mem_size - a) { +@@ -238,8 +306,9 @@ static void write_zip(PDF pdf) + { + int flush, err = Z_OK; + uInt zip_len; ++ strbuf_s *buf = pdf->buf; + z_stream *s = pdf->c_stream; +- boolean finish = pdf->zip_write_state == zip_finish; ++ boolean finish = pdf->zip_write_state == ZIP_FINISH; + assert(pdf->compress_level > 0); + /* This was just to suppress the filename report in |pdftex_fail| + but zlib errors are rare enough (especially now that the +@@ -265,8 +334,8 @@ static void write_zip(PDF pdf) + } + assert(s != NULL); + assert(pdf->zipbuf != NULL); +- s->next_in = pdf->buf; +- s->avail_in = (uInt) pdf->ptr; ++ s->next_in = buf->data; ++ s->avail_in = (uInt) (buf->p - buf->data); + while (true) { + if (s->avail_out == 0 || (finish && s->avail_out < ZIP_BUF_SIZE)) { + zip_len = ZIP_BUF_SIZE - s->avail_out; +@@ -280,6 +349,7 @@ static void write_zip(PDF pdf) + assert(s->avail_in == 0); + assert(s->avail_out == ZIP_BUF_SIZE); + xfflush(pdf->file); ++ pdf->zip_write_state = NO_ZIP; + break; + } + flush = Z_FINISH; +@@ -305,6 +375,19 @@ void zip_free(PDF pdf) + xfree(pdf->c_stream); + } + ++@ @c ++static void write_nozip(PDF pdf) ++{ ++ strbuf_s *buf = pdf->buf; ++ size_t l = strbuf_offset(buf); ++ if (l == 0) ++ return; ++ pdf->stream_length = pdf_offset(pdf) - pdf->save_offset; ++ pdf->gone += ++ (off_t) xfwrite((char *) buf->data, sizeof(char), l, pdf->file); ++ pdf->last_byte = *(buf->p - 1); ++} ++ + @ The PDF buffer is flushed by calling |pdf_flush|, which checks the + variable |zip_write_state| and will compress the buffer before flushing if + neccesary. We call |pdf_begin_stream| to begin a stream and |pdf_end_stream| +@@ -312,173 +395,142 @@ to finish it. The stream contents will b + + @c + void pdf_flush(PDF pdf) +-{ /* flush out the |pdf_buf| */ +- +- off_t saved_pdf_gone; +- if (!pdf->os_mode) { +- saved_pdf_gone = pdf->gone; +- switch (pdf->zip_write_state) { +- case no_zip: +- if (pdf->ptr > 0) { +- if (pdf->draftmode == 0) +- (void) xfwrite((char *) pdf->buf, sizeof(char), +- (size_t) pdf->ptr, pdf->file); +- pdf->gone += pdf->ptr; +- pdf->last_byte = pdf->buf[pdf->ptr - 1]; +- } +- break; +- case zip_writing: +- if (pdf->draftmode == 0) +- write_zip(pdf); +- break; +- case zip_finish: +- if (pdf->draftmode == 0) ++{ /* flush out the |pdf->buf| */ ++ os_struct *os = pdf->os; ++ off_t saved_pdf_gone = pdf->gone; ++ assert(pdf->buf == os->buf[os->curbuf]); ++ switch (os->curbuf) { ++ case PDFOUT_BUF: ++ if (pdf->draftmode == 0) { ++ switch (pdf->zip_write_state) { ++ case NO_ZIP: ++ write_nozip(pdf); ++ break; ++ case ZIP_WRITING: ++ case ZIP_FINISH: + write_zip(pdf); +- pdf->zip_write_state = no_zip; +- break; ++ break; ++ default: ++ assert(0); ++ } + } +- pdf->ptr = 0; ++ strbuf_seek(pdf->buf, 0); + if (saved_pdf_gone > pdf->gone) + pdf_error("file size", + "File size exceeds architectural limits (pdf_gone wraps around)"); ++ break; ++ case LUASTM_BUF: ++ luaL_addsize(&(os->b), strbuf_offset(pdf->buf)); ++ pdf->buf->p = pdf->buf->data = (unsigned char *) luaL_prepbuffer(&(os->b)); /* for next stream piece */ ++ break; ++ case OBJSTM_BUF: ++ break; ++ default: ++ assert(0); + } + } + +-@ switch between PDF stream and object stream mode +- +-@c +-static void pdf_os_switch(PDF pdf, boolean pdf_os) ++@ @c ++static void pdf_buffer_select(PDF pdf, boolean do_os) + { +- if (pdf_os && pdf->os_enable) { +- if (!pdf->os_mode) { /* back up PDF stream variables */ +- pdf->op_ptr = pdf->ptr; +- pdf->ptr = pdf->os_ptr; +- pdf->buf = pdf->os_buf; +- pdf->buf_size = pdf->os_buf_size; +- pdf->os_mode = true; /* switch to object stream */ +- } ++ os_struct *os = pdf->os; ++ if (pdf->os_enable && do_os) { ++ os->curbuf = OBJSTM_BUF; /* switch to object stream */ + } else { +- if (pdf->os_mode) { /* back up object stream variables */ +- pdf->os_ptr = pdf->ptr; +- pdf->ptr = pdf->op_ptr; +- pdf->buf = pdf->op_buf; +- pdf->buf_size = pdf->op_buf_size; +- pdf->os_mode = false; /* switch to PDF stream */ +- } ++ os->curbuf = PDFOUT_BUF; /* switch to PDF stream */ + } ++ pdf->buf = os->buf[pdf->os->curbuf]; + } + +-@ create new \.{/ObjStm} object if required, and set up cross reference info ++@ create new \.{/ObjStm} object if required, and set up cross reference info + + @c +-static void pdf_os_prepare_obj(PDF pdf, int i, int pdf_os_level) +-{ +- pdf_os_switch(pdf, ((pdf_os_level > 0) +- && (pdf->objcompresslevel >= pdf_os_level))); +- if (pdf->os_mode) { +- if (pdf->os_cur_objnum == 0) { +- pdf->os_cur_objnum = +- pdf_create_obj(pdf, obj_type_objstm, pdf->obj_ptr + 1); +- pdf->os_cntr++; /* only for statistics */ +- pdf->os_idx = 0; +- pdf->ptr = 0; /* start fresh object stream */ +- } else { +- pdf->os_idx++; +- } +- obj_os_idx(pdf, i) = pdf->os_idx; +- obj_offset(pdf, i) = pdf->os_cur_objnum; +- pdf->os_obj[pdf->os_idx].num = i; +- pdf->os_obj[pdf->os_idx].off = pdf->ptr; +- } else { +- obj_offset(pdf, i) = pdf_offset(pdf); +- obj_os_idx(pdf, i) = -1; /* mark it as not included in object stream */ ++static void pdf_prepare_obj(PDF pdf, int k, int pdf_os_threshold) ++{ ++ os_struct *os = pdf->os; ++ strbuf_s *obuf = os->buf[OBJSTM_BUF]; ++ assert(os->curbuf != LUASTM_BUF); ++ assert(pdf_os_threshold >= OBJSTM_ALWAYS); ++ pdf_buffer_select(pdf, (pdf->objcompresslevel >= pdf_os_threshold)); ++ assert(pdf->buf == os->buf[os->curbuf]); ++ switch (os->curbuf) { ++ case PDFOUT_BUF: ++ obj_offset(pdf, k) = pdf_offset(pdf); ++ obj_os_idx(pdf, k) = PDF_OS_MAX_OBJS; /* mark it as not included in any ObjStm */ ++ break; ++ case LUASTM_BUF: ++ assert(0); ++ break; ++ case OBJSTM_BUF: ++ if (os->cur_objstm == 0) { ++ os->cur_objstm = (unsigned int) pdf_create_obj(pdf, obj_type_objstm, 0); ++ os->idx = 0; ++ obuf->p = obuf->data; /* start fresh object stream */ ++ os->ostm_ctr++; /* only for statistics */ ++ } ++ assert(os->idx < PDF_OS_MAX_OBJS); /* for marking below */ ++ obj_os_idx(pdf, k) = (int) os->idx; ++ obj_os_objnum(pdf, k) = (int) os->cur_objstm; ++ os->obj[os->idx].num = k; ++ os->obj[os->idx].off = obuf->p - obuf->data; ++ break; ++ default: ++ assert(0); + } + } + +-@* low-level buffer checkers. +- +-@ check that |s| bytes more fit into |pdf_os_buf|; increase it if required +-@c +-static void pdf_os_get_os_buf(PDF pdf, int s) +-{ +- int a; +- if (s > sup_pdf_os_buf_size - pdf->ptr) +- overflow("PDF object stream buffer", (unsigned) pdf->os_buf_size); +- if (pdf->ptr + s > pdf->os_buf_size) { +- a = pdf->os_buf_size / 5; +- if (pdf->ptr + s > pdf->os_buf_size + a) +- pdf->os_buf_size = pdf->ptr + s; +- else if (pdf->os_buf_size < sup_pdf_os_buf_size - a) +- pdf->os_buf_size = pdf->os_buf_size + a; +- else +- pdf->os_buf_size = sup_pdf_os_buf_size; +- pdf->os_buf = +- xreallocarray(pdf->os_buf, unsigned char, +- (unsigned) pdf->os_buf_size); +- pdf->buf = pdf->os_buf; +- pdf->buf_size = pdf->os_buf_size; +- } +-} +- +-@ make sure that there are at least |n| bytes free in PDF buffer ++@* Low-level buffer checkers. ++ ++@ Set the active buffer pointer. ++Make sure that there are at least |n| bytes free in that buffer, ++flush if needed. + @c + void pdf_room(PDF pdf, int n) + { +- if (pdf->os_mode && (n + pdf->ptr > pdf->buf_size)) +- pdf_os_get_os_buf(pdf, n); +- else if ((!pdf->os_mode) && (n > pdf->buf_size)) +- overflow("PDF output buffer", (unsigned) pdf->op_buf_size); +- else if ((!pdf->os_mode) && (n + pdf->ptr > pdf->buf_size)) +- pdf_flush(pdf); +-} +- +- +-@ print out a character to PDF buffer; the character will be printed in octal +- form in the following cases: chars <= 32, backslash (92), left parenthesis +- (40) and right parenthesis (41) +- +-@c +-#define pdf_print_escaped(c) \ +- if ((c)<=32||(c)=='\\'||(c)=='('||(c)==')'||(c)>127) { \ +- pdf_room(pdf,4); \ +- pdf_quick_out(pdf,'\\'); \ +- pdf_quick_out(pdf,(unsigned char)('0' + (((c)>>6) & 0x3))); \ +- pdf_quick_out(pdf,(unsigned char)('0' + (((c)>>3) & 0x7))); \ +- pdf_quick_out(pdf,(unsigned char)('0' + ( (c) & 0x7))); \ +- } else { \ +- pdf_out(pdf,(c)); \ +- } +- +-void pdf_print_char(PDF pdf, int c) +-{ +- if (c > 255) ++ os_struct *os = pdf->os; ++ strbuf_s *buf = pdf->buf; ++ if ((size_t) (n + buf->p - buf->data) <= buf->size) + return; +- pdf_print_escaped(c); ++ assert(buf == os->buf[os->curbuf]); ++ switch (os->curbuf) { ++ case PDFOUT_BUF: ++ if ((size_t) n > buf->size) ++ overflow("PDF output buffer", (unsigned) buf->size); ++ if ((size_t) (n + buf->p - buf->data) < buf->limit) ++ strbuf_room(buf, (size_t) n); /* grow it if possible */ ++ else ++ pdf_flush(pdf); ++ break; ++ case LUASTM_BUF: ++ if ((size_t) n > buf->size) ++ overflow("PDF output buffer", (unsigned) buf->size); ++ pdf_flush(pdf); ++ break; ++ case OBJSTM_BUF: ++ strbuf_room(buf, (size_t) n); /* just grow it */ ++ break; ++ default: ++ assert(0); ++ } + } + + @ @c + void pdf_out_block(PDF pdf, const char *s, size_t n) + { + size_t l; ++ strbuf_s *buf = pdf->buf; + do { + l = n; +- if ((int) l > pdf->buf_size) +- l = (size_t) pdf->buf_size; ++ if (l > buf->size) ++ l = buf->size; + pdf_room(pdf, (int) l); +- (void) memcpy(pdf->buf + pdf->ptr, s, l); +- pdf->ptr += (int) l; ++ (void) memcpy(buf->p, s, l); ++ buf->p += l; + s += l; + n -= l; + } while (n > 0); + } + +-void pdf_print_wide_char(PDF pdf, int c) +-{ +- char hex[5]; +- snprintf(hex, 5, "%04X", c); +- pdf_out_block(pdf, (const char *) hex, 4); +-} +- + @ @c + __attribute__ ((format(printf, 2, 3))) + void pdf_printf(PDF pdf, const char *fmt, ...) +@@ -513,60 +565,40 @@ void pdf_print(PDF pdf, str_number s) + @c + void pdf_print_int(PDF pdf, longinteger n) + { +- register int k = 0; /* current digit; we assume that $|n|<10^{23}$ */ +- int dig[24]; +- if (n < 0) { +- pdf_out(pdf, '-'); +- if (n < -0x7FFFFFFF) { /* need to negate |n| more carefully */ +- register longinteger m; +- k++; +- m = -1 - n; +- n = m / 10; +- m = (m % 10) + 1; +- if (m < 10) { +- dig[0] = (int) m; +- } else { +- dig[0] = 0; +- n++; +- } +- } else { +- n = -n; +- } +- } +- do { +- dig[k++] = (int) (n % 10); +- n /= 10; +- } while (n != 0); +- pdf_room(pdf, k); +- while (k-- > 0) { +- pdf_quick_out(pdf, (unsigned char) ('0' + dig[k])); +- } ++ char s[24]; ++ int w; ++ w = snprintf(s, 23, "%ld", n); ++ check_nprintf(w, 23); ++ pdf_out_block(pdf, (const char *) s, (size_t) w); + } + +-@ print $m/10^d$ as real +-@c +-void pdf_print_real(PDF pdf, int m, int d) ++@ @c ++void print_pdffloat(PDF pdf, pdffloat f) + { ++ char a[24]; ++ int e = f.e, i, j; ++ long l, m = f.m; + if (m < 0) { + pdf_out(pdf, '-'); +- m = -m; +- }; +- pdf_print_int(pdf, m / ten_pow[d]); +- m = m % ten_pow[d]; +- if (m > 0) { ++ m *= -1; ++ } ++ l = m / ten_pow[e]; ++ pdf_print_int(pdf, l); ++ l = m % ten_pow[e]; ++ if (l != 0) { + pdf_out(pdf, '.'); +- d--; +- while (m < ten_pow[d]) { +- pdf_out(pdf, '0'); +- d--; ++ j = snprintf(a, 23, "%ld", l + ten_pow[e]); ++ assert(j < 23); ++ for (i = e; i > 0; i--) { ++ if (a[i] != '0') ++ break; ++ a[i] = '\0'; + } +- while (m % 10 == 0) +- m /= 10; +- pdf_print_int(pdf, m); ++ pdf_puts(pdf, (a + 1)); + } + } + +-@ print out |s| as string in PDF output ++@ print out |s| as string in PDF output + @c + void pdf_print_str(PDF pdf, const char *s) + { +@@ -599,64 +631,93 @@ void pdf_print_str(PDF pdf, const char * + pdf_puts(pdf, orig); /* it was a hex string after all */ + } + +-@ begin a stream ++@ begin a stream (needs to have a stream dictionary also) + @c + void pdf_begin_stream(PDF pdf) + { +- assert(pdf->os_mode == false); +- pdf_puts(pdf, "/Length \n"); +- pdf->seek_write_length = true; /* fill in length at |pdf_end_stream| call */ +- pdf->stream_length_offset = pdf_offset(pdf) - 11; ++ os_struct *os = pdf->os; ++ strbuf_s *lbuf = os->buf[LUASTM_BUF]; ++ assert(os->curbuf == PDFOUT_BUF); ++ assert(pdf->buf == os->buf[os->curbuf]); ++ assert(pdf->zip_write_state == NO_ZIP); ++ pdf_puts(pdf, "\nstream\n"); ++ pdf_save_offset(pdf); ++ pdf_flush(pdf); ++ if (os->trigger_luastm) { ++ os->trigger_luastm = false; /* this was just a trigger */ ++ luaL_buffinit(Luas, &(os->b)); ++ lbuf->p = lbuf->data = (unsigned char *) luaL_prepbuffer(&(os->b)); ++ lbuf->size = lbuf->limit = LUAL_BUFFERSIZE; ++ os->curbuf = LUASTM_BUF; ++ pdf->buf = os->buf[os->curbuf]; ++ } ++ if (pdf->stream_deflate) { ++ assert(pdf->compress_level > 0); ++ pdf->zip_write_state = ZIP_WRITING; ++ } ++ pdf->stream_writing = true; + pdf->stream_length = 0; + pdf->last_byte = 0; +- if (pdf->compress_level > 0) { +- pdf_puts(pdf, "/Filter /FlateDecode\n"); +- pdf_puts(pdf, ">>\n"); +- pdf_puts(pdf, "stream\n"); +- pdf_flush(pdf); +- pdf->zip_write_state = zip_writing; +- } else { +- pdf_puts(pdf, ">>\n"); +- pdf_puts(pdf, "stream\n"); +- pdf_save_offset(pdf); +- } + } + +-@ @c +-static void write_stream_length(PDF pdf, int length, longinteger offset) +-{ +- if (jobname_cstr == NULL) +- jobname_cstr = makecstring(job_name); +- if (pdf->draftmode == 0) { +- xfseeko(pdf->file, (off_t) offset, SEEK_SET, jobname_cstr); +- fprintf(pdf->file, "%li", (long int) length); +- xfseeko(pdf->file, pdf_offset(pdf), SEEK_SET, jobname_cstr); +- } +-} +- +-@ end a stream ++@ end a stream + @c + void pdf_end_stream(PDF pdf) + { +- if (pdf->zip_write_state == zip_writing) +- pdf->zip_write_state = zip_finish; +- else +- pdf->stream_length = pdf_offset(pdf) - pdf_saved_offset(pdf); +- pdf_flush(pdf); +- if (pdf->seek_write_length) +- write_stream_length(pdf, (int) pdf->stream_length, +- pdf->stream_length_offset); ++ os_struct *os = pdf->os; ++ strbuf_s *lbuf = os->buf[LUASTM_BUF]; ++ lstring ls; ++ assert(pdf->buf == os->buf[os->curbuf]); ++ switch (os->curbuf) { ++ case PDFOUT_BUF: ++ if (pdf->zip_write_state == ZIP_WRITING) ++ pdf->zip_write_state = ZIP_FINISH; ++ pdf_flush(pdf); /* sets pdf->last_byte */ ++ break; ++ case LUASTM_BUF: ++ luaL_addsize(&(os->b), strbuf_offset(os->buf[LUASTM_BUF])); ++ luaL_pushresult(&(os->b)); ++ ++ /* now the complete page stream is on the Lua stack */ ++ /* TODO: pagestream filter callback here */ ++ ++ ls.s = lua_tolstring(Luas, -1, &ls.l); ++ lbuf->data = (unsigned char *) ls.s; ++ lbuf->p = lbuf->data + ls.l; ++ os->curbuf = LUASTM_BUF; ++ pdf->buf = os->buf[os->curbuf]; ++ if (pdf->zip_write_state == ZIP_WRITING) { ++ pdf->zip_write_state = ZIP_FINISH; ++ write_zip(pdf); ++ } else ++ write_nozip(pdf); ++ lua_pop(Luas, 1); ++ os->curbuf = PDFOUT_BUF; ++ pdf->buf = os->buf[os->curbuf]; ++ assert(pdf->buf->data == pdf->buf->p); ++ break; ++ case OBJSTM_BUF: ++ assert(0); ++ break; ++ default: ++ assert(0); ++ } ++ assert(pdf->zip_write_state == NO_ZIP); ++ assert(os->curbuf == PDFOUT_BUF); ++ assert(pdf->buf == os->buf[os->curbuf]); ++ pdf->stream_deflate = false; ++ pdf->stream_writing = false; ++ if (pdf->last_byte != '\n') ++ pdf_out(pdf, '\n'); /* doesn't really belong to the stream */ ++ pdf_puts(pdf, "endstream"); ++ /* write stream /Length */ ++ if (pdf->seek_write_length && pdf->draftmode == 0) { ++ xfseeko(pdf->file, (off_t) pdf->stream_length_offset, SEEK_SET, ++ pdf->job_name); ++ fprintf(pdf->file, "%li", (long int) pdf->stream_length); ++ xfseeko(pdf->file, 0, SEEK_END, pdf->job_name); ++ } + pdf->seek_write_length = false; +- if (pdf->last_byte != pdf_newline_char) +- pdf_out(pdf, pdf_newline_char); +- pdf_puts(pdf, "endstream\n"); +- pdf_end_obj(pdf); +-} +- +-void pdf_remove_last_space(PDF pdf) +-{ +- if ((pdf->ptr > 0) && (pdf->buf[pdf->ptr - 1] == ' ')) +- pdf->ptr--; + } + + @ To print |scaled| value to PDF output we need some subroutines to ensure +@@ -720,19 +781,20 @@ scaled round_xn_over_d(scaled x, int n, + } + + @ @c +-#define lround(a) (long) floor((a) + 0.5) +- +-void pdf_print_bp(PDF pdf, scaled s) ++void pdf_add_bp(PDF pdf, scaled s) + { /* print scaled as |bp| */ + pdffloat a; + pdfstructure *p = pdf->pstruct; + assert(p != NULL); + a.m = lround(s * p->k1); + a.e = pdf->decimal_digits; ++ if (pdf->cave > 0) ++ pdf_out(pdf, ' '); + print_pdffloat(pdf, a); ++ pdf->cave = 1; + } + +-void pdf_print_mag_bp(PDF pdf, scaled s) ++void pdf_add_mag_bp(PDF pdf, scaled s) + { /* take |mag| into account */ + pdffloat a; + pdfstructure *p = pdf->pstruct; +@@ -742,18 +804,12 @@ void pdf_print_mag_bp(PDF pdf, scaled s) + else + a.m = lround(s * p->k1); + a.e = pdf->decimal_digits; ++ if (pdf->cave > 0) ++ pdf_out(pdf, ' '); + print_pdffloat(pdf, a); ++ pdf->cave = 1; + } + +-#define set_p_or_return(a) do { \ +- p = a; \ +- if (p==NULL) { \ +- a = item; \ +- return; \ +- } \ +- } while (0) +- +- + @* handling page resources. + + @c +@@ -879,7 +935,7 @@ static void destroy_page_resources_tree( + + @* Subroutines to print out various PDF objects. + +-@ print out an integer |n| with fixed width |w|; used for outputting cross-reference table ++@ print out an integer |n| with fixed width |w|; used for outputting cross-reference table + @c + static void pdf_print_fw_int(PDF pdf, longinteger n, size_t w) + { +@@ -894,7 +950,7 @@ static void pdf_print_fw_int(PDF pdf, lo + pdf_out_block(pdf, (const char *) digits, w); + } + +-@ print out an integer |n| as a fixed number |w| of bytes; used for outputting \.{/XRef} cross-reference stream ++@ print out an integer |n| as a fixed number |w| of bytes; used for outputting \.{/XRef} cross-reference stream + @c + static void pdf_out_bytes(PDF pdf, longinteger n, size_t w) + { +@@ -909,59 +965,12 @@ static void pdf_out_bytes(PDF pdf, longi + pdf_out_block(pdf, (const char *) bytes, w); + } + +-@ print out an entry in dictionary with integer value to PDF buffer +-@c +-void pdf_int_entry(PDF pdf, const char *s, int v) +-{ +- pdf_printf(pdf, "/%s ", s); +- pdf_print_int(pdf, v); +-} +- +-void pdf_int_entry_ln(PDF pdf, const char *s, int v) +-{ +- +- pdf_int_entry(pdf, s, v); +- pdf_print_nl(pdf); +-} +- +-@ print out an indirect entry in dictionary +-@c +-void pdf_indirect(PDF pdf, const char *s, int o) +-{ +- pdf_printf(pdf, "/%s %d 0 R", s, (int) o); +-} +- +-void pdf_indirect_ln(PDF pdf, const char *s, int o) +-{ +- +- pdf_indirect(pdf, s, o); +- pdf_print_nl(pdf); +-} +- +-@ print out |s| as string in PDF output ++@ print out |s| as string in PDF output + @c + void pdf_print_str_ln(PDF pdf, const char *s) + { + pdf_print_str(pdf, s); +- pdf_print_nl(pdf); +-} +- +-@ print out an entry in dictionary with string value to PDF buffer +-@c +-void pdf_str_entry(PDF pdf, const char *s, const char *v) +-{ +- if (v == 0) +- return; +- pdf_printf(pdf, "/%s ", s); +- pdf_print_str(pdf, v); +-} +- +-void pdf_str_entry_ln(PDF pdf, const char *s, const char *v) +-{ +- if (v == 0) +- return; +- pdf_str_entry(pdf, s, v); +- pdf_print_nl(pdf); ++ pdf_out(pdf, '\n'); + } + + @ @c +@@ -969,43 +978,34 @@ void pdf_print_toks(PDF pdf, halfword p) + { + int len = 0; + char *s = tokenlist_to_cstring(p, true, &len); +- if (len > 0) +- pdf_puts(pdf, s); +- xfree(s); +-} +- +-void pdf_print_toks_ln(PDF pdf, halfword p) +-{ +- int len = 0; +- char *s = tokenlist_to_cstring(p, true, &len); + if (len > 0) { ++ if (pdf->cave > 0) ++ pdf_out(pdf, ' '); + pdf_puts(pdf, s); +- pdf_print_nl(pdf); ++ pdf->cave = 1; + } + xfree(s); + } + +-@ prints a rect spec ++@ prints a rect spec + @c +-void pdf_print_rect_spec(PDF pdf, halfword r) ++void pdf_add_rect_spec(PDF pdf, halfword r) + { +- pdf_print_mag_bp(pdf, pdf_ann_left(r)); +- pdf_out(pdf, ' '); +- pdf_print_mag_bp(pdf, pdf_ann_bottom(r)); +- pdf_out(pdf, ' '); +- pdf_print_mag_bp(pdf, pdf_ann_right(r)); +- pdf_out(pdf, ' '); +- pdf_print_mag_bp(pdf, pdf_ann_top(r)); ++ pdf_add_mag_bp(pdf, pdf_ann_left(r)); ++ pdf_add_mag_bp(pdf, pdf_ann_bottom(r)); ++ pdf_add_mag_bp(pdf, pdf_ann_right(r)); ++ pdf_add_mag_bp(pdf, pdf_ann_top(r)); + } + +-@ output a rectangle specification to PDF file ++@ output a rectangle specification to PDF file + @c + void pdf_rectangle(PDF pdf, halfword r) + { + prepare_mag(); +- pdf_puts(pdf, "/Rect ["); +- pdf_print_rect_spec(pdf, r); +- pdf_puts(pdf, "]\n"); ++ pdf_add_name(pdf, "Rect"); ++ pdf_begin_array(pdf); ++ pdf_add_rect_spec(pdf, r); ++ pdf_end_array(pdf); + } + + @ @c +@@ -1019,7 +1019,7 @@ static void init_pdf_outputparameters(PD + pdf->image_gamma = fix_int(pdf_image_gamma, 0, 1000000); + pdf->image_hicolor = fix_int(pdf_image_hicolor, 0, 1); + pdf->image_apply_gamma = fix_int(pdf_image_apply_gamma, 0, 1); +- pdf->objcompresslevel = fix_int(pdf_objcompresslevel, 0, 3); ++ pdf->objcompresslevel = fix_int(pdf_objcompresslevel, 0, MAX_OBJ_COMPRESS_LEVEL); + pdf->inclusion_copy_font = fix_int(pdf_inclusion_copy_font, 0, 1); + pdf->replace_font = fix_int(pdf_replace_font, 0, 1); + pdf->pk_resolution = fix_int(pdf_pk_resolution, 72, 8000); +@@ -1055,7 +1055,7 @@ static void init_pdf_outputparameters(PD + pdf->resname_prefix = get_resname_prefix(pdf); + } + +-@ Checks that we have a name for the generated PDF file and that it's open. ++@ Checks that we have a name for the generated PDF file and that it's open. + + @c + static void ensure_output_file_open(PDF pdf, const char *ext) +@@ -1088,7 +1088,7 @@ static void ensure_pdf_header_written(PD + pdf_out(pdf, 'T' + 128); + pdf_out(pdf, 'E' + 128); + pdf_out(pdf, 'X' + 128); +- pdf_print_nl(pdf); ++ pdf_out(pdf, '\n'); + } + + @ @c +@@ -1152,117 +1152,242 @@ When calling this procedure, |pdf_os_mod + @c + static void pdf_os_write_objstream(PDF pdf) + { +- halfword i, j, p, q; +- if (pdf->os_cur_objnum == 0) /* no object stream started */ ++ os_struct *os = pdf->os; ++ unsigned int i, j, n1, n2; /* n1, n2: ObjStm buffer may be reallocated! */ ++ strbuf_s *obuf = os->buf[OBJSTM_BUF]; ++ if (os->cur_objstm == 0) /* no object stream started */ + return; +- p = pdf->ptr; +- i = 0; +- j = 0; +- while (i <= pdf->os_idx) { /* assemble object number and byte offset pairs */ +- pdf_printf(pdf, "%d %d", (int) pdf->os_obj[i].num, +- (int) pdf->os_obj[i].off); +- if (j == 9) { /* print out in groups of ten for better readability */ +- pdf_out(pdf, pdf_newline_char); ++ assert(pdf->buf == obuf); /* yes, pdf_out() still goes into ObjStm */ ++ assert(os->idx > 0); /* yes, there are objects for the ObjStm */ ++ n1 = (unsigned int) strbuf_offset(obuf); /* remember end of collected object stream contents */ ++ /* this is needed here to calculate /First for the ObjStm dict */ ++ for (i = 0, j = 0; i < os->idx; i++) { /* add object-number/byte-offset list to buffer */ ++ pdf_print_int(pdf, (int) os->obj[i].num); ++ pdf_out(pdf, ' '); ++ pdf_print_int(pdf, (int) os->obj[i].off); ++ if (j == 9 || i == os->idx - 1) { /* print out in groups of ten for better readability */ ++ pdf_out(pdf, '\n'); + j = 0; + } else { + pdf_out(pdf, ' '); + j++; + } +- i++; + } +- pdf->buf[pdf->ptr - 1] = pdf_newline_char; /* no risk of flush, as we are in |pdf_os_mode| */ +- q = pdf->ptr; +- pdf_begin_dict(pdf, pdf->os_cur_objnum, 0); /* switch to PDF stream writing */ +- pdf_puts(pdf, "/Type /ObjStm\n"); +- pdf_printf(pdf, "/N %d\n", (int) (pdf->os_idx + 1)); +- pdf_printf(pdf, "/First %d\n", (int) (q - p)); ++ n2 = (unsigned int) strbuf_offset(obuf); /* remember current buffer end */ ++ pdf_begin_obj(pdf, (int) os->cur_objstm, OBJSTM_NEVER); /* switch to PDF stream writing */ ++ pdf_begin_dict(pdf); ++ pdf_dict_add_name(pdf, "Type", "ObjStm"); ++ pdf_dict_add_int(pdf, "N", (int) os->idx); /* number of objects in ObjStm */ ++ pdf_dict_add_int(pdf, "First", (int) (n2 - n1)); ++ pdf_dict_add_streaminfo(pdf); ++ pdf_end_dict(pdf); + pdf_begin_stream(pdf); +- /* write object number and byte offset pairs; +- |q - p| should always fit into the PDF output buffer */ +- pdf_out_block(pdf, (const char *) (pdf->os_buf + p), (size_t) (q - p)); +- i = 0; +- while (i < p) { +- q = i + pdf->buf_size; +- if (q > p) +- q = p; +- pdf_room(pdf, q - i); +- while (i < q) { /* write the buffered objects */ +- pdf_quick_out(pdf, pdf->os_buf[i]); +- i++; +- } +- } ++ /* write object-number/byte-offset list */ ++ pdf_out_block(pdf, (const char *) (obuf->data + n1), (size_t) (n2 - n1)); ++ /* write collected object stream contents */ ++ pdf_out_block(pdf, (const char *) obuf->data, (size_t) n1); + pdf_end_stream(pdf); +- pdf->os_cur_objnum = 0; /* to force object stream generation next time */ ++ pdf_end_obj(pdf); ++ os->cur_objstm = 0; /* to force object stream generation next time */ + } + +-@ begin a PDF dictionary object ++@ begin a PDF dictionary + @c +-void pdf_begin_dict(PDF pdf, int i, int pdf_os_level) ++void pdf_begin_dict(PDF pdf) + { +- ensure_output_state(pdf, ST_HEADER_WRITTEN); +- pdf_os_prepare_obj(pdf, i, pdf_os_level); +- if (!pdf->os_mode) { +- pdf_printf(pdf, "%d 0 obj\n<<\n", (int) i); +- } else { +- if (pdf->compress_level == 0) +- pdf_printf(pdf, "%% %d 0 obj\n", (int) i); /* debugging help */ +- pdf_puts(pdf, "<<\n"); +- } ++ pdf_puts(pdf, "<<"); ++ pdf->cave = 0; + } + +-@ begin a new PDF dictionary object ++@ end a PDF dictionary + @c +-int pdf_new_dict(PDF pdf, int t, int i, int pdf_os_level) ++void pdf_end_dict(PDF pdf) + { +- int k = pdf_create_obj(pdf, t, i); +- pdf_begin_dict(pdf, k, pdf_os_level); +- return k; ++ pdf_puts(pdf, ">>"); ++ pdf->cave = 0; + } + +-@ end a PDF dictionary object ++@ add integer object to dict + @c +-void pdf_end_dict(PDF pdf) ++void pdf_dict_add_bool(PDF pdf, const char *key, int i) + { +- if (pdf->os_mode) { +- pdf_puts(pdf, ">>\n"); +- if (pdf->os_idx == pdf_os_max_objs - 1) +- pdf_os_write_objstream(pdf); +- } else { +- pdf_puts(pdf, ">>\nendobj\n"); +- } ++ pdf_add_name(pdf, key); ++ pdf_add_bool(pdf, i); + } + +-@ begin a PDF object ++@ add integer object to dict + @c +-void pdf_begin_obj(PDF pdf, int i, int pdf_os_level) ++void pdf_dict_add_int(PDF pdf, const char *key, int i) + { +- ensure_output_state(pdf, ST_HEADER_WRITTEN); +- pdf_os_prepare_obj(pdf, i, pdf_os_level); +- if (!pdf->os_mode) { +- pdf_printf(pdf, "%d 0 obj\n", (int) i); +- } else if (pdf->compress_level == 0) { +- pdf_printf(pdf, "%% %d 0 obj\n", (int) i); /* debugging help */ ++ pdf_add_name(pdf, key); ++ pdf_add_int(pdf, i); ++} ++ ++@ add name object to dict ++@c ++void pdf_dict_add_name(PDF pdf, const char *key, const char *val) ++{ ++ pdf_add_name(pdf, key); ++ pdf_add_name(pdf, val); ++} ++ ++@ add string object to dict ++@c ++void pdf_dict_add_string(PDF pdf, const char *key, const char *val) ++{ ++ if (val == NULL) ++ return; ++ pdf_add_name(pdf, key); ++ if (pdf->cave > 0) ++ pdf_out(pdf, ' '); ++ pdf->cave = 0; ++ pdf_print_str(pdf, val); ++} ++ ++@ add name reference to dict ++@c ++void pdf_dict_add_ref(PDF pdf, const char *key, int num) ++{ ++ pdf_add_name(pdf, key); ++ pdf_add_ref(pdf, num); ++} ++ ++@ add objects of different types ++@c ++void pdf_add_null(PDF pdf) ++{ ++ if (pdf->cave > 0) ++ pdf_out(pdf, ' '); ++ pdf_puts(pdf, "null"); ++ pdf->cave = 1; ++} ++ ++void pdf_add_bool(PDF pdf, int i) ++{ ++ if (pdf->cave > 0) ++ pdf_out(pdf, ' '); ++ if (i == 0) ++ pdf_puts(pdf, "false"); ++ else ++ pdf_puts(pdf, "true"); ++ pdf->cave = 1; ++} ++ ++void pdf_add_int(PDF pdf, int i) ++{ ++ if (pdf->cave > 0) ++ pdf_out(pdf, ' '); ++ pdf_print_int(pdf, i); ++ pdf->cave = 1; ++} ++ ++void pdf_add_string(PDF pdf, const char *s) ++{ ++ if (pdf->cave > 0) ++ pdf_out(pdf, ' '); ++ pdf_print_str(pdf, s); ++ pdf->cave = 1; ++} ++ ++void pdf_add_name(PDF pdf, const char *name) ++{ ++ pdf_out(pdf, '/'); ++ pdf_puts(pdf, name); ++ pdf->cave = 1; ++} ++ ++void pdf_add_ref(PDF pdf, int num) ++{ ++ if (pdf->cave > 0) ++ pdf_out(pdf, ' '); ++ pdf_print_int(pdf, num); ++ pdf_puts(pdf, " 0 R"); ++ pdf->cave = 1; ++} ++ ++@ add stream length and filter entries to a stream dictionary, ++remember file position for seek ++@c ++void pdf_dict_add_streaminfo(PDF pdf) ++{ ++ assert(pdf->buf == pdf->os->buf[PDFOUT_BUF]); ++ pdf_add_name(pdf, "Length"); ++ pdf->stream_length_offset = pdf_offset(pdf) + 1; ++ pdf->seek_write_length = true; /* fill in length at |pdf_end_stream| call */ ++ pdf_puts(pdf, " x "); /* space for 10 decimal digits */ ++ pdf->cave = 1; ++ if (pdf->compress_level > 0) { ++ pdf_dict_add_name(pdf, "Filter", "FlateDecode"); ++ pdf->stream_deflate = true; + } + } + +-@ begin a new PDF object ++@ begin a PDF array + @c +-int pdf_new_obj(PDF pdf, int t, int i, int pdf_os_level) ++void pdf_begin_array(PDF pdf) + { +- int k = pdf_create_obj(pdf, t, i); +- pdf_begin_obj(pdf, k, pdf_os_level); +- return k; ++ pdf_out(pdf, '['); ++ pdf->cave = 0; ++} ++ ++@ end a PDF array ++@c ++void pdf_end_array(PDF pdf) ++{ ++ pdf_out(pdf, ']'); ++ pdf->cave = 0; + } + +-@ end a PDF object ++@ begin a PDF object ++@c ++void pdf_begin_obj(PDF pdf, int i, int pdf_os_threshold) ++{ ++ os_struct *os = pdf->os; ++ strbuf_s *buf; ++ ensure_output_state(pdf, ST_HEADER_WRITTEN); ++ pdf_prepare_obj(pdf, i, pdf_os_threshold); ++ assert(pdf->buf == os->buf[os->curbuf]); ++ buf = pdf->buf; ++ switch (os->curbuf) { ++ case PDFOUT_BUF: ++ pdf_printf(pdf, "%d 0 obj\n", (int) i); ++ break; ++ case LUASTM_BUF: ++ assert(0); ++ break; ++ case OBJSTM_BUF: ++ if (pdf->compress_level == 0) ++ pdf_printf(pdf, "%% %d 0 obj\n", (int) i); /* debugging help */ ++ break; ++ default: ++ assert(0); ++ } ++ pdf->cave = 0; ++} ++ ++@ end a PDF object + @c + void pdf_end_obj(PDF pdf) + { +- if (pdf->os_mode) { +- if (pdf->os_idx == pdf_os_max_objs - 1) ++ os_struct *os = pdf->os; ++ assert(pdf->buf == os->buf[os->curbuf]); ++ switch (os->curbuf) { ++ case PDFOUT_BUF: ++ pdf_puts(pdf, "\nendobj\n"); /* end a PDF object */ ++ break; ++ case LUASTM_BUF: ++ assert(0); ++ break; ++ case OBJSTM_BUF: ++ os->idx++; /* = number of objects collected so far in ObjStm */ ++ os->o_ctr++; /* only for statistics */ ++ if (os->idx == PDF_OS_MAX_OBJS) + pdf_os_write_objstream(pdf); +- } else { +- pdf_puts(pdf, "endobj\n"); /* end a PDF object */ ++ else ++ pdf_out(pdf, ' '); /* Adobe Reader seems to need this */ ++ break; ++ default: ++ assert(0); + } + } + +@@ -1271,7 +1396,7 @@ void pdf_end_obj(PDF pdf) + control characters are octal encoded. + This assumes that the string does not contain any already escaped + characters! +- ++ + @c + char *convertStringToPDFString(const char *in, int len) + { +@@ -1311,7 +1436,7 @@ char *convertStringToPDFString(const cha + @ Converts any string given in in in an allowed PDF string which is + hexadecimal encoded; + |sizeof(out)| should be at least $|lin|*2+1$. +- ++ + @c + static void convertStringToHexString(const char *in, char *out, int lin) + { +@@ -1387,7 +1512,10 @@ static void print_ID(PDF pdf, const char + md5_finish(&state, digest); + /* write the IDs */ + convertStringToHexString((char *) digest, id, 16); +- pdf_printf(pdf, "/ID [<%s> <%s>]", id, id); ++ pdf_add_name(pdf, "ID"); ++ pdf_begin_array(pdf); ++ pdf_printf(pdf, "<%s> <%s>", id, id); ++ pdf_end_array(pdf); + } + + @ Print the /CreationDate entry. +@@ -1505,20 +1633,6 @@ void init_start_time(PDF pdf) + } + + @ @c +-static void print_creation_date(PDF pdf) +-{ +- init_start_time(pdf); +- pdf_printf(pdf, "/CreationDate (%s)\n", pdf->start_time_str); +-} +- +-@ @c +-static void print_mod_date(PDF pdf) +-{ +- init_start_time(pdf); +- pdf_printf(pdf, "/ModDate (%s)\n", pdf->start_time_str); +-} +- +-@ @c + char *getcreationdate(PDF pdf) + { + assert(pdf); +@@ -1538,67 +1652,6 @@ void remove_pdffile(PDF pdf) + } + + @ @c +-static void realloc_fb(PDF pdf) +-{ +- if (pdf->fb_array == NULL) { +- pdf->fb_limit = SMALL_ARRAY_SIZE; +- pdf->fb_array = xtalloc(pdf->fb_limit, char); +- pdf->fb_ptr = pdf->fb_array; +- } else if ((size_t) (pdf->fb_ptr - pdf->fb_array + 1) > pdf->fb_limit) { +- size_t last_ptr_index = (size_t) (pdf->fb_ptr - pdf->fb_array); +- pdf->fb_limit *= 2; +- if ((size_t) (pdf->fb_ptr - pdf->fb_array + 1) > pdf->fb_limit) +- pdf->fb_limit = (size_t) (pdf->fb_ptr - pdf->fb_array + 1); +- xretalloc(pdf->fb_array, pdf->fb_limit, char); +- pdf->fb_ptr = pdf->fb_array + last_ptr_index; +- } +-} +- +-@ @c +-int fb_offset(PDF pdf) +-{ +- return (int) (pdf->fb_ptr - pdf->fb_array); +-} +- +-@ @c +-void fb_seek(PDF pdf, int offset) +-{ +- pdf->fb_ptr = pdf->fb_array + offset; +-} +- +-@ @c +-void fb_putchar(PDF pdf, eight_bits b) +-{ +- if ((size_t) (pdf->fb_ptr - pdf->fb_array + 1) > pdf->fb_limit) +- realloc_fb(pdf); +- *(pdf->fb_ptr)++ = (char) b; +-} +- +-@ @c +-void fb_flush(PDF pdf) +-{ +- char *p; +- int n; +- for (p = pdf->fb_array; p < pdf->fb_ptr;) { +- n = pdf->buf_size - pdf->ptr; +- if (pdf->fb_ptr - p < n) +- n = (int) (pdf->fb_ptr - p); +- memcpy(pdf->buf + pdf->ptr, p, (unsigned) n); +- pdf->ptr += n; +- if (pdf->ptr == pdf->buf_size) +- pdf_flush(pdf); +- p += n; +- } +- pdf->fb_ptr = pdf->fb_array; +-} +- +-@ @c +-void fb_free(PDF pdf) +-{ +- xfree(pdf->fb_array); +-} +- +-@ @c + void pdf_error(const char *t, const char *p) + { + normalize_selector(); +@@ -1635,7 +1688,7 @@ void pdf_warning(const char *t, const ch + history = warning_issued; + } + +-@ Use |check_o_mode()| in the backend-specific "Implement..." chunks ++@ Use |check_o_mode()| in the backend-specific "Implement..." chunks + + @c + void check_o_mode(PDF pdf, const char *s, int o_mode_bitpattern, boolean strict) +@@ -1735,64 +1788,81 @@ char *get_resname_prefix(PDF pdf) + + void pdf_begin_page(PDF pdf) + { ++ pdffloat f; + scaled form_margin = 0; /* was one_bp until SVN4066 */ + ensure_output_state(pdf, ST_HEADER_WRITTEN); + init_pdf_pagecalculations(pdf); +- + if (pdf->page_resources == NULL) { + pdf->page_resources = xtalloc(1, pdf_resource_struct); + pdf->page_resources->resources_tree = NULL; + } +- pdf->page_resources->last_resources = pdf_new_objnum(pdf); ++ pdf->page_resources->last_resources = ++ pdf_create_obj(pdf, obj_type_others, 0); + reset_page_resources(pdf); + + if (global_shipping_mode == SHIPPING_PAGE) { +- pdf->last_page = get_obj(pdf, obj_type_page, total_pages + 1, 0); ++ pdf->last_page = pdf_get_obj(pdf, obj_type_page, total_pages + 1, 0); + set_obj_aux(pdf, pdf->last_page, 1); /* mark that this page has been created */ +- pdf->last_stream = pdf_new_dict(pdf, obj_type_pagestream, 0, 0); ++ pdf->last_stream = pdf_create_obj(pdf, obj_type_pagestream, 0); ++ pdf_begin_obj(pdf, pdf->last_stream, OBJSTM_NEVER); + pdf->last_thread = null; ++ pdf_begin_dict(pdf); + pdflua_begin_page(pdf); + } else { + assert(global_shipping_mode == SHIPPING_FORM); +- pdf_begin_dict(pdf, pdf_cur_form, 0); ++ pdf_begin_obj(pdf, pdf_cur_form, OBJSTM_NEVER); + pdf->last_stream = pdf_cur_form; + + /* Write out Form stream header */ +- pdf_puts(pdf, "/Type /XObject\n"); +- pdf_puts(pdf, "/Subtype /Form\n"); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_name(pdf, "Type", "XObject"); ++ pdf_dict_add_name(pdf, "Subtype", "Form"); + if (pdf_xform_attr != null) +- pdf_print_toks_ln(pdf, pdf_xform_attr); ++ pdf_print_toks(pdf, pdf_xform_attr); + if (obj_xform_attr(pdf, pdf_cur_form) != null) { +- pdf_print_toks_ln(pdf, obj_xform_attr(pdf, pdf_cur_form)); ++ pdf_print_toks(pdf, obj_xform_attr(pdf, pdf_cur_form)); + delete_token_ref(obj_xform_attr(pdf, pdf_cur_form)); + set_obj_xform_attr(pdf, pdf_cur_form, null); + } +- pdf_puts(pdf, "/BBox ["); +- pdf_print_bp(pdf, -form_margin); +- pdf_out(pdf, ' '); +- pdf_print_bp(pdf, -form_margin); +- pdf_out(pdf, ' '); +- pdf_print_bp(pdf, cur_page_size.h + form_margin); +- pdf_out(pdf, ' '); +- pdf_print_bp(pdf, cur_page_size.v + form_margin); +- pdf_puts(pdf, "]\n"); +- pdf_puts(pdf, "/FormType 1\n"); +- pdf_puts(pdf, "/Matrix [1 0 0 1 0 0]\n"); +- pdf_indirect_ln(pdf, "Resources", pdf->page_resources->last_resources); ++ pdf_add_name(pdf, "BBox"); ++ pdf_begin_array(pdf); ++ pdf_add_bp(pdf, -form_margin); ++ pdf_add_bp(pdf, -form_margin); ++ pdf_add_bp(pdf, pdf->page_size.h + form_margin); ++ pdf_add_bp(pdf, pdf->page_size.v + form_margin); ++ pdf_end_array(pdf); ++ pdf_dict_add_int(pdf, "FormType", 1); ++ pdf_add_name(pdf, "Matrix"); ++ pdf_begin_array(pdf); ++ pdf_add_int(pdf, 1); ++ pdf_add_int(pdf, 0); ++ pdf_add_int(pdf, 0); ++ pdf_add_int(pdf, 1); ++ pdf_add_int(pdf, 0); ++ pdf_add_int(pdf, 0); ++ pdf_end_array(pdf); ++ pdf_dict_add_ref(pdf, "Resources", pdf->page_resources->last_resources); + } + /* Start stream of page/form contents */ ++ pdf_dict_add_streaminfo(pdf); ++ pdf_end_dict(pdf); ++ pdf->os->trigger_luastm = false; /* if it's true, the page stream goes through Lua */ + pdf_begin_stream(pdf); + if (global_shipping_mode == SHIPPING_PAGE) { + /* Adjust transformation matrix for the magnification ratio */ + if (mag != 1000) { +- pdf_print_real(pdf, mag, 3); ++ setpdffloat(f, mag, 3); ++ print_pdffloat(pdf, f); + pdf_puts(pdf, " 0 0 "); +- pdf_print_real(pdf, mag, 3); ++ print_pdffloat(pdf, f); + pdf_puts(pdf, " 0 0 cm\n"); + } + } +- pdf_shipout_begin(); ++ pos_stack_used = 0; /* start with empty stack */ + ++ if (global_shipping_mode == SHIPPING_PAGE) { ++ colorstackpagestart(); ++ } + if (global_shipping_mode == SHIPPING_PAGE) + pdf_out_colorstack_startpage(pdf); + } +@@ -1802,13 +1872,17 @@ void print_pdf_table_string(PDF pdf, con + { + size_t len; + const char *ls; +- lua_getglobal(Luas, "pdf"); /* t ... */ ++ lua_getglobal(Luas, "pdf"); /* t ... */ + lua_pushstring(Luas, s); /* s t ... */ + lua_gettable(Luas, -2); /* s? t ... */ + if (lua_isstring(Luas, -1)) { /* s t ... */ + ls = lua_tolstring(Luas, -1, &len); +- pdf_out_block(pdf, ls, len); +- pdf_out(pdf, '\n'); ++ if (len > 0) { ++ if (pdf->cave == 1) ++ pdf_out(pdf, ' '); ++ pdf_out_block(pdf, ls, len); ++ pdf->cave = 1; ++ } + } + lua_pop(Luas, 2); /* ... */ + } +@@ -1819,84 +1893,92 @@ void print_pdf_table_string(PDF pdf, con + + void pdf_end_page(PDF pdf) + { ++ char s[64], *p; + int j, annots = 0, beads = 0; + pdf_resource_struct *res_p = pdf->page_resources; + pdf_resource_struct local_page_resources; + pdf_object_list *annot_list, *bead_list, *link_list, *ol, *ol1; +- scaledpos save_cur_page_size; /* to save |cur_page_size| during flushing pending forms */ ++ scaledpos save_cur_page_size; /* to save |pdf->page_size| during flushing pending forms */ + shipping_mode_e save_shipping_mode; + int procset = PROCSET_PDF; + + /* Finish stream of page/form contents */ + pdf_goto_pagemode(pdf); +- pdf_shipout_end(); ++ if (pos_stack_used > 0) { ++ pdftex_fail("%u unmatched \\pdfsave after %s shipout", ++ (unsigned int) pos_stack_used, ++ ((global_shipping_mode == ++ SHIPPING_PAGE) ? "page" : "form")); ++ } + pdf_end_stream(pdf); ++ pdf_end_obj(pdf); + + if (global_shipping_mode == SHIPPING_PAGE) { + pdf->last_pages = pdf_do_page_divert(pdf, pdf->last_page, 0); + + /* Write out /Page object */ +- pdf_begin_dict(pdf, pdf->last_page, 1); +- pdf_puts(pdf, "/Type /Page\n"); +- pdf_indirect_ln(pdf, "Contents", pdf->last_stream); +- pdf_indirect_ln(pdf, "Resources", res_p->last_resources); +- pdf_puts(pdf, "/MediaBox [0 0 "); +- pdf_print_mag_bp(pdf, cur_page_size.h); +- pdf_out(pdf, ' '); +- pdf_print_mag_bp(pdf, cur_page_size.v); +- pdf_puts(pdf, "]\n"); ++ pdf_begin_obj(pdf, pdf->last_page, OBJSTM_ALWAYS); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_name(pdf, "Type", "Page"); ++ pdf_dict_add_ref(pdf, "Contents", pdf->last_stream); ++ pdf_dict_add_ref(pdf, "Resources", res_p->last_resources); ++ pdf_add_name(pdf, "MediaBox"); ++ pdf_begin_array(pdf); ++ pdf_add_int(pdf, 0); ++ pdf_add_int(pdf, 0); ++ pdf_add_mag_bp(pdf, pdf->page_size.h); ++ pdf_add_mag_bp(pdf, pdf->page_size.v); ++ pdf_end_array(pdf); + if (pdf_page_attr != null) +- pdf_print_toks_ln(pdf, pdf_page_attr); ++ pdf_print_toks(pdf, pdf_page_attr); + print_pdf_table_string(pdf, "pageattributes"); +- pdf_indirect_ln(pdf, "Parent", pdf->last_pages); ++ pdf_dict_add_ref(pdf, "Parent", pdf->last_pages); + if (pdf->img_page_group_val != 0) { + assert(pdf->img_page_group_val > 0); +- pdf_printf(pdf, "/Group %d 0 R\n", pdf->img_page_group_val); ++ pdf_dict_add_ref(pdf, "Group", pdf->img_page_group_val); + } + annot_list = get_page_resources_list(pdf, obj_type_annot); + link_list = get_page_resources_list(pdf, obj_type_link); + if (annot_list != NULL || link_list != NULL) { + annots = pdf_create_obj(pdf, obj_type_annots, 0); +- pdf_indirect_ln(pdf, "Annots", annots); ++ pdf_dict_add_ref(pdf, "Annots", annots); + } + bead_list = get_page_resources_list(pdf, obj_type_bead); + if (bead_list != NULL) { + beads = pdf_create_obj(pdf, obj_type_beads, 0); +- pdf_indirect_ln(pdf, "B", beads); ++ pdf_dict_add_ref(pdf, "B", beads); + } + pdf_end_dict(pdf); ++ pdf_end_obj(pdf); + pdflua_end_page(pdf, annots, beads); + + pdf->img_page_group_val = 0; + + /* Generate array of annotations or beads in page */ + if (annot_list != NULL || link_list != NULL) { +- pdf_begin_obj(pdf, annots, 1); +- pdf_puts(pdf, "["); ++ pdf_begin_obj(pdf, annots, OBJSTM_ALWAYS); ++ pdf_begin_array(pdf); + while (annot_list != NULL) { + assert(annot_list->info > 0); +- pdf_print_int(pdf, annot_list->info); +- pdf_puts(pdf, " 0 R "); ++ pdf_add_ref(pdf, annot_list->info); + annot_list = annot_list->link; + } + while (link_list != NULL) { +- pdf_print_int(pdf, link_list->info); +- pdf_puts(pdf, " 0 R "); ++ pdf_add_ref(pdf, link_list->info); + link_list = link_list->link; + } +- pdf_puts(pdf, "]\n"); ++ pdf_end_array(pdf); + pdf_end_obj(pdf); + } + if (bead_list != NULL) { +- pdf_begin_dict(pdf, beads, 1); +- pdf_puts(pdf, "["); ++ pdf_begin_obj(pdf, beads, OBJSTM_ALWAYS); ++ pdf_begin_array(pdf); + while (bead_list != NULL) { +- pdf_print_int(pdf, bead_list->info); +- pdf_printf(pdf, " 0 R "); ++ pdf_add_ref(pdf, bead_list->info); + bead_list = bead_list->link; + } +- pdf_printf(pdf, "]\n"); +- pdf_end_dict(pdf); ++ pdf_end_array(pdf); ++ pdf_end_obj(pdf); + } + } + +@@ -1912,19 +1994,19 @@ void pdf_end_page(PDF pdf) + /* Write out pending forms */ + /* When flushing pending forms we need to save and restore resource lists + which are also used by page shipping. +- Saving and restoring |cur_page_size| is needed for proper ++ Saving and restoring |pdf->page_size| is needed for proper + writing out pending PDF marks. */ + ol = get_page_resources_list(pdf, obj_type_xform); + while (ol != NULL) { + if (!is_obj_written(pdf, ol->info)) { + pdf_cur_form = ol->info; +- save_cur_page_size = cur_page_size; ++ save_cur_page_size = pdf->page_size; + save_shipping_mode = global_shipping_mode; + pdf->page_resources = &local_page_resources; + local_page_resources.resources_tree = NULL; + ship_out(pdf, obj_xform_box(pdf, pdf_cur_form), SHIPPING_FORM); + /* Restore page size and page resources */ +- cur_page_size = save_cur_page_size; ++ pdf->page_size = save_cur_page_size; + global_shipping_mode = save_shipping_mode; + destroy_page_resources_tree(pdf); + pdf->page_resources = res_p; +@@ -1947,11 +2029,13 @@ void pdf_end_page(PDF pdf) + while (ol != NULL) { + if (ol->info > 0 && obj_type(pdf, ol->info) == obj_type_annot) { + j = obj_annot_ptr(pdf, ol->info); /* |j| points to |pdf_annot_node| */ +- pdf_begin_dict(pdf, ol->info, 1); +- pdf_puts(pdf, "/Type /Annot\n"); +- pdf_print_toks_ln(pdf, pdf_annot_data(j)); ++ pdf_begin_obj(pdf, ol->info, OBJSTM_ALWAYS); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_name(pdf, "Type", "Annot"); ++ pdf_print_toks(pdf, pdf_annot_data(j)); + pdf_rectangle(pdf, j); + pdf_end_dict(pdf); ++ pdf_end_obj(pdf); + } + ol = ol->link; + } +@@ -1960,17 +2044,19 @@ void pdf_end_page(PDF pdf) + if ((ol = get_page_resources_list(pdf, obj_type_link)) != NULL) { + while (ol != NULL) { + j = obj_annot_ptr(pdf, ol->info); +- pdf_begin_dict(pdf, ol->info, 1); +- pdf_puts(pdf, "/Type /Annot\n"); ++ pdf_begin_obj(pdf, ol->info, OBJSTM_ALWAYS); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_name(pdf, "Type", "Annot"); + if (pdf_action_type(pdf_link_action(j)) != pdf_action_user) +- pdf_puts(pdf, "/Subtype /Link\n"); ++ pdf_dict_add_name(pdf, "Subtype", "Link"); + if (pdf_link_attr(j) != null) +- pdf_print_toks_ln(pdf, pdf_link_attr(j)); ++ pdf_print_toks(pdf, pdf_link_attr(j)); + pdf_rectangle(pdf, j); + if (pdf_action_type(pdf_link_action(j)) != pdf_action_user) + pdf_puts(pdf, "/A "); + write_action(pdf, pdf_link_action(j)); + pdf_end_dict(pdf); ++ pdf_end_obj(pdf); + ol = ol->link; + } + /* Flush |pdf_start_link_node|'s created by |append_link| */ +@@ -1992,17 +2078,18 @@ void pdf_end_page(PDF pdf) + + } + /* Write out resources dictionary */ +- pdf_begin_dict(pdf, res_p->last_resources, 1); ++ pdf_begin_obj(pdf, res_p->last_resources, OBJSTM_ALWAYS); ++ pdf_begin_dict(pdf); + /* Print additional resources */ + if (global_shipping_mode == SHIPPING_PAGE) { + if (pdf_page_resources != null) +- pdf_print_toks_ln(pdf, pdf_page_resources); ++ pdf_print_toks(pdf, pdf_page_resources); + print_pdf_table_string(pdf, "pageresources"); + } else { + if (pdf_xform_resources != null) +- pdf_print_toks_ln(pdf, pdf_xform_resources); ++ pdf_print_toks(pdf, pdf_xform_resources); + if (obj_xform_resources(pdf, pdf_cur_form) != null) { +- pdf_print_toks_ln(pdf, obj_xform_resources(pdf, pdf_cur_form)); ++ pdf_print_toks(pdf, obj_xform_resources(pdf, pdf_cur_form)); + delete_token_ref(obj_xform_resources(pdf, pdf_cur_form)); + set_obj_xform_resources(pdf, pdf_cur_form, null); + } +@@ -2010,18 +2097,18 @@ void pdf_end_page(PDF pdf) + + /* Generate font resources */ + if ((ol = get_page_resources_list(pdf, obj_type_font)) != NULL) { +- pdf_puts(pdf, "/Font << "); ++ pdf_add_name(pdf, "Font"); ++ pdf_begin_dict(pdf); + while (ol != NULL) { + assert(ol->info > 0); /* always base font: an object number */ +- pdf_puts(pdf, "/F"); +- pdf_print_int(pdf, obj_info(pdf, ol->info)); +- pdf_print_resname_prefix(pdf); +- pdf_out(pdf, ' '); +- pdf_print_int(pdf, ol->info); +- pdf_puts(pdf, " 0 R "); ++ p = s; ++ p += snprintf(p, 20, "F%i", obj_info(pdf, ol->info)); ++ if (pdf->resname_prefix != NULL) ++ p += snprintf(p, 20, "%s", pdf->resname_prefix); ++ pdf_dict_add_ref(pdf, s, ol->info); + ol = ol->link; + } +- pdf_puts(pdf, ">>\n"); ++ pdf_end_dict(pdf); + procset |= PROCSET_TEXT; + } + +@@ -2029,47 +2116,47 @@ void pdf_end_page(PDF pdf) + ol = get_page_resources_list(pdf, obj_type_xform); + ol1 = get_page_resources_list(pdf, obj_type_ximage); + if (ol != NULL || ol1 != NULL) { +- pdf_puts(pdf, "/XObject << "); ++ pdf_add_name(pdf, "XObject"); ++ pdf_begin_dict(pdf); + while (ol != NULL) { +- pdf_printf(pdf, "/Fm"); +- pdf_print_int(pdf, obj_info(pdf, ol->info)); +- pdf_print_resname_prefix(pdf); +- pdf_out(pdf, ' '); +- pdf_print_int(pdf, ol->info); +- pdf_puts(pdf, " 0 R "); ++ p = s; ++ p += snprintf(p, 20, "Fm%i", obj_info(pdf, ol->info)); ++ if (pdf->resname_prefix != NULL) ++ p += snprintf(p, 20, "%s", pdf->resname_prefix); ++ pdf_dict_add_ref(pdf, s, ol->info); + ol = ol->link; + } + while (ol1 != null) { +- pdf_puts(pdf, "/Im"); +- pdf_print_int(pdf, obj_data_ptr(pdf, ol1->info)); +- pdf_print_resname_prefix(pdf); +- pdf_out(pdf, ' '); +- pdf_print_int(pdf, ol1->info); +- pdf_puts(pdf, " 0 R "); ++ p = s; ++ p += snprintf(p, 20, "Im%i", obj_info(pdf, ol1->info)); ++ if (pdf->resname_prefix != NULL) ++ p += snprintf(p, 20, "%s", pdf->resname_prefix); ++ pdf_dict_add_ref(pdf, s, ol1->info); + procset |= img_procset(idict_array[obj_data_ptr(pdf, ol1->info)]); + ol1 = ol1->link; + } +- pdf_puts(pdf, ">>\n"); ++ pdf_end_dict(pdf); + } + + /* Generate ProcSet */ +- pdf_puts(pdf, "/ProcSet ["); ++ pdf_add_name(pdf, "ProcSet"); ++ pdf_begin_array(pdf); + if ((procset & PROCSET_PDF) != 0) +- pdf_puts(pdf, " /PDF"); ++ pdf_add_name(pdf, "PDF"); + if ((procset & PROCSET_TEXT) != 0) +- pdf_puts(pdf, " /Text"); ++ pdf_add_name(pdf, "Text"); + if ((procset & PROCSET_IMAGE_B) != 0) +- pdf_puts(pdf, " /ImageB"); ++ pdf_add_name(pdf, "ImageB"); + if ((procset & PROCSET_IMAGE_C) != 0) +- pdf_puts(pdf, " /ImageC"); ++ pdf_add_name(pdf, "ImageC"); + if ((procset & PROCSET_IMAGE_I) != 0) +- pdf_puts(pdf, " /ImageI"); +- pdf_puts(pdf, " ]\n"); +- ++ pdf_add_name(pdf, "ImageI"); ++ pdf_end_array(pdf); + pdf_end_dict(pdf); ++ pdf_end_obj(pdf); + } + +-@* Finishing the PDF output file. ++@* Finishing the PDF output file. + + @ Destinations that have been referenced but don't exists have + |obj_dest_ptr=null|. Leaving them undefined might cause troubles for +@@ -2094,10 +2181,12 @@ static void check_nonexisting_destinatio + (" has been referenced but does not exist, replaced by a fixed one"); + print_ln(); + print_ln(); +- pdf_begin_obj(pdf, k, 1); +- pdf_out(pdf, '['); +- pdf_print_int(pdf, pdf->last_page); +- pdf_puts(pdf, " 0 R /Fit]\n"); ++ ++ pdf_begin_obj(pdf, k, OBJSTM_ALWAYS); ++ pdf_begin_array(pdf); ++ pdf_add_ref(pdf, pdf->last_page); ++ pdf_add_name(pdf, "Fit"); ++ pdf_end_array(pdf); + pdf_end_obj(pdf); + } + } +@@ -2141,12 +2230,14 @@ static int pdf_print_info(PDF pdf, int l + trapped_given; + char *s = NULL; + int k, len = 0; +- k = pdf_new_dict(pdf, obj_type_info, 0, 3); /* keep Info readable unless explicitely forced */ ++ k = pdf_create_obj(pdf, obj_type_info, 0); ++ pdf_begin_obj(pdf, k, 3); /* keep Info readable unless explicitely forced */ + creator_given = false; + producer_given = false; + creationdate_given = false; + moddate_given = false; + trapped_given = false; ++ pdf_begin_dict(pdf); + if (pdf_info_toks != 0) { + s = tokenlist_to_cstring(pdf_info_toks, true, &len); + creator_given = substr_of_str("/Creator", s); +@@ -2157,36 +2248,41 @@ static int pdf_print_info(PDF pdf, int l + } + if (!producer_given) { + /* Print the Producer key */ +- pdf_puts(pdf, "/Producer (LuaTeX-"); ++ pdf_add_name(pdf, "Producer"); ++ pdf_puts(pdf, " (LuaTeX-"); + pdf_print_int(pdf, luatex_version / 100); + pdf_out(pdf, '.'); + pdf_print_int(pdf, luatex_version % 100); + pdf_out(pdf, '.'); + pdf_print(pdf, luatex_revision); +- pdf_puts(pdf, ")\n"); ++ pdf_out(pdf, ')'); + } + if (pdf_info_toks != null) { + if (len > 0) { ++ pdf_out(pdf, '\n'); + pdf_puts(pdf, s); +- pdf_print_nl(pdf); ++ pdf_out(pdf, '\n'); + xfree(s); + } + delete_token_ref(pdf_info_toks); + pdf_info_toks = null; + } + if (!creator_given) +- pdf_str_entry_ln(pdf, "Creator", "TeX"); ++ pdf_dict_add_string(pdf, "Creator", "TeX"); + if (!creationdate_given) { +- print_creation_date(pdf); ++ init_start_time(pdf); ++ pdf_dict_add_string(pdf, "CreationDate", pdf->start_time_str); + } + if (!moddate_given) { +- print_mod_date(pdf); ++ init_start_time(pdf); ++ pdf_dict_add_string(pdf, "ModDate", pdf->start_time_str); + } + if (!trapped_given) { +- pdf_puts(pdf, "/Trapped /False\n"); ++ pdf_dict_add_name(pdf, "Trapped", "False"); + } +- pdf_str_entry_ln(pdf, "PTEX.Fullbanner", pdftex_banner); ++ pdf_dict_add_string(pdf, "PTEX.Fullbanner", pdftex_banner); + pdf_end_dict(pdf); ++ pdf_end_obj(pdf); + return k; + } + +@@ -2294,16 +2390,15 @@ void finish_pdf_file(PDF pdf, int luatex + + /* Output article threads */ + if (pdf->head_tab[obj_type_thread] != 0) { +- threads = pdf_new_obj(pdf, obj_type_others, 0, 1); +- pdf_out(pdf, '['); ++ threads = pdf_create_obj(pdf, obj_type_others, 0); ++ pdf_begin_obj(pdf, threads, OBJSTM_ALWAYS); ++ pdf_begin_array(pdf); + k = pdf->head_tab[obj_type_thread]; + while (k != 0) { +- pdf_print_int(pdf, k); +- pdf_puts(pdf, " 0 R "); ++ pdf_add_ref(pdf, k); + k = obj_link(pdf, k); + } +- pdf_remove_last_space(pdf); +- pdf_puts(pdf, "]\n"); ++ pdf_end_array(pdf); + pdf_end_obj(pdf); + k = pdf->head_tab[obj_type_thread]; + while (k != 0) { +@@ -2315,34 +2410,38 @@ void finish_pdf_file(PDF pdf, int luatex + } + + /* Output the /Catalog object */ +- root = pdf_new_dict(pdf, obj_type_catalog, 0, 1); +- pdf_puts(pdf, "/Type /Catalog\n"); +- pdf_indirect_ln(pdf, "Pages", pdf->last_pages); ++ root = pdf_create_obj(pdf, obj_type_catalog, 0); ++ pdf_begin_obj(pdf, root, OBJSTM_ALWAYS); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_name(pdf, "Type", "Catalog"); ++ pdf_dict_add_ref(pdf, "Pages", pdf->last_pages); + if (threads != 0) +- pdf_indirect_ln(pdf, "Threads", threads); ++ pdf_dict_add_ref(pdf, "Threads", threads); + if (outlines != 0) +- pdf_indirect_ln(pdf, "Outlines", outlines); ++ pdf_dict_add_ref(pdf, "Outlines", outlines); + if (names_tree != 0) +- pdf_indirect_ln(pdf, "Names", names_tree); ++ pdf_dict_add_ref(pdf, "Names", names_tree); + if (pdf_catalog_toks != null) { +- pdf_print_toks_ln(pdf, pdf_catalog_toks); ++ pdf_print_toks(pdf, pdf_catalog_toks); + delete_token_ref(pdf_catalog_toks); + pdf_catalog_toks = null; + } + if (pdf_catalog_openaction != 0) +- pdf_indirect_ln(pdf, "OpenAction", pdf_catalog_openaction); ++ pdf_dict_add_ref(pdf, "OpenAction", pdf_catalog_openaction); + pdf_end_dict(pdf); ++ pdf_end_obj(pdf); + + /* last candidate for object stream */ + info = pdf_print_info(pdf, luatex_version, luatex_revision); /* final object for pdf->os_enable == false */ + + if (pdf->os_enable) { +- pdf_os_switch(pdf, true); ++ pdf_buffer_select(pdf, true); + pdf_os_write_objstream(pdf); + pdf_flush(pdf); +- pdf_os_switch(pdf, false); ++ pdf_buffer_select(pdf, false); + /* Output the cross-reference stream dictionary */ +- xref_stm = pdf_new_dict(pdf, obj_type_others, 0, 0); /* final object for pdf->os_enable == true */ ++ xref_stm = pdf_create_obj(pdf, obj_type_others, 0); ++ pdf_begin_obj(pdf, xref_stm, OBJSTM_NEVER); /* final object for pdf->os_enable == true */ + if ((obj_offset(pdf, pdf->obj_ptr) / 256) > 16777215) + xref_offset_width = 5; + else if (obj_offset(pdf, pdf->obj_ptr) > 16777215) +@@ -2353,30 +2452,37 @@ void finish_pdf_file(PDF pdf, int luatex + xref_offset_width = 2; + /* Build a linked list of free objects */ + build_free_object_list(pdf); +- pdf_puts(pdf, "/Type /XRef\n"); +- pdf_puts(pdf, "/Index [0 "); +- pdf_print_int(pdf, pdf->obj_ptr + 1); +- pdf_puts(pdf, "]\n"); +- pdf_int_entry_ln(pdf, "Size", pdf->obj_ptr + 1); +- pdf_puts(pdf, "/W [1 "); +- pdf_print_int(pdf, (int) xref_offset_width); +- pdf_puts(pdf, " 1]\n"); +- pdf_indirect_ln(pdf, "Root", root); +- pdf_indirect_ln(pdf, "Info", info); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_name(pdf, "Type", "XRef"); ++ pdf_add_name(pdf, "Index"); ++ pdf_begin_array(pdf); ++ pdf_add_int(pdf, 0); ++ pdf_add_int(pdf, pdf->obj_ptr + 1); ++ pdf_end_array(pdf); ++ pdf_dict_add_int(pdf, "Size", pdf->obj_ptr + 1); ++ pdf_add_name(pdf, "W"); ++ pdf_begin_array(pdf); ++ pdf_add_int(pdf, 1); ++ pdf_add_int(pdf, (int) xref_offset_width); ++ pdf_add_int(pdf, 1); ++ pdf_end_array(pdf); ++ pdf_dict_add_ref(pdf, "Root", root); ++ pdf_dict_add_ref(pdf, "Info", info); + if (pdf_trailer_toks != null) { +- pdf_print_toks_ln(pdf, pdf_trailer_toks); ++ pdf_print_toks(pdf, pdf_trailer_toks); + delete_token_ref(pdf_trailer_toks); + pdf_trailer_toks = null; + } + print_ID(pdf, pdf->file_name); +- pdf_print_nl(pdf); ++ pdf_dict_add_streaminfo(pdf); ++ pdf_end_dict(pdf); + pdf_begin_stream(pdf); + for (k = 0; k <= pdf->obj_ptr; k++) { + if (!is_obj_written(pdf, k)) { /* a free object */ + pdf_out(pdf, 0); + pdf_out_bytes(pdf, obj_link(pdf, k), xref_offset_width); + pdf_out(pdf, 255); +- } else if (obj_os_idx(pdf, k) == -1) { /* object not in object stream */ ++ } else if (obj_os_idx(pdf, k) == PDF_OS_MAX_OBJS) { /* object not in object stream */ + pdf_out(pdf, 1); + pdf_out_bytes(pdf, obj_offset(pdf, k), + xref_offset_width); +@@ -2389,6 +2495,7 @@ void finish_pdf_file(PDF pdf, int luatex + } + } + pdf_end_stream(pdf); ++ pdf_end_obj(pdf); + /* TODO: generate a debug version of the crossref */ + + pdf_flush(pdf); +@@ -2418,26 +2525,28 @@ void finish_pdf_file(PDF pdf, int luatex + /* Output the trailer */ + if (!pdf->os_enable) { + pdf_puts(pdf, "trailer\n"); +- pdf_puts(pdf, "<< "); +- pdf_int_entry_ln(pdf, "Size", pdf->obj_ptr + 1); +- pdf_indirect_ln(pdf, "Root", root); +- pdf_indirect_ln(pdf, "Info", info); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_int(pdf, "Size", pdf->obj_ptr + 1); ++ pdf_dict_add_ref(pdf, "Root", root); ++ pdf_dict_add_ref(pdf, "Info", info); + if (pdf_trailer_toks != null) { +- pdf_print_toks_ln(pdf, pdf_trailer_toks); ++ pdf_print_toks(pdf, pdf_trailer_toks); + delete_token_ref(pdf_trailer_toks); + pdf_trailer_toks = null; + } + print_ID(pdf, pdf->file_name); +- pdf_puts(pdf, " >>\n"); ++ pdf_end_dict(pdf); ++ pdf_out(pdf, '\n'); + } + pdf_puts(pdf, "startxref\n"); + if (pdf->os_enable) +- pdf_print_int_ln(pdf, obj_offset(pdf, xref_stm)); ++ pdf_add_int(pdf, (int) obj_offset(pdf, xref_stm)); + else +- pdf_print_int_ln(pdf, pdf_saved_offset(pdf)); +- pdf_puts(pdf, "%%EOF\n"); ++ pdf_add_int(pdf, (int) pdf->save_offset); ++ pdf_puts(pdf, "\n%%EOF\n"); + + pdf_flush(pdf); ++ + if (callback_id == 0) { + tprint_nl("Output written on "); + tprint(pdf->file_name); +@@ -2469,12 +2578,11 @@ void finish_pdf_file(PDF pdf, int luatex + "\nPDF statistics: %d PDF objects out of %d (max. %d)\n", + (int) pdf->obj_ptr, (int) pdf->obj_tab_size, + (int) sup_obj_tab_size); +- if (pdf->os_cntr > 0) { ++ if (pdf->os->ostm_ctr > 0) { + fprintf(log_file, + " %d compressed objects within %d object stream%s\n", +- (int) ((pdf->os_cntr - 1) * pdf_os_max_objs + +- pdf->os_idx + 1), (int) pdf->os_cntr, +- (pdf->os_cntr > 1 ? "s" : "")); ++ (int) pdf->os->o_ctr, (int) pdf->os->ostm_ctr, ++ (pdf->os->ostm_ctr > 1 ? "s" : "")); + } + fprintf(log_file, " %d named destinations out of %d (max. %d)\n", + (int) pdf->dest_names_ptr, (int) pdf->dest_names_size, +@@ -2499,7 +2607,8 @@ void scan_pdfcatalog(PDF pdf) + } else { + check_o_mode(pdf, "\\pdfcatalog", 1 << OMODE_PDF, true); + p = scan_action(pdf); +- pdf_catalog_openaction = pdf_new_obj(pdf, obj_type_others, 0, 1); ++ pdf_catalog_openaction = pdf_create_obj(pdf, obj_type_others, 0); ++ pdf_begin_obj(pdf, pdf_catalog_openaction, OBJSTM_ALWAYS); + write_action(pdf, p); + pdf_end_obj(pdf); + delete_action_ref(p); +--- texk/web2c/luatexdir/pdf/pdfglyph.w ++++ texk/web2c/luatexdir/pdf/pdfglyph.w 2011-10-13 07:39:33.000000000 +0000 +@@ -1,6 +1,6 @@ + % pdfglyph.w + +-% Copyright 2009-2010 Taco Hoekwater ++% Copyright 2009-2011 Taco Hoekwater + + % This file is part of LuaTeX. + +@@ -19,15 +19,12 @@ + + @ @c + static const char _svn_version[] = +- "$Id: pdfglyph.w 4131 2011-04-11 13:41:26Z taco $" +- "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdfglyph.w $"; ++ "$Id: pdfglyph.w 4329 2011-07-13 21:27:51Z hhenkel $" ++ "$URL: http://foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/pdf/pdfglyph.w $"; + + #include "ptexlib.h" +- +-@ @c + #include "pdf/pdfpage.h" + +-#define lround(a) (long) floor((a) + 0.5) + #define pdf2double(a) ((double) (a).m / ten_pow[(a).e]) + + @ eternal constants +@@ -58,32 +55,33 @@ void pdf_print_charwidth(PDF pdf, intern + @ @c + static void setup_fontparameters(PDF pdf, internal_font_number f) + { +- float slant, extend, expand; ++ float slant, extend, expand, scale = 1.0; + float u = 1.0; + pdfstructure *p = pdf->pstruct; + /* fix mantis bug \# 0000200 (acroread "feature") */ + if ((font_format(f) == opentype_format || + (font_format(f) == type1_format && font_encodingbytes(f) == 2)) + && font_units_per_em(f) > 0) +- u = (float) (font_units_per_em(f) / 1000.0); ++ u = font_units_per_em(f) / 1000.0; + pdf->f_cur = f; + p->f_pdf = pdf_set_font(pdf, f); +- p->fs.m = lround((float) font_size(f) / u / one_bp * ten_pow[p->fs.e]); +- slant = (float) font_slant(f) / (float) 1000.0; +- extend = (float) font_extend(f) / (float) 1000.0; +- expand = (float) 1.0 + (float) font_expand_ratio(f) / (float) 1000.0; ++ p->fs.m = lround(font_size(f) / u / one_bp * ten_pow[p->fs.e]); ++ slant = font_slant(f) / 1000.0; ++ extend = font_extend(f) / 1000.0; ++ expand = 1.0 + font_expand_ratio(f) / 1000.0; + p->tj_delta.e = p->cw.e - 1; /* "- 1" makes less corrections inside []TJ */ + /* no need to be more precise than TeX (1sp) */ + while (p->tj_delta.e > 0 + && (double) font_size(f) / ten_pow[p->tj_delta.e + e_tj] < 0.5) + p->tj_delta.e--; /* happens for very tiny fonts */ + assert(p->cw.e >= p->tj_delta.e); /* else we would need, e. g., |ten_pow[-1]| */ +- p->tm[0].m = lround(expand * extend * (float) ten_pow[p->tm[0].e]); +- p->tm[2].m = lround(slant * (float) ten_pow[p->tm[2].e]); ++ p->tm[0].m = lround(scale * expand * extend * ten_pow[p->tm[0].e]); ++ p->tm[2].m = lround(slant * ten_pow[p->tm[2].e]); ++ p->tm[3].m = lround(scale * ten_pow[p->tm[3].e]); + p->k2 = + ten_pow[e_tj + +- p->cw.e] / (ten_pow[p->pdf.h.e] * pdf2double(p->fs) * +- pdf2double(p->tm[0])); ++ p->cw.e] * scale / (ten_pow[p->pdf.h.e] * pdf2double(p->fs) * ++ pdf2double(p->tm[0])); + } + + @ @c +@@ -92,18 +90,13 @@ static void set_font(PDF pdf) + pdfstructure *p = pdf->pstruct; + pdf_printf(pdf, "/F%d", (int) p->f_pdf); + pdf_print_resname_prefix(pdf); +- pdf_printf(pdf, " "); ++ pdf_out(pdf, ' '); + print_pdffloat(pdf, p->fs); +- pdf_printf(pdf, " Tf "); ++ pdf_puts(pdf, " Tf "); + p->f_pdf_cur = p->f_pdf; + p->fs_cur.m = p->fs.m; +-} +- +-@ @c +-static void print_tm(PDF pdf, pdffloat * tm) +-{ +- print_pdf_matrix(pdf, tm); +- pdf_printf(pdf, " Tm "); ++ p->need_tf = false; ++ p->need_tm = true; /* always follow Tf by Tm */ + } + + @ @c +@@ -113,12 +106,40 @@ static void set_textmatrix(PDF pdf, scal + pdfstructure *p = pdf->pstruct; + assert(is_textmode(p)); + move = calc_pdfpos(p, pos); +- if (p->need_tm == 1 || move) { +- print_tm(pdf, p->tm); ++ if (p->need_tm || move) { ++ print_pdf_matrix(pdf, p->tm); ++ pdf_puts(pdf, " Tm "); + p->pdf.h.m = p->pdf_bt_pos.h.m + p->tm[4].m; /* Tm replaces */ + p->pdf.v.m = p->pdf_bt_pos.v.m + p->tm[5].m; +- p->need_tm = 0; ++ p->need_tm = false; + } ++ p->tm0_cur.m = p->tm[0].m; ++} ++ ++@ Print out a character to PDF buffer; the character will be printed in octal ++form in the following cases: chars <= 32, backslash (92), left parenthesis ++(40), and right parenthesis (41). ++@c ++static void pdf_print_char(PDF pdf, int c) ++{ ++ if (c > 255) ++ return; ++ /* pdf_print_escaped(c) */ ++ if (c <= 32 || c == '\\' || c == '(' || c == ')' || c > 127) { ++ pdf_room(pdf, 4); ++ pdf_quick_out(pdf, '\\'); ++ pdf_quick_out(pdf, (unsigned char) ('0' + ((c >> 6) & 0x3))); ++ pdf_quick_out(pdf, (unsigned char) ('0' + ((c >> 3) & 0x7))); ++ pdf_quick_out(pdf, (unsigned char) ('0' + (c & 0x7))); ++ } else ++ pdf_out(pdf, c); ++} ++ ++static void pdf_print_wide_char(PDF pdf, int c) ++{ ++ char hex[5]; ++ snprintf(hex, 5, "%04X", c); ++ pdf_out_block(pdf, (const char *) hex, 4); + } + + @ @c +@@ -127,10 +148,10 @@ static void begin_charmode(PDF pdf, inte + assert(is_chararraymode(p)); + if (font_encodingbytes(f) == 2) { + p->ishex = 1; +- pdf_printf(pdf, "<"); ++ pdf_out(pdf, '<'); + } else { + p->ishex = 0; +- pdf_printf(pdf, "("); ++ pdf_out(pdf, '('); + } + p->mode = PMODE_CHAR; + } +@@ -142,9 +163,9 @@ void end_charmode(PDF pdf) + assert(is_charmode(p)); + if (p->ishex == 1) { + p->ishex = 0; +- pdf_printf(pdf, ">"); ++ pdf_out(pdf, '>'); + } else { +- pdf_printf(pdf, ")"); ++ pdf_out(pdf, ')'); + } + p->mode = PMODE_CHARARRAY; + } +@@ -156,7 +177,7 @@ static void begin_chararray(PDF pdf) + assert(is_textmode(p)); + p->pdf_tj_pos = p->pdf; + p->cw.m = 0; +- pdf_printf(pdf, "["); ++ pdf_out(pdf, '['); + p->mode = PMODE_CHARARRAY; + } + +@@ -165,7 +186,7 @@ void end_chararray(PDF pdf) + { + pdfstructure *p = pdf->pstruct; + assert(is_chararraymode(p)); +- pdf_printf(pdf, "]TJ\n"); ++ pdf_puts(pdf, "]TJ\n"); + p->pdf = p->pdf_tj_pos; + p->mode = PMODE_TEXT; + } +@@ -178,29 +199,34 @@ void pdf_place_glyph(PDF pdf, internal_f + scaledpos pos = pdf->posstruct->pos; + if (!char_exists(f, c)) + return; +- if (f != pdf->f_cur || is_textmode(p) || is_pagemode(p)) { ++ /* ensure to be within BT...ET */ ++ if (is_pagemode(p)) { + pdf_goto_textmode(pdf); +- if (f != pdf->f_cur) +- setup_fontparameters(pdf, f); +- if (p->f_pdf != p->f_pdf_cur || p->fs.m != p->fs_cur.m) { ++ p->need_tf = true; ++ } ++ /* all font setup */ ++ if (f != pdf->f_cur || p->need_tf) { ++ setup_fontparameters(pdf, f); ++ if (p->need_tf || p->f_pdf != p->f_pdf_cur || p->fs.m != p->fs_cur.m) { ++ pdf_goto_textmode(pdf); + set_font(pdf); +- p->need_tm = 1; /* force Tm setting */ ++ } else if (p->tm0_cur.m != p->tm[0].m) { ++ /* catch in-line HZ expand change due to efcode */ ++ p->need_tm = true; + } +- set_textmatrix(pdf, pos); +- begin_chararray(pdf); + } +- assert(is_charmode(p) || is_chararraymode(p)); +- move = calc_pdfpos(p, pos); +- if (move) { +- if ((p->wmode == WMODE_H +- && (p->pdf_bt_pos.v.m + p->tm[5].m) != p->pdf.v.m) ++ /* all movements */ ++ move = calc_pdfpos(p, pos); /* within text or chararray or char mode */ ++ if (move || p->need_tm) { ++ if (p->need_tm || (p->wmode == WMODE_H ++ && (p->pdf_bt_pos.v.m + p->tm[5].m) != p->pdf.v.m) + || (p->wmode == WMODE_V + && (p->pdf_bt_pos.h.m + p->tm[4].m) != p->pdf.h.m) + || abs(p->tj_delta.m) >= 1000000) { + pdf_goto_textmode(pdf); + set_textmatrix(pdf, pos); + begin_chararray(pdf); +- move = calc_pdfpos(p, pos); ++ move = calc_pdfpos(p, pos); /* for fine adjustment */ + } + if (move) { + assert((p->wmode == WMODE_H +@@ -214,6 +240,8 @@ void pdf_place_glyph(PDF pdf, internal_f + p->cw.m -= p->tj_delta.m * ten_pow[p->cw.e - p->tj_delta.e]; + } + } ++ /* glyph output */ ++ assert(is_chararraymode(p) || is_charmode(p)); + if (is_chararraymode(p)) + begin_charmode(pdf, f, p); + pdf_mark_char(f, c); +--- texk/web2c/luatexdir/pdf/pdfimage.w ++++ texk/web2c/luatexdir/pdf/pdfimage.w 2011-10-13 07:39:33.000000000 +0000 +@@ -130,12 +130,12 @@ void place_img(PDF pdf, image_dict * idi + cm[5] = p->cm[5]; + if (pdf->img_page_group_val == 0) + pdf->img_page_group_val = img_group_ref(idict); /* added from web for 1.40.8 */ +- pdf_printf(pdf, "q\n"); ++ pdf_puts(pdf, "q\n"); + pdf_print_cm(pdf, cm); +- pdf_printf(pdf, "/Im"); ++ pdf_puts(pdf, "/Im"); + pdf_print_int(pdf, img_index(idict)); + pdf_print_resname_prefix(pdf); +- pdf_printf(pdf, " Do\nQ\n"); ++ pdf_puts(pdf, " Do\nQ\n"); + addto_page_resources(pdf, obj_type_ximage, img_objnum(idict)); + if (img_state(idict) < DICT_OUTIMG) + img_state(idict) = DICT_OUTIMG; +--- texk/web2c/luatexdir/pdf/pdflink.w ++++ texk/web2c/luatexdir/pdf/pdflink.w 2011-10-13 07:39:33.000000000 +0000 +@@ -1,6 +1,6 @@ + % pdflink.w + +-% Copyright 2009-2010 Taco Hoekwater ++% Copyright 2009-2011 Taco Hoekwater + + % This file is part of LuaTeX. + +@@ -15,12 +15,12 @@ + % License for more details. + + % You should have received a copy of the GNU General Public License along +-% with LuaTeX; if not, see . ++% with LuaTeX; if not, see . + + @ @c + static const char _svn_version[] = +- "$Id: pdflink.w 3891 2010-09-14 23:02:24Z hhenkel $" +- "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdflink.w $"; ++ "$Id: pdflink.w 4309 2011-06-20 17:53:56Z hhenkel $" ++ "$URL: http://foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/pdf/pdflink.w $"; + + #include "ptexlib.h" + +@@ -61,7 +61,7 @@ void do_link(PDF pdf, halfword p, halfwo + pdf_error("ext4", "link annotations cannot be inside an XForm"); + assert(type(parent_box) == hlist_node); + if (is_obj_scheduled(pdf, pdf_link_objnum(p))) +- pdf_link_objnum(p) = pdf_new_objnum(pdf); ++ pdf_link_objnum(p) = pdf_create_obj(pdf, obj_type_others, 0); + push_link_level(pdf, p); + alt_rule.wd = width(p); + alt_rule.ht = height(p); +@@ -93,9 +93,9 @@ void end_link(PDF pdf, halfword p) + if (global_shipping_mode == SHIPPING_PAGE && matrixused()) { + matrixrecalculate(pos.h + pdf_link_margin); + pdf_ann_left(q) = getllx() - pdf_link_margin; +- pdf_ann_top(q) = cur_page_size.v - getury() - pdf_link_margin; ++ pdf_ann_top(q) = pdf->page_size.v - getury() - pdf_link_margin; + pdf_ann_right(q) = geturx() + pdf_link_margin; +- pdf_ann_bottom(q) = cur_page_size.v - getlly() + pdf_link_margin; ++ pdf_ann_bottom(q) = pdf->page_size.v - getlly() + pdf_link_margin; + } else { + switch (pdf->posstruct->dir) { + case dir_TLT: +@@ -114,7 +114,6 @@ void end_link(PDF pdf, halfword p) + pop_link_level(pdf); + } + +- + @ For ``running'' annotations we must append a new node when the end of + annotation is in other box than its start. The new created node is identical to + corresponding whatsit node representing the start of annotation, but its +@@ -122,7 +121,7 @@ corresponding whatsit node representing + node, in order to use |flush_node_list| to do the job. + + +-@ Append a new pdf annot to |pdf_link_list| ++@ Append a new pdf annot to |pdf_link_list|. + + @c + void append_link(PDF pdf, halfword parent_box, scaledpos cur, small_number i) +@@ -150,7 +149,7 @@ void scan_startlink(PDF pdf) + halfword r; + if (abs(cur_list.mode_field) == vmode) + pdf_error("ext1", "\\pdfstartlink cannot be used in vertical mode"); +- k = pdf_new_objnum(pdf); ++ k = pdf_create_obj(pdf, obj_type_others, 0); + new_annot_whatsit(pdf_start_link_node); + set_pdf_link_attr(cur_list.tail_field, null); + if (scan_keyword("attr")) { +--- texk/web2c/luatexdir/pdf/pdfliteral.w ++++ texk/web2c/luatexdir/pdf/pdfliteral.w 2011-10-13 07:39:33.000000000 +0000 +@@ -70,7 +70,7 @@ void pdf_out_literal(PDF pdf, halfword p + break; + case direct_always: + pdf_end_string_nl(pdf); +- ps->need_tm = 1; ++ ps->need_tm = true; + break; + default: + confusion("literal1"); +@@ -136,7 +136,7 @@ void pdf_literal(PDF pdf, str_number s, + break; + case direct_always: + pdf_end_string_nl(pdf); +- p->need_tm = 1; ++ p->need_tm = true; + break; + default: + confusion("literal1"); +@@ -150,5 +150,5 @@ void pdf_literal(PDF pdf, str_number s, + assert(s < 256); + pdf_out(pdf, s); + } +- pdf_print_nl(pdf); ++ pdf_out(pdf, '\n'); + } +--- texk/web2c/luatexdir/pdf/pdfluaapi.w ++++ texk/web2c/luatexdir/pdf/pdfluaapi.w 2011-10-13 07:39:33.000000000 +0000 +@@ -79,9 +79,9 @@ void pdflua_end_page(PDF pdf, int annots + lua_newtable(Luas); /* t f t ... */ + lua_pushnumber(Luas, total_pages); /* i t f t ... */ + lua_setfield(Luas, -2, "pagenum"); /* t f t ... */ +- lua_pushnumber(Luas, cur_page_size.h); /* i t f t ... */ ++ lua_pushnumber(Luas, pdf->page_size.h); /* i t f t ... */ + lua_setfield(Luas, -2, "hsize"); /* t f t ... */ +- lua_pushnumber(Luas, cur_page_size.v); /* i t f t ... */ ++ lua_pushnumber(Luas, pdf->page_size.v); /* i t f t ... */ + lua_setfield(Luas, -2, "vsize"); /* t f t ... */ + if (annots != 0) { + lua_pushnumber(Luas, annots); /* i t f t ... */ +--- texk/web2c/luatexdir/pdf/pdfobj.h ++++ texk/web2c/luatexdir/pdf/pdfobj.h 2011-10-13 07:39:33.000000000 +0000 +@@ -1,6 +1,6 @@ + /* pdfobj.h + +- Copyright 2009 Taco Hoekwater ++ Copyright 2009-2011 Taco Hoekwater + + This file is part of LuaTeX. + +@@ -32,13 +32,13 @@ + # define obj_obj_stream_attr(pdf, A) pdf->mem[obj_data_ptr((pdf), (A)) + 1] /* additional attributes into stream dict */ + # define obj_obj_flags(pdf, A) pdf->mem[obj_data_ptr((pdf), (A)) + 2] /* stream/file flags */ + # define obj_obj_pdfcompresslevel(pdf, A) pdf->mem[obj_data_ptr((pdf), (A)) + 3] /* overrides \pdfcompresslevel */ +-# define obj_obj_pdfoslevel(pdf, A) pdf->mem[obj_data_ptr((pdf), (A)) + 4] /* for object stream compression */ ++# define obj_obj_objstm_threshold(pdf, A) pdf->mem[obj_data_ptr((pdf), (A)) + 4] /* for object stream compression */ + + /* define set_obj_obj_data(pdf, A, B) obj_obj_data((pdf), (A)) = (B) */ + /* define set_obj_obj_flags(pdf, A, B) obj_obj_flags((pdf), (A)) = (B) */ + /* define set_obj_obj_stream_attr(pdf, A, B) obj_obj_stream_attr((pdf), (A)) = (B) */ + /* define set_obj_obj_pdfcompresslevel(pdf, A, B) obj_obj_pdfcompresslevel((pdf), (A)) = (B) */ +-/* define set_obj_obj_pdfoslevel(pdf, A, B) obj_obj_pdfoslevel((pdf), (A)) = (B) */ ++/* define set_obj_obj_objstm_threshold(pdf, A, B) obj_obj_objstm_threshold((pdf), (A)) = (B) */ + + /**********************************************************************/ + +--- texk/web2c/luatexdir/pdf/pdfobj.w ++++ texk/web2c/luatexdir/pdf/pdfobj.w 2011-10-13 07:39:33.000000000 +0000 +@@ -1,6 +1,6 @@ + % pdfobj.w + +-% Copyright 2009-2010 Taco Hoekwater ++% Copyright 2009-2011 Taco Hoekwater + + % This file is part of LuaTeX. + +@@ -38,16 +38,17 @@ void pdf_write_obj(PDF pdf, int k) + const_lstring st; + size_t li; /* index into |data.s| */ + int saved_compress_level = pdf->compress_level; +- int os_level = 1; /* gives compressed objects for \.{\\pdfobjcompresslevel} $>$ 0 */ ++ int os_threshold = OBJSTM_ALWAYS; /* gives compressed objects for \.{\\pdfobjcompresslevel} >= |OBJSTM_ALWAYS| */ + int l = 0; /* possibly a lua registry reference */ + int ll = 0; + data.s = NULL; + if (obj_obj_pdfcompresslevel(pdf, k) > -1) /* -1 = "unset" */ + pdf->compress_level = obj_obj_pdfcompresslevel(pdf, k); +- if (obj_obj_pdfoslevel(pdf, k) > -1) /* -1 = "unset" */ +- os_level = obj_obj_pdfoslevel(pdf, k); ++ if (obj_obj_objstm_threshold(pdf, k) != OBJSTM_UNSET) ++ os_threshold = obj_obj_objstm_threshold(pdf, k); + if (obj_obj_is_stream(pdf, k)) { +- pdf_begin_dict(pdf, k, 0); ++ pdf_begin_obj(pdf, k, OBJSTM_NEVER); ++ pdf_begin_dict(pdf); + l = obj_obj_stream_attr(pdf, k); + if (l != LUA_NOREF) { + lua_rawgeti(Luas, LUA_REGISTRYINDEX, l); +@@ -60,15 +61,17 @@ void pdf_write_obj(PDF pdf, int k) + luaL_unref(Luas, LUA_REGISTRYINDEX, l); + obj_obj_stream_attr(pdf, k) = LUA_NOREF; + } ++ pdf_dict_add_streaminfo(pdf); ++ pdf_end_dict(pdf); + pdf_begin_stream(pdf); + } else +- pdf_begin_obj(pdf, k, os_level); ++ pdf_begin_obj(pdf, k, os_threshold); + l = obj_obj_data(pdf, k); + lua_rawgeti(Luas, LUA_REGISTRYINDEX, l); + assert(lua_isstring(Luas, -1)); + st.s = lua_tolstring(Luas, -1, &li); + st.l = li; +- lua_pop(Luas,1); ++ lua_pop(Luas, 1); + if (obj_obj_is_file(pdf, k)) { + boolean res = false; /* callback status value */ + const char *fnam = NULL; /* callback found filename */ +@@ -110,9 +113,10 @@ void pdf_write_obj(PDF pdf, int k) + if (!obj_obj_is_stream(pdf, k) && st.s[st.l - 1] != '\n') + pdf_out(pdf, '\n'); + } +- if (obj_obj_is_stream(pdf, k)) ++ if (obj_obj_is_stream(pdf, k)) { + pdf_end_stream(pdf); +- else ++ pdf_end_obj(pdf); ++ } else + pdf_end_obj(pdf); + luaL_unref(Luas, LUA_REGISTRYINDEX, l); + obj_obj_data(pdf, k) = LUA_NOREF; +@@ -127,7 +131,7 @@ void init_obj_obj(PDF pdf, int k) + unset_obj_obj_is_stream(pdf, k); + unset_obj_obj_is_file(pdf, k); + obj_obj_pdfcompresslevel(pdf, k) = -1; /* unset */ +- obj_obj_pdfoslevel(pdf, k) = -1; /* unset */ ++ obj_obj_objstm_threshold(pdf, k) = OBJSTM_UNSET; /* unset */ + } + + @ The \.{\\pdfobj} primitive is used to create a ``raw'' object in the PDF +@@ -148,7 +152,7 @@ void scan_obj(PDF pdf) + if (cur_cmd != spacer_cmd) + back_input(); + pdf->obj_count++; +- k = pdf_create_obj(pdf, obj_type_obj, pdf->obj_ptr + 1); ++ k = pdf_create_obj(pdf, obj_type_obj, 0); + } else { + if (scan_keyword("useobjnum")) { + scan_int(); +@@ -158,13 +162,13 @@ void scan_obj(PDF pdf) + luaL_error(Luas, "object in use"); + } else { + pdf->obj_count++; +- k = pdf_create_obj(pdf, obj_type_obj, pdf->obj_ptr + 1); ++ k = pdf_create_obj(pdf, obj_type_obj, 0); + } + obj_data_ptr(pdf, k) = pdf_get_mem(pdf, pdfmem_obj_size); + init_obj_obj(pdf, k); + if (scan_keyword("uncompressed")) { + obj_obj_pdfcompresslevel(pdf, k) = 0; /* \pdfcompresslevel = 0 */ +- obj_obj_pdfoslevel(pdf, k) = 0; ++ obj_obj_objstm_threshold(pdf, k) = OBJSTM_NEVER; + } + if (scan_keyword("stream")) { + set_obj_obj_is_stream(pdf, k); +--- texk/web2c/luatexdir/pdf/pdfoutline.w ++++ texk/web2c/luatexdir/pdf/pdfoutline.w 2011-10-13 07:39:33.000000000 +0000 +@@ -1,6 +1,6 @@ + % pdfoutline.w +-% +-% Copyright 2009-2010 Taco Hoekwater ++ ++% Copyright 2009-2011 Taco Hoekwater + + % This file is part of LuaTeX. + +@@ -82,7 +82,7 @@ static int open_subentries(PDF pdf, half + return k; + } + +-@ return number of outline entries in the same level with |p| ++@ return number of outline entries in the same level with |p| + + @c + static int outline_list_count(PDF pdf, pointer p) +@@ -115,7 +115,8 @@ void scan_pdfoutline(PDF pdf) + } + scan_pdf_ext_toks(); + q = def_ref; +- j = pdf_new_obj(pdf, obj_type_others, 0, 1); ++ j = pdf_create_obj(pdf, obj_type_others, 0); ++ pdf_begin_obj(pdf, j, OBJSTM_ALWAYS); + write_action(pdf, p); + pdf_end_obj(pdf); + delete_action_ref(p); +@@ -123,7 +124,8 @@ void scan_pdfoutline(PDF pdf) + set_obj_outline_ptr(pdf, k, pdf_get_mem(pdf, pdfmem_outline_size)); + set_obj_outline_action_objnum(pdf, k, j); + set_obj_outline_count(pdf, k, i); +- l = pdf_new_obj(pdf, obj_type_others, 0, 1); ++ l = pdf_create_obj(pdf, obj_type_others, 0); ++ pdf_begin_obj(pdf, l, OBJSTM_ALWAYS); + { + char *s = tokenlist_to_cstring(q, true, NULL); + pdf_print_str_ln(pdf, s); +@@ -172,7 +174,7 @@ void scan_pdfoutline(PDF pdf) + } + + @ In the end we must flush PDF objects that cannot be written out +-immediately after shipping out pages. ++immediately after shipping out pages. + + @c + int print_outlines(PDF pdf) +@@ -180,7 +182,7 @@ int print_outlines(PDF pdf) + int k, l, a; + int outlines; + if (pdf->first_outline != 0) { +- outlines = pdf_new_dict(pdf, obj_type_others, 0, 1); ++ outlines = pdf_create_obj(pdf, obj_type_others, 0); + l = pdf->first_outline; + k = 0; + do { +@@ -191,11 +193,14 @@ int print_outlines(PDF pdf) + set_obj_outline_parent(pdf, l, pdf->obj_ptr); + l = obj_outline_next(pdf, l); + } while (l != 0); +- pdf_printf(pdf, "/Type /Outlines\n"); +- pdf_indirect_ln(pdf, "First", pdf->first_outline); +- pdf_indirect_ln(pdf, "Last", pdf->last_outline); +- pdf_int_entry_ln(pdf, "Count", k); ++ pdf_begin_obj(pdf, outlines, OBJSTM_ALWAYS); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_name(pdf, "Type", "Outlines"); ++ pdf_dict_add_ref(pdf, "First", pdf->first_outline); ++ pdf_dict_add_ref(pdf, "Last", pdf->last_outline); ++ pdf_dict_add_int(pdf, "Count", k); + pdf_end_dict(pdf); ++ pdf_end_obj(pdf); + /* Output PDF outline entries */ + + k = pdf->head_tab[obj_type_outline]; +@@ -206,27 +211,31 @@ int print_outlines(PDF pdf) + if (obj_outline_next(pdf, k) == 0) + pdf->last_outline = k; + } +- pdf_begin_dict(pdf, k, 1); +- pdf_indirect_ln(pdf, "Title", obj_outline_title(pdf, k)); +- pdf_indirect_ln(pdf, "A", obj_outline_action_objnum(pdf, k)); ++ pdf_begin_obj(pdf, k, OBJSTM_ALWAYS); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_ref(pdf, "Title", obj_outline_title(pdf, k)); ++ pdf_dict_add_ref(pdf, "A", obj_outline_action_objnum(pdf, k)); + if (obj_outline_parent(pdf, k) != 0) +- pdf_indirect_ln(pdf, "Parent", obj_outline_parent(pdf, k)); ++ pdf_dict_add_ref(pdf, "Parent", obj_outline_parent(pdf, k)); + if (obj_outline_prev(pdf, k) != 0) +- pdf_indirect_ln(pdf, "Prev", obj_outline_prev(pdf, k)); ++ pdf_dict_add_ref(pdf, "Prev", obj_outline_prev(pdf, k)); + if (obj_outline_next(pdf, k) != 0) +- pdf_indirect_ln(pdf, "Next", obj_outline_next(pdf, k)); ++ pdf_dict_add_ref(pdf, "Next", obj_outline_next(pdf, k)); + if (obj_outline_first(pdf, k) != 0) +- pdf_indirect_ln(pdf, "First", obj_outline_first(pdf, k)); ++ pdf_dict_add_ref(pdf, "First", obj_outline_first(pdf, k)); + if (obj_outline_last(pdf, k) != 0) +- pdf_indirect_ln(pdf, "Last", obj_outline_last(pdf, k)); ++ pdf_dict_add_ref(pdf, "Last", obj_outline_last(pdf, k)); + if (obj_outline_count(pdf, k) != 0) +- pdf_int_entry_ln(pdf, "Count", obj_outline_count(pdf, k)); ++ pdf_dict_add_int(pdf, "Count", obj_outline_count(pdf, k)); + if (obj_outline_attr(pdf, k) != 0) { +- pdf_print_toks_ln(pdf, obj_outline_attr(pdf, k)); ++ pdf_out(pdf, '\n'); ++ pdf_print_toks(pdf, obj_outline_attr(pdf, k)); ++ pdf_out(pdf, '\n'); + delete_token_ref(obj_outline_attr(pdf, k)); + set_obj_outline_attr(pdf, k, null); + } + pdf_end_dict(pdf); ++ pdf_end_obj(pdf); + k = obj_link(pdf, k); + } + +--- texk/web2c/luatexdir/pdf/pdfpage.h ++++ texk/web2c/luatexdir/pdf/pdfpage.h 2011-10-13 07:39:33.000000000 +0000 +@@ -47,7 +47,6 @@ void init_pdf_pagecalculations(PDF pdf); + void pdf_print_cm(PDF pdf, pdffloat * cm); + void pdf_set_pos(PDF pdf, scaledpos pos); + void pdf_set_pos_temp(PDF pdf, scaledpos pos); +-void print_pdffloat(PDF pdf, pdffloat f); + void print_pdf_matrix(PDF pdf, pdffloat * tm); + + #endif +--- texk/web2c/luatexdir/pdf/pdfpage.w ++++ texk/web2c/luatexdir/pdf/pdfpage.w 2011-10-13 07:39:33.000000000 +0000 +@@ -1,6 +1,6 @@ + % pdfpage.w + +-% Copyright 2006-2010 Taco Hoekwater ++% Copyright 2006-2011 Taco Hoekwater + + % This file is part of LuaTeX. + +@@ -29,8 +29,6 @@ static const char _svn_version[] = + #include + #include + +-#define lround(a) (long) floor((a) + 0.5) +- + @ eternal constants + @c + #define one_bp ((double) 65536 * (double) 72.27 / 72) /* number of sp per 1bp */ +@@ -56,10 +54,11 @@ void init_pdf_pagecalculations(PDF pdf) + setpdffloat(p->cm[4], 0, decimal_digits); /* horizontal movement on page */ + setpdffloat(p->cm[5], 0, decimal_digits); /* vertical movement on page */ + /* for placement inside BT...ET */ ++ setpdffloat(p->tm0_cur, 0, 6); /* mantissa holds HZ expand * ExtendFont */ + setpdffloat(p->tm[0], ten_pow[6], 6); /* mantissa holds HZ expand * ExtendFont */ + setpdffloat(p->tm[1], 0, 0); + setpdffloat(p->tm[2], 0, 3); /* mantissa holds SlantFont, 0 = default */ +- setpdffloat(p->tm[3], 1, 0); ++ setpdffloat(p->tm[3], ten_pow[6], 6); + setpdffloat(p->tm[4], 0, decimal_digits); /* mantissa holds delta from |pdf_bt_pos.h| */ + setpdffloat(p->tm[5], 0, decimal_digits); /* mantissa holds delta from |pdf_bt_pos.v| */ + /* */ +@@ -68,7 +67,8 @@ void init_pdf_pagecalculations(PDF pdf) + p->wmode = WMODE_H; + p->mode = PMODE_PAGE; + p->ishex = 0; +- p->need_tm = 0; ++ p->need_tf = false; ++ p->need_tm = false; + p->k1 = ten_pow[p->pdf.h.e] / one_bp; + } + +@@ -158,38 +158,12 @@ boolean calc_pdfpos(pdfstructure * p, sc + } + + @ @c +-void print_pdffloat(PDF pdf, pdffloat f) +-{ +- char a[24]; +- int e = f.e, i, j; +- long l, m = f.m; +- if (m < 0) { +- pdf_puts(pdf, "-"); +- m *= -1; +- } +- l = m / ten_pow[e]; +- pdf_print_int(pdf, l); +- l = m % ten_pow[e]; +- if (l != 0) { +- pdf_puts(pdf, "."); +- j = snprintf(a, 23, "%ld", l + ten_pow[e]); +- assert(j < 23); +- for (i = e; i > 0; i--) { +- if (a[i] != '0') +- break; +- a[i] = '\0'; +- } +- pdf_puts(pdf, (a + 1)); +- } +-} +- +-@ @c + void print_pdf_matrix(PDF pdf, pdffloat * tm) + { + int i; + for (i = 0; i < 5; i++) { + print_pdffloat(pdf, tm[i]); +- pdf_puts(pdf, " "); ++ pdf_out(pdf, ' '); + } + print_pdffloat(pdf, tm[i]); + } +@@ -234,8 +208,7 @@ static void begin_text(PDF pdf) + p->pdf_bt_pos = p->pdf; + pdf_puts(pdf, "BT\n"); + p->mode = PMODE_TEXT; +- p->f_pdf_cur = null_font; /* forces Tf operator */ +- p->fs_cur.m = 0; ++ p->need_tf = true; + } + + static void end_text(PDF pdf) +@@ -268,14 +241,14 @@ void pdf_goto_pagemode(PDF pdf) + end_chararray(pdf); + if (is_textmode(p)) + end_text(pdf); +- assert(is_pagemode(p)); + } ++ assert(is_pagemode(p)); + } + + void pdf_goto_textmode(PDF pdf) + { + pdfstructure *p = pdf->pstruct; +- scaledpos origin = { ++ const scaledpos origin = { + 0, 0 + }; + if (!is_textmode(p)) { +@@ -288,6 +261,6 @@ void pdf_goto_textmode(PDF pdf) + if (is_chararraymode(p)) + end_chararray(pdf); + } +- assert(is_textmode(p)); + } ++ assert(is_textmode(p)); + } +--- texk/web2c/luatexdir/pdf/pdfpagetree.h ++++ texk/web2c/luatexdir/pdf/pdfpagetree.h 2011-10-13 07:39:33.000000000 +0000 +@@ -0,0 +1,29 @@ ++/* pdfpagetree.h ++ ++ Copyright 2009--2011 Taco Hoekwater ++ ++ This file is part of LuaTeX. ++ ++ LuaTeX is free software; you can redistribute it and/or modify it under ++ the terms of the GNU General Public License as published by the Free ++ Software Foundation; either version 2 of the License, or (at your ++ option) any later version. ++ ++ LuaTeX is distributed in the hope that it will be useful, but WITHOUT ++ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public ++ License for more details. ++ ++ You should have received a copy of the GNU General Public License along ++ with LuaTeX; if not, see . */ ++ ++/* $Id: pdfpagetree.h 4214 2011-04-27 21:53:38Z hhenkel $ */ ++ ++#ifndef PAGETREE_H ++# define PAGETREE_H ++ ++int output_pages_tree(PDF); ++int pdf_do_page_divert(PDF, int, int); ++void pdf_do_page_undivert(int, int); ++ ++#endif /* PAGETREE_H */ +--- texk/web2c/luatexdir/pdf/pdfpagetree.w ++++ texk/web2c/luatexdir/pdf/pdfpagetree.w 2011-10-13 07:39:33.000000000 +0000 +@@ -0,0 +1,272 @@ ++% pdfpagetree.w ++ ++% Copyright 2006-2011 Taco Hoekwater ++ ++% This file is part of LuaTeX. ++ ++% LuaTeX is free software; you can redistribute it and/or modify it under ++% the terms of the GNU General Public License as published by the Free ++% Software Foundation; either version 2 of the License, or (at your ++% option) any later version. ++ ++% LuaTeX is distributed in the hope that it will be useful, but WITHOUT ++% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++% FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public ++% License for more details. ++ ++% You should have received a copy of the GNU General Public License along ++% with LuaTeX; if not, see . ++ ++@ @c ++#include "ptexlib.h" ++ ++static const char _svn_version[] = ++ "$Id: pdfpagetree.w 4217 2011-04-27 22:50:59Z hhenkel $ " ++ "$URL: http://foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/pdf/pdfpagetree.w $"; ++ ++@* Page diversions. ++ ++@ @c ++#ifdef DEBUG ++# define PAGES_TREE_KIDSMAX 3 ++#else ++# define PAGES_TREE_KIDSMAX 10 ++#endif ++ ++static struct avl_table *divert_list_tree = NULL; ++ ++typedef struct pages_entry_ { ++ int objnum; /* object number of this /Pages object */ ++ int number_of_pages; /* total number of all pages below */ ++ int number_of_kids; /* number of direct kid objects */ ++ int kids[PAGES_TREE_KIDSMAX]; /* array of kid object numbers */ ++ struct pages_entry_ *next; ++} pages_entry; ++ ++typedef struct divert_list_entry_ { ++ int divnum; ++ pages_entry *first; ++ pages_entry *last; ++} divert_list_entry; ++ ++static int comp_divert_list_entry(const void *pa, const void *pb, void *p) ++{ ++ (void) p; ++ if (((const divert_list_entry *) pa)->divnum > ++ ((const divert_list_entry *) pb)->divnum) ++ return 1; ++ if (((const divert_list_entry *) pa)->divnum < ++ ((const divert_list_entry *) pb)->divnum) ++ return -1; ++ return 0; ++} ++ ++@ @c ++static pages_entry *new_pages_entry(PDF pdf) ++{ ++ pages_entry *p; ++ int i; ++ p = xtalloc(1, pages_entry); ++ p->number_of_pages = p->number_of_kids = 0; ++ for (i = 0; i < PAGES_TREE_KIDSMAX; i++) ++ p->kids[i] = 0; ++ p->next = NULL; ++ p->objnum = pdf_create_obj(pdf, obj_type_pages, 0); ++ return p; ++} ++ ++@ @c ++static divert_list_entry *new_divert_list_entry(void) ++{ ++ divert_list_entry *d; ++ d = xtalloc(1, divert_list_entry); ++ d->first = d->last = NULL; ++ return d; ++} ++ ++@ @c ++static void ensure_list_tree(void) ++{ ++ if (divert_list_tree == NULL) { ++ divert_list_tree = ++ avl_create(comp_divert_list_entry, NULL, &avl_xallocator); ++ assert(divert_list_tree != NULL); ++ } ++} ++ ++@ @c ++static divert_list_entry *get_divert_list(int divnum) ++{ ++ divert_list_entry *d, tmp; ++ void **aa; ++ tmp.divnum = divnum; ++ d = (divert_list_entry *) avl_find(divert_list_tree, &tmp); ++ if (d == NULL) { ++ d = new_divert_list_entry(); ++ d->divnum = divnum; ++ aa = avl_probe(divert_list_tree, d); ++ assert(aa != NULL); ++ } ++ return d; ++} ++ ++@ |pdf_do_page_divert()| returns the current /Parent object number ++@c ++int pdf_do_page_divert(PDF pdf, int objnum, int divnum) ++{ ++ divert_list_entry *d; ++ pages_entry *p; ++#ifdef DEBUG ++ pages_entry *q; ++ struct avl_traverser t; ++ int i; ++#endif ++ /* initialize the tree */ ++ ensure_list_tree(); ++ /* make sure we have a list for this diversion */ ++ d = get_divert_list(divnum); ++ if (d->first == NULL || d->last->number_of_kids == PAGES_TREE_KIDSMAX) { ++ /* append a new |pages_entry| */ ++ p = new_pages_entry(pdf); ++ if (d->first == NULL) ++ d->first = p; ++ else ++ d->last->next = p; ++ d->last = p; ++ } ++ p = d->last; ++ p->kids[p->number_of_kids++] = objnum; ++ p->number_of_pages++; ++#ifdef DEBUG ++ printf("\n"); ++ avl_t_init(&t, divert_list_tree); ++ for (d = avl_t_first(&t, divert_list_tree); d != NULL; d = avl_t_next(&t)) { ++ printf("===== D-LIST %d: ", d->divnum); ++ for (q = d->first; q != NULL; q = q->next) { ++ printf("P=%d NK=%d (", q->objnum, q->number_of_kids); ++ for (i = 0; i < q->number_of_kids; i++) ++ printf("%d ", q->kids[i]); ++ printf(") "); ++ } ++ printf("\n"); ++ } ++ printf("\n"); ++#endif ++ return p->objnum; ++} ++ ++@ @c ++static void movelist(divert_list_entry * d, divert_list_entry * dto) ++{ ++ if (d != NULL && d->first != NULL && d->divnum != dto->divnum) { /* no undivert of empty list or into self */ ++ if (dto->first == NULL) ++ dto->first = d->first; ++ else ++ dto->last->next = d->first; ++ dto->last = d->last; ++ d->first = d->last = NULL; /* one could as well remove this |divert_list_entry| */ ++ } ++} ++ ++@ undivert from diversion |divnum| into diversion |curdivnum| ++@c ++void pdf_do_page_undivert(int divnum, int curdivnum) ++{ ++ divert_list_entry *d, *dto, tmp; ++ struct avl_traverser t; ++#ifdef DEBUG ++ pages_entry *p; ++ int i; ++#endif ++ /* initialize the tree */ ++ ensure_list_tree(); ++ /* find the diversion |curdivnum| list where diversion |divnum| should go */ ++ dto = get_divert_list(curdivnum); ++ if (divnum == 0) { /* 0 = special case: undivert {\it all\/} lists */ ++ avl_t_init(&t, divert_list_tree); ++ for (d = avl_t_first(&t, divert_list_tree); d != NULL; ++ d = avl_t_next(&t)) ++ movelist(d, dto); ++ } else { ++ tmp.divnum = divnum; ++ d = (divert_list_entry *) avl_find(divert_list_tree, &tmp); ++ movelist(d, dto); ++ } ++#ifdef DEBUG ++ printf("\n"); ++ avl_t_init(&t, divert_list_tree); ++ for (d = avl_t_first(&t, divert_list_tree); d != NULL; d = avl_t_next(&t)) { ++ printf("===== U-LIST %d: ", d->divnum); ++ for (p = d->first; p != NULL; p = p->next) { ++ printf("P=%d NK=%d (", p->objnum, p->number_of_kids); ++ for (i = 0; i < p->number_of_kids; i++) ++ printf("%d ", p->kids[i]); ++ printf(") "); ++ } ++ printf("\n"); ++ } ++ printf("\n"); ++#endif ++} ++ ++@ write a /Pages object ++@c ++#define pdf_pages_attr equiv(pdf_pages_attr_loc) ++ ++static void write_pages(PDF pdf, pages_entry * p, int parent) ++{ ++ int i; ++ assert(p != NULL); ++ pdf_begin_obj(pdf, p->objnum, OBJSTM_ALWAYS); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_name(pdf, "Type", "Pages"); ++ if (parent == 0) { /* it's root */ ++ if (pdf_pages_attr != null) { ++ pdf_print_toks(pdf, pdf_pages_attr); ++ pdf_out(pdf, ' '); ++ } ++ print_pdf_table_string(pdf, "pagesattributes"); ++ } else ++ pdf_dict_add_ref(pdf, "Parent", parent); ++ pdf_dict_add_int(pdf, "Count", (int) p->number_of_pages); ++ pdf_add_name(pdf, "Kids"); ++ pdf_begin_array(pdf); ++ for (i = 0; i < p->number_of_kids; i++) ++ pdf_add_ref(pdf, (int) p->kids[i]); ++ pdf_end_array(pdf); ++ pdf_end_dict(pdf); ++ pdf_end_obj(pdf); ++} ++ ++@ loop over all /Pages objects, output them, create their parents, ++recursing bottom up, return the /Pages root object number ++@c ++static int output_pages_list(PDF pdf, pages_entry * pe) ++{ ++ pages_entry *p, *q, *r; ++ assert(pe != NULL); ++ if (pe->next == NULL) { /* everything fits into one |pages_entry| */ ++ write_pages(pdf, pe, 0); /* --> /Pages root found */ ++ return pe->objnum; ++ } ++ q = r = new_pages_entry(pdf); /* one level higher needed */ ++ for (p = pe; p != NULL; p = p->next) { ++ if (q->number_of_kids == PAGES_TREE_KIDSMAX) { ++ q->next = new_pages_entry(pdf); ++ q = q->next; ++ } ++ q->kids[q->number_of_kids++] = p->objnum; ++ q->number_of_pages += p->number_of_pages; ++ write_pages(pdf, p, q->objnum); ++ } ++ return output_pages_list(pdf, r); /* recurse through next higher level */ ++} ++ ++@ @c ++int output_pages_tree(PDF pdf) ++{ ++ divert_list_entry *d; ++ pdf_do_page_undivert(0, 0); /* concatenate all diversions into diversion 0 */ ++ d = get_divert_list(0); /* get diversion 0 */ ++ return output_pages_list(pdf, d->first); ++} +--- texk/web2c/luatexdir/pdf/pdfrule.w ++++ texk/web2c/luatexdir/pdf/pdfrule.w 2011-10-13 07:39:33.000000000 +0000 +@@ -1,6 +1,6 @@ + % pdfrule.w + % +-% Copyright 2010 Taco Hoekwater ++% Copyright 2010-2011 Taco Hoekwater + + % This file is part of LuaTeX. + +@@ -19,16 +19,12 @@ + + @ @c + static const char _svn_version[] = +- "$Id: pdfrule.w 3584 2010-04-02 17:45:55Z hhenkel $" +- "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/pdf/pdfrule.w $"; ++ "$Id: pdfrule.w 4321 2011-07-01 19:32:05Z hhenkel $" ++ "$URL: http://foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/pdf/pdfrule.w $"; + + #include "ptexlib.h" +- +-@ @c + #include "pdf/pdfpage.h" + +-#define lround(a) (long) floor((a) + 0.5) +- + @ @c + void pdf_place_rule(PDF pdf, halfword q, scaledpos size) + { +@@ -41,30 +37,30 @@ void pdf_place_rule(PDF pdf, halfword q, + dim.h.e = p->pdf.h.e; + dim.v.m = lround(size.v * p->k1); + dim.v.e = p->pdf.v.e; +- pdf_printf(pdf, "q\n"); ++ pdf_puts(pdf, "q\n"); + if (size.v <= one_bp) { + pos.v += (int) lround(0.5 * size.v); + pdf_set_pos_temp(pdf, pos); +- pdf_printf(pdf, "[]0 d 0 J "); ++ pdf_puts(pdf, "[]0 d 0 J "); + print_pdffloat(pdf, dim.v); +- pdf_printf(pdf, " w 0 0 m "); ++ pdf_puts(pdf, " w 0 0 m "); + print_pdffloat(pdf, dim.h); +- pdf_printf(pdf, " 0 l S\n"); ++ pdf_puts(pdf, " 0 l S\n"); + } else if (size.h <= one_bp) { + pos.h += (int) lround(0.5 * size.h); + pdf_set_pos_temp(pdf, pos); +- pdf_printf(pdf, "[]0 d 0 J "); ++ pdf_puts(pdf, "[]0 d 0 J "); + print_pdffloat(pdf, dim.h); +- pdf_printf(pdf, " w 0 0 m 0 "); ++ pdf_puts(pdf, " w 0 0 m 0 "); + print_pdffloat(pdf, dim.v); +- pdf_printf(pdf, " l S\n"); ++ pdf_puts(pdf, " l S\n"); + } else { + pdf_set_pos_temp(pdf, pos); +- pdf_printf(pdf, "0 0 "); ++ pdf_puts(pdf, "0 0 "); + print_pdffloat(pdf, dim.h); +- pdf_printf(pdf, " "); ++ pdf_out(pdf, ' '); + print_pdffloat(pdf, dim.v); +- pdf_printf(pdf, " re f\n"); ++ pdf_puts(pdf, " re f\n"); + } +- pdf_printf(pdf, "Q\n"); ++ pdf_puts(pdf, "Q\n"); + } +--- texk/web2c/luatexdir/pdf/pdfshipout.w ++++ texk/web2c/luatexdir/pdf/pdfshipout.w 2011-10-13 07:39:33.000000000 +0000 +@@ -141,34 +141,34 @@ void ship_out(PDF pdf, halfword p, shipp + /* Calculate page dimensions and margins */ + if (global_shipping_mode == SHIPPING_PAGE) { + if (page_width > 0) +- cur_page_size.h = page_width; ++ pdf->page_size.h = page_width; + else { + switch (page_direction) { + case dir_TLT: +- cur_page_size.h = width(p) + 2 * page_left_offset; ++ pdf->page_size.h = width(p) + 2 * page_left_offset; + break; + case dir_TRT: +- cur_page_size.h = width(p) + 2 * page_right_offset; ++ pdf->page_size.h = width(p) + 2 * page_right_offset; + break; + case dir_LTL: +- cur_page_size.h = height(p) + depth(p) + 2 * page_left_offset; ++ pdf->page_size.h = height(p) + depth(p) + 2 * page_left_offset; + break; + case dir_RTT: +- cur_page_size.h = height(p) + depth(p) + 2 * page_right_offset; ++ pdf->page_size.h = height(p) + depth(p) + 2 * page_right_offset; + break; + } + } + if (page_height > 0) +- cur_page_size.v = page_height; ++ pdf->page_size.v = page_height; + else { + switch (page_direction) { + case dir_TLT: + case dir_TRT: +- cur_page_size.v = height(p) + depth(p) + 2 * page_top_offset; ++ pdf->page_size.v = height(p) + depth(p) + 2 * page_top_offset; + break; + case dir_LTL: + case dir_RTT: +- cur_page_size.v = width(p) + 2 * page_top_offset; ++ pdf->page_size.v = width(p) + 2 * page_top_offset; + break; + } + } +@@ -179,13 +179,13 @@ void ship_out(PDF pdf, halfword p, shipp + switch (pdf->o_mode) { + case OMODE_DVI: + refpoint.pos.h = one_true_inch; +- refpoint.pos.v = cur_page_size.v - one_true_inch; ++ refpoint.pos.v = pdf->page_size.v - one_true_inch; + dvi = refpoint.pos; + break; + case OMODE_PDF: + case OMODE_LUA: + refpoint.pos.h = pdf_h_origin; +- refpoint.pos.v = cur_page_size.v - pdf_v_origin; ++ refpoint.pos.v = pdf->page_size.v - pdf_v_origin; + break; + default: + assert(0); +@@ -203,7 +203,7 @@ void ship_out(PDF pdf, halfword p, shipp + case dir_TRT: + case dir_RTT: + refpoint.pos.h += +- cur_page_size.h - page_right_offset - one_true_inch; ++ pdf->page_size.h - page_right_offset - one_true_inch; + refpoint.pos.v -= v_offset; + break; + } +@@ -221,13 +221,13 @@ void ship_out(PDF pdf, halfword p, shipp + switch (pdf->posstruct->dir) { + case dir_TLT: + case dir_TRT: +- cur_page_size.h = width(p); +- cur_page_size.v = height(p) + depth(p); ++ pdf->page_size.h = width(p); ++ pdf->page_size.v = height(p) + depth(p); + break; + case dir_LTL: + case dir_RTT: +- cur_page_size.h = height(p) + depth(p); +- cur_page_size.v = width(p); ++ pdf->page_size.h = height(p) + depth(p); ++ pdf->page_size.v = width(p); + break; + } + switch (pdf->posstruct->dir) { +--- texk/web2c/luatexdir/pdf/pdftables.h ++++ texk/web2c/luatexdir/pdf/pdftables.h 2011-10-13 07:39:33.000000000 +0000 +@@ -1,6 +1,6 @@ + /* pdftables.h + +- Copyright 2009 Taco Hoekwater ++ Copyright 2009-2011 Taco Hoekwater + + This file is part of LuaTeX. + +@@ -67,30 +67,33 @@ structure depending on the object type; + well. + */ + +-# define obj_info(pdf,A) pdf->obj_tab[(A)].u.int0 /* information representing identifier of this object */ +-# define obj_start(pdf,A) pdf->obj_tab[(A)].u.str0 +-# define obj_link(pdf,A) pdf->obj_tab[(A)].int1 /* link to the next entry in linked list */ +-# define obj_offset(pdf,A) pdf->obj_tab[(A)].int2 /* negative (flags), or byte offset for this object in PDF +- output file, or object stream number for this object */ +-# define obj_os_idx(pdf,A) pdf->obj_tab[(A)].int3 /* index of this object in object stream */ +-# define obj_aux(pdf,A) pdf->obj_tab[(A)].v.int4 /* auxiliary pointer */ +-# define obj_stop(pdf,A) pdf->obj_tab[(A)].v.str4 +-# define obj_type(pdf,A) pdf->obj_tab[(A)].objtype +- +-# define obj_data_ptr obj_aux /* pointer to |pdf->mem| */ +- +-# define set_obj_link(pdf,A,B) obj_link(pdf,A)=B +-# define set_obj_start(pdf,A,B) obj_start(pdf,A)=B +-# define set_obj_info(pdf,A,B) obj_info(pdf,A)=B +-# define set_obj_offset(pdf,A,B) obj_offset(pdf,A)=B +-# define set_obj_aux(pdf,A,B) obj_aux(pdf,A)=B +-# define set_obj_stop(pdf,A,B) obj_stop(pdf,A)=B +-# define set_obj_data_ptr(pdf,A,B) obj_data_ptr(pdf,A)=B +- +-# define set_obj_fresh(pdf,A) obj_offset(pdf,(A))=-2 +-# define set_obj_scheduled(pdf,A) if (intcast(obj_offset(pdf,A))==-2) obj_offset(pdf,A)=-1 +-# define is_obj_scheduled(pdf,A) (intcast(obj_offset(pdf,A))>-2) +-# define is_obj_written(pdf,A) (intcast(obj_offset(pdf,A))>-1) ++# define obj_info(pdf,A) pdf->obj_tab[(A)].u.int0 /* information representing identifier of this object */ ++# define obj_start(pdf,A) pdf->obj_tab[(A)].u.str0 ++# define obj_link(pdf,A) pdf->obj_tab[(A)].int1 /* link to the next entry in linked list */ ++ ++# define obj_offset(pdf,A) pdf->obj_tab[(A)].int2 /* negative (flags), or byte offset for this object in PDF ++ output file, or ... */ ++# define obj_os_objnum(pdf,A) pdf->obj_tab[(A)].int2 /* ... object stream number for this object */ ++# define obj_os_idx(pdf,A) pdf->obj_tab[(A)].int3 /* index of this object in object stream */ ++# define obj_aux(pdf,A) pdf->obj_tab[(A)].v.int4 /* auxiliary pointer */ ++# define obj_stop(pdf,A) pdf->obj_tab[(A)].v.str4 ++# define obj_type(pdf,A) pdf->obj_tab[(A)].objtype ++ ++# define obj_data_ptr obj_aux /* pointer to |pdf->mem| */ ++ ++# define set_obj_link(pdf,A,B) obj_link(pdf,A)=(B) ++# define set_obj_start(pdf,A,B) obj_start(pdf,A)=(B) ++# define set_obj_info(pdf,A,B) obj_info(pdf,A)=(B) ++# define set_obj_offset(pdf,A,B) obj_offset(pdf,A)=(B) ++# define set_obj_os_objnum(pdf,A,B) obj_offset(pdf,A)=(B) ++# define set_obj_aux(pdf,A,B) obj_aux(pdf,A)=(B) ++# define set_obj_stop(pdf,A,B) obj_stop(pdf,A)=(B) ++# define set_obj_data_ptr(pdf,A,B) obj_data_ptr(pdf,A)=(B) ++ ++# define set_obj_fresh(pdf,A) obj_offset(pdf,(A))=-2 ++# define set_obj_scheduled(pdf,A) if (intcast(obj_offset(pdf,A))==-2) obj_offset(pdf,A)=-1 ++# define is_obj_scheduled(pdf,A) (intcast(obj_offset(pdf,A))>-2) ++# define is_obj_written(pdf,A) (intcast(obj_offset(pdf,A))>-1) + + /* NOTE: The data structure definitions for the nodes on the typesetting side are + inside |nodes.h| */ +@@ -102,9 +105,8 @@ well. + extern int find_obj(PDF pdf, int t, int i, boolean byname); + extern void check_obj_exists(PDF pdf, int objnum); + extern void check_obj_type(PDF pdf, int t, int objnum); +-extern int get_obj(PDF pdf, int t, int i, boolean byname); ++extern int pdf_get_obj(PDF pdf, int t, int i, boolean byname); + extern int pdf_create_obj(PDF pdf, int t, int i); +-extern int pdf_new_objnum(PDF pdf); + + extern void set_rect_dimens(PDF pdf, halfword p, halfword parent_box, + scaledpos cur, scaled_whd alt_rule, scaled margin); +--- texk/web2c/luatexdir/pdf/pdftables.w ++++ texk/web2c/luatexdir/pdf/pdftables.w 2011-10-13 07:39:33.000000000 +0000 +@@ -142,7 +142,7 @@ int pdf_create_obj(PDF pdf, int t, int i + if (i < 0) { + ss = makecstring(-i); + avl_put_str_obj(pdf, ss, pdf->obj_ptr, t); +- } else ++ } else if (i > 0) + avl_put_int_obj(pdf, i, pdf->obj_ptr, t); + if (t <= HEAD_TAB_MAX) { + obj_link(pdf, pdf->obj_ptr) = pdf->head_tab[t]; +@@ -179,7 +179,7 @@ int find_obj(PDF pdf, int t, int i, bool + |vlist_out|. + + @c +-int get_obj(PDF pdf, int t, int i, boolean byname) ++int pdf_get_obj(PDF pdf, int t, int i, boolean byname) + { + int r; + str_number s; +@@ -206,15 +206,8 @@ int get_obj(PDF pdf, int t, int i, boole + return r; + } + +-@ create a new object and return its number +- ++@ object checking + @c +-int pdf_new_objnum(PDF pdf) +-{ +- int k = pdf_create_obj(pdf, obj_type_others, 0); +- return k; +-} +- + void check_obj_exists(PDF pdf, int objnum) + { + if (objnum < 0 || objnum > pdf->obj_ptr) +@@ -290,7 +283,7 @@ void set_rect_dimens(PDF pdf, halfword p + @ @c + void libpdffinish(PDF pdf) + { +- fb_free(pdf); ++ strbuf_free(pdf->fb); + xfree(pdf->job_id_string); + fm_free(); + t1_free(); +@@ -302,7 +295,6 @@ void libpdffinish(PDF pdf) + zip_free(pdf); + } + +- + @ Store some of the pdftex data structures in the format. The idea here is + to ensure that any data structures referenced from pdftex-specific whatsit + nodes are retained. For the sake of simplicity and speed, all the filled parts +--- texk/web2c/luatexdir/pdf/pdfthread.w ++++ texk/web2c/luatexdir/pdf/pdfthread.w 2011-10-13 07:39:33.000000000 +0000 +@@ -36,8 +36,9 @@ void append_bead(PDF pdf, halfword p) + int a, b, c, t; + if (global_shipping_mode == SHIPPING_FORM) + pdf_error("ext4", "threads cannot be inside an XForm"); +- t = get_obj(pdf, obj_type_thread, pdf_thread_id(p), pdf_thread_named_id(p)); +- b = pdf_new_objnum(pdf); ++ t = pdf_get_obj(pdf, obj_type_thread, pdf_thread_id(p), ++ pdf_thread_named_id(p)); ++ b = pdf_create_obj(pdf, obj_type_others, 0); + obj_bead_ptr(pdf, b) = pdf_get_mem(pdf, pdfmem_bead_size); + set_obj_bead_page(pdf, b, pdf->last_page); + set_obj_bead_data(pdf, b, p); +@@ -143,12 +144,13 @@ void end_thread(PDF pdf, halfword p) + @c + void thread_title(PDF pdf, int t) + { +- pdf_printf(pdf, "/Title ("); ++ pdf_add_name(pdf, "Title"); ++ pdf_out(pdf, '('); + if (obj_info(pdf, t) < 0) + pdf_print(pdf, -obj_info(pdf, t)); + else + pdf_print_int(pdf, obj_info(pdf, t)); +- pdf_printf(pdf, ")\n"); ++ pdf_out(pdf, ')'); + } + + void pdf_fix_thread(PDF pdf, int t) +@@ -166,23 +168,32 @@ void pdf_fix_thread(PDF pdf, int t) + tprint(" has been referenced but does not exist, replaced by a fixed one"); + print_ln(); + print_ln(); +- a = pdf_new_dict(pdf, obj_type_others, 0, 0); +- pdf_indirect_ln(pdf, "T", t); +- pdf_indirect_ln(pdf, "V", a); +- pdf_indirect_ln(pdf, "N", a); +- pdf_indirect_ln(pdf, "P", pdf->last_page); +- pdf_printf(pdf, "/R [0 0 "); +- pdf_print_bp(pdf, page_width); +- pdf_out(pdf, ' '); +- pdf_print_bp(pdf, page_height); +- pdf_printf(pdf, "]\n"); ++ a = pdf_create_obj(pdf, obj_type_others, 0); ++ pdf_begin_obj(pdf, a, OBJSTM_ALWAYS); ++ pdf_begin_dict(pdf); ++ pdf_dict_add_ref(pdf, "T", t); ++ pdf_dict_add_ref(pdf, "V", a); ++ pdf_dict_add_ref(pdf, "N", a); ++ pdf_dict_add_ref(pdf, "P", pdf->last_page); ++ pdf_add_name(pdf, "R"); ++ pdf_begin_array(pdf); ++ pdf_add_int(pdf, 0); ++ pdf_add_int(pdf, 0); ++ pdf_add_bp(pdf, page_width); ++ pdf_add_bp(pdf, page_height); ++ pdf_end_array(pdf); + pdf_end_dict(pdf); +- pdf_begin_dict(pdf, t, 1); +- pdf_printf(pdf, "/I << \n"); ++ pdf_end_obj(pdf); ++ ++ pdf_begin_obj(pdf, t, OBJSTM_ALWAYS); ++ pdf_begin_dict(pdf); ++ pdf_add_name(pdf, "I"); ++ pdf_begin_dict(pdf); + thread_title(pdf, t); +- pdf_printf(pdf, ">>\n"); +- pdf_indirect_ln(pdf, "F", a); + pdf_end_dict(pdf); ++ pdf_dict_add_ref(pdf, "F", a); ++ pdf_end_dict(pdf); ++ pdf_end_obj(pdf); + } + + void out_thread(PDF pdf, int t) +@@ -193,7 +204,8 @@ void out_thread(PDF pdf, int t) + pdf_fix_thread(pdf, t); + return; + } +- pdf_begin_dict(pdf, t, 1); ++ pdf_begin_obj(pdf, t, OBJSTM_ALWAYS); ++ pdf_begin_dict(pdf); + a = obj_thread_first(pdf, t); + b = a; + last_attr = 0; +@@ -205,26 +217,29 @@ void out_thread(PDF pdf, int t) + if (last_attr != 0) { + pdf_print_ln(pdf, last_attr); + } else { +- pdf_printf(pdf, "/I << \n"); ++ pdf_add_name(pdf, "I"); ++ pdf_begin_dict(pdf); + thread_title(pdf, t); +- pdf_printf(pdf, ">>\n"); ++ pdf_end_dict(pdf); + } +- pdf_indirect_ln(pdf, "F", a); ++ pdf_dict_add_ref(pdf, "F", a); + pdf_end_dict(pdf); ++ pdf_end_obj(pdf); + do { +- pdf_begin_dict(pdf, a, 1); ++ pdf_begin_obj(pdf, a, OBJSTM_ALWAYS); ++ pdf_begin_dict(pdf); + if (a == b) +- pdf_indirect_ln(pdf, "T", t); +- pdf_indirect_ln(pdf, "V", obj_bead_prev(pdf, a)); +- pdf_indirect_ln(pdf, "N", obj_bead_next(pdf, a)); +- pdf_indirect_ln(pdf, "P", obj_bead_page(pdf, a)); +- pdf_indirect_ln(pdf, "R", obj_bead_rect(pdf, a)); ++ pdf_dict_add_ref(pdf, "T", t); ++ pdf_dict_add_ref(pdf, "V", obj_bead_prev(pdf, a)); ++ pdf_dict_add_ref(pdf, "N", obj_bead_next(pdf, a)); ++ pdf_dict_add_ref(pdf, "P", obj_bead_page(pdf, a)); ++ pdf_dict_add_ref(pdf, "R", obj_bead_rect(pdf, a)); + pdf_end_dict(pdf); ++ pdf_end_obj(pdf); + a = obj_bead_next(pdf, a); + } while (a != b); + } + +- + @ @c + void scan_thread_id(void) + { +@@ -260,15 +275,16 @@ void print_bead_rectangles(PDF pdf) + int l; + if ((k = get_page_resources_list(pdf, obj_type_bead)) != NULL) { + while (k != NULL) { +- l = pdf_new_obj(pdf, obj_type_others, 0, 1); +- pdf_out(pdf, '['); ++ l = pdf_create_obj(pdf, obj_type_others, 0); ++ pdf_begin_obj(pdf, l, OBJSTM_ALWAYS); ++ pdf_begin_array(pdf); + i = obj_bead_data(pdf, k->info); /* pointer to a whatsit or whatsit-like node */ +- pdf_print_rect_spec(pdf, i); ++ pdf_add_rect_spec(pdf, i); + if (subtype(i) == pdf_thread_data_node) /* thanh says it mis be destroyed here */ + flush_node(i); +- pdf_printf(pdf, "]\n"); +- set_obj_bead_rect(pdf, k->info, l); /* rewrite |obj_bead_data| */ ++ pdf_end_array(pdf); + pdf_end_obj(pdf); ++ set_obj_bead_rect(pdf, k->info, l); /* rewrite |obj_bead_data| */ + k = k->link; + } + } +--- texk/web2c/luatexdir/pdf/pdftypes.h ++++ texk/web2c/luatexdir/pdf/pdftypes.h 2011-10-13 07:39:33.000000000 +0000 +@@ -1,6 +1,6 @@ + /* pdftypes.h + +- Copyright 2009-2010 Taco Hoekwater ++ Copyright 2009-2011 Taco Hoekwater + + This file is part of LuaTeX. + +@@ -25,6 +25,33 @@ + # include + # include "lua/luatex-api.h" + ++/* The prefix "PTEX" for the PDF keys is special to pdfTeX; ++ this has been registered with Adobe by Hans Hagen. */ ++ ++# define pdfkeyprefix "PTEX" ++ ++# define lround(a) (long) floor((a) + 0.5) ++ ++# define MAX_OBJ_COMPRESS_LEVEL 3 /* maximum/clipping value for \pdfobjcompresslevel */ ++# define OBJSTM_UNSET -1 /* initial value */ ++# define OBJSTM_ALWAYS 1 /* \pdfobjcompresslevel >= OBJSTM_ALWAYS: put object into object stream */ ++# define OBJSTM_NEVER (MAX_OBJ_COMPRESS_LEVEL + 1) ++ /* above maximum/clipping value for \pdfobjcompresslevel */ ++ ++typedef int internal_font_number; /* |font| in a |char_node| */ ++ ++typedef enum { ++ NO_ZIP, /* no \.{ZIP} compression */ ++ ZIP_WRITING, /* \.{ZIP} compression being used */ ++ ZIP_FINISH /* finish \.{ZIP} compression */ ++} zip_write_state_e; ++ ++typedef enum { ++ PDFOUT_BUF, ++ OBJSTM_BUF, ++ LUASTM_BUF ++} buffer_e; ++ + /* This stucture holds everything that is needed for the actual pdf generation. + + Because this structure interfaces with C++, it is not wise to use |boolean| +@@ -35,11 +62,6 @@ the types explicitly defined in this hea + |integer| and |eight_bits| that are used elsewhere in the \LUATEX\ sources. + */ + +-typedef struct os_obj_data_ { +- int num; +- int off; +-} os_obj_data; +- + typedef struct { + long m; /* mantissa (significand) */ + int e; /* exponent * -1 */ +@@ -101,6 +123,7 @@ typedef struct { + pdffloat tj_delta; /* rel. movement in [(..)..]TJ array (glyph raster) */ + pdffloat fs; /* font size in PDF units */ + pdffloat fs_cur; /* to check if fs.m has changed and Tf needed */ ++ pdffloat tm0_cur; /* to check if tm[0] has changed and Tm needed */ + pdffloat cm[6]; /* cm array */ + pdffloat tm[6]; /* Tm array */ + double k1; /* conv. factor from TeX sp to PDF page raster */ +@@ -110,6 +133,7 @@ typedef struct { + writing_mode wmode; /* PDF writing mode WMode (horizontal/vertical) */ + pos_mode mode; /* current positioning mode */ + int ishex; /* Whether the current char string is <> or () */ ++ int need_tf; /* flag whether Tf needs to be set */ + int need_tm; /* flag whether Tm needs to be set */ + } pdfstructure; + +@@ -176,9 +200,62 @@ typedef struct pdf_resource_struct_ { + int last_resources; /* halfword to most recently generated Resources object. */ + } pdf_resource_struct; + ++/**********************************************************************/ ++ ++typedef struct os_obj_data_ { ++ int num; ++ int off; ++} os_obj_data; ++ ++typedef struct strbuf_s_ { ++ unsigned char *data; /* a PDF stream buffer */ ++ unsigned char *p; /* pointer to the next character in the PDF stream buffer */ ++ size_t size; /* currently allocated size of the PDF stream buffer, grows dynamically */ ++ size_t limit; /* maximum allowed PDF stream buffer size */ ++} strbuf_s; ++ ++typedef struct os_struct_ { ++ os_obj_data *obj; /* array of object stream objects */ ++ strbuf_s *buf[3]; ++ buffer_e curbuf; /* select into which buffer to output */ ++ luaL_Buffer b; /* Lua buffer connected to luastm_buf */ ++ unsigned int cur_objstm; /* number of current object stream object */ ++ unsigned int idx; /* index of object within object stream [1...PDF_OS_MAX_OBJS - 1] */ ++ unsigned int ostm_ctr; /* statistics: counter for object stream objects */ ++ unsigned int o_ctr; /* statistics: counter for objects within object streams */ ++ int trigger_luastm; ++} os_struct; ++ ++/**********************************************************************/ ++ ++# define packet_max_recursion 100 /* see |packet_cur_s| */ ++# define packet_stack_size 100 ++ ++typedef struct packet_stack_record_ { ++ float c0; ++ float c1; ++ float c2; ++ float c3; ++ scaledpos pos; /* c4, c5 */ ++} packet_stack_record; ++ ++typedef struct vf_struct_ { ++ packet_stack_record *packet_stack; /* for "push" and "pop" */ ++ int packet_stack_level; ++ int packet_stack_minlevel; /* to check stack underflow */ ++ internal_font_number lf; /* local font number, resolved */ ++ int fs_f; /* local font size */ ++ int packet_cur_s; /* do_vf_packet() nesting level */ ++ posstructure *refpos; ++ int vflua; /* flag, whether vf.*() functions are allowed */ ++} vf_struct; ++ ++/**********************************************************************/ ++ + typedef struct pdf_output_file_ { + FILE *file; /* the PDF output file handle */ + char *file_name; /* the PDF output file name */ ++ char *job_name; + output_mode o_mode; /* output mode (DVI/PDF/...) */ + output_state o_state; + /* generation parameters */ +@@ -197,24 +274,11 @@ typedef struct pdf_output_file_ { + int objcompresslevel; /* fixed level for activating PDF object streams */ + char *job_id_string; /* the full job string */ + +- /* output file buffering */ +- unsigned char *op_buf; /* the PDF output buffer */ +- int op_buf_size; /* output buffer size (static) */ +- int op_ptr; /* store for PDF buffer |pdf_ptr| while inside object streams */ +- unsigned char *os_buf; /* the PDF object stream buffer */ +- int os_buf_size; /* current size of the PDF object stream buffer, grows dynamically */ +- int os_ptr; /* store for object stream |pdf_ptr| while outside object streams */ +- +- os_obj_data *os_obj; /* array of object stream objects */ +- int os_idx; /* pointer into |pdf_os_objnum| and |pdf_os_objoff| */ +- int os_cntr; /* counter for object stream objects */ +- int os_mode; /* true if producing object stream */ + int os_enable; /* true if object streams are globally enabled */ +- int os_cur_objnum; /* number of current object stream object */ ++ os_struct *os; /* object stream structure pointer */ ++ ++ strbuf_s *buf; /* pointer to the current stream buffer (PDF stream, ObjStm, or Lua) */ + +- unsigned char *buf; /* pointer to the PDF output buffer or PDF object stream buffer */ +- int buf_size; /* end of PDF output buffer or PDF object stream buffer */ +- int ptr; /* pointer to the first unused byte in the PDF buffer or object stream buffer */ + off_t save_offset; /* to save |pdf_offset| */ + off_t gone; /* number of bytes that were flushed to output */ + +@@ -223,14 +287,13 @@ typedef struct pdf_output_file_ { + time_t start_time; /* when this job started */ + char *start_time_str; /* minimum size for time_str is 24: "D:YYYYmmddHHMMSS+HH'MM'" */ + +- /* define fb_ptr, fb_array & fb_limit */ +- char *fb_array; +- char *fb_ptr; +- size_t fb_limit; ++ strbuf_s *fb; /* pointer to auxiliary buffer for font stuff */ + + char *zipbuf; + z_stream *c_stream; /* compression stream pointer */ +- int zip_write_state; /* which state of compression we are in */ ++ zip_write_state_e zip_write_state; /* which state of compression we are in */ ++ int stream_deflate; /* true, if stream dict has /Filter/FlateDecode */ ++ int stream_writing; /* true while writing stream */ + + int pk_scale_factor; /* this is just a preprocessed value that depends on + |pk_resolution| and |decimal_digits| */ +@@ -270,6 +333,8 @@ typedef struct pdf_output_file_ { + + pdf_resource_struct *page_resources; + ++ scaledpos page_size; /* width and height of page being shipped */ ++ + /* the variables from pdfdest */ + int dest_names_size; + int dest_names_ptr; +@@ -290,6 +355,9 @@ typedef struct pdf_output_file_ { + + int f_cur; /* TeX font number */ + int pdflua_ref; ++ int cave; /* stay away from previous PDF object */ ++ ++ vf_struct *vfstruct; + } pdf_output_file; + + typedef pdf_output_file *PDF; +--- texk/web2c/luatexdir/pdf/pdfxform.w ++++ texk/web2c/luatexdir/pdf/pdfxform.w 2011-10-13 07:39:33.000000000 +0000 +@@ -1,6 +1,6 @@ + % pdfxform.w + +-% Copyright 2009-2010 Taco Hoekwater ++% Copyright 2009-2011 Taco Hoekwater + + % This file is part of LuaTeX. + +@@ -59,11 +59,11 @@ void pdf_place_form(PDF pdf, halfword p) + (void) calc_pdfpos(q, pdf->posstruct->pos); + cm[4] = q->cm[4]; + cm[5] = q->cm[5]; +- pdf_printf(pdf, "q\n"); ++ pdf_puts(pdf, "q\n"); + pdf_print_cm(pdf, cm); + pdf_printf(pdf, "/Fm%d", (int) obj_info(pdf, objnum)); + pdf_print_resname_prefix(pdf); +- pdf_printf(pdf, " Do\nQ\n"); ++ pdf_puts(pdf, " Do\nQ\n"); + addto_page_resources(pdf, obj_type_xform, objnum); + } + +--- texk/web2c/luatexdir/tex/align.w ++++ texk/web2c/luatexdir/tex/align.w 2011-10-13 07:39:33.000000000 +0000 +@@ -967,6 +967,7 @@ value is changed to zero and so is the n + glue_set(q) = glue_set(p); + shift_amount(q) = o; + r = vlink(list_ptr(q)); ++ assert (type(r) == unset_node); + s = vlink(list_ptr(p)); + do { + /* Set the glue in node |r| and change it from an unset node */ +--- texk/web2c/luatexdir/tex/commands.h ++++ texk/web2c/luatexdir/tex/commands.h 2011-10-13 07:39:32.000000000 +0000 +@@ -266,6 +266,7 @@ typedef enum { + Omega_revision_code, /* command code for \.{\\Omegarevision} */ + eTeX_revision_code, /* command code for \.{\\eTeXrevision} */ + font_identifier_code, /* command code for \.{tex.fontidentifier} (virtual) */ ++ font_id_code, /* command code for \.{\\fontid} */ + } convert_codes; + + typedef enum { +--- texk/web2c/luatexdir/tex/commands.w ++++ texk/web2c/luatexdir/tex/commands.w 2011-10-13 07:39:33.000000000 +0000 +@@ -480,6 +480,7 @@ void initialize_commands(void) + primitive_omega("OmegaVersion", convert_cmd, omega_code, 0); + primitive_aleph("AlephVersion", convert_cmd, aleph_code, 0); + primitive_tex("fontname", convert_cmd, font_name_code, 0); ++ primitive_luatex("fontid", convert_cmd, font_id_code, 0); + primitive_pdftex("pdftexrevision", convert_cmd, pdftex_revision_code, 0); + primitive_luatex("luatexrevision", convert_cmd, luatex_revision_code, 0); + primitive_luatex("luatexdatestamp", convert_cmd, luatex_date_code, 0); +--- texk/web2c/luatexdir/tex/inputstack.w ++++ texk/web2c/luatexdir/tex/inputstack.w 2011-10-13 07:39:33.000000000 +0000 +@@ -307,12 +307,13 @@ void show_context(void) + print_int(iname - 1); + print_char('>'); + }; +- } else if (iindex != in_open) { /* input from a pseudo file */ +- tprint_nl("l."); +- print_int(line_stack[iindex + 1]); + } else { + tprint_nl("l."); +- print_int(line); ++ if (iindex == in_open) { ++ print_int(line); ++ } else { /* input from a pseudo file */ ++ print_int(line_stack[iindex + 1]); ++ } + } + print_char(' '); + PSEUDO_PRINT_THE_LINE(); +@@ -390,7 +391,7 @@ void push_input(void) + incr(input_ptr); + } + +-@ ++@ + Here is a procedure that starts a new level of token-list input, given + a token list |p| and its type |t|. If |t=macro|, the calling routine should + set |name| and |loc|. +@@ -490,7 +491,7 @@ void back_input(void) + iloc = p; /* that was |back_list(p)|, without procedure overhead */ + } + +-@ Insert token |p| into \TeX's input ++@ Insert token |p| into \TeX's input + @c + int reinsert_token(boolean a, halfword pp) + { +@@ -585,7 +586,7 @@ void clear_for_error_prompt(void) + } + + @ To get \TeX's whole input mechanism going, we perform the following +- actions. ++ actions. + + @c + void initialize_inputstack(void) +@@ -685,7 +686,7 @@ static halfword string_to_pseudo(str_num + } + + +-@ The |pseudo_start| procedure initiates reading from a pseudo file. ++@ The |pseudo_start| procedure initiates reading from a pseudo file. + + @c + void pseudo_from_string(void) +@@ -779,7 +780,7 @@ boolean pseudo_input(void) + return true; + } + +-@ When we are done with a pseudo file we `close' it ++@ When we are done with a pseudo file we `close' it. + + @c + void pseudo_close(void) +--- texk/web2c/luatexdir/tex/linebreak.w ++++ texk/web2c/luatexdir/tex/linebreak.w 2011-10-13 07:39:33.000000000 +0000 +@@ -105,13 +105,6 @@ void line_break(boolean d, int line_brea + pack_begin_line = cur_list.ml_field; /* this is for over/underfull box messages */ + vlink(temp_head) = vlink(cur_list.head_field); + new_hyphenation(temp_head, cur_list.tail_field); +- if ((!is_char_node(vlink(cur_list.head_field))) +- && ((type(vlink(cur_list.head_field)) == whatsit_node) +- && (subtype(vlink(cur_list.head_field)) == local_par_node))) +- paragraph_dir = local_par_dir(vlink(cur_list.head_field)); +- else { +- assert(0); /* |paragraph_dir = 0|; */ +- } + cur_list.tail_field = new_ligkern(temp_head, cur_list.tail_field); + if (is_char_node(cur_list.tail_field)) { + tail_append(new_penalty(inf_penalty)); +@@ -127,12 +120,34 @@ void line_break(boolean d, int line_brea + final_par_glue = new_param_glue(par_fill_skip_code); + couple_nodes(cur_list.tail_field, final_par_glue); + cur_list.tail_field = vlink(cur_list.tail_field); ++#ifdef DEBUG ++ { ++ int n = temp_head; ++ fprintf(stdout, "pre_linebreak_filter status:\n"); ++ while (n) { ++ fprintf(stdout, " %s node %d\n", ++ get_node_name(type(n), subtype(n)), (int) n); ++ n = vlink(n); ++ } ++ } ++#endif + lua_node_filter(pre_linebreak_filter_callback, + line_break_context, temp_head, + addressof(cur_list.tail_field)); + last_line_fill = cur_list.tail_field; + pop_nest(); + start_of_par = cur_list.tail_field; ++#ifdef DEBUG ++ { ++ int n = temp_head; ++ fprintf(stdout, "pre_linebreak_filter returned:\n"); ++ while (n) { ++ fprintf(stdout, " %s node %d\n", ++ get_node_name(type(n), subtype(n)), (int) n); ++ n = vlink(n); ++ } ++ } ++#endif + callback_id = callback_defined(linebreak_filter_callback); + if (callback_id > 0) { + callback_id = +@@ -169,6 +184,12 @@ void line_break(boolean d, int line_brea + } + } + if (callback_id == 0) { ++ if ((!is_char_node(vlink(temp_head))) ++ && ((type(vlink(temp_head)) == whatsit_node) ++ && (subtype(vlink(temp_head)) == local_par_node))) ++ paragraph_dir = local_par_dir(vlink(temp_head)); ++ else ++ assert(0); /* |paragraph_dir = 0|; */ + ext_do_line_break(paragraph_dir, + int_par(pretolerance_code), + int_par(tracing_paragraphs_code), +--- texk/web2c/luatexdir/tex/mainbody.h ++++ texk/web2c/luatexdir/tex/mainbody.h 2011-10-13 07:39:33.000000000 +0000 +@@ -96,7 +96,6 @@ typedef unsigned char glue_ord; /* infin + + typedef unsigned short group_code; /* |save_level| for a level boundary */ + +-typedef int internal_font_number; /* |font| in a |char_node| */ + typedef int font_index; /* index into |font_info| */ + + typedef int save_pointer; +--- texk/web2c/luatexdir/tex/mlist.w ++++ texk/web2c/luatexdir/tex/mlist.w 2011-10-13 07:39:33.000000000 +0000 +@@ -2050,19 +2050,19 @@ static void make_over_delimiter(pointer + static void make_delimiter_over(pointer q, int cur_style) + { + pointer x, y, v; /* temporary registers for box construction */ +- scaled shift_up, shift_down, clr, delta; ++ scaled shift_up, shift_down, clr, actual; + y = clean_box(nucleus(q), cur_style, cur_style); + x = flat_delimiter(left_delimiter(q), + cur_size + (cur_size == script_script_size ? 0 : 1), + width(y), cur_style); + left_delimiter(q) = null; + fixup_widths(x, y); +- shift_up = over_delimiter_bgap(cur_style); ++ shift_up = over_delimiter_bgap(cur_style)-height(x)-depth(x); + shift_down = 0; + clr = over_delimiter_vgap(cur_style); +- delta = clr - ((shift_up - depth(x)) - (height(y) - shift_down)); +- if (delta > 0) { +- shift_up = shift_up + delta; ++ actual = shift_up - height(y); ++ if (actual < clr) { ++ shift_up = shift_up + (clr-actual); + } + v = wrapup_delimiter(x, y, q, shift_up, shift_down); + width(v) = width(x); /* this also equals |width(y)| */ +@@ -2077,7 +2077,7 @@ static void make_delimiter_over(pointer + static void make_delimiter_under(pointer q, int cur_style) + { + pointer x, y, v; /* temporary registers for box construction */ +- scaled shift_up, shift_down, clr, delta; ++ scaled shift_up, shift_down, clr, actual; + x = clean_box(nucleus(q), cur_style, cur_style); + y = flat_delimiter(left_delimiter(q), + cur_size + (cur_size == script_script_size ? 0 : 1), +@@ -2085,11 +2085,11 @@ static void make_delimiter_under(pointer + left_delimiter(q) = null; + fixup_widths(x, y); + shift_up = 0; +- shift_down = under_delimiter_bgap(cur_style); ++ shift_down = under_delimiter_bgap(cur_style) - height(y)-depth(y); + clr = under_delimiter_vgap(cur_style); +- delta = clr - ((shift_up - depth(x)) - (height(y) - shift_down)); +- if (delta > 0) { +- shift_down = shift_down + delta; ++ actual = shift_down - depth(x); ++ if (actual ++% Copyright 2006-2011 Taco Hoekwater + + % This file is part of LuaTeX. + +@@ -19,8 +19,8 @@ + + @ @c + static const char _svn_version[] = +- "$Id: textoken.w 4032 2010-12-11 09:38:19Z taco $" +- "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.66.0/source/texk/web2c/luatexdir/tex/textoken.w $"; ++ "$Id: textoken.w 4315 2011-06-28 08:54:07Z taco $" ++ "$URL: http://foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/tex/textoken.w $"; + + #include "ptexlib.h" + +@@ -1605,6 +1605,27 @@ void ins_the_toks(void) + ins_list(token_link(temp_token_head)); + } + ++@ This routine, used in the next one, prints the job name, possibly ++modified by the |process_jobname| callback. ++ ++@c ++static void print_job_name(void) ++{ ++ if (job_name) { ++ char *s, *ss; /* C strings for jobname before and after processing */ ++ int callback_id, lua_retval; ++ s = (char*)str_string(job_name); ++ callback_id = callback_defined(process_jobname_callback); ++ if (callback_id > 0) { ++ lua_retval = run_callback(callback_id, "S->S", s, &ss); ++ if ((lua_retval == true) && (ss != NULL)) ++ s = ss; ++ } ++ tprint(s); ++ } else { ++ print(job_name); ++ } ++} + + @ Here is a routine that print the result of a convert command, using + the argument |i|. It returns |false | if it does not know to print +@@ -1654,7 +1675,7 @@ static boolean print_convert_string(half + print(format_name); + break; + case job_name_code: +- print(job_name); ++ print_job_name(); + break; + case font_name_code: + append_string((unsigned char *) font_name(i), +@@ -1665,6 +1686,9 @@ static boolean print_convert_string(half + tprint("pt"); + } + break; ++ case font_id_code: ++ print_int(i); ++ break; + case math_style_code: + print_math_style(); + break; +@@ -1681,7 +1705,7 @@ static boolean print_convert_string(half + tprint("pt"); + break; + case pdf_page_ref_code: +- print_int(get_obj(static_pdf, obj_type_page, i, false)); ++ print_int(pdf_get_obj(static_pdf, obj_type_page, i, false)); + break; + case pdf_xform_name_code: + print_int(obj_info(static_pdf, i)); +@@ -1768,6 +1792,7 @@ void conv_toks(void) + case aleph_code: + break; + case font_name_code: ++ case font_id_code: + scan_font_ident(); + break; + case pdftex_revision_code: +--- texk/web2c/luatexdir/utils/utils.h ++++ texk/web2c/luatexdir/utils/utils.h 2011-10-13 07:39:33.000000000 +0000 +@@ -1,7 +1,7 @@ + /* utils.h + + Copyright 1996-2006 Han The Thanh +- Copyright 2006-2009 Taco Hoekwater ++ Copyright 2006-2011 Taco Hoekwater + + This file is part of LuaTeX. + +@@ -43,7 +43,6 @@ int xfflush(FILE *); + int xgetc(FILE *); + int xputc(int, FILE *); + scaled ext_xn_over_d(scaled, scaled, scaled); +-char *stripzeros(char *); + void initversionstring(char **versions); + extern void check_buffer_overflow(int wsize); + extern void check_pool_overflow(int wsize); +--- texk/web2c/luatexdir/utils/utils.w ++++ texk/web2c/luatexdir/utils/utils.w 2011-10-13 07:39:33.000000000 +0000 +@@ -46,10 +46,6 @@ static const char _svn_version[] = + + #include "png.h" + +-/* POPPLER_VERSION is defined in poppler-config.h for poppler from +- * the TeX Live tree, or in the Makefile for an installed version. */ +-#include "poppler-config.h" +- + @ @c + #define check_nprintf(size_get, size_want) \ + if ((unsigned)(size_get) >= (unsigned)(size_want)) \ +@@ -178,8 +174,10 @@ void pdftex_fail(const char *fmt, ...) + __attribute__ ((format(printf, 1, 2))) + void pdftex_warn(const char *fmt, ...) + { ++ int old_selector = selector; + va_list args; + va_start(args, fmt); ++ selector = term_and_log; + print_ln(); + tex_printf("LuaTeX warning"); + if (cur_file_name) +@@ -189,6 +187,7 @@ void pdftex_warn(const char *fmt, ...) + tprint(print_buf); + va_end(args); + print_ln(); ++ selector = old_selector; + } + + @ @c +@@ -273,6 +272,7 @@ scaled ext_xn_over_d(scaled x, scaled n, + @ function strips trailing zeros in string with numbers; + leading zeros are not stripped (as in real life) + @c ++#if 0 + char *stripzeros(char *a) + { + enum { NONUM, DOTNONUM, INT, DOT, LEADDOT, FRAC } s = NONUM, t = NONUM; +@@ -339,6 +339,7 @@ char *stripzeros(char *a) + *q = '\0'; + return a; + } ++#endif + + @ @c + void initversionstring(char **versions) +@@ -346,9 +347,11 @@ void initversionstring(char **versions) + (void) asprintf(versions, + "Compiled with libpng %s; using libpng %s\n" + "Compiled with zlib %s; using zlib %s\n" +- "Compiled with poppler version %s\n", ++ "Compiled with poppler version %d.%d.%d\n", + PNG_LIBPNG_VER_STRING, png_libpng_ver, +- ZLIB_VERSION, zlib_version, POPPLER_VERSION); ++ ZLIB_VERSION, zlib_version, ++ poppler_version_major(), poppler_version_minor(), ++ poppler_version_micro()); + } + + @ @c diff --git a/source-overflow.dif b/source-overflow.dif new file mode 100644 index 0000000..a0e3181 --- /dev/null +++ b/source-overflow.dif @@ -0,0 +1,168 @@ +--- texk/web2c/synctexdir/synctex-e-rec.ch0 (revision 23678) ++++ texk/web2c/synctexdir/synctex-e-rec.ch0 (revision 23688) +@@ -82,21 +82,11 @@ + link(prev_p):=p; + @z + +-@x etex.ch l.4126 +- if is_char_node(p) then r:=get_avail +- else case type(p) of ++@x etex.ch l.4186 + hlist_node,vlist_node: begin r:=get_node(box_node_size); +- mem[r+6]:=mem[p+6]; mem[r+5]:=mem[p+5]; {copy the last two words} +- words:=5; list_ptr(r):=null; {this affects |mem[r+5]|} +- end; + @y +- if is_char_node(p) then r:=get_avail +- else case type(p) of + hlist_node,vlist_node: begin r:=get_node(box_node_size); + @; +- mem[r+6]:=mem[p+6]; mem[r+5]:=mem[p+5]; {copy the last two words} +- words:=5; list_ptr(r):=null; {this affects |mem[r+5]|} +- end; + @z + + @x synctex-e-mem.ch0 l.100 +--- texk/web2c/eptexdir/eptex.ech (revision 23678) ++++ texk/web2c/eptexdir/eptex.ech 2011-12-12 09:46:29.391146557 +0000 +@@ -283,6 +283,18 @@ disp_node: begin + othercases goto next_p + @z + ++@x e-pTeX: just_copy ++ hlist_node,vlist_node: begin r:=get_node(box_node_size); ++ mem[r+6]:=mem[p+6]; mem[r+5]:=mem[p+5]; {copy the last two words} ++ words:=5; list_ptr(r):=null; {this affects |mem[r+5]|} ++@y ++ dir_node,hlist_node,vlist_node: begin r:=get_node(box_node_size); ++ mem[r+7]:=mem[p+7]; mem[r+6]:=mem[p+6]; mem[r+5]:=mem[p+5]; ++ {copy the last three words} ++ add_glue_ref(space_ptr(r)); add_glue_ref(xspace_ptr(r)); ++ words:=5; list_ptr(r):=null; {this affects |mem[r+5]|} ++@z ++ + @x e-pTeX: ifcsname l.28620 + buffer[m]:=info(p) mod @'400; incr(m); p:=link(p); + @y +--- texk/web2c/xetexdir/xetex.ch (revision 23186) ++++ texk/web2c/xetexdir/xetex.ch (revision 24314) +@@ -328,7 +328,7 @@ for i:=@'177 to @'377 do xchr[i]:=i; + {Initialize enc\TeX\ data.} + for i:=0 to 255 do mubyte_read[i]:=null; + for i:=0 to 255 do mubyte_write[i]:=0; +-for i:=0 to 128 do mubyte_cswrite[i]:=null; ++for i:=0 to 127 do mubyte_cswrite[i]:=null; + mubyte_keep := 0; mubyte_start := false; + write_noexpanding := false; cs_converting := false; + special_printing := false; message_printing := false; +--- texk/web2c/enctex.ch (revision 23186) ++++ texk/web2c/enctex.ch (revision 24314) +@@ -42,14 +42,14 @@ for i:=@'177 to @'377 do xchr[i]:=i; + {Initialize enc\TeX\ data.} + for i:=0 to 255 do mubyte_read[i]:=null; + for i:=0 to 255 do mubyte_write[i]:=0; +-for i:=0 to 128 do mubyte_cswrite[i]:=null; ++for i:=0 to 127 do mubyte_cswrite[i]:=null; + mubyte_keep := 0; mubyte_start := false; + write_noexpanding := false; cs_converting := false; + special_printing := false; message_printing := false; + no_convert := false; active_noconvert := false; + @z + +-@x [5.59] l.1508FIXME -- enc\TeX\ modifications of |print|. ++@x [5.59] l.1508 FIXME -- enc\TeX\ modifications of |print|. + else begin if selector>pseudo then + begin print_char(s); return; {internal strings are not expanded} + end; +--- texk/web2c/ptexdir/ptex-base.ch 2011/08/18 10:21:01 ++++ texk/web2c/ptexdir/ptex-base.ch 2011/08/18 13:52:11 +@@ -46,6 +46,7 @@ + % (31/12/2010) AK Bug fix and accent Kanji by Hironori Kitagawa. + % (19/01/2011) PB Let \lastkern etc act through disp node. + % (15/04/2011) PB pTeX p3.2 Add \ifdbox and \ifddir ++% (2011-08-18) PB Bug fix by Hironori Kitagawa. + % + @x [1.2] l.200 - pTeX: + @d banner==TeX_banner +@@ -5848,6 +5849,9 @@ + var @!jc:KANJI_code; {temporary register for KANJI} + @!sp,@!mp,@!ep:pointer; + begin@/ ++if f=null_font then ++ begin get_jfm_pos:=kchar_type(null_font)(0); return; ++ end; + jc:=toDVI(kcode); + sp:=1; { start position } + ep:=font_num_ext[f]-1; { end position } +@@ -6677,11 +6681,13 @@ + goto main_loop_j+3; + @# + main_loop_j+1: space_factor:=1000; +- fast_get_avail(main_p); font(main_p):=main_f; character(main_p):=cur_l; +- link(tail):=main_p; tail:=main_p; last_jchr:=tail; +- fast_get_avail(main_p); info(main_p):=KANJI(cur_chr); +- link(tail):=main_p; tail:=main_p; +- cx:=cur_chr; @; ++ if main_f<>null_font then ++ begin fast_get_avail(main_p); font(main_p):=main_f; character(main_p):=cur_l; ++ link(tail):=main_p; tail:=main_p; last_jchr:=tail; ++ fast_get_avail(main_p); info(main_p):=KANJI(cur_chr); ++ link(tail):=main_p; tail:=main_p; ++ cx:=cur_chr; @; ++ end; + ins_kp:=false; + again_2: + get_next; +@@ -6717,7 +6723,10 @@ + @# + main_loop_j+3: + if ins_kp=true then @; +- @; ++ if main_f<>null_font then ++ begin @; ++ end ++ else inhibit_glue_flag:=false; + if ins_kp=false then begin { Kanji -> Kanji } + goto main_loop_j+1; + end else if ins_kp=true then begin { Kanji -> Ascii } + +--- texk/dvipsk/dospecial.c 2010-05-10 17:47:35.000000000 +0200 ++++ texk/dvipsk/dospecial.c 2011-10-19 14:29:46.323146222 +0200 +@@ -112,7 +112,7 @@ static void + fgetboundingbox(char *f, float *llx_p, float *lly_p, float *urx_p, float *ury_p) + { + FILE *fp; +- char buf[BUFSIZ]; ++ char buf[BUFSIZ+1]; + + fp = search(figpath, f, READ); + if (fp == 0) +--- texk/web2c/luatexdir/luafontloader/fontforge/fontforge/psread.c 2010-04-04 15:55:46.000000000 +0200 ++++ texk/web2c/luatexdir/luafontloader/fontforge/fontforge/psread.c 2011-10-20 10:14:41.851646143 +0200 +@@ -385,7 +385,7 @@ return; + wrapper->top = io; + } + +-static int ioescapestopped(IO *wrapper, struct psstack *stack, int sp) { ++static int ioescapestopped(IO *wrapper, struct psstack *stack, int sp, const size_t bsize) { + _IO *io = wrapper->top, *iop; + int wasstopped; + +@@ -396,7 +396,7 @@ static int ioescapestopped(IO *wrapper, + free(io); + if ( wasstopped ) { + wrapper->top = iop; +- if ( sp<(int)(sizeof(stack)/sizeof(stack[0])) ) { ++ if ( sp<(int)bsize ) { + stack[sp].type = ps_bool; + stack[sp++].u.tf = true; + } +@@ -1609,7 +1609,7 @@ static void _InterpretPS(IO *wrapper, En + } + break; + case pt_stop: +- sp = ioescapestopped(wrapper,stack,sp); ++ sp = ioescapestopped(wrapper,stack,sp,sizeof(stack)/sizeof(stack[0])); + break; + case pt_load: + if ( sp>=1 && stack[sp-1].type==ps_lit ) { diff --git a/source-poppler.dif b/source-poppler.dif new file mode 100644 index 0000000..4c0bc87 --- /dev/null +++ b/source-poppler.dif @@ -0,0 +1,302 @@ +--- texk/web2c/xetexdir/XeTeX_ext.c ++++ texk/web2c/xetexdir/XeTeX_ext.c 2009-09-04 08:40:24.000000000 +0000 +@@ -39,15 +39,15 @@ authorization from the copyright holders + #include + + #ifdef XETEX_OTHER +-#ifdef POPPLER_VERSION +-#define xpdfVersion POPPLER_VERSION +-#define xpdfString "poppler" +-#include "poppler-config.h" +-#else +-#define xpdfString "xpdf" +-#include "xpdf/config.h" +-#endif +-#include "png.h" ++# ifdef POPPLER_VERSION ++# define xpdfVersion POPPLER_VERSION ++# define xpdfString "poppler" ++# include ++# else ++# define xpdfString "xpdf" ++# include "xpdf/config.h" ++# endif ++# include "png.h" + #endif + + #include "zlib.h" +--- texk/web2c/xetexdir/pdfimage.cpp ++++ texk/web2c/xetexdir/pdfimage.cpp 2009-09-04 08:44:54.000000000 +0000 +@@ -33,19 +33,27 @@ authorization from the copyright holders + #include "pdfimage.h" + + #ifdef POPPLER_VERSION +-#include +-#include +-#include +-#include +-#include +-#define GString GooString ++# include ++# include ++# include ++# include ++# include ++# define GString GooString + #else +-#include "goo/GString.h" ++# include "goo/GString.h" + #endif +- +-#include "PDFDoc.h" +-#include "Catalog.h" +-#include "Page.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + #include "XeTeX_ext.h" + +--- texk/web2c/xetexdir/xetexextra.h ++++ texk/web2c/xetexdir/xetexextra.h 2011-09-13 14:45:00.256426839 +0000 +@@ -56,7 +56,11 @@ Foundation, Inc., 675 Mass Ave, Cambridg + #include /* for ETEX_VERSION */ + #include /* for XETEX_VERSION */ + +-#define BANNER "This is XeTeX, Version 3.1415926-" ETEX_VERSION "-" XETEX_VERSION ++#ifdef POPPLER_VERSION ++# define BANNER "This is XeTeX using libpoppler, Version 3.1415926-" ETEX_VERSION "-" XETEX_VERSION ++#else ++# define BANNER "This is XeTeX, Version 3.1415926-" ETEX_VERSION "-" XETEX_VERSION ++#endif + #define COPYRIGHT_HOLDER "SIL International and Jonathan Kew" + #define AUTHOR "Jonathan Kew" + #define PROGRAM_HELP XETEXHELP +--- texk/web2c/luatexdir/image/epdf.h ++++ texk/web2c/luatexdir/image/epdf.h 2011-09-13 14:49:39.051927771 +0000 +@@ -36,20 +36,20 @@ + # include + # include + # include +-# include "Object.h" +-# include "Stream.h" +-# include "Gfx.h" +-# include "Annot.h" +-# include "Array.h" +-# include "Dict.h" +-# include "XRef.h" +-# include "Catalog.h" +-# include "Link.h" +-# include "Page.h" +-# include "GfxFont.h" +-# include "PDFDoc.h" +-# include "GlobalParams.h" +-# include "Error.h" ++# include ++# include ++# include ++# include ++# include ++# include ++# include ++# include ++# include ++# include ++# include ++# include ++# include ++# include + + extern "C" { + +--- texk/web2c/pdftexdir/pdftexextra.h ++++ texk/web2c/pdftexdir/pdftexextra.h 2011-09-13 14:46:22.147926062 +0000 +@@ -25,7 +25,11 @@ with this program. If not, see /* for PDFTEX_VERSION */ + #include /* for ETEX_VERSION */ + +-#define BANNER "This is pdfTeX, Version 3.1415926-" ETEX_VERSION "-" PDFTEX_VERSION ++#ifdef POPPLER_VERSION ++# define BANNER "This is pdfTeX using libpoppler, Version 3.1415926-" ETEX_VERSION "-" PDFTEX_VERSION ++#else ++# define BANNER "This is pdfTeX, Version 3.1415926-" ETEX_VERSION "-" PDFTEX_VERSION ++#endif + #define COPYRIGHT_HOLDER "Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX)" + #define AUTHOR NULL + #define PROGRAM_HELP PDFTEXHELP +--- texk/web2c/pdftexdir/pdftoepdf.cc ++++ texk/web2c/pdftexdir/pdftoepdf.cc 2010-11-12 12:15:38.000000000 +0000 +@@ -21,44 +21,41 @@ with this program. If not, see . + */ +-#define boolean MINGW32_boolean +- + #include + #include + #include + #include + #include + #include +- ++extern "C" { ++#include ++} + #ifdef POPPLER_VERSION +-#include +-#include +-#include +-#include +-#include +-#define GString GooString ++# include ++# include ++# include ++# include ++# include ++# define GString GooString + #else +-#include +-#include +-#include +-#include +-#include ++# include ++# include ++# include ++# include + #endif +- +-#include "Object.h" +-#include "Stream.h" +-#include "Array.h" +-#include "Dict.h" +-#include "XRef.h" +-#include "Catalog.h" +-#include "Link.h" +-#include "Page.h" +-#include "GfxFont.h" +-#include "PDFDoc.h" +-#include "GlobalParams.h" +-#include "Error.h" +- +-#undef boolean ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + // This file is mostly C and not very much C++; it's just used to interface + // the functions of xpdf, which happens to be written in C++. +--- texk/web2c/pdftexdir/pdftosrc.cc ++++ texk/web2c/pdftexdir/pdftosrc.cc 2009-09-04 08:56:10.000000000 +0000 +@@ -22,33 +22,35 @@ with this program. If not, see + #include + #include +- ++extern "C" { ++#include ++} + #ifdef POPPLER_VERSION +-#define GString GooString +-#define xpdfVersion POPPLER_VERSION +-#include +-#include +-#include +-#include ++# define GString GooString ++# define xpdfVersion POPPLER_VERSION ++# include ++# include ++# include ++# include + #else +-#include +-#include +-#include +-#include +-#include ++# include ++# include ++# include ++# include + #endif +- +-#include "Object.h" +-#include "Stream.h" +-#include "Array.h" +-#include "Dict.h" +-#include "XRef.h" +-#include "Catalog.h" +-#include "Page.h" +-#include "GfxFont.h" +-#include "PDFDoc.h" +-#include "GlobalParams.h" +-#include "Error.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + static XRef *xref = 0; + +--- texk/web2c/pdftexdir/utils.c ++++ texk/web2c/pdftexdir/utils.c 2009-09-04 08:38:04.000000000 +0000 +@@ -42,12 +42,12 @@ with this program. If not, see ++# define xpdfVersion POPPLER_VERSION ++# define xpdfString "poppler" + #else +-#include "xpdf/config.h" /* just to get the xpdf version */ +-#define xpdfString "xpdf" ++# include "xpdf/config.h" /* just to get the xpdf version */ ++# define xpdfString "xpdf" + #endif + + #define check_nprintf(size_get, size_want) \ +--- texk/web2c/pdftexdir/writefont.c ++++ texk/web2c/pdftexdir/writefont.c 2009-09-04 08:39:19.000000000 +0000 +@@ -17,6 +17,9 @@ You should have received a copy of the G + with this program. If not, see . + */ + ++#ifdef POPPLER_VERSION ++# include ++#endif + #include "ptexlib.h" + + /**********************************************************************/ diff --git a/source-psutils-flip.dif b/source-psutils-flip.dif new file mode 100644 index 0000000..ca52bc4 --- /dev/null +++ b/source-psutils-flip.dif @@ -0,0 +1,112 @@ +Patch for pstops from psutils to allow page flipping (i. e. mirroring). +Useful for creating of print matrices on transparent films. + +http://www.penguin.cz/~utx +ftp://ftp.penguin.cz/pub/users/utx/psutils/psutils-flip.diff + +--- utils/psutils/psutils-1.17/pstops.c.orig 1997-03-11 23:53:04.000000000 +0100 ++++ utils/psutils/psutils-1.17/pstops.c 2002-07-26 19:14:49.000000000 +0200 +@@ -35,7 +35,7 @@ + { + fprintf(stderr, "%s: page specification error:\n", program); + fprintf(stderr, " = [modulo:]\n"); +- fprintf(stderr, " = [-]pageno[@scale][L|R|U][(xoff,yoff)][,spec|+spec]\n"); ++ fprintf(stderr, " = [-]pageno[@scale][L|R|U|H|V][(xoff,yoff)][,spec|+spec]\n"); + fprintf(stderr, " modulo>=1, 0<=pagenorotate += 180; + tail->flags |= ROTATE; + break; ++ case 'h': case 'H': ++ tail->hflip += 1; ++ tail->flags |= HFLIP; ++ break; ++ case 'v': case 'V': ++ tail->vflip += 1; ++ tail->flags |= VFLIP; ++ break; + case '(': + tail->xoff += parsedimen(&str, argerror); + if (*str++ != ',') argerror(); +--- utils/psutils/psutils-1.17/psspec.h.orig 1997-03-11 23:53:04.000000000 +0100 ++++ utils/psutils/psutils-1.17/psspec.h 2002-07-26 17:41:41.000000000 +0200 +@@ -8,12 +8,14 @@ + /* pagespec flags */ + #define ADD_NEXT (0x01) + #define ROTATE (0x02) +-#define SCALE (0x04) +-#define OFFSET (0x08) +-#define GSAVE (ROTATE|SCALE|OFFSET) ++#define HFLIP (0x04) ++#define VFLIP (0x08) ++#define SCALE (0x10) ++#define OFFSET (0x20) ++#define GSAVE (ROTATE|HFLIP|VFLIP|SCALE|OFFSET) + + typedef struct pagespec { +- int reversed, pageno, flags, rotate; ++ int reversed, pageno, flags, rotate, hflip, vflip; + double xoff, yoff, scale; + struct pagespec *next; + } PageSpec ; +--- utils/psutils/psutils-1.17/psspec.c.orig 1997-03-11 23:53:04.000000000 +0100 ++++ utils/psutils/psutils-1.17/psspec.c 2002-07-26 19:21:10.000000000 +0200 +@@ -22,6 +22,8 @@ + if (temp == NULL) + message(FATAL, "out of memory\n"); + temp->reversed = temp->pageno = temp->flags = temp->rotate = 0; ++ temp->hflip = 0; ++ temp->vflip = 0; + temp->scale = 1; + temp->xoff = temp->yoff = 0; + temp->next = NULL; +@@ -208,6 +210,14 @@ + sprintf(buffer, "%d rotate\n", ps->rotate); + writestring(buffer); + } ++ if ((ps->flags & HFLIP) && (ps->hflip%2)) { ++ sprintf(buffer, "[ -1 0 0 1 %f 0 ] concat\n", width*ps->scale); ++ writestring(buffer); ++ } ++ if ((ps->flags & VFLIP) && (ps->vflip%2)) { ++ sprintf(buffer, "[ 1 0 0 -1 0 %f ] concat\n", height*ps->scale); ++ writestring(buffer); ++ } + if (ps->flags & SCALE) { + sprintf(buffer, "%f dup scale\n", ps->scale); + writestring(buffer); +--- utils/psutils/psutils-1.17/pstops.man.orig 1997-03-11 23:53:04.000000000 +0100 ++++ utils/psutils/psutils-1.17/pstops.man 2002-07-26 19:25:37.000000000 +0200 +@@ -43,7 +43,7 @@ + .I = spec[+specs][,specs] + .TP + .I spec +-.I = [-]pageno[L][R][U][@scale][(xoff,yoff)] ++.I = [-]pageno[L][R][U][H][V][@scale][(xoff,yoff)] + .RE + .sp + .I modulo +@@ -74,8 +74,9 @@ + or + .B "h" + to specify as a multiple of the width or height. +-The optional parameters \fIL\fR, \fIR\fR, and \fIU\fR rotate the page left, +-right, or upside-down. ++The optional parameters \fIL\fR, \fIR\fR, \fIU\fR, \fIH\fR and \fIV\fR ++rotate the page left, right, or upside-down, and flip (mirror) page ++horizontally or vertically. + The optional + .I scale + parameter scales the page by the fraction specified. +--- utils/psutils/psutils-1.17/README.orig 1997-03-11 23:53:05.000000000 +0100 ++++ utils/psutils/psutils-1.17/README 2002-07-26 19:36:58.000000000 +0200 +@@ -181,6 +181,7 @@ + Mike Coleman + Dale Scheetz dwarf@polaris.net + Yves Arrouye arrouye@marin.fdn.fr ++ Stanislav Brabec utx@penguin.cz + + (Apologies to anyone who I have left out, it was not intentional.) + diff --git a/source-psutils.dif b/source-psutils.dif new file mode 100644 index 0000000..4d9cd23 --- /dev/null +++ b/source-psutils.dif @@ -0,0 +1,375 @@ +--- utils/psutils/psutils-1.17/Makefile.unix ++++ utils/psutils/psutils-1.17/Makefile.unix 2009-08-28 14:44:14.829902235 +0000 +@@ -25,10 +25,10 @@ PAPER=a4 + + OS = UNIX + +-BINDIR = /usr/local/bin ++BINDIR = /usr/bin + SCRIPTDIR = $(BINDIR) +-INCLUDEDIR = /usr/local/share/psutils +-PERL = /usr/local/bin/perl ++INCLUDEDIR = /usr/share/psutils ++PERL = /usr/bin/perl + + BINMODE = 0755 + MANMODE = 0644 +@@ -36,10 +36,11 @@ CHMOD = chmod + INSTALL = install -c -m $(BINMODE) + INSTALLMAN = install -c -m $(MANMODE) + MANEXT = 1 +-MANDIR = /usr/local/share/man/man$(MANEXT) ++MANDIR = /usr/share/man/man$(MANEXT) + + CC = gcc +-CFLAGS = -DPAPER=\"$(PAPER)\" -DUNIX -O -Wall ++CFLAGS = -DPAPER=\"$(PAPER)\" -DUNIX $(RPM_OPT_FLAGS) -pipe -Wall ++CCFLAGS = $(CFLAGS) + + BIN = psbook psselect pstops epsffit psnup \ + psresize +--- utils/psutils/psutils-1.17/epsffit.c ++++ utils/psutils/psutils-1.17/epsffit.c 2009-08-28 14:47:36.941903881 +0000 +@@ -47,8 +47,8 @@ int main(int argc, char **argv) + int furx, fury, fllx, flly; + int showpage = 0, centre = 0, rotate = 0, aspect = 0, maximise = 0; + char buf[BUFSIZ]; +- FILE *input; +- FILE *output; ++ FILE *input = stdin; ++ FILE *output = stdout; + + program = *argv++; argc--; + +@@ -164,9 +164,14 @@ int main(int argc, char **argv) + yoffset -= lly * yscale; + } + fputs("%%EndComments\n", output); +- if (showpage) +- fputs("save /showpage{}def /copypage{}def /erasepage{}def\n", output); +- else ++ if (showpage) { ++ fputs("/startEpsffit {\n", output); ++ fputs(" /EpsffitSave {save} def\n", output); ++ fputs(" userdict 200 dict begin\n", output); ++ fputs(" /showpage{}def /copypage{}def /erasepage{}def\n", output); ++ fputs("}def\n", output); ++ fputs("startEpsffit\n", output); ++ } else + fputs("%%BeginProcSet: epsffit 1 0\n", output); + fputs("gsave\n", output); + fprintf(output, "%.3f %.3f translate\n", xoffset, yoffset); +@@ -182,7 +187,7 @@ int main(int argc, char **argv) + if (bbfound) { + fputs("grestore\n", output); + if (showpage) +- fputs("restore showpage\n", output); /* just in case */ ++ fputs("end EpsffitSave restore showpage\n", output); /* just in case */ + } else + message(FATAL, "no %%%%BoundingBox:\n"); + +--- utils/psutils/psutils-1.17/fixmacps.pl ++++ utils/psutils/psutils-1.17/fixmacps.pl 2009-08-28 14:44:14.833901961 +0000 +@@ -7,7 +7,7 @@ + use File::Basename; + + $line = 0; # keep line count +-$predir = `kpsewhich -progname=dvips -format="other text files" md71_0.ps`; ++$predir = `kpsewhich -progname=dvips/psutils -format="other text files" md71_0.ps`; + $dir=`dirname $predir`; + $prefix = "md"; + $default = "md71_0.ps"; +--- utils/psutils/psutils-1.17/getafm ++++ utils/psutils/psutils-1.17/getafm 2009-08-28 14:44:14.833901961 +0000 +@@ -1,7 +1,7 @@ + #!/bin/sh + + if [ $# -ne 1 ]; then +- echo "usage: $0 font-name | gsnd - >font-name.afm" >&2 ++ echo "usage: $0 font-name | gsnd -q - >font-name.afm" >&2 + exit 1 + fi + +@@ -66,8 +66,9 @@ cat << EOF + (isFixedPitch)(IsFixedPitch) prany + (UnderlinePosition)dup prany + (UnderlineThickness)dup prany +- (Version)(version) prany ++ (version)(Version) prany + (Notice)dup prany ++ (Copyright)dup prany + pop + } + { +--- utils/psutils/psutils-1.17/pserror.c ++++ utils/psutils/psutils-1.17/pserror.c 2009-08-28 14:44:14.833901961 +0000 +@@ -17,7 +17,7 @@ extern char *program ; /* Defined by mai + warnings, and errors sent to stderr. If called with the flags MESSAGE_EXIT + set, the routine does not return */ + +-#define MAX_MESSAGE 256 /* maximum formatted message length */ ++#define MAX_MESSAGE 1024 /* maximum formatted message length */ + #define MAX_FORMAT 16 /* maximum format length */ + #define MAX_COLUMN 78 /* maximum column to print upto */ + +@@ -27,6 +27,7 @@ void message(int flags, char *format, .. + static int column = 0 ; /* current screen column for message wrap */ + char msgbuf[MAX_MESSAGE] ; /* buffer in which to put the message */ + char *bufptr = msgbuf ; /* message buffer pointer */ ++ char *tail = bufptr + MAX_MESSAGE; + + if ( (flags & MESSAGE_NL) && column != 0 ) { /* new line if not already */ + putc('\n', stderr) ; +@@ -34,8 +35,11 @@ void message(int flags, char *format, .. + } + + if ( flags & MESSAGE_PROGRAM ) { ++ const size_t len = strlen(program); ++ if (len + 2 >= tail - bufptr) ++ goto out; + strcpy(bufptr, program) ; +- bufptr += strlen(program) ; ++ bufptr += len; + *bufptr++ = ':' ; + *bufptr++ = ' ' ; + } +@@ -55,13 +59,15 @@ void message(int flags, char *format, .. + fmtbuf[index] = '\0' ; + switch (c) { + case '%': ++ if (bufptr >= tail) ++ goto out; + *bufptr++ = '%' ; + case '\0': + break ; + case 'e': case 'E': case 'f': case 'g': case 'G': + { + double d = va_arg(args, double) ; +- sprintf(bufptr, fmtbuf, d) ; ++ snprintf(bufptr, tail - bufptr, fmtbuf, d); + bufptr += strlen(bufptr) ; + } + break ; +@@ -69,17 +75,17 @@ void message(int flags, char *format, .. + case 'p': case 'u': case 'x': case 'X': + if ( longform ) { + long l = va_arg(args, long) ; +- sprintf(bufptr, fmtbuf, l) ; ++ snprintf(bufptr, tail - bufptr, fmtbuf, l); + } else { + int i = va_arg(args, int) ; +- sprintf(bufptr, fmtbuf, i) ; ++ snprintf(bufptr, tail - bufptr, fmtbuf, i); + } + bufptr += strlen(bufptr) ; + break ; + case 's': + { + char *s = va_arg(args, char *) ; +- sprintf(bufptr, fmtbuf, s) ; ++ snprintf(bufptr, tail - bufptr, fmtbuf, s); + bufptr += strlen(bufptr) ; + } + break ; +@@ -92,6 +98,8 @@ void message(int flags, char *format, .. + } while ( !done ) ; + } else if ( c == '\n' ) { /* write out message so far and reset column */ + int len = bufptr - msgbuf ; /* length of current message */ ++ if (bufptr >= tail) ++ goto out; + *bufptr++ = '\n' ; + *bufptr = '\0' ; + if ( column + len > MAX_COLUMN && column > 0 ) { +@@ -100,8 +108,11 @@ void message(int flags, char *format, .. + } + fputs(bufptr = msgbuf, stderr) ; + column = 0 ; +- } else ++ } else { ++ if (bufptr >= tail) ++ goto out; + *bufptr++ = c ; ++ } + } + *bufptr = '\0' ; + { +@@ -117,6 +128,7 @@ void message(int flags, char *format, .. + } + va_end(args) ; + +- if ( flags & MESSAGE_EXIT ) /* don't return to program */ ++out: ++ if (flags & MESSAGE_EXIT) /* don't return to program */ + exit(1) ; + } +--- utils/psutils/psutils-1.17/psmerge.man ++++ utils/psutils/psutils-1.17/psmerge.man 2009-08-28 14:44:14.833901961 +0000 +@@ -24,6 +24,26 @@ standard output. + .I Psmerge + will merge multiple files concatenated into a single file as if they + were in separate files. ++.SH BUGS ++.I psmerge ++is for a very specific case; it does not merge files in the general case. ++.br ++For all those cases which can not be handled by ++.I psmerge ++the program ++.I gs ++(known as ghostscript) may help: ++ ++.sp 1 ++.in +1c ++.nf ++ gs -dNOPAUSE -sDEVICE=pswrite -sOutputFile=out.ps \\ ++ file1.ps file2.ps ... -c quit ++.fi ++.in -1c ++.sp 1 ++ ++This is rather slow and generates bigger output files. + .SH AUTHOR + Copyright (C) Angus J. C. Duggan 1991-1995 + .SH "SEE ALSO" +@@ -31,6 +51,3 @@ Copyright (C) Angus J. C. Duggan 1991-19 + .SH TRADEMARKS + .B PostScript + is a trademark of Adobe Systems Incorporated. +-.SH BUGS +-.I psmerge +-is for a very specific case; it does not merge files in the general case. +--- utils/psutils/psutils-1.17/psselect.c ++++ utils/psutils/psutils-1.17/psselect.c 2009-08-28 14:44:14.837902516 +0000 +@@ -52,6 +52,9 @@ static PageRange *addrange(char *str, Pa + { + int first=0; + int sign; ++ ++ if(!str) return NULL; ++ + sign = (*str == '_' && ++str) ? -1 : 1; + if (isdigit(*str)) { + first = sign*atoi(str); +--- utils/psutils/psutils-1.17/psspec.c ++++ utils/psutils/psutils-1.17/psspec.c 2009-08-28 14:44:14.837902516 +0000 +@@ -12,6 +12,9 @@ + + #include + ++/* #define SHOWPAGE_LOAD 1 */ ++#undef SHOWPAGE_LOAD ++ + double width = -1; + double height = -1; + +--- utils/psutils/psutils-1.17/pstops.man ++++ utils/psutils/psutils-1.17/pstops.man 2009-08-28 14:44:14.837902516 +0000 +@@ -86,7 +86,7 @@ the document, instead of the start. + If page \fIspec\fRs are separated by + .B \+ + the pages will be merged into one page; if they are separated by +-.B \, ++.B , + they will be on separate pages. + If there is only one page specification, with + .I pageno +--- utils/psutils/psutils-1.17/psutil.c ++++ utils/psutils/psutils-1.17/psutil.c 2009-08-28 14:44:14.837902516 +0000 +@@ -44,14 +44,45 @@ static long *pageptr; + + /* list of paper sizes supported */ + static Paper papersizes[] = { +- { "a3", 842, 1191 }, /* 29.7cm * 42cm */ +- { "a4", 595, 842 }, /* 21cm * 29.7cm */ +- { "a5", 421, 595 }, /* 14.85cm * 21cm */ +- { "b5", 516, 729 }, /* 18.2cm * 25.72cm */ +- { "A3", 842, 1191 }, /* 29.7cm * 42cm */ +- { "A4", 595, 842 }, /* 21cm * 29.7cm */ +- { "A5", 421, 595 }, /* 14.85cm * 21cm */ +- { "B5", 516, 729 }, /* 18.2cm * 25.72cm */ ++ { "a0", 2384, 3370 }, ++ { "a1", 1684, 2384 }, ++ { "a2", 1191, 1684 }, ++ { "a3", 842, 1191 }, /* 29.7cm * 42cm */ ++ { "a4", 595, 842 }, /* 21cm * 29.7cm */ ++ { "a5", 421, 595 }, /* 14.85cm * 21cm */ ++ { "a6", 297, 420 }, ++ { "a7", 210, 297 }, ++ { "a8", 148, 210 }, ++ { "a9", 105, 148 }, ++ { "a10", 73, 105 }, ++ { "isob0", 2835, 4008 }, ++ { "b0", 2835, 4008 }, ++ { "isob1", 2004, 2835 }, ++ { "b1", 2004, 2835 }, ++ { "isob2", 1417, 2004 }, ++ { "b2", 1417, 2004 }, ++ { "isob3", 1001, 1417 }, ++ { "b3", 1001, 1417 }, ++ { "isob4", 709, 1001 }, ++ { "b4", 709, 1001 }, ++ { "isob5", 499, 709 }, ++ { "b5", 499, 709 }, ++ { "isob6", 354, 499 }, ++ { "b6", 354, 499 }, ++ { "jisb0", 2920, 4127 }, ++ { "jisb1", 2064, 2920 }, ++ { "jisb2", 1460, 2064 }, ++ { "jisb3", 1032, 1460 }, ++ { "jisb4", 729, 1032 }, ++ { "jisb5", 516, 729 }, ++ { "jisb6", 363, 516 }, ++ { "c0", 2599, 3677 }, ++ { "c1", 1837, 2599 }, ++ { "c2", 1298, 1837 }, ++ { "c3", 918, 1298 }, ++ { "c4", 649, 918 }, ++ { "c5", 459, 649 }, ++ { "c6", 323, 459 }, + { "letter", 612, 792 }, /* 8.5in * 11in */ + { "legal", 612, 1008 }, /* 8.5in * 14in */ + { "ledger", 1224, 792 }, /* 17in * 11in */ +@@ -61,6 +92,14 @@ static Paper papersizes[] = { + { "folio", 612, 936 }, /* 8.5in * 13in */ + { "quarto", 610, 780 }, /* 8.5in * 10.83in */ + { "10x14", 720, 1008 }, /* 10in * 14in */ ++ { "archE", 2592, 3456 }, ++ { "archD", 1728, 2592 }, ++ { "archC", 1296, 1728 }, ++ { "archB", 864, 1296 }, ++ { "archA", 648, 864 }, ++ { "flsa", 612, 936 }, /* U.S. foolscap */ ++ { "flse", 612, 936 }, /* European foolscap */ ++ { "halfletter", 396, 612 }, + { NULL, 0, 0 } + }; + +@@ -69,7 +108,7 @@ Paper* findpaper(char *name) + { + Paper *pp; + for (pp = papersizes; PaperName(pp); pp++) { +- if (strcmp(PaperName(pp), name) == 0) { ++ if (strncasecmp(PaperName(pp), name, strlen(PaperName(pp))) == 0) { + return pp; + } + } +@@ -88,16 +127,15 @@ FILE *seekable(FILE *fp) + #if defined(WINNT) || defined(WIN32) + struct _stat fs ; + #else +- long fpos; ++ struct stat fs; + #endif + + #if defined(WINNT) || defined(WIN32) + if (_fstat(fileno(fp), &fs) == 0 && (fs.st_mode&_S_IFREG) != 0) + return (fp); + #else +- if ((fpos = ftell(fp)) >= 0) +- if (!fseek(fp, 0L, SEEK_END) && !fseek(fp, fpos, SEEK_SET)) +- return (fp); ++ if (fstat(fileno(fp), &fs) == 0 && S_ISREG(fs.st_mode)) ++ return (fp); + #endif + + #if defined(MSDOS) diff --git a/source-texdoc.dif b/source-texdoc.dif new file mode 100644 index 0000000..0707cd1 --- /dev/null +++ b/source-texdoc.dif @@ -0,0 +1,23 @@ +--- texk/texlive/linked_scripts/tetex/texdoctk.pl ++++ texk/texlive/linked_scripts/tetex/texdoctk.pl 2008-09-24 14:56:14.000000000 +0000 +@@ -1458,7 +1458,7 @@ sub writerc { + mv $myrc,"$myrc.save" if (-e $myrc); + open(MYRC,">$myrc"); + print MYRC "# user's .texdocrc, generated by program\n +-# root of user's doc directory (from \$HOMETEXMF) ++# root of user's doc directory (from \$TEXMFHOME) + # can be left empty if \$TEXMFHOME is undefined + HOMEDOCPATH=$homedocpath_tmp + # general viewer behaviour (y or yes to make active) +@@ -1621,9 +1621,9 @@ sub readrc { + $localdocpath="$texmflocal/$localdocpath"; + } + } +-# find user's $HOMETEXMF/doc, if there is one ++# find user's $TEXMFHOME/doc, if there is one + if ($icall == 2 || $pathflagh == 1) { +- $texmfhome=`kpsewhich --expand-path=${qq}\$HOMETEXMF${qq}`; ++ $texmfhome=`kpsewhich --expand-path=${qq}\$TEXMFHOME${qq}`; + chomp $texmfhome; + if (length $texmfhome) { + # if HOMEDOCPATH is not explicitly defined, it equals TEXDOCPATH diff --git a/source-warns.dif b/source-warns.dif new file mode 100644 index 0000000..e660680 --- /dev/null +++ b/source-warns.dif @@ -0,0 +1,259 @@ +--- libs/icu/icu-4.6/i18n/decNumber.h ++++ libs/icu/icu-4.6/i18n/decNumber.h 2010-11-16 10:35:02.000000000 +0000 +@@ -54,26 +54,30 @@ + /* For ICU, use one digit per byte, to make it easier to emulate the + * old DigitList interface on top of a decNumber + */ +- #define DECDPUN 1 /* DECimal Digits Per UNit [must be >0 */ ++ #define DECDPUN 3 /* DECimal Digits Per UNit [must be >0 */ + /* and <10; 3 or powers of 2 are best]. */ + +- /* DECNUMDIGITS is the default number of digits that can be held in */ +- /* the structure. If undefined, 1 is assumed and it is assumed */ +- /* that the structure will be immediately followed by extra space, */ +- /* as required. DECNUMDIGITS is always >0. */ +- #if !defined(DECNUMDIGITS) +- #define DECNUMDIGITS 1 +- #endif +- + /* The size (integer data type) of each unit is determined by the */ + /* number of digits it will hold. */ + #if DECDPUN<=2 + #define decNumberUnit uint8_t ++ #define DECNUMDIGITS 3 + #elif DECDPUN<=4 + #define decNumberUnit uint16_t ++ #define DECNUMDIGITS 2 + #else + #define decNumberUnit uint32_t ++ #define DECNUMDIGITS 1 + #endif ++ ++ /* DECNUMDIGITS is the default number of digits that can be held in */ ++ /* the structure. If undefined, 1 is assumed and it is assumed */ ++ /* that the structure will be immediately followed by extra space, */ ++ /* as required. DECNUMDIGITS is always >0. */ ++ #if !defined(DECNUMDIGITS) ++ #define DECNUMDIGITS 1 ++ #endif ++ + /* The number of units needed is ceil(DECNUMDIGITS/DECDPUN) */ + #define DECNUMUNITS ((DECNUMDIGITS+DECDPUN-1)/DECDPUN) + +--- libs/icu/icu-4.6/tools/pkgdata/pkgdata.cpp ++++ libs/icu/icu-4.6/tools/pkgdata/pkgdata.cpp 2010-11-16 10:43:55.000000000 +0000 +@@ -1741,8 +1741,8 @@ static void loadLists(UPKGOptions *o, UE + /* #1 try the same path where pkgdata was called from. */ + findDirname(progname, cmdBuf, 1024, &status); + if(U_SUCCESS(status)) { +- uprv_strncat(cmdBuf, U_FILE_SEP_STRING, 1024); +- uprv_strncat(cmdBuf, cmd, 1024); ++ uprv_strncat(cmdBuf, U_FILE_SEP_STRING, strlen(U_FILE_SEP_STRING)); ++ uprv_strncat(cmdBuf, cmd, strlen(cmd)); + + if(verbose) { + fprintf(stdout, "# Calling icu-config: %s\n", cmdBuf); +--- libs/teckit/TECkit-2.5.1/source/Compiler.cpp ++++ libs/teckit/TECkit-2.5.1/source/Compiler.cpp 2009-08-28 15:16:33.000000000 +0000 +@@ -1451,13 +1451,16 @@ Compiler::Compiler(const char* txt, UInt + if (dest != 0) { + int result = compress2(dest + 8, &destLen, compiledTable, compiledSize, Z_BEST_COMPRESSION); + if (result == Z_OK) { +- destLen += 8; +- dest = (Byte*)realloc(dest, destLen); // shrink dest to fit +- WRITE(((FileHeader*)dest)->type, kMagicNumberCmp); +- WRITE(((FileHeader*)dest)->version, compiledSize); +- free(compiledTable); +- compiledTable = dest; +- compiledSize = destLen; ++ if ((dest = (Byte*)realloc(dest, destLen+8)) != NULL) { ++ destLen += 8; ++ WRITE(((FileHeader*)dest)->type, kMagicNumberCmp); ++ WRITE(((FileHeader*)dest)->version, compiledSize); ++ free(compiledTable); ++ compiledTable = dest; ++ compiledSize = destLen; ++ } ++ else ++ free(dest); + } + else + free(dest); +--- texk/makeindexk/genind.h ++++ texk/makeindexk/genind.h 2009-08-28 15:18:03.000000000 +0000 +@@ -25,6 +25,20 @@ + * + */ + ++#ifndef __has_idx_printf ++#define __has_idx_printf ++#include ++static __inline__ int idx_printf(FILE *stream, const char *format, ...) ++{ ++ int ret; ++ va_list ap; ++ va_start(ap, format); ++ ret = vfprintf(stream, format, ap); ++ va_end(ap); ++ return ret; ++} ++#endif ++ + #define IND_ERROR(F) { \ + if (idx_dot) { \ + fprintf(ilg_fp, "\n"); \ +@@ -45,7 +59,7 @@ + fprintf(ilg_fp, \ + "## Warning (input = %s, line = %d; output = %s, line = %d):\n -- ", \ + curr->fn, curr->lc, ind_fn, ind_lc+1); \ +- fprintf(ilg_fp, F, D); \ ++ idx_printf(ilg_fp, F, D); \ + ind_ec++; \ + } + +--- texk/makeindexk/mkind.h ++++ texk/makeindexk/mkind.h 2009-08-28 15:20:13.000000000 +0000 +@@ -245,6 +245,20 @@ extern int mk_getc (FILE *str); + #define STREQ(A, B) (strcmp(A, B) == 0) + #define STRNEQ(A, B) (strcmp(A, B) != 0) + ++#ifndef __has_idx_printf ++#define __has_idx_printf ++#include ++static __inline__ int idx_printf(FILE *stream, const char *format, ...) ++{ ++ int ret; ++ va_list ap; ++ va_start(ap, format); ++ ret = vfprintf(stream, format, ap); ++ va_end(ap); ++ return ret; ++} ++#endif ++ + #define MESSAGE(F) { \ + if (verbose) \ + fprintf(stderr, F); \ +@@ -253,8 +267,8 @@ extern int mk_getc (FILE *str); + + #define MESSAGE1(F, S) { \ + if (verbose) \ +- fprintf(stderr, F, S); \ +- fprintf(ilg_fp, F, S); \ ++ idx_printf(stderr, F, S); \ ++ idx_printf(ilg_fp, F, S); \ + } + + #if USE_KPATHSEA /* kpathsea defines a different FATAL */ +@@ -272,7 +286,7 @@ extern int mk_getc (FILE *str); + #endif + + #define FATAL1(F, S) { \ +- fprintf(stderr, F, S); \ ++ idx_printf(stderr, F, S); \ + fprintf(stderr, USAGE, pgm_fn); \ + EXIT(1); \ + } +--- texk/makeindexk/scanid.h ++++ texk/makeindexk/scanid.h 2009-08-28 15:21:10.000000000 +0000 +@@ -112,6 +112,20 @@ + idx_ec++; \ + } + ++#ifndef __has_idx_printf ++#define __has_idx_printf ++#include ++static __inline__ int idx_printf(FILE *stream, const char *format, ...) ++{ ++ int ret; ++ va_list ap; ++ va_start(ap, format); ++ ret = vfprintf(stream, format, ap); ++ va_end(ap); ++ return ret; ++} ++#endif ++ + #define IDX_ERROR1(F, D) { \ + if (idx_dot) { \ + fprintf(ilg_fp, "\n"); \ +@@ -119,7 +133,7 @@ + } \ + fprintf(ilg_fp, "!! Input index error (file = %s, line = %d):\n -- ", \ + idx_fn, idx_lc); \ +- fprintf(ilg_fp, F, D); \ ++ idx_printf(ilg_fp, F, D); \ + idx_ec++; \ + } + +--- texk/makeindexk/scanst.h ++++ texk/makeindexk/scanst.h 2009-08-28 15:21:39.000000000 +0000 +@@ -157,6 +157,20 @@ + put_dot = FALSE; \ + } + ++#ifndef __has_idx_printf ++#define __has_idx_printf ++#include ++static __inline__ int idx_printf(FILE *stream, const char *format, ...) ++{ ++ int ret; ++ va_list ap; ++ va_start(ap, format); ++ ret = vfprintf(stream, format, ap); ++ va_end(ap); ++ return ret; ++} ++#endif ++ + #define STY_ERROR1(F, D) { \ + if (idx_dot) { \ + fprintf(ilg_fp, "\n"); \ +@@ -164,7 +178,7 @@ + } \ + fprintf(ilg_fp, "** Input style error (file = %s, line = %d):\n -- ", \ + sty_fn, sty_lc); \ +- fprintf(ilg_fp, F, D); \ ++ idx_printf(ilg_fp, F, D); \ + sty_ec++; \ + put_dot = FALSE; \ + } +--- texk/ps2pkm/t1funcs.c ++++ texk/ps2pkm/t1funcs.c 2010-05-18 09:19:07.000000000 +0000 +@@ -242,7 +242,7 @@ int Type1OpenScalable (ev, ppFont, flags + else { + h = w = 0; + area->xmin = area->xmax = 0; +- area->ymax = area->ymax = 0; ++ area->ymin = area->ymax = 0; + } + + glyphs[i].metrics.leftSideBearing = area->xmin; +--- texk/ps2pkm/token.c ++++ texk/ps2pkm/token.c 2009-08-28 15:16:33.000000000 +0000 +@@ -108,7 +108,7 @@ static DOUBLE P10(exponent) + if (exponent < 0) { + power = 0.1; + value = (exponent & 1 ? power : 1.0); +- exponent = -(++exponent >> 1); /* portable C for -(exponent/2) */ ++ exponent = -((exponent+1) >> 1); /* portable C for -(exponent/2) */ + } + else { + power = 10.0; +--- texk/ps2pkm/type1.c ++++ texk/ps2pkm/type1.c 2009-08-28 15:16:33.000000000 +0000 +@@ -110,11 +110,11 @@ typedef struct xobject xobject; + static DOUBLE tmpx; /* Store macro argument in tmpx to avoid re-evaluation */ + static LONG tmpi; /* Store converted value in tmpi to avoid re-evaluation */ + +-#define FABS(x) (((tmpx = (x)) < 0.0) ? -tmpx : tmpx) ++#define FABS(x) ({ tmpx = (x); (tmpx < 0.0) ? -tmpx : tmpx; }) + +-#define CEIL(x) (((tmpi = (LONG) (tmpx = (x))) < tmpx) ? ++tmpi : tmpi) ++#define CEIL(x) ({ tmpi = (LONG) (tmpx = (x)); (tmpi < tmpx) ? ++tmpi : tmpi; }) + +-#define FLOOR(x) (((tmpi = (LONG) (tmpx = (x))) > tmpx) ? --tmpi : tmpi) ++#define FLOOR(x) ({ tmpi = (LONG) (tmpx = (x)); (tmpi > tmpx) ? --tmpi : tmpi; }) + + #define ROUND(x) FLOOR((x) + 0.5) + diff --git a/source-x11r7.dif b/source-x11r7.dif new file mode 100644 index 0000000..9f48c55 --- /dev/null +++ b/source-x11r7.dif @@ -0,0 +1,15 @@ +--- texk/xdvik/xdvi.h ++++ texk/xdvik/xdvi.h 2008-09-24 15:43:29.000000000 +0000 +@@ -202,6 +202,12 @@ typedef unsigned long xuint32; + #include + #endif + ++/* redefine X11 macros for our own usage, see below */ ++#ifdef __STDC__ ++# undef NeedFunctionPrototypes ++# undef NeedWidePrototypes ++#endif ++ + /* for unused parameters */ + #ifndef UNUSED + # define UNUSED(x) ((void)(x)) diff --git a/source-xdvizilla.dif b/source-xdvizilla.dif new file mode 100644 index 0000000..38a96ac --- /dev/null +++ b/source-xdvizilla.dif @@ -0,0 +1,16 @@ +--- texk/xdvik/xdvizilla ++++ texk/xdvik/xdvizilla 2008-09-25 10:38:16.072122050 +0000 +@@ -89,12 +89,7 @@ trap 'do_cleanup' 1 2 3 7 13 15 + ### create a temporary directory only read/writable by user + ### try mktemp if it's available + TMP_DIR=${TMPDIR-${TEMP-${TMP-/tmp}}}/${progname}.XXXXXX +-TMP_DIR=`mktemp -d "$TMP_DIR" 2> /dev/null` +-if [ $? -ne 0 ]; then +- ### fall back to unsafe creation +- TMP_DIR=${TMPDIR-${TEMP-${TMP-/tmp}}}/${progname}.$$ +- (umask 077; mkdir "$TMP_DIR") || do_abort "Could not create directory \`$TMP_DIR'" +-fi ++TMP_DIR=$(mktemp -d "$TMP_DIR") || do_abort "Could not create directory \`$TMP_DIR'" + + ### we hard-wire the magic for DVI files here since some "file" implementations + ### (e.g. on Solaris 9) don't recognize DVI files (bug #1508963) diff --git a/source.dif b/source.dif new file mode 100644 index 0000000..aef7f27 --- /dev/null +++ b/source.dif @@ -0,0 +1,1125 @@ +--- libs/icu/icu-4.6/common/Makefile.in ++++ libs/icu/icu-4.6/common/Makefile.in 2011-12-09 11:43:35.443147133 +0000 +@@ -66,7 +66,7 @@ DEFS += -DU_COMMON_IMPLEMENTATION @DEFS@ + LDFLAGS += $(LDFLAGSICUUC) + + # for plugin configuration +-CPPFLAGS += "-DDEFAULT_ICU_PLUGINS=\"$(libdir)/icu\" " ++CPPFLAGS += "-DDEFAULT_ICU_PLUGINS=\"/usr/lib/icu\" " + + # for icu data location + ifeq ($(PKGDATA_MODE),common) +--- reautoconf ++++ reautoconf 2009-09-03 10:53:28.000000000 +0000 +@@ -83,7 +83,7 @@ echo "$0: TL_AUTOHEADER, T + + # Give users a chance to quit here + # and set TL_AUTOCONF, TL_AUTOHEADER, TL_AUTOMAKE, and/or TL_ACLOCAL +-$do_cmd sleep 5 ++# $do_cmd sleep 5 + + AUTOCONF=$TL_AUTOCONF + AUTOHEADER=$TL_AUTOHEADER +--- texk/dviljk/dvi2xx.c ++++ texk/dviljk/dvi2xx.c 2009-09-02 12:47:26.000000000 +0000 +@@ -169,7 +169,18 @@ main(int argc, char *argv[]) + setbuf(ERR_STREAM, NULL); + G_progname = argv[0]; + #ifdef KPATHSEA ++# if defined(LJ) + kpse_set_program_name(argv[0], "dvilj"); ++# endif ++# if defined(LJ2P) ++ kpse_set_program_name(argv[0], "dvilj2p"); ++# endif ++# if defined(LJ4) && !defined(LJ4L) ++ kpse_set_program_name(argv[0], "dvilj4"); ++# endif ++# if defined(LJ4) && defined(LJ4L) ++ kpse_set_program_name(argv[0], "dvilj4l"); ++# endif + kpse_set_program_enabled (kpse_pk_format, MAKE_TEX_PK_BY_DEFAULT, kpse_src_compile); + #endif + DecodeArgs(argc, argv); +--- texk/kpathsea/c-fopen.h ++++ texk/kpathsea/c-fopen.h 2010-11-12 17:02:18.000000000 +0000 +@@ -34,17 +34,17 @@ + + /* How to open a binary file for reading: */ + #ifndef FOPEN_RBIN_MODE +-#define FOPEN_RBIN_MODE "rb" ++#define FOPEN_RBIN_MODE "r" + #endif /* not FOPEN_RBIN_MODE */ + + /* How to open a binary file for writing: */ + #ifndef FOPEN_WBIN_MODE +-#define FOPEN_WBIN_MODE "wb" ++#define FOPEN_WBIN_MODE "w" + #endif /* not FOPEN_WBIN_MODE */ + + /* How to open a binary file for appending: */ + #ifndef FOPEN_ABIN_MODE +-#define FOPEN_ABIN_MODE "ab" ++#define FOPEN_ABIN_MODE "a" + #endif /* not FOPEN_ABIN_MODE */ + + /* How to switch an already open file handle to binary mode. +--- texk/kpathsea/c-memstr.h ++++ texk/kpathsea/c-memstr.h 2009-09-02 12:47:26.000000000 +0000 +@@ -38,6 +38,7 @@ + + /* Just to be complete, we make both the system V/ANSI and the BSD + versions of the string functions available. */ ++#ifndef __GNUC__ + #if !defined(HAVE_STRCHR) && !defined(strchr) + #define strchr index + #endif +@@ -82,4 +83,6 @@ extern char *strstr (); + #endif + #endif + ++#endif /* not __GNUC__ */ ++ + #endif /* not KPATHSEA_C_MEMSTR_H */ +--- texk/kpathsea/cnf-to-paths.awk ++++ texk/kpathsea/cnf-to-paths.awk 2011-09-13 16:11:30.316427108 +0000 +@@ -32,7 +32,7 @@ + val = $0; + sub(/^.*=[ \t]*/, "", val); + sub(/[ \t]*$/, "", val); +- #print "got ident", ident, "and val", val >"/dev/stderr"; ++print "got ident", ident, "and val", val >"/dev/stderr"; + + if (val ~ /\$SELFAUTO/) { + # Replace all semicolons with colons in the SELFAUTO paths we're keeping. +--- texk/kpathsea/db.c ++++ texk/kpathsea/db.c 2010-11-12 17:04:26.000000000 +0000 +@@ -94,12 +94,21 @@ db_build (kpathsea kpse, hash_table_type + unsigned len = strlen (db_filename) - sizeof (DB_NAME) + 1; /* Keep the /. */ + string top_dir = (string)xmalloc (len + 1); + string cur_dir = NULL; /* First thing in ls-R might be a filename. */ +- FILE *db_file = fopen (db_filename, FOPEN_R_MODE); ++ struct stat statdb; ++ FILE *db_file; + + strncpy (top_dir, db_filename, len); + top_dir[len] = 0; + +- if (db_file) { ++ if ((getenv("MKTEXLSR") == NULL) && ++ (stat(db_filename, &statdb) < 0 || statdb.st_size == 0)) { ++ char buf[PATH_MAX+1]; ++ snprintf(buf, PATH_MAX, "mktexlsr %s", top_dir); ++ xputenv("MKTEXLSR", "true"); /* fork loop detection */ ++ system (buf); ++ } ++ ++ if ((db_file = fopen (db_filename, FOPEN_R_MODE))) { + while ((line = read_line (db_file)) != NULL) { + len = strlen (line); + +--- texk/kpathsea/mktex.opt ++++ texk/kpathsea/mktex.opt 2009-09-02 12:47:26.000000000 +0000 +@@ -37,10 +37,11 @@ if test "$DOSISH" = "no"; then SEP=':'; + # TEMPDIR needs to be unique to each process because of the possibility of two + # people running dvips (or whatever) simultaneously. + if test -n "$TMPDIR"; then +- TEMPDIR="${TMPDIR}/mt$$.tmp" ++ TEMPDIR="${TMPDIR}/.mtXXXXXXXXXX" + else +- TEMPDIR="/tmp/mt$$.tmp" ++ TEMPDIR="/tmp/.mtXXXXXXXXXX" + fi ++TEMPDIR=$(mktemp -d "$TEMPDIR") || exit 1 + + # We want to output only filenames to standard output, but it's too + # error-prone to write the scripts that way, so we direct stdout here. +@@ -48,17 +49,23 @@ STDOUT="$TEMPDIR/mt$$.out" + + # We will change search paths to include $KPSE_DOT. This is necessary + # since we cd to $TEMPDIR. +-: ${KPSE_DOT=`pwd`}; export KPSE_DOT ++: ${KPSE_DOT=${PWD}}; export KPSE_DOT + + # Clean up on normal or abnormal exit. + # The "cd /" is for MS-DOS and MS-Windows, where there is a separate + # current directory on each drive, and therefore "cd $KPSE_DOT" might + # still leave $TMPDIR current directory on its drive, in which case it + # cannot be removed. +-trap 'rc=$?; cd /; cd "$KPSE_DOT"; test -f "$STDOUT" && cat "$STDOUT"; rm -rf "$TEMPDIR"; exit $rc' \ +- 0 1 2 3 7 13 15 ++atexit () ++{ ++ local rc=$? ++ cd "$KPSE_DOT" ++ test -n "$STDOUT" -a -f "$STDOUT" && cat "$STDOUT" ++ test -n "$TEMPDIR" -a -d "$TEMPDIR" && rm -rf "$TEMPDIR" ++ exit $rc ++} ++trap 'atexit' EXIT SIGHUP SIGINT SIGQUIT SIGBUS SIGPIPE SIGTERM + +-(umask 077 && mkdir "$TEMPDIR") || exit 1 + cd "$TEMPDIR" || exit 1 + + # The alternative location for fonts. The directory need not exist, +@@ -68,6 +75,11 @@ if test -z "$MT_VARTEXFONTS"; then + echo "$0: VARTEXFONTS is not defined. Defaulting to \`$KPSE_DOT'." >&2 + MT_VARTEXFONTS='$KPSE_DOT' + fi ++: ${MT_TEXMFVAR=`kpsewhich --expand-var='$TEXMFVAR' | sed 's%^!!%%'`} ++if test -z "$MT_TEXMFVAR"; then ++ echo "$0: TEXMFVAR is not defined. Defaulting to \`$KPSE_DOT'." >&2 ++ MT_TEXMFVAR='$KPSE_DOT' ++fi + + # The supporting scripts: + : ${MT_MKTEXNAM=`kpsewhich --format='web2c files' mktexnam`} +--- texk/kpathsea/mktexlsr ++++ texk/kpathsea/mktexlsr 2011-09-14 10:37:28.867925384 +0000 +@@ -15,6 +15,9 @@ version='$Id: mktexlsr 23151 2011-06-27 + progname=`echo $0 | sed 's%.*/%%'` + usage="Usage: $progname [OPTION]... [DIR]... + ++MKTEXLSR=true; export MKTEXLSR ++set -o noclobber ++ + Rebuild ls-R filename databases used by TeX. If one or more arguments + DIRS are given, these are used as the directories in which to build + ls-R. Else all directories in the search path for ls-R files +@@ -51,6 +54,9 @@ if test "$DOSISH" = "no"; then SEP=':'; + # be done before kpsewhich can be called, and thus cannot be put into + # mktex.opt. + dirname=`echo $0 | sed 's%/*[^/][^/]*$%%'` ++case "$SEP$PATH$SEP" in ++ *$SEP$dirname$SEP*) dirname="" ;; ++esac + case $dirname in + "") # Do nothing + ;; +@@ -62,6 +68,28 @@ case $dirname in + export PATH ;; + esac + ++# Sometimes the scripts and binaries are located elsewhere check this ++# by following the links and extend the path with appropiate dirnames. ++ link=`readlink -f $0` ++dirname=`echo $link | sed 's%/*[^/][^/]*$%%'` ++ cpu=`uname -i|tr '[:upper:]' '[:lower:]' | sed 's/ppc64/ppc/;s/i386/i?86/'` ++ os=`uname -s|tr '[:upper:]' '[:lower:]'` ++ binary=`echo $dirname | sed "s%share%lib%;s%noarch%${cpu}-${os}%"` ++ binary=`echo $binary` ++case "$SEP$PATH$SEP" in ++ *$SEP$dirname$SEP*) dirname="" ;; ++esac ++case $dirname in ++ "") # Do nothing ++ ;; ++ /* | [A-z]:/*) # Absolute name ++ PATH="$dirname$SEP$binary$SEP$PATH" ++ export PATH ;; ++ *) # Relative name ++ PATH="`pwd`/$dirname$SEP`pwd`/$binary$SEP$PATH" ++ export PATH ;; ++esac ++ + if tty -s; then verbose=true; else verbose=false; fi + dry_run=false + trees= +@@ -134,6 +162,21 @@ old_ls_R_magic='% ls-R -- maintained by + shift + } + ++nobody="$(id -un nobody)" ++if test "$(id -ur 2> /dev/null)" = "0" -a -n "$nobody" && type -p nobody > /dev/null 2>&1 ; then ++ grep -qE 'nobody:[^:]*:[0-9]+:0:0::::' /etc/shadow ++ if test $? -eq 0 ; then ++ echo "$progname: Warning the password of the user nobody has expired." >&2 ++ echo " Please use program \`chage' to set maxdays to 99999." >&2 ++ echo "" ++ exit 1 ++ fi ++ runls () { nobody ls -LRa 2>/dev/null; } ++else ++ runls () { ls -LRa 2>/dev/null; } ++fi ++ ++cache="`kpsewhich --expand-var='$VARTEXFONTS'`" + for TEXMFLS_R in "$@"; do + # Prepend cwd if the directory was relative. + case "$TEXMFLS_R" in +@@ -163,12 +206,23 @@ for TEXMFLS_R in "$@"; do + # want to be silent if the directory doesn't exist, since the ls-R + # path ordinarily contains many nonexistent directories. + test -d "$db_dir" || continue +- test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; } ++ if test -w "$db_dir" ; then ++ # default ++ db_dir_tmp="$db_dir/.lsR.XXXXXX" ++ else ++ # Escape to writable cache directory ++ test -w "$cache" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; } ++ db_dir_tmp="$cache/.lsR.XXXXXX" ++ fi + + if test ! -f "$db_file"; then +- cp /dev/null "$db_file" ++ # Note: this script has set the noclobber option at line 18 ++ > "$db_file" \ ++ || { echo "$progname: could not create file '$db_file'. Skipping..." >&2; continue; } + # Use same permissions as parent directory, minus x,s, or t bits. + chmod `kpsestat -xst "$db_dir"` "$db_file" ++ elif test -w $db_file -a ! -s $db_file ; then ++ : Is writable but empty + elif test -s "$db_file" \ + && test "x`sed '1s/ $//;1q' \"$db_file\"`" != "x$ls_R_magic" \ + && test "x`sed '1s/ $//;1q' \"$db_file\"`" != "x$old_ls_R_magic"; then +@@ -179,16 +233,23 @@ for TEXMFLS_R in "$@"; do + # Skip if we cannot write the file: + kpseaccess -w "$db_file" || { echo "$progname: $db_file: no write permission, skipping..." >&2; continue; } + +- db_dir_tmp="$db_dir/lsR$$.tmp" +- (umask 077 && mkdir "$db_dir_tmp" ) \ ++ until PERMS=`kpsestat = "$db_file"`; do sleep 1; done ++ if test "$PERMS" = "666" -a ! -k "$db_dir" ; then ++ echo "$progname: '$db_file' world writable but '$db_dir' not sticky. Skipping..." >&2 ++ continue ++ fi ++ ++ db_dir_tmp=$(mktemp -d "$db_dir_tmp") \ + || { echo "$progname: $db_dir_tmp: could not create directory, skipping..." >&2; continue; } + db_file_tmp="$db_dir_tmp/lsR$$.tmp" + rm -f "$db_file_tmp" + + $verbose && echo "$progname: Updating $db_file... " >&2 + $dry_run && continue +- +- echo "$ls_R_magic" >"$db_file_tmp" ++ ++ # Note: this script has set the noclobber option at line 18 ++ echo "$ls_R_magic" >"$db_file_tmp" \ ++ || { echo "$progname: could not create file '$db_file_tmp'. Skipping..." >&2; continue; } + + # The main task. We put ./: in the output, so top-level files can be + # found via ls-R. Probably irrelevant in practice. The sed command +@@ -200,17 +261,25 @@ for TEXMFLS_R in "$@"; do + # + echo "./:" >>"$db_file_tmp" + vc_dirs='\.\(bzr\|git\|hg\|svn\)\|_darcs' +- (cd "$TEXMFLS_R" && \ls -LRa 2>/dev/null) \ ++ (cd "$TEXMFLS_R" && \runls) \ + | sed -e '/^$/{n;s%^\./%%;s%^%./%;}; /^\.$/d; /^\.\.$/d; /^'$vc_dirs'$/d;' \ +- -e '/^[\.\/]*lsR[0-9]*\.tmp:*$/d' \ ++ -e '/^[\.\/]*lsR[0-9]*\.tmp:*$/d;/^[\.\/]*'${db_dir_tmp##*/}':*$/d' \ + | sed -e /$vc_dirs'.*:$/,/^$/d' \ + >>"$db_file_tmp" + + # To be really safe, a loop. + until PERMS=`kpsestat = "$db_file"`; do sleep 1; done + chmod $PERMS "$db_file_tmp" +- rm -f "$db_file" +- mv "$db_file_tmp" "$db_file" ++ if test -O "$db_file" ; then ++ # We're the owner of the $db_file ++ mv "$db_file_tmp" "$db_file" ++ else ++ # Sticky bit is set see line 141 ++ # Temporary unset the noclobber option at line 20 ++ set +o noclobber ++ cat "$db_file_tmp" > "$db_file" ++ set -o noclobber ++ fi + rm -rf "$db_dir_tmp" + done + $verbose && echo "$progname: Done." >&2 +--- texk/kpathsea/progname.c ++++ texk/kpathsea/progname.c 2011-12-07 11:56:54.567647087 +0000 +@@ -612,9 +612,9 @@ kpathsea_set_program_name (kpathsea kpse + /* SELFAUTODIR is actually the parent of the invocation directory, + and SELFAUTOPARENT the grandparent. This is how teTeX did it. */ + kpathsea_xputenv (kpse, "SELFAUTOLOC", sdir); +- sdir_parent = xdirname (sdir); ++ sdir_parent = xstrdup ("/usr/lib"); + kpathsea_xputenv (kpse, "SELFAUTODIR", sdir_parent); +- sdir_grandparent = xdirname (sdir_parent); ++ sdir_grandparent = xstrdup ("/usr/share"); + kpathsea_xputenv (kpse, "SELFAUTOPARENT", sdir_grandparent); + + #if defined(WIN32) || defined(__MINGW32__) || defined(__CYGWIN__) +--- texk/kpathsea/texmf.cnf ++++ texk/kpathsea/texmf.cnf 2011-09-14 09:42:47.752427040 +0000 +@@ -53,31 +53,34 @@ TEXMFROOT = $SELFAUTOPARENT + + % The tree containing runtime files related to the specific + % distribution and version. +-TEXMFMAIN = $TEXMFROOT/texmf ++TEXMFMAIN = /usr/lib/texmf + + % The main tree of packages, distribution-agnostic: +-TEXMFDIST = $TEXMFROOT/texmf-dist ++TEXMFDIST = /usr/share/texmf ++ ++% Our documentation-only tree, arranged by language: ++TEXMFDOC = ${TEXMFDIST}/doc;${TEXMFMAIN}/doc + + % Local additions to the distribution trees. +-TEXMFLOCAL = $TEXMFROOT/../texmf-local ++TEXMFLOCAL = /usr/local/share/texmf + + % TEXMFSYSVAR, where *-sys store cached runtime data. +-TEXMFSYSVAR = $TEXMFROOT/texmf-var ++TEXMFSYSVAR = /var/lib/texmf + + % TEXMFSYSCONFIG, where *-sys store configuration data. +-TEXMFSYSCONFIG = $TEXMFROOT/texmf-config ++TEXMFSYSCONFIG = /etc/texmf + + % Per-user texmf tree(s) -- organized per the TDS, as usual. To define + % more than one per-user tree, set this to a list of directories in + % braces, as described above. (This used to be HOMETEXMF.) ~ expands + % to %USERPROFILE% on Windows, $HOME otherwise. +-TEXMFHOME = ~/texmf ++TEXMFHOME = $HOME/texmf + + % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data. +-TEXMFVAR = ~/.texlive2011/texmf-var ++TEXMFVAR = ${TEXMFSYSVAR} + + % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data. +-TEXMFCONFIG = ~/.texlive2011/texmf-config ++TEXMFCONFIG = ${TEXMFSYSCONFIG} + + % List all the texmf trees. + % +@@ -92,7 +95,7 @@ TEXMFCONFIG = ~/.texlive2011/texmf-confi + % versions should take precedence over those -- although it is generally + % a source of confusion to have different versions of a package + % installed, whatever the trees, so try to avoid it. +-TEXMF = {$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST} ++TEXMF = {$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST} + + % Where to look for ls-R files. There need not be an ls-R in the + % directories in this path, but if there is one, Kpathsea will use it. +@@ -100,18 +103,17 @@ TEXMF = {$TEXMFCONFIG,$TEXMFVAR,$TEXMFHO + % does not create ls-R files in the non-!! elements -- because if an + % ls-R is present, it will be used, and the disk will not be searched. + % This is arguably a bug in kpathsea. +-TEXMFDBS = {!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST} ++TEXMFDBS = $TEXMF;$VARTEXFONTS + + % The system trees. These are the trees that are shared by all users. + % If a tree appears in this list, the mktex* scripts will use + % VARTEXFONTS for generated files, if the original tree isn't writable; + % otherwise the current working directory is used. +-SYSTEXMF = $TEXMFSYSVAR;$TEXMFMAIN;$TEXMFLOCAL;$TEXMFDIST ++SYSTEXMF = $TEXMFSYSCONFIG;$TEXMFSYSVAR;$TEXMFMAIN;$TEXMFLOCAL;$TEXMFDIST + + % Where generated fonts may be written. This tree is used when the sources + % were found in a system tree and either that tree wasn't writable, or the + % varfonts feature was enabled in MT_FEATURES in mktex.cnf. +-VARTEXFONTS = $TEXMFVAR/fonts + + % On some systems, there will be a system tree which contains all the font + % files that may be created as well as the formats. For example +@@ -122,7 +124,7 @@ VARTEXFONTS = $TEXMFVAR/fonts + % + % Remove $VARTEXFONTS from TEXMFDBS if the VARTEXFONTS directory is below + % one of the TEXMF directories (avoids overlapping ls-R files). +- ++VARTEXFONTS = /var/cache/texmf/fonts + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % Usually you will not need to edit any of the following variables. +@@ -130,7 +132,7 @@ VARTEXFONTS = $TEXMFVAR/fonts + + % WEB2C is for Web2C specific files. The current directory may not be + % a good place to look for them. +-WEB2C = $TEXMF/web2c ++WEB2C = ${TEXMFHOME}/web2c;${TEXMFSYSCONFIG}/web2c;${TEXMFSYSVAR}/web2c;$TEXMF/web2c + + % TEXINPUTS is for TeX input files -- i.e., anything to be found by \input + % or \openin, including .sty, .eps, etc. We specify paths for all known +@@ -171,23 +173,23 @@ TEXINPUTS.elatex = .;$TEXMF/tex/{ + TEXINPUTS.etex = .;$TEXMF/tex/{plain,generic,}// + + % pdfTeX. +-TEXINPUTS.pdfcslatex = .;$TEXMF/tex/{cslatex,csplain,latex,generic,}// +-TEXINPUTS.pdfcsplain = .;$TEXMF/tex/{csplain,plain,generic,}// +-TEXINPUTS.pdflatex = .;$TEXMF/tex/{latex,generic,}// +-TEXINPUTS.pdfmex = .;$TEXMF/tex/{mex,plain,generic,}// +-TEXINPUTS.utf8mex = .;$TEXMF/tex/{mex,plain,generic,}// +-TEXINPUTS.pdftex = .;$TEXMF/tex/{plain,generic,}// +-TEXINPUTS.pdftexinfo = .;$TEXMF/tex/{texinfo,plain,generic,}// +-TEXINPUTS.pdfamstex = .;$TEXMF/tex/{amstex,plain,generic,}// ++TEXINPUTS.pdfcslatex = .;$TEXMF/{pdftex,tex}/{cslatex,csplain,latex,generic,}// ++TEXINPUTS.pdfcsplain = .;$TEXMF/{pdftex,tex}/{csplain,plain,generic,}// ++TEXINPUTS.pdflatex = .;$TEXMF/{pdftex,tex}/{latex,generic,}// ++TEXINPUTS.pdfmex = .;$TEXMF/{pdftex,tex}/{mex,plain,generic,}// ++TEXINPUTS.utf8mex = .;$TEXMF/{pdftex,tex}/{mex,plain,generic,}// ++TEXINPUTS.pdftex = .;$TEXMF/{pdftex,tex}/{plain,generic,}// ++TEXINPUTS.pdftexinfo = .;$TEXMF/{pdftex,tex}/{texinfo,plain,generic,}// ++TEXINPUTS.pdfamstex = .;$TEXMF/{pdftex,tex}/{amstex,plain,generic,}// + + % pdfeTeX. +-TEXINPUTS.pdfelatex = .;$TEXMF/tex/{latex,generic,}// +-TEXINPUTS.pdfetex = .;$TEXMF/tex/{plain,generic,}// ++TEXINPUTS.pdfelatex = .;$TEXMF/{pdftex,tex}/{latex,generic,}// ++TEXINPUTS.pdfetex = .;$TEXMF/{pdftex,tex}/{plain,generic,}// + + % pdfxTeX. +-TEXINPUTS.pdfxlatex = .;$TEXMF/tex/{latex,generic,}// +-TEXINPUTS.pdfxmex = .;$TEXMF/tex/{mex,plain,generic,}// +-TEXINPUTS.pdfxtex = .;$TEXMF/tex/{plain,generic,}// ++TEXINPUTS.pdfxlatex = .;$TEXMF/{pdftex,tex}/{latex,generic,}// ++TEXINPUTS.pdfxmex = .;$TEXMF/{pdftex,tex}/{mex,plain,generic,}// ++TEXINPUTS.pdfxtex = .;$TEXMF/{pdftex,tex}/{plain,generic,}// + + % LuaTeX. + TEXINPUTS.lualatex = .;$TEXMF/tex/{lualatex,latex,luatex,generic,}// +@@ -223,18 +225,18 @@ BSTINPUTS.pbibtex = .;$TEXMF/{pbib + TEXINPUTS.context = .;$TEXMF/tex/{context,plain,generic}// + + % jadetex. +-TEXINPUTS.jadetex = .;$TEXMF/tex/{jadetex,latex,generic,}// +-TEXINPUTS.pdfjadetex = .;$TEXMF/tex/{jadetex,latex,generic,}// ++TEXINPUTS.jadetex = .;$TEXMF/tex/{jadetex,xmltex,latex,plain,generic,}// ++TEXINPUTS.pdfjadetex = .;$TEXMF/{pdftex,tex}/{jadetex,xmltex,latex,plain,generic,}// + + % XMLTeX. +-TEXINPUTS.xmltex = .;$TEXMF/tex/{xmltex,latex,generic,}// +-TEXINPUTS.pdfxmltex = .;$TEXMF/tex/{xmltex,latex,generic,}// ++TEXINPUTS.xmltex = .;$TEXMF/tex/{xmltex,latex,plain,generic,}// ++TEXINPUTS.pdfxmltex = .;$TEXMF/{pdftex,tex}/{xmltex,latex,plain,generic,}// + + % Miscellany, no longer built. + TEXINPUTS.lamstex = .;$TEXMF/tex/{lamstex,plain,generic,}// + TEXINPUTS.lollipop = .;$TEXMF/tex/{lollipop,plain,generic,}// +-TEXINPUTS.frpdflatex = .;$TEXMF/tex/{french,latex,generic,}// +-TEXINPUTS.frpdftex = .;$TEXMF/tex/{french,plain,generic,}// ++TEXINPUTS.frpdflatex = .;$TEXMF/{pdftex,tex}/{french,latex,generic,}// ++TEXINPUTS.frpdftex = .;$TEXMF/{pdftex,tex}/{french,plain,generic,}// + + % Earlier entries override later ones, so put this generic one last. + TEXINPUTS = .;$TEXMF/tex/{$progname,generic,}// +@@ -253,13 +255,13 @@ MPINPUTS = .;$TEXMF/metapost// + % We repeat the same definition three times because of the way fmtutil + % is implemented; if we use ${TEXFORMATS}, the mpost/mf/etc. formats + % will not be found. +-TEXFORMATS = .;$TEXMF/web2c{/$engine,} +-MFBASES = .;$TEXMF/web2c{/$engine,} +-MPMEMS = .;$TEXMF/web2c{/$engine,} ++TEXFORMATS = .;$WEB2C/{$engine,}// ++MFBASES = .;$WEB2C/{$engine,}// ++MPMEMS = .;$WEB2C/{$engine,}// + % + % As of 2008, pool files don't exist any more (the strings are compiled + % into the binaries), but just in case something expects to find these: +-TEXPOOL = .;$TEXMF/web2c ++TEXPOOL = .;$WEB2C + MFPOOL = ${TEXPOOL} + MPPOOL = ${TEXPOOL} + +@@ -287,7 +289,7 @@ GFFONTS = .;$TEXMF/fonts/gf/$MAKETEX_MOD + GLYPHFONTS = .;$TEXMF/fonts + + % A place to puth everything that doesn't fit the other font categories. +-MISCFONTS = .;$TEXMF/fonts/misc// ++MISCFONTS = .;$TEXMF/fonts/misc//;$TEXMF/fonts/hbf// + + % font name map files. This isn't just fonts/map// because ConTeXt + % wants support for having files with the same name in the different +@@ -365,8 +367,8 @@ MPSUPPORT = .;$TEXMF/metapost/support + % For xdvi to find mime.types and .mailcap, if they do not exist in + % ~. These are single directories, not paths. + % (But the default mime.types, at least, may well suffice.) +-MIMELIBDIR = $TEXMFROOT/etc +-MAILCAPLIBDIR = $TEXMFROOT/etc ++MIMELIBDIR = /etc ++MAILCAPLIBDIR = /etc + + % Default settings for fontconfig library, used by Windows versions of + % xetex/xdvipdfmx. On Unixish systems, fontconfig ignores this. +@@ -442,7 +444,8 @@ RUBYINPUTS = .;$TEXMF/scripts/{$progna + % + % For security reasons, it is better not to include . in this path. + % +-TEXMFCNF = {$SELFAUTOLOC,$SELFAUTODIR,$SELFAUTOPARENT}{,{/share,}/texmf{-local,}/web2c} ++TEXMFCNF = /etc/texmf;/etc/texmf/web2c;/var/lib/texmf/web2c;$TEXMF/web2c ++ + + % kpathsea 3.5.3 and later sets these at runtime. To avoid empty + % expansions from binaries linked against an earlier version of the +@@ -621,9 +624,9 @@ BIBTEX_CSFILE = 88591lat.csf + % For some xy-pic samples, you may need as much as 700000 words of memory. + % For the vast majority of documents, 60000 or less will do. + % +-main_memory = 3000000 % words of inimemory available; also applies to inimf&mp +-extra_mem_top = 0 % extra high memory for chars, tokens, etc. +-extra_mem_bot = 0 % extra low memory for boxes, glue, breakpoints, etc. ++main_memory = 3500000 % words of inimemory available; also applies to inimf&mp ++extra_mem_top = 0 % extra high memory for chars, tokens, etc. (has to be 0 for omega) ++extra_mem_bot = 0 % extra low memory for boxes, glue, breakpoints, etc. (has to be 0 for omega) + + % ConTeXt needs lots of memory. + extra_mem_top.context = 2000000 +@@ -707,3 +710,33 @@ max_strings.pbibtex = 35307 + line_length.gftype = 500 + max_rows.gftype = 8191 + max_cols.gftype = 8191 ++ ++% These are xmltex specific ++main_memory.xmltex = 1500000 ++param_size.xmltex = 1500 ++stack_size.xmltex = 1500 ++hash_extra.xmltex = 50000 ++string_vacancies.xmltex = 45000 ++pool_free.xmltex = 47500 ++nest_size.xmltex = 500 ++save_size.xmltex = 10000 ++pool_size.xmltex = 500000 ++max_strings.xmltex = 55000 ++ ++% These are pdfxmltex specific ++main_memory.pdfxmltex = 2500000 ++param_size.pdfxmltex = 1500 ++stack_size.pdfxmltex = 1500 ++hash_extra.pdfxmltex = 50000 ++string_vacancies.pdfxmltex = 45000 ++pool_free.pdfxmltex = 47500 ++nest_size.pdfxmltex = 500 ++save_size.pdfxmltex = 10000 ++pool_size.pdfxmltex = 500000 ++max_strings.pdfxmltex = 55000 ++ ++% These are jadetex specific ++main_memory.jadetex = 499999 ++hash_extra.jadetex = 25000 ++pool_size.jadetex = 500000 ++save_size.jadetex = 15000 +--- texk/lcdf-typetools/otftotfm/otftotfm.cc ++++ texk/lcdf-typetools/otftotfm/otftotfm.cc 2011-12-19 12:58:13.735646589 +0100 +@@ -60,6 +60,9 @@ + # include + #endif + ++#undef SHAREDIR ++#define SHAREDIR "/usr/share/texmf/fonts/map/glyphlist" ++ + using namespace Efont; + + #define VERSION_OPT 301 +--- texk/ps2pkm/pk2bm.c ++++ texk/ps2pkm/pk2bm.c 2009-09-02 12:47:26.000000000 +0000 +@@ -41,8 +41,7 @@ int main(int argc, char *argv[]) + quarterword lsbf(); + void dots(); + chardesc cd; +- char *myname = "pk2bm", *pkname; +- int atoo(char *); ++ char *myname = "pk2bm", *pkname, *endptr; + + while (--argc > 0 && (*++argv)[0] == '-') { + done=0; +@@ -50,26 +49,36 @@ int main(int argc, char *argv[]) + switch (c) { + case 'c': + if (*++argv[0] == '\0') { +- argc--; argv++; ++ if (--argc == 0) { ++err: ++ printf("%s: illegal value for option %c\n", myname, c); ++ exit(1); ++ } ++ argv++; + } + C = *argv[0]; + done = 1; break; + case 'o': + if (*++argv[0] == '\0') { +- argc--; ++argv; ++ if (--argc == 0) goto err; ++ ++argv; + } +- C = atoo(argv[0]); ++ C = strtol(argv[0], &endptr, 8); ++ if (endptr==argv[0] || *endptr) goto err; + done = 1; break; + case 'H': + if (*++argv[0] == '\0') { +- argc--; argv++; ++ if (--argc == 0) goto err; ++ argv++; + } +- h = atoi(argv[0]); ++ h = strtol(argv[0], &endptr, 10); ++ if (endptr==argv[0] || *endptr) goto err; + done=1; + break; + case 'W': + if (*++argv[0] == '\0') { +- argc--; argv++; ++ if (--argc == 0) goto err; ++ argv++; + } + w = atoi(argv[0]); + done=1; +@@ -86,7 +95,7 @@ int main(int argc, char *argv[]) + } + } + +- if (argc == 0) { ++ if (argc != 1) { + printf("Usage: %s [-bh] {-c char|-o octchar} [-W width -H height] pkfile\n", myname); + exit(1); + } +@@ -199,8 +208,3 @@ quarterword u; int n; + } + } + +-int atoo(char *oct) +-{ int octal = 0; +- while (*oct != '\0') octal = 8*octal + (*oct++) - '0'; +- return octal & 0xff; +-} +--- texk/tetex/fmtutil ++++ texk/tetex/fmtutil 2010-11-12 17:22:52.000000000 +0000 +@@ -160,7 +160,7 @@ setupTmpDir() + + trap 'cleanup 1' 1 2 3 7 13 15 + needsCleanup=true +- (umask 077; mkdir "$tmpdir") \ ++ (umask 077; mkdir -m 0700 "$tmpdir") \ + || abort "could not create directory \`$tmpdir'" + } + +@@ -419,7 +419,7 @@ main() + need_find_hyphenfile=false + cfgparam= + cfgmaint= +- tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/$progname.$$ ++ tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/$progname.$RANDOM + verboseFlag=true + noAbortFlag=false + +@@ -743,6 +743,7 @@ run_initex() + *) prgswitch=-progname=$format;; + esac + ++ type -p "$engine" &> /dev/null || return + rm -f $fmtfile + + # Check for infinite recursion before running the iniTeX: +@@ -756,6 +757,12 @@ run_initex() + mktexfmt_loop=$mktexfmt_loop:$format/$engine + export mktexfmt_loop + ++ test "$batchmode" = "yes" && { ++ case "$engine" in ++ tex|ptex) ++ texargs="\\batchmode \\input $texargs" ++ esac ++ } + verboseMsg "$progname: running \`$engine -ini $tcxflag $jobswitch $prgswitch $texargs' ..." + + # run in a subshell to get a local effect of TEXPOOL manipulation: +--- texk/tetex/fmtutil.cnf ++++ texk/tetex/fmtutil.cnf 2011-09-14 10:45:24.500873881 +0000 +@@ -45,11 +45,11 @@ amstex pdftex - -translate-file=cp227.tc + # from context: + cont-en pdftex cont-usr.tex -8bit *cont-en.ini + cont-en xetex cont-usr.tex -8bit *cont-en.ini +-#! cont-de pdftex cont-usr.tex -8bit *cont-de.ini +-#! cont-fr pdftex cont-usr.tex -8bit *cont-fr.ini +-#! cont-it pdftex cont-usr.tex -8bit *cont-it.ini +-#! cont-nl pdftex cont-usr.tex -8bit *cont-nl.ini +-#! cont-ro pdftex cont-usr.tex -8bit *cont-ro.ini ++cont-de pdftex cont-usr.tex -8bit *cont-de.ini ++cont-fr pdftex cont-usr.tex -8bit *cont-fr.ini ++cont-it pdftex cont-usr.tex -8bit *cont-it.ini ++cont-nl pdftex cont-usr.tex -8bit *cont-nl.ini ++cont-ro pdftex cont-usr.tex -8bit *cont-ro.ini + # + # from cslatex: + cslatex pdftex - -etex -translate-file=cp227.tcx cslatex.ini +@@ -63,8 +63,8 @@ pdfcsplain pdftex - -etex -translate-fil + eplain pdftex language.dat -translate-file=cp227.tcx *eplain.ini + # + # from jadetex: +-jadetex pdftex language.dat *jadetex.ini +-pdfjadetex pdftex language.dat *pdfjadetex.ini ++jadetex pdftex language.dat -translate-file=cp227.tcx *jadetex.ini ++pdfjadetex pdftex language.dat -translate-file=cp227.tcx *pdfjadetex.ini + # + # from latex-bin: + latex pdftex language.dat -translate-file=cp227.tcx *latex.ini +@@ -117,5 +117,5 @@ xetex xetex language.def -etex xetex.ini + xelatex xetex language.dat -etex xelatex.ini + # + # from xmltex: +-xmltex pdftex language.dat *xmltex.ini +-pdfxmltex pdftex language.dat *pdfxmltex.ini ++xmltex pdftex language.dat -translate-file=cp227.tcx *xmltex.ini ++pdfxmltex pdftex language.dat -translate-file=cp227.tcx *pdfxmltex.ini +--- texk/texlive/linked_scripts/musixtex/musixtex.lua ++++ texk/texlive/linked_scripts/musixtex/musixtex.lua 2011-12-14 11:04:34.139646956 +0000 +@@ -67,6 +67,11 @@ tex = "etex" + musixflx = "musixflx" + dvi = "dvips" + ps2pdf = "ps2pdf" ++if string.match(arg[0], "pdfmusixtex$") then ++ tex = "pdfetex" ++ dvi = "" ++ ps2pdf = "" ++end + + exit_code = 0 + narg = 1 +--- texk/tetex/texconfig ++++ texk/tetex/texconfig 2009-09-02 12:47:26.000000000 +0000 +@@ -37,7 +37,7 @@ envVars=" + TEXMFDBS TEXMFINI TEXMFSCRIPTS TEXPICTS TEXPKS TEXPOOL TEXPSHEADERS + TEXSOURCES TFMFONTS TRFONTS TTFONTS VFFONTS WEB2C WEBINPUTS + " +-tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/tctmp.$$ ++tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/tctmp.$$.$RANDOM + needsCleanup=false + lastUpdatedFile= + +@@ -1007,21 +1007,6 @@ For more information about these \`featu + ;; + + formats) +- cat >&2 <&2 + fmtutil --catcfg > $tmpdir/pre +@@ -1047,22 +1032,6 @@ EOM + + # "hyphen FORMAT" + hyphen) +- cat >&2 </dev/null 2>&1 ++ test $? -ne 0 && continue ++ ++ install_link "$selfautoloc/$fmt" "$symlinkdir/$fmt" ++ ++ # restore positional arguments: ++ set x $main_args_while; shift + done + } + +@@ -276,12 +292,12 @@ main() + test -f "$cnf_file" || abort "config file \`$cnf' not found" + + +- tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/texlinks.$$ ++ tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/texlinks.$$.$RANDOM + setupTmpDir + cd "$tmpdir" || cleanup 1 + +- sed '/^[ ]*#/d; /^[ ]*$/d' $cnf_file \ +- | awk '{print $1, $2}' > cnf_file_ln.$$ ++ sed '/^[ ]*#/d; /^[ ]*$/d; s%\*%%' $cnf_file \ ++ | awk '{print $1, $2, $NF}' > cnf_file_ln.$$ + + if test -z "$dirs"; then + if test $multiplatform = true; then +@@ -302,13 +318,16 @@ main() + # cnf_file_ln.$$ has lines with "format engine" pairs + set x `cat cnf_file_ln.$$`; shift + while test $# != 0; do +- fmt=$1; engine=$2; shift; shift ++ fmt=$1; engine=$2; ini=$3; shift; shift; shift + + # Some broken shells destroy the positional arguments when calling a + # shellfunction. Therefore, we save and restore them "by hand" in the + # main_args_while variable. + main_args_while="$@" + ++ kpsewhich -progname=$fmt -format=tex $ini >/dev/null 2>&1 ++ test $? -ne 0 && continue ++ + test "x$fmt" = "x$engine" && continue + if test -f "$d/$engine$exeext"; then + case $unlink in +--- texk/web2c/Makefile.in ++++ texk/web2c/Makefile.in 2011-12-09 14:00:22.711147221 +0000 +@@ -2445,7 +2445,7 @@ libmd5_a_SOURCES = libmd5/md5.c libmd5/m + md5main_CPPFLAGS = -I$(srcdir)/libmd5 + md5main_SOURCES = libmd5/md5main.c + md5main_LDADD = libmd5.a +-all: ff-config.h ++all: ff-config.h w2c/config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + + .SUFFIXES: +@@ -2493,6 +2493,11 @@ w2c/c-auto.h: w2c/stamp-h1 + w2c/stamp-h1: $(srcdir)/c-auto.in $(top_builddir)/config.status + @rm -f w2c/stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status w2c/c-auto.h ++.PHONY: w2c/config.h ++w2c/config.h: ++ $(MKDIR_P) w2c ++ cp $(srcdir)/w2c/config.h $@ ++ + $(srcdir)/c-auto.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f w2c/stamp-h1 +--- texk/web2c/window/regis.c ++++ texk/web2c/window/regis.c 2009-09-02 12:47:27.000000000 +0000 +@@ -64,12 +64,14 @@ void mf_regis_blankrectangle (screencol + screenrow top, + screenrow bottom) + { +- printf( ++ const char *format = + #ifdef WRITEWHITE +- "%cPpP[%d,%d]W(I0)W(S1)V[%d,%d]V[%d,%d]V[%d,%d]V[%d,%d]W(S0)W(I3)%c\\", ++ "%cPpP[%d,%d]W(I0)W(S1)V[%d,%d]V[%d,%d]V[%d,%d]V[%d,%d]W(S0)W(I3)%c\\" + #else +- "%cPpP[%d,%d]W(I3)W(S1)V[%d,%d]V[%d,%d]V[%d,%d]V[%d,%d]W(S0)W(I0)%c\\", ++ "%cPpP[%d,%d]W(I3)W(S1)V[%d,%d]V[%d,%d]V[%d,%d]V[%d,%d]W(S0)W(I0)%c\\" + #endif ++ ; ++ printf(format, + ESCAPE,left,bottom,right,bottom,right,top,left,top, + left,bottom,ESCAPE); + } +--- texk/web2c/window/x11-Xlib.c ++++ texk/web2c/window/x11-Xlib.c 2009-09-02 12:47:27.000000000 +0000 +@@ -73,6 +73,8 @@ static XWMHints wm_hints = { + #define BORDER_WIDTH 1 /* Should get this from resource. */ + #define DEFAULT_X_POSITION 0 + #define DEFAULT_Y_POSITION 0 ++#define DEFAULT_WIDTH 450 ++#define DEFAULT_DEPTH 500 + + + #include +@@ -101,11 +103,11 @@ mf_x11_initscreen(void) + + sizehints.x = DEFAULT_X_POSITION; + sizehints.y = DEFAULT_Y_POSITION; +- sizehints.width = screenwidth; +- sizehints.height = screendepth; ++ sizehints.width = DEFAULT_WIDTH; ++ sizehints.height = DEFAULT_DEPTH; + sizehints.flags = PPosition|PSize; + +- sprintf (default_geometry, "%ux%u+%u+%u", screenwidth, screendepth, ++ sprintf (default_geometry, "%ux%u+%u+%u", DEFAULT_WIDTH, DEFAULT_DEPTH, + DEFAULT_X_POSITION, DEFAULT_Y_POSITION); + + /* Look up the geometry for this window. (Section 10.2 Obtaining X +--- texk/web2c/window/x11-Xt.c ++++ texk/web2c/window/x11-Xt.c 2009-09-02 12:47:27.000000000 +0000 +@@ -18,8 +18,8 @@ + + #define PLANE 0 + +-static unsigned int mf_defwidth = 0; +-static unsigned int mf_defheight = 0; ++static unsigned int mf_defwidth = 450;; ++static unsigned int mf_defheight = 500; + + static Display *mf_display; + static Window mf_window; +--- texk/xdvik/psgs.c ++++ texk/xdvik/psgs.c 2009-09-02 12:47:27.000000000 +0000 +@@ -30,6 +30,8 @@ OTHER DEALINGS IN THE SOFTWARE. + #include /* for timeval */ + + #include ++#include ++#include + + /* Condition for retrying a write */ + #include +@@ -625,6 +627,26 @@ initGS(void) + perror("[xdvik] pipe"); + return False; + } ++ ++ if (GS_pid > 0) { /* Check if we've a running ghostscript */ ++ int status, n = 0; ++ errno = 0; ++retry: ++ switch (waitpid(GS_pid, &status, WNOHANG)) { ++ case -1: ++ if (errno == EINTR) ++ goto retry; ++ return False; ++ case 0: ++ break; ++ default: ++ if (WIFEXITED(status) && WEXITSTATUS(status)) ++ return False; ++ if (WIFSIGNALED(status)) ++ return False; ++ break; /* Not reached */ ++ } ++ } + fflush(stderr); /* to avoid double flushing */ + GS_pid = vfork(); + if (GS_pid == 0) { /* child */ +--- texk/xdvik/xdvi-sh.in ++++ texk/xdvik/xdvi-sh.in 2009-09-02 12:47:27.000000000 +0000 +@@ -50,4 +50,19 @@ if test -n "$xdviappfile"; then + XFILESEARCHPATH="$xdviapppath:${XFILESEARCHPATH-%D}"; export XFILESEARCHPATH + fi + +-exec @final_exec_name@ $NAMEOPT ${1+"$@"} ++uncompress= ++filename="${1+"$@"}" ++case "${filename}" in ++ *.gz) uncompress="gzip -d -c $filename" ;; ++ *.bz2) uncompress="bzip2 -d -c $filename" ;; ++esac ++if test -n "$uncompress" -a -r "$filename" ; then ++ filename="${filename##*/}" ++ tmpfile="`mktemp ${TMPDIR-/tmp}/${filename%.*}.XXXXXX`" || exit 1 ++ trap 'rc=$?; rm -f $tmpfile; exit $rc' 0 1 2 3 6 13 15 ++ $uncompress > $tmpfile ++ exec -a xdvi @final_exec_name@ $NAMEOPT $tmpfile ++else ++ exec -a xdvi @final_exec_name@ $NAMEOPT ${1+"$@"} ++fi ++ +--- utils/asymptote/Makefile.in ++++ utils/asymptote/Makefile.in 2011-12-13 10:26:35.111646882 +0000 +@@ -55,8 +55,8 @@ CFLAGS = @CPPFLAGS@ @CFLAGS@ + OPTS = $(DEFS) $(CFLAGS) + INCL = -I . @INCL@ + +-CXX = @CXX@ -Wall -ansi +-CC = @CC@ -Wall -ansi ++CXX = @CXX@ -Wall ++CC = @CC@ -Wall + MAKEDEPEND = $(OPTS) -O0 -M -DDEPEND + BISON = bison + LEX = @LEX@ diff --git a/texlive-20110705-source.tar.xz b/texlive-20110705-source.tar.xz new file mode 100644 index 0000000..3f0d21f --- /dev/null +++ b/texlive-20110705-source.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:772d19795fd841737f5b00472810b49d98b3b62373fba67c12c757e95c510da2 +size 131207904 diff --git a/texlive-rpmlintrc b/texlive-rpmlintrc new file mode 100644 index 0000000..9ae9e4a --- /dev/null +++ b/texlive-rpmlintrc @@ -0,0 +1,5 @@ +addFilter(".*texlive-(collection|scheme)-.*\.noarch:.*suse-filelist-empty.*") +addFilter(".*texlive.src:.*:.*macro-in-comment.*") +addFilter(".*texlive-scheme-.*.noarch:.*:-*summary-not-capitalized.*") +addFilter(".*texlive-.*noarch:.*:.*filename-too-long-for-joliet.*") +addFilter(".*texlive-.*:.*:.*description-shorter-than-summary.*") diff --git a/texlive.changes b/texlive.changes new file mode 100644 index 0000000..70e60a1 --- /dev/null +++ b/texlive.changes @@ -0,0 +1,6 @@ +------------------------------------------------------------------- +Tue Dec 20 13:24:26 UTC 2011 - werner@suse.de + +- First initial main spec file using the original TeX Live packaging + scheme and layout + diff --git a/texlive.cron b/texlive.cron new file mode 100644 index 0000000..ed65343 --- /dev/null +++ b/texlive.cron @@ -0,0 +1,28 @@ +#!/bin/bash +# +# Remove pk files older than 20 days +# Remove tfm files older than 60 days +# Don't remove source files +# Call texhash +# + +test -r /etc/sysconfig/texlive && . /etc/sysconfig/texlive + +OLDIFS=$IFS; IFS=':;' +VARTEXFONTS="$(kpsewhich --expand-var '$VARTEXFONTS' 2> /dev/null)" +IFS=$OLDIFS + +if test "$CLEAR_TEXMF_FONTS" = "yes" -a -n "$VARTEXFONTS" -a -x /usr/bin/safe-rm ; then + for p in $VARTEXFONTS ; do + test -d $p/pk/ && find $p/pk/ -type f -and -atime +20 -print0 + test -d $p/tfm/ && find $p/tfm/ -type f -and -atime +60 -print0 + done > >(exec -a xargs xargs -r -l100 -0 -- /usr/bin/safe-rm) +fi + +# +# Update the ls-R's +# +texhash > /dev/null + +# +exit 0 diff --git a/texlive.csh b/texlive.csh new file mode 100644 index 0000000..bbdb1bc --- /dev/null +++ b/texlive.csh @@ -0,0 +1,24 @@ +# +# /etc/profile.d/texlive.csh +# + +# +# Expand TEXINPUTS +# +if ( -d ${HOME}/TeX/ ) then + # + # Hmmm ... texmf/ should be used instead of TeX/ + # + if ( ${?TEXINPUTS} ) then + setenv TEXINPUTS ${TEXINPUTS}:${HOME}/TeX//: + else + setenv TEXINPUTS ${HOME}/TeX//: + endif +endif +if ( -d /usr/doc/.TeX/ ) then + if ( ${?TEXINPUTS} ) then + setenv TEXINPUTS ${TEXINPUTS}:/usr/doc/.TeX: + else + setenv TEXINPUTS /usr/doc/.TeX: + endif +endif diff --git a/texlive.sh b/texlive.sh new file mode 100644 index 0000000..d8f6759 --- /dev/null +++ b/texlive.sh @@ -0,0 +1,24 @@ +# +# /etc/profile.d/texlive.sh +# + +# +# Expand TEXINPUTS +# +if test -d $HOME/TeX/ ; then + # + # Hmmm ... texmf/ should be used instead of TeX/ + # + if test -n "$TEXINPUTS" ; then + TEXINPUTS="$TEXINPUTS:$HOME/TeX//:" + else + TEXINPUTS="$HOME/TeX//:" + fi +fi +if test -d /usr/doc/.TeX/ ; then + if test -n "$TEXINPUTS" ; then + TEXINPUTS="$TEXINPUTS:/usr/doc/.TeX:" + else + TEXINPUTS="/usr/doc/.TeX:" + fi +fi diff --git a/texlive.spec b/texlive.spec new file mode 100644 index 0000000..426f95d --- /dev/null +++ b/texlive.spec @@ -0,0 +1,6945 @@ +# +# spec file for package texlive +# +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +%define texlive_version 2011 +%define texlive_release 20110705 +%define texlive_source texlive-20110705-source + +%define __perl_requires %{nil} +%define __os_install_post /usr/lib/rpm/brp-compress \\\ + %(ls /usr/lib/rpm/brp-suse.d/* 2> /dev/null | grep -vE 'symlink|desktop') %{nil} + +Name: texlive +Version: %{texlive_version} +Release: %{texlive_release} +License: GPL-2.0+ ; GPL-2.0 ; GPL-3.0 ; LPPL-1.3c ; LPPL-1 ; Artistic-1 ; Apache-2 ; MIT ; OFL-1.1 ; BSD3c ; TeX-License ; Public Domain +Summary: The TeXLive Formatting System +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +BuildRequires: bison +BuildRequires: cairo +BuildRequires: cairo-devel +BuildRequires: dejavu +BuildRequires: dialog +BuildRequires: ed +BuildRequires: expat +BuildRequires: fdupes +BuildRequires: fftw3-devel +BuildRequires: flex +BuildRequires: freeglut-devel +BuildRequires: freetype +BuildRequires: freetype2-devel +BuildRequires: gc-devel +BuildRequires: gcc-c++ +BuildRequires: gd-devel +BuildRequires: ghostscript-devel +BuildRequires: ghostscript-library +BuildRequires: glibc-devel +BuildRequires: gsl-devel +BuildRequires: jpeg +BuildRequires: libicu +BuildRequires: libicu-devel +BuildRequires: libjpeg-devel +BuildRequires: libpng-devel +BuildRequires: libpoppler-devel +BuildRequires: ncurses-devel +BuildRequires: netpbm +BuildRequires: pango-devel +BuildRequires: readline-devel +BuildRequires: t1lib +BuildRequires: t1lib-devel +BuildRequires: unzip +BuildRequires: xaw3d-devel +BuildRequires: xorg-x11-devel +BuildRequires: xorg-x11-util-devel +BuildRequires: xz +BuildRequires: zip +BuildRequires: zziplib-devel +BuildRequires: pango-tools +Source0: ftp://tug.org/texlive/historic/2011/%{texlive_source}.tar.xz +Source3: git://biblatex-biber.git.sourceforge.net/gitroot/biblatex-biber/biblatex-biber/biblatex-biber-0.9.3.tar.xz +Source4: cnf-to-paths.awk +Source10: rc.config.texlive +Source11: SuSEconfig.texlive +Source12: texlive.cron +Source13: texlive.sh +Source14: texlive.csh +Source15: fc-texlive.conf +Source16: fc-t1-texlive.conf +Source17: fc-truetype-texlive.conf +Source30: texlive-rpmlintrc +Source31: dot.dvipsrc +Source50: nobody.c +Source51: nobody.8 +Source1000: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/scheme-basic.tar.xz +Source1001: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/scheme-context.tar.xz +Source1002: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/scheme-full.tar.xz +Source1003: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/scheme-gust.tar.xz +Source1004: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/scheme-medium.tar.xz +Source1005: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/scheme-minimal.tar.xz +Source1006: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/scheme-tetex.tar.xz +Source1007: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/scheme-xml.tar.xz +Source1008: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-basic.tar.xz +Source1009: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-bibtexextra.tar.xz +Source1010: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-binextra.tar.xz +Source1011: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-context.tar.xz +Source1012: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-documentation-arabic.tar.xz +Source1013: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-documentation-base.tar.xz +Source1014: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-documentation-bulgarian.tar.xz +Source1015: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-documentation-chinese.tar.xz +Source1016: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-documentation-czechslovak.tar.xz +Source1017: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-documentation-dutch.tar.xz +Source1018: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-documentation-english.tar.xz +Source1019: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-documentation-finnish.tar.xz +Source1020: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-documentation-french.tar.xz +Source1021: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-documentation-german.tar.xz +Source1022: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-documentation-italian.tar.xz +Source1023: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-documentation-japanese.tar.xz +Source1024: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-documentation-korean.tar.xz +Source1025: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-documentation-mongolian.tar.xz +Source1026: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-documentation-polish.tar.xz +Source1027: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-documentation-portuguese.tar.xz +Source1028: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-documentation-russian.tar.xz +Source1029: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-documentation-serbian.tar.xz +Source1030: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-documentation-slovenian.tar.xz +Source1031: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-documentation-spanish.tar.xz +Source1032: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-documentation-thai.tar.xz +Source1033: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-documentation-turkish.tar.xz +Source1034: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-documentation-ukrainian.tar.xz +Source1035: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-documentation-vietnamese.tar.xz +Source1036: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-fontsextra.tar.xz +Source1037: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-fontsrecommended.tar.xz +Source1038: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-fontutils.tar.xz +Source1039: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-formatsextra.tar.xz +Source1040: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-games.tar.xz +Source1041: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-genericextra.tar.xz +Source1042: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-genericrecommended.tar.xz +Source1043: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-htmlxml.tar.xz +Source1044: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-humanities.tar.xz +Source1045: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langafrican.tar.xz +Source1046: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langarabic.tar.xz +Source1047: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langarmenian.tar.xz +Source1048: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langcjk.tar.xz +Source1049: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langcroatian.tar.xz +Source1050: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langcyrillic.tar.xz +Source1051: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langczechslovak.tar.xz +Source1052: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langdanish.tar.xz +Source1053: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langdutch.tar.xz +Source1054: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langenglish.tar.xz +Source1055: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langfinnish.tar.xz +Source1056: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langfrench.tar.xz +Source1057: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langgerman.tar.xz +Source1058: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langgreek.tar.xz +Source1059: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langhebrew.tar.xz +Source1060: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langhungarian.tar.xz +Source1061: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langindic.tar.xz +Source1062: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langitalian.tar.xz +Source1063: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langlatin.tar.xz +Source1064: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langlatvian.tar.xz +Source1065: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langlithuanian.tar.xz +Source1066: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langmongolian.tar.xz +Source1067: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langnorwegian.tar.xz +Source1068: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langother.tar.xz +Source1069: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langpolish.tar.xz +Source1070: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langportuguese.tar.xz +Source1071: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langspanish.tar.xz +Source1072: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langswedish.tar.xz +Source1073: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langtibetan.tar.xz +Source1074: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langturkmen.tar.xz +Source1075: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-langvietnamese.tar.xz +Source1076: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-latex.tar.xz +Source1077: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-latexextra.tar.xz +Source1078: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-latexrecommended.tar.xz +Source1079: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-luatex.tar.xz +Source1080: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-mathextra.tar.xz +Source1081: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-metapost.tar.xz +Source1082: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-music.tar.xz +Source1083: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-omega.tar.xz +Source1084: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-pictures.tar.xz +Source1085: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-plainextra.tar.xz +Source1086: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-pstricks.tar.xz +Source1087: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-publishers.tar.xz +Source1088: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-science.tar.xz +Source1089: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-texinfo.tar.xz +Source1090: ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/collection-xetex.tar.xz +Patch0: source.dif +Patch1: source-configure.dif +Patch2: source-xdvizilla.dif +Patch3: source-arraysubs.dif +Patch5: source-texdoc.dif +Patch6: source-dviutils.dif +Patch7: source-psutils-flip.dif +Patch8: source-psutils.dif +Patch10: source-poppler.dif +Patch11: source-lacheck.dif +Patch12: source-warns.dif +Patch13: source-x11r7.dif +Patch14: source-luatex.dif +Patch15: source-overflow.dif +Patch17: source-64.dif +Patch18: source-a2ping.dif +Patch19: source-dvipng.dif +Prefix: /usr/bin +# +# psutils -- is also available as the package psutils and therefore +# not necessary required, enabling the resulting psutils +# in texlive-tools cause dependency on texlive package +%bcond_with psutils +%bcond_with buildbiber + +%{expand: %%global options %(mktemp /tmp/texlive-opts.XXXXXXXX)} +%global _varlib %{_localstatedir}/lib +%global _libexecdir %{_prefix}/lib + +%define _texmfdistdir %{_datadir}/texmf +%define _texmfmaindir %{_libexecdir}/texmf +%define _texmfdirs \{%{_texmfdistdir},%{_texmfmaindir}\} + +%define _texmfconfdir %{_sysconfdir}/texmf +%define _texmfvardir %{_varlib}/texmf +%define _texmfcache %{_localstatedir}/cache/texmf +%define _fontcache %{_texmfcache}/fonts +# +%define _x11bin %{_prefix}/bin +%define _x11lib %{_libdir} +%define _x11data %{_datadir}/X11 +%define _x11inc %{_includedir} +%define _appdefdir %{_x11data}/app-defaults +# +%description +After installing texlive and the package texlive-latex, find a large +selection of documentation for TeX, LaTeX, and various layout styles in +/usr/share/texmf/doc. + +TeX (pronounced tech) is an interpreter for text formatting and was +developed by Donald E. Knuth. It works with control and macro commands +on a text file. Working with TeX is similar to typesetting methods. +LaTeX is a complex macro package that removes the cryptical TeX +interface and does most of the work for the user. + +TeX uses special fonts produced by the MetaFont program. Various +printer drivers and an X11 viewer are also included in this package. +The teTeX package is based on the standard TeX package of Karl Berry, +which makes configuration much easier. It is also possible to use +PostScript fonts. A real PostScript printer is required, however. If +the ghostscript (gs) package is installed, all drivers for printing and +viewing can use these fonts. Note, however, that the fonts included in +the ghostscript package are not identical to Adobe's PostScript fonts. +The copyright prohibids us to include them on the CD. + +Besides these features, the programs MakeIndex (for producing indexes) +and BibTeX (for literature data processing) exist. + +The texlive package includes a full texmf tree, many programs like tex, +dvips, etc., shell script configuration, and a big collection of +documentations. This package is easily configured by the script +texconfig and has multilanguage options. + +%package basesystem +Summary: Basic system layout for TeX Live +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +BuildArch: noarch +Requires: %{name} = %{texlive_version} +Requires: %{name}-kpathsea +Requires: %{name}-tetex = %{texlive_version} +Requires(post): %fillup_prereq +Requires(prereq): coreutils +Requires(prereq): ed +Requires(prereq): findutils +Requires(prereq): grep +Requires(prereq): permissions +Requires(prereq): sed +Requires(interp): /usr/bin/env +Requires(interp): /usr/bin/perl +Requires: cron +Requires: ghostscript_x11 +Requires: perl-Tk +Requires: perl-File-Which +Requires: /usr/bin/clear +Requires: /usr/bin/dialog + +%description basesystem +The basic system layout for TeX Live installation. + + +%package scheme-basic +Summary: Basic scheme (plain and LaTeX) +Group: Productivity/Publishing/TeX/Frontends +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn17228 +Requires: texlive-collection-basic = %{texlive_version} +Requires: texlive-collection-latex = %{texlive_version} +BuildArch: noarch + +%description scheme-basic +This is the basic TeX Live scheme: it is a small set of files +sufficient to typeset plain TeX or LaTeX documents in +PostScript or PDF, using the Computer Modern fonts. This +scheme corresponds to collection-basic and collection-latex. + +%package scheme-context +Summary: ConTeXt scheme +Group: Productivity/Publishing/TeX/Frontends +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn23157 +Requires: texlive-collection-context = %{texlive_version} +Requires: texlive-collection-metapost = %{texlive_version} +Requires: texlive-tex-gyre = %{texlive_version} +Requires: texlive-antt = %{texlive_version} +Requires: texlive-iwona = %{texlive_version} +Requires: texlive-kurier = %{texlive_version} +Requires: texlive-poltawski = %{texlive_version} +Requires: texlive-txfonts = %{texlive_version} +Requires: texlive-pxfonts = %{texlive_version} +Requires: texlive-eulervm = %{texlive_version} +Requires: texlive-marvosym = %{texlive_version} +Requires: texlive-wasy = %{texlive_version} +Requires: texlive-ly1 = %{texlive_version} +BuildArch: noarch + +%description scheme-context +This is the TeX Live scheme for installing ConTeXt. + +%package scheme-full +Summary: Full scheme (everything) +Group: Productivity/Publishing/TeX/Frontends +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn21417 +Requires: texlive-collection-basic = %{texlive_version} +Requires: texlive-collection-bibtexextra = %{texlive_version} +Requires: texlive-collection-binextra = %{texlive_version} +Requires: texlive-collection-context = %{texlive_version} +Requires: texlive-collection-documentation-arabic = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +Requires: texlive-collection-documentation-bulgarian = %{texlive_version} +Requires: texlive-collection-documentation-chinese = %{texlive_version} +Requires: texlive-collection-documentation-czechslovak = %{texlive_version} +Requires: texlive-collection-documentation-dutch = %{texlive_version} +Requires: texlive-collection-documentation-english = %{texlive_version} +Requires: texlive-collection-documentation-finnish = %{texlive_version} +Requires: texlive-collection-documentation-french = %{texlive_version} +Requires: texlive-collection-documentation-german = %{texlive_version} +Requires: texlive-collection-documentation-italian = %{texlive_version} +Requires: texlive-collection-documentation-japanese = %{texlive_version} +Requires: texlive-collection-documentation-korean = %{texlive_version} +Requires: texlive-collection-documentation-mongolian = %{texlive_version} +Requires: texlive-collection-documentation-polish = %{texlive_version} +Requires: texlive-collection-documentation-portuguese = %{texlive_version} +Requires: texlive-collection-documentation-russian = %{texlive_version} +Requires: texlive-collection-documentation-serbian = %{texlive_version} +Requires: texlive-collection-documentation-slovenian = %{texlive_version} +Requires: texlive-collection-documentation-spanish = %{texlive_version} +Requires: texlive-collection-documentation-thai = %{texlive_version} +Requires: texlive-collection-documentation-turkish = %{texlive_version} +Requires: texlive-collection-documentation-ukrainian = %{texlive_version} +Requires: texlive-collection-documentation-vietnamese = %{texlive_version} +Requires: texlive-collection-fontsextra = %{texlive_version} +Requires: texlive-collection-fontsrecommended = %{texlive_version} +Requires: texlive-collection-fontutils = %{texlive_version} +Requires: texlive-collection-formatsextra = %{texlive_version} +Requires: texlive-collection-games = %{texlive_version} +Requires: texlive-collection-genericextra = %{texlive_version} +Requires: texlive-collection-genericrecommended = %{texlive_version} +Requires: texlive-collection-htmlxml = %{texlive_version} +Requires: texlive-collection-humanities = %{texlive_version} +Requires: texlive-collection-langafrican = %{texlive_version} +Requires: texlive-collection-langarabic = %{texlive_version} +Requires: texlive-collection-langarmenian = %{texlive_version} +Requires: texlive-collection-langcjk = %{texlive_version} +Requires: texlive-collection-langcroatian = %{texlive_version} +Requires: texlive-collection-langcyrillic = %{texlive_version} +Requires: texlive-collection-langczechslovak = %{texlive_version} +Requires: texlive-collection-langdanish = %{texlive_version} +Requires: texlive-collection-langdutch = %{texlive_version} +Requires: texlive-collection-langfinnish = %{texlive_version} +Requires: texlive-collection-langfrench = %{texlive_version} +Requires: texlive-collection-langgerman = %{texlive_version} +Requires: texlive-collection-langgreek = %{texlive_version} +Requires: texlive-collection-langhebrew = %{texlive_version} +Requires: texlive-collection-langhungarian = %{texlive_version} +Requires: texlive-collection-langindic = %{texlive_version} +Requires: texlive-collection-langitalian = %{texlive_version} +Requires: texlive-collection-langlatin = %{texlive_version} +Requires: texlive-collection-langlatvian = %{texlive_version} +Requires: texlive-collection-langlithuanian = %{texlive_version} +Requires: texlive-collection-langmongolian = %{texlive_version} +Requires: texlive-collection-langnorwegian = %{texlive_version} +Requires: texlive-collection-langother = %{texlive_version} +Requires: texlive-collection-langpolish = %{texlive_version} +Requires: texlive-collection-langportuguese = %{texlive_version} +Requires: texlive-collection-langspanish = %{texlive_version} +Requires: texlive-collection-langswedish = %{texlive_version} +Requires: texlive-collection-langtibetan = %{texlive_version} +Requires: texlive-collection-langturkmen = %{texlive_version} +Requires: texlive-collection-langenglish = %{texlive_version} +Requires: texlive-collection-langvietnamese = %{texlive_version} +Requires: texlive-collection-latex = %{texlive_version} +Requires: texlive-collection-latexextra = %{texlive_version} +Requires: texlive-collection-latexrecommended = %{texlive_version} +Requires: texlive-collection-luatex = %{texlive_version} +Requires: texlive-collection-mathextra = %{texlive_version} +Requires: texlive-collection-metapost = %{texlive_version} +Requires: texlive-collection-music = %{texlive_version} +Requires: texlive-collection-omega = %{texlive_version} +Requires: texlive-collection-pictures = %{texlive_version} +Requires: texlive-collection-plainextra = %{texlive_version} +Requires: texlive-collection-pstricks = %{texlive_version} +Requires: texlive-collection-publishers = %{texlive_version} +Requires: texlive-collection-science = %{texlive_version} +Requires: texlive-collection-texinfo = %{texlive_version} +Requires: texlive-collection-xetex = %{texlive_version} +BuildArch: noarch + +%description scheme-full +This is the full TeX Live scheme: it installs everything +available. + +%package scheme-gust +Summary: GUST TeX Live scheme +Group: Productivity/Publishing/TeX/Frontends +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn21479 +Requires: texlive-FAQ-en = %{texlive_version} +Requires: texlive-Type1fonts = %{texlive_version} +Requires: texlive-amslatex-primer = %{texlive_version} +Requires: texlive-amstex = %{texlive_version} +Requires: texlive-antt = %{texlive_version} +Requires: texlive-bibtex8 = %{texlive_version} +Requires: texlive-comment = %{texlive_version} +Requires: texlive-comprehensive = %{texlive_version} +Requires: texlive-concrete = %{texlive_version} +Requires: texlive-cyklop = %{texlive_version} +Requires: texlive-dvidvi = %{texlive_version} +Requires: texlive-dviljk = %{texlive_version} +Requires: texlive-gustprog = %{texlive_version} +Requires: texlive-impatient = %{texlive_version} +Requires: texlive-iwona = %{texlive_version} +Requires: texlive-metafont-beginners = %{texlive_version} +Requires: texlive-metapost-examples = %{texlive_version} +Requires: texlive-poltawski = %{texlive_version} +Requires: texlive-pstricks-tutorial = %{texlive_version} +Requires: texlive-seetexk = %{texlive_version} +Requires: texlive-seminar = %{texlive_version} +Requires: texlive-tds = %{texlive_version} +Requires: texlive-tex4ht = %{texlive_version} +Requires: texlive-texdoc = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +Requires: texlive-collection-context = %{texlive_version} +Requires: texlive-collection-documentation-polish = %{texlive_version} +Requires: texlive-collection-fontutils = %{texlive_version} +Requires: texlive-collection-fontsrecommended = %{texlive_version} +Requires: texlive-collection-genericrecommended = %{texlive_version} +Requires: texlive-collection-langpolish = %{texlive_version} +Requires: texlive-collection-latex = %{texlive_version} +Requires: texlive-collection-latexrecommended = %{texlive_version} +Requires: texlive-collection-metapost = %{texlive_version} +Requires: texlive-collection-xetex = %{texlive_version} +BuildArch: noarch + +%description scheme-gust +This is the GUST TeX Live scheme: it is a set of files +sufficient to typeset Polish plain TeX, LaTeX and ConTeXt +documents in PostScript or PDF. + +%package scheme-medium +Summary: Medium scheme (plain, latex, recommended packages, some languages) +Group: Productivity/Publishing/TeX/Frontends +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn18615 +Requires: texlive-collection-basic = %{texlive_version} +Requires: texlive-collection-binextra = %{texlive_version} +Requires: texlive-collection-context = %{texlive_version} +Requires: texlive-collection-documentation-english = %{texlive_version} +Requires: texlive-collection-fontutils = %{texlive_version} +Requires: texlive-collection-fontsrecommended = %{texlive_version} +Requires: texlive-collection-langczechslovak = %{texlive_version} +Requires: texlive-collection-langdutch = %{texlive_version} +Requires: texlive-collection-langfrench = %{texlive_version} +Requires: texlive-collection-langgerman = %{texlive_version} +Requires: texlive-collection-langitalian = %{texlive_version} +Requires: texlive-collection-langpolish = %{texlive_version} +Requires: texlive-collection-langportuguese = %{texlive_version} +Requires: texlive-collection-langspanish = %{texlive_version} +Requires: texlive-collection-langenglish = %{texlive_version} +Requires: texlive-collection-latex = %{texlive_version} +Requires: texlive-collection-latexrecommended = %{texlive_version} +Requires: texlive-collection-mathextra = %{texlive_version} +Requires: texlive-collection-metapost = %{texlive_version} +Requires: texlive-collection-texinfo = %{texlive_version} +Requires: texlive-collection-xetex = %{texlive_version} +Requires: texlive-collection-luatex = %{texlive_version} +Requires: texlive-collection-genericrecommended = %{texlive_version} +BuildArch: noarch + +%description scheme-medium +This is the medium TeX Live collection: it contains plain TeX, +LaTeX, many recommended packages, and support for some widely- +used European languages. + +%package scheme-minimal +Summary: Minimal scheme (plain only) +Group: Productivity/Publishing/TeX/Frontends +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13822 +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description scheme-minimal +This is the minimal TeX Live scheme, with support for only +plain TeX. (No LaTeX macros.) LuaTeX is included because Lua +scripts are used in TeX Live infrastructure. This scheme +corresponds exactly to collection-basic. + +%package scheme-tetex +Summary: TeTeX scheme (more than medium, but nowhere near full) +Group: Productivity/Publishing/TeX/Frontends +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn21479 +Requires: texlive-FAQ-en = %{texlive_version} +Requires: texlive-SIunits = %{texlive_version} +Requires: texlive-acronym = %{texlive_version} +Requires: texlive-amslatex-primer = %{texlive_version} +Requires: texlive-bbm = %{texlive_version} +Requires: texlive-bbm-macros = %{texlive_version} +Requires: texlive-bbold = %{texlive_version} +Requires: texlive-bibtex8 = %{texlive_version} +Requires: texlive-ctie = %{texlive_version} +Requires: texlive-detex = %{texlive_version} +Requires: texlive-dtl = %{texlive_version} +Requires: texlive-dvicopy = %{texlive_version} +Requires: texlive-dvidvi = %{texlive_version} +Requires: texlive-dviljk = %{texlive_version} +Requires: texlive-patgen = %{texlive_version} +Requires: texlive-pdftools = %{texlive_version} +Requires: texlive-seetexk = %{texlive_version} +Requires: texlive-tie = %{texlive_version} +Requires: texlive-web = %{texlive_version} +Requires: texlive-cmbright = %{texlive_version} +Requires: texlive-cweb = %{texlive_version} +Requires: texlive-eplain = %{texlive_version} +Requires: texlive-eulervm = %{texlive_version} +Requires: texlive-gentle = %{texlive_version} +Requires: texlive-lshort-english = %{texlive_version} +Requires: texlive-mathmode = %{texlive_version} +Requires: texlive-mltex = %{texlive_version} +Requires: texlive-multirow = %{texlive_version} +Requires: texlive-nomencl = %{texlive_version} +Requires: texlive-pst-pdf = %{texlive_version} +Requires: texlive-pstricks-tutorial = %{texlive_version} +Requires: texlive-rsfs = %{texlive_version} +Requires: texlive-subfigure = %{texlive_version} +Requires: texlive-supertabular = %{texlive_version} +Requires: texlive-tamethebeast = %{texlive_version} +Requires: texlive-tds = %{texlive_version} +Requires: texlive-tex-refs = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +Requires: texlive-collection-context = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +Requires: texlive-collection-fontutils = %{texlive_version} +Requires: texlive-collection-fontsrecommended = %{texlive_version} +Requires: texlive-collection-genericrecommended = %{texlive_version} +Requires: texlive-collection-langcjk = %{texlive_version} +Requires: texlive-collection-langcroatian = %{texlive_version} +Requires: texlive-collection-langcyrillic = %{texlive_version} +Requires: texlive-collection-langczechslovak = %{texlive_version} +Requires: texlive-collection-langdanish = %{texlive_version} +Requires: texlive-collection-langdutch = %{texlive_version} +Requires: texlive-collection-langfinnish = %{texlive_version} +Requires: texlive-collection-langfrench = %{texlive_version} +Requires: texlive-collection-langgerman = %{texlive_version} +Requires: texlive-collection-langgreek = %{texlive_version} +Requires: texlive-collection-langhungarian = %{texlive_version} +Requires: texlive-collection-langitalian = %{texlive_version} +Requires: texlive-collection-langlatin = %{texlive_version} +Requires: texlive-collection-langmongolian = %{texlive_version} +Requires: texlive-collection-langnorwegian = %{texlive_version} +Requires: texlive-collection-langother = %{texlive_version} +Requires: texlive-collection-langpolish = %{texlive_version} +Requires: texlive-collection-langportuguese = %{texlive_version} +Requires: texlive-collection-langspanish = %{texlive_version} +Requires: texlive-collection-langswedish = %{texlive_version} +Requires: texlive-collection-langenglish = %{texlive_version} +Requires: texlive-collection-langvietnamese = %{texlive_version} +Requires: texlive-collection-latex = %{texlive_version} +Requires: texlive-collection-latexrecommended = %{texlive_version} +Requires: texlive-collection-mathextra = %{texlive_version} +Requires: texlive-collection-metapost = %{texlive_version} +Requires: texlive-collection-omega = %{texlive_version} +Requires: texlive-collection-pictures = %{texlive_version} +Requires: texlive-collection-pstricks = %{texlive_version} +Requires: texlive-collection-texinfo = %{texlive_version} +BuildArch: noarch + +%description scheme-tetex +TeX Live scheme nearly equivalent to the teTeX distribution +that was maintained by Thomas Esser. + +%package scheme-xml +Summary: XML scheme +Group: Productivity/Publishing/TeX/Frontends +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13822 +Requires: texlive-context = %{texlive_version} +Requires: texlive-jadetex = %{texlive_version} +Requires: texlive-ltxmisc = %{texlive_version} +Requires: texlive-marvosym = %{texlive_version} +Requires: texlive-marvosym = %{texlive_version} +Requires: texlive-metapost = %{texlive_version} +Requires: texlive-passivetex = %{texlive_version} +Requires: texlive-rotating = %{texlive_version} +Requires: texlive-stmaryrd = %{texlive_version} +Requires: texlive-tex4ht = %{texlive_version} +Requires: texlive-tipa = %{texlive_version} +Requires: texlive-ucs = %{texlive_version} +Requires: texlive-wasy = %{texlive_version} +Requires: texlive-wasysym = %{texlive_version} +Requires: texlive-xmltex = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +Requires: texlive-collection-fontsrecommended = %{texlive_version} +Requires: texlive-collection-latex = %{texlive_version} +Requires: texlive-collection-omega = %{texlive_version} +BuildArch: noarch + +%description scheme-xml +This contains the things you need to do XML-related work, +including PassiveTeX, JadeTeX, ConTeXt and Omega. + +%package collection-basic +Summary: Essential programs and files +Group: Productivity/Publishing/TeX/Frontends +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn20730 +Requires: texlive-collection-documentation-base = %{texlive_version} +Requires: texlive-amsfonts = %{texlive_version} +Requires: texlive-bibtex = %{texlive_version} +Requires: texlive-cm = %{texlive_version} +Requires: texlive-dvipdfm = %{texlive_version} +Requires: texlive-dvipdfmx = %{texlive_version} +Requires: texlive-dvipdfmx-def = %{texlive_version} +Requires: texlive-dvips = %{texlive_version} +Requires: texlive-enctex = %{texlive_version} +Requires: texlive-etex = %{texlive_version} +Requires: texlive-etex-pkg = %{texlive_version} +Requires: texlive-glyphlist = %{texlive_version} +Requires: texlive-gsftopk = %{texlive_version} +Requires: texlive-hyph-utf8 = %{texlive_version} +Requires: texlive-hyphen-base = %{texlive_version} +Requires: texlive-ifluatex = %{texlive_version} +Requires: texlive-ifxetex = %{texlive_version} +Requires: texlive-kpathsea = %{texlive_version} +Requires: texlive-lua-alt-getopt = %{texlive_version} +Requires: texlive-luatex = %{texlive_version} +Requires: texlive-makeindex = %{texlive_version} +Requires: texlive-metafont = %{texlive_version} +Requires: texlive-mflogo = %{texlive_version} +Requires: texlive-mfware = %{texlive_version} +Requires: texlive-misc = %{texlive_version} +Requires: texlive-pdftex = %{texlive_version} +Requires: texlive-plain = %{texlive_version} +Requires: texlive-tetex = %{texlive_version} +Requires: texlive-tex = %{texlive_version} +Requires: texlive-texconfig = %{texlive_version} +Requires: texlive-texlive-msg-translations = %{texlive_version} +Requires: texlive-texlive-scripts = %{texlive_version} +Requires: texlive-xdvi = %{texlive_version} +BuildArch: noarch + +%description collection-basic +These files are regarded as basic for any TeX system, covering +plain TeX macros, Computer Modern fonts, and configuration for +common drivers; no LaTeX. + +%package collection-bibtexextra +Summary: Extra BibTeX styles +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn24610 +Requires: texlive-aichej = %{texlive_version} +Requires: texlive-amsrefs = %{texlive_version} +Requires: texlive-apacite = %{texlive_version} +Requires: texlive-apalike2 = %{texlive_version} +Requires: texlive-beebe = %{texlive_version} +Requires: texlive-bibarts = %{texlive_version} +Requires: texlive-biber = %{texlive_version} +Requires: texlive-bibexport = %{texlive_version} +Requires: texlive-bibhtml = %{texlive_version} +Requires: texlive-biblatex = %{texlive_version} +Requires: texlive-biblatex-apa = %{texlive_version} +Requires: texlive-biblatex-chem = %{texlive_version} +Requires: texlive-biblatex-chicago = %{texlive_version} +Requires: texlive-biblatex-dw = %{texlive_version} +Requires: texlive-biblatex-fiwi = %{texlive_version} +Requires: texlive-biblatex-historian = %{texlive_version} +Requires: texlive-biblatex-ieee = %{texlive_version} +Requires: texlive-biblatex-juradiss = %{texlive_version} +Requires: texlive-biblatex-luh-ipw = %{texlive_version} +Requires: texlive-biblatex-mla = %{texlive_version} +Requires: texlive-biblatex-musuos = %{texlive_version} +Requires: texlive-biblatex-nature = %{texlive_version} +Requires: texlive-biblatex-nejm = %{texlive_version} +Requires: texlive-biblatex-philosophy = %{texlive_version} +Requires: texlive-biblatex-science = %{texlive_version} +Requires: texlive-biblist = %{texlive_version} +Requires: texlive-bibtopic = %{texlive_version} +Requires: texlive-bibtopicprefix = %{texlive_version} +Requires: texlive-bibunits = %{texlive_version} +Requires: texlive-breakcites = %{texlive_version} +Requires: texlive-cell = %{texlive_version} +Requires: texlive-chbibref = %{texlive_version} +Requires: texlive-chicago = %{texlive_version} +Requires: texlive-chicago-annote = %{texlive_version} +Requires: texlive-chembst = %{texlive_version} +Requires: texlive-chscite = %{texlive_version} +Requires: texlive-collref = %{texlive_version} +Requires: texlive-compactbib = %{texlive_version} +Requires: texlive-custom-bib = %{texlive_version} +Requires: texlive-din1505 = %{texlive_version} +Requires: texlive-dk-bib = %{texlive_version} +Requires: texlive-doipubmed = %{texlive_version} +Requires: texlive-fbs = %{texlive_version} +Requires: texlive-figbib = %{texlive_version} +Requires: texlive-footbib = %{texlive_version} +Requires: texlive-harvard = %{texlive_version} +Requires: texlive-harvmac = %{texlive_version} +Requires: texlive-historische-zeitschrift = %{texlive_version} +Requires: texlive-ijqc = %{texlive_version} +Requires: texlive-inlinebib = %{texlive_version} +Requires: texlive-iopart-num = %{texlive_version} +Requires: texlive-jneurosci = %{texlive_version} +Requires: texlive-jurabib = %{texlive_version} +Requires: texlive-ksfh_nat = %{texlive_version} +Requires: texlive-listbib = %{texlive_version} +Requires: texlive-logreq = %{texlive_version} +Requires: texlive-margbib = %{texlive_version} +Requires: texlive-multibib = %{texlive_version} +Requires: texlive-munich = %{texlive_version} +Requires: texlive-notes2bib = %{texlive_version} +Requires: texlive-perception = %{texlive_version} +Requires: texlive-pnas2009 = %{texlive_version} +Requires: texlive-rsc = %{texlive_version} +Requires: texlive-showtags = %{texlive_version} +Requires: texlive-sort-by-letters = %{texlive_version} +Requires: texlive-splitbib = %{texlive_version} +Requires: texlive-uni-wtal-ger = %{texlive_version} +Requires: texlive-urlbst = %{texlive_version} +Requires: texlive-vak = %{texlive_version} +Requires: texlive-xcite = %{texlive_version} +Requires: texlive-collection-latex = %{texlive_version} +BuildArch: noarch + +%description collection-bibtexextra +Additional BibTeX styles and bibliography databases, including +BibLaTeX. + +%package collection-binextra +Summary: TeX auxiliary programs +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn24062 +Requires: texlive-collection-basic = %{texlive_version} +Requires: texlive-a2ping = %{texlive_version} +Requires: texlive-asymptote = %{texlive_version} +Requires: texlive-bibtex8 = %{texlive_version} +Requires: texlive-bibtexu = %{texlive_version} +Requires: texlive-bundledoc = %{texlive_version} +Requires: texlive-chktex = %{texlive_version} +Requires: texlive-ctie = %{texlive_version} +Requires: texlive-cweb = %{texlive_version} +Requires: texlive-de-macro = %{texlive_version} +Requires: texlive-detex = %{texlive_version} +Requires: texlive-dtl = %{texlive_version} +Requires: texlive-dviasm = %{texlive_version} +Requires: texlive-dvicopy = %{texlive_version} +Requires: texlive-dvidvi = %{texlive_version} +Requires: texlive-dviljk = %{texlive_version} +Requires: texlive-dvipng = %{texlive_version} +Requires: texlive-dvipos = %{texlive_version} +Requires: texlive-dvisvgm = %{texlive_version} +Requires: texlive-findhyph = %{texlive_version} +Requires: texlive-fragmaster = %{texlive_version} +Requires: texlive-hyphenex = %{texlive_version} +Requires: texlive-lacheck = %{texlive_version} +Requires: texlive-latex2man = %{texlive_version} +Requires: texlive-latexdiff = %{texlive_version} +Requires: texlive-latexmk = %{texlive_version} +Requires: texlive-listings-ext = %{texlive_version} +Requires: texlive-match_parens = %{texlive_version} +Requires: texlive-mkjobtexmf = %{texlive_version} +Requires: texlive-patgen = %{texlive_version} +Requires: texlive-pdfcrop = %{texlive_version} +Requires: texlive-pdfjam = %{texlive_version} +Requires: texlive-pdftools = %{texlive_version} +Requires: texlive-pkfix = %{texlive_version} +Requires: texlive-pkfix-helper = %{texlive_version} +Requires: texlive-purifyeps = %{texlive_version} +Requires: texlive-seetexk = %{texlive_version} +Requires: texlive-sty2dtx = %{texlive_version} +Requires: texlive-synctex = %{texlive_version} +Requires: texlive-texcount = %{texlive_version} +Requires: texlive-texdef = %{texlive_version} +Requires: texlive-texdiff = %{texlive_version} +Requires: texlive-texdirflatten = %{texlive_version} +Requires: texlive-texdoc = %{texlive_version} +Requires: texlive-texloganalyser = %{texlive_version} +Requires: texlive-texware = %{texlive_version} +Requires: texlive-tie = %{texlive_version} +Requires: texlive-tpic2pdftex = %{texlive_version} +Requires: texlive-web = %{texlive_version} +BuildArch: noarch + +%description collection-binextra +Various useful, but non-essential, support programs. Includes +programs and macros for DVI file manipulation, literate +programming, patgen, and the TeX Works Editor. + +%package collection-context +Summary: ConTeXt format +Group: Productivity/Publishing/TeX/Frontends +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn23785 +Requires: texlive-context = %{texlive_version} +Requires: texlive-jmn = %{texlive_version} +Requires: texlive-lmextra = %{texlive_version} +Requires: texlive-context-account = %{texlive_version} +Requires: texlive-context-algorithmic = %{texlive_version} +Requires: texlive-context-bnf = %{texlive_version} +Requires: texlive-context-chromato = %{texlive_version} +Requires: texlive-context-construction-plan = %{texlive_version} +Requires: texlive-context-degrade = %{texlive_version} +Requires: texlive-context-filter = %{texlive_version} +Requires: texlive-context-fixme = %{texlive_version} +Requires: texlive-context-french = %{texlive_version} +Requires: texlive-context-fullpage = %{texlive_version} +Requires: texlive-context-games = %{texlive_version} +Requires: texlive-context-gantt = %{texlive_version} +Requires: texlive-context-gnuplot = %{texlive_version} +Requires: texlive-context-letter = %{texlive_version} +Requires: texlive-context-lettrine = %{texlive_version} +Requires: texlive-context-lilypond = %{texlive_version} +Requires: texlive-context-mathsets = %{texlive_version} +Requires: texlive-context-notes-zh-cn = %{texlive_version} +Requires: texlive-context-rst = %{texlive_version} +Requires: texlive-context-ruby = %{texlive_version} +Requires: texlive-context-simplefonts = %{texlive_version} +Requires: texlive-context-simpleslides = %{texlive_version} +Requires: texlive-context-typearea = %{texlive_version} +Requires: texlive-context-typescripts = %{texlive_version} +Requires: texlive-context-vim = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-context +Hans Hagen's powerful ConTeXt system, http://pragma-ade.com. +Also includes third-party ConTeXt packages. + +%package collection-documentation-arabic +Summary: Arabic documentation +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn14327 +Requires: texlive-lshort-persian = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +BuildArch: noarch + +%description collection-documentation-arabic +The collection-documentation-arabic package + +%package collection-documentation-base +Summary: TeX Live documentation +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn17091 +Requires: texlive-texlive-common = %{texlive_version} +Requires: texlive-texlive-en = %{texlive_version} +BuildArch: noarch + +%description collection-documentation-base +The collection-documentation-base package + +%package collection-documentation-bulgarian +Summary: Bulgarian documentation +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn19296 +Requires: texlive-lshort-bulgarian = %{texlive_version} +Requires: texlive-pst-eucl-translation-bg = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +BuildArch: noarch + +%description collection-documentation-bulgarian +The collection-documentation-bulgarian package + +%package collection-documentation-chinese +Summary: Chinese documentation +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn14384 +Requires: texlive-asymptote-faq-zh-cn = %{texlive_version} +Requires: texlive-asymptote-by-example-zh-cn = %{texlive_version} +Requires: texlive-asymptote-manual-zh-cn = %{texlive_version} +Requires: texlive-ctex-faq = %{texlive_version} +Requires: texlive-latex-notes-zh-cn = %{texlive_version} +Requires: texlive-lshort-chinese = %{texlive_version} +Requires: texlive-texlive-zh-cn = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +BuildArch: noarch + +%description collection-documentation-chinese +The collection-documentation-chinese package + +%package collection-documentation-czechslovak +Summary: Czech/Slovak documentation +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn23021 +Requires: texlive-lshort-czech = %{texlive_version} +Requires: texlive-lshort-slovak = %{texlive_version} +Requires: texlive-texlive-cz = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +BuildArch: noarch + +%description collection-documentation-czechslovak +The collection-documentation-czechslovak package + +%package collection-documentation-dutch +Summary: Dutch documentation +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13822 +Requires: texlive-lshort-dutch = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +BuildArch: noarch + +%description collection-documentation-dutch +The collection-documentation-dutch package + +%package collection-documentation-english +Summary: English documentation +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn24289 +Requires: texlive-FAQ-en = %{texlive_version} +Requires: texlive-MemoirChapStyles = %{texlive_version} +Requires: texlive-Type1fonts = %{texlive_version} +Requires: texlive-amslatex-primer = %{texlive_version} +Requires: texlive-around-the-bend = %{texlive_version} +Requires: texlive-ascii-chart = %{texlive_version} +Requires: texlive-components-of-TeX = %{texlive_version} +Requires: texlive-comprehensive = %{texlive_version} +Requires: texlive-dtxtut = %{texlive_version} +Requires: texlive-first-latex-doc = %{texlive_version} +Requires: texlive-free-math-font-survey = %{texlive_version} +Requires: texlive-gentle = %{texlive_version} +Requires: texlive-guide-to-latex = %{texlive_version} +Requires: texlive-impatient = %{texlive_version} +Requires: texlive-intro-scientific = %{texlive_version} +Requires: texlive-knuth = %{texlive_version} +Requires: texlive-l2tabu-english = %{texlive_version} +Requires: texlive-latex-course = %{texlive_version} +Requires: texlive-latex-doc-ptr = %{texlive_version} +Requires: texlive-latex-graphics-companion = %{texlive_version} +Requires: texlive-latex-veryshortguide = %{texlive_version} +Requires: texlive-latex-web-companion = %{texlive_version} +Requires: texlive-latex2e-help-texinfo = %{texlive_version} +Requires: texlive-latex4wp = %{texlive_version} +Requires: texlive-latexcheat = %{texlive_version} +Requires: texlive-lshort-english = %{texlive_version} +Requires: texlive-macros2e = %{texlive_version} +Requires: texlive-math-e = %{texlive_version} +Requires: texlive-mathmode = %{texlive_version} +Requires: texlive-memdesign = %{texlive_version} +Requires: texlive-metafont-beginners = %{texlive_version} +Requires: texlive-metapost-examples = %{texlive_version} +Requires: texlive-mil3 = %{texlive_version} +Requires: texlive-patgen2-tutorial = %{texlive_version} +Requires: texlive-pdf-forms-tutorial-en = %{texlive_version} +Requires: texlive-plain-doc = %{texlive_version} +Requires: texlive-pstricks-examples-en = %{texlive_version} +Requires: texlive-pstricks-tutorial = %{texlive_version} +Requires: texlive-simplified-latex = %{texlive_version} +Requires: texlive-svg-inkscape = %{texlive_version} +Requires: texlive-tabulars-e = %{texlive_version} +Requires: texlive-tamethebeast = %{texlive_version} +Requires: texlive-tds = %{texlive_version} +Requires: texlive-tex-font-errors-cheatsheet = %{texlive_version} +Requires: texlive-tex-overview = %{texlive_version} +Requires: texlive-tex-refs = %{texlive_version} +Requires: texlive-texbytopic = %{texlive_version} +Requires: texlive-titlepages = %{texlive_version} +Requires: texlive-tlc2 = %{texlive_version} +Requires: texlive-visualfaq = %{texlive_version} +Requires: texlive-webguide = %{texlive_version} +Requires: texlive-xetexref = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +BuildArch: noarch + +%description collection-documentation-english +The collection-documentation-english package + +%package collection-documentation-finnish +Summary: Finnish documentation +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13822 +Requires: texlive-lshort-finnish = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +BuildArch: noarch + +%description collection-documentation-finnish +The collection-documentation-finnish package + +%package collection-documentation-french +Summary: French documentation +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn24345 +Requires: texlive-apprends-latex = %{texlive_version} +Requires: texlive-epslatex-fr = %{texlive_version} +Requires: texlive-impatient-fr = %{texlive_version} +Requires: texlive-l2tabu-french = %{texlive_version} +Requires: texlive-lshort-french = %{texlive_version} +Requires: texlive-texlive-fr = %{texlive_version} +Requires: texlive-translation-array-fr = %{texlive_version} +Requires: texlive-translation-dcolumn-fr = %{texlive_version} +Requires: texlive-translation-tabbing-fr = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +BuildArch: noarch + +%description collection-documentation-french +The collection-documentation-french package + +%package collection-documentation-german +Summary: German documentation +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn24319 +Requires: texlive-fifinddo-info = %{texlive_version} +Requires: texlive-kopka = %{texlive_version} +Requires: texlive-l2picfaq = %{texlive_version} +Requires: texlive-l2tabu = %{texlive_version} +Requires: texlive-latex-bib-ex = %{texlive_version} +Requires: texlive-latex-referenz = %{texlive_version} +Requires: texlive-latex-tabellen = %{texlive_version} +Requires: texlive-latex-tipps-und-tricks = %{texlive_version} +Requires: texlive-lshort-german = %{texlive_version} +Requires: texlive-pdf-forms-tutorial-de = %{texlive_version} +Requires: texlive-presentations = %{texlive_version} +Requires: texlive-pstricks-examples = %{texlive_version} +Requires: texlive-templates-fenn = %{texlive_version} +Requires: texlive-templates-sommer = %{texlive_version} +Requires: texlive-texlive-de = %{texlive_version} +Requires: texlive-translation-arsclassica-de = %{texlive_version} +Requires: texlive-translation-biblatex-de = %{texlive_version} +Requires: texlive-translation-chemsym-de = %{texlive_version} +Requires: texlive-translation-enumitem-de = %{texlive_version} +Requires: texlive-translation-europecv-de = %{texlive_version} +Requires: texlive-translation-evc-de = %{texlive_version} +Requires: texlive-translation-filecontents-de = %{texlive_version} +Requires: texlive-translation-moreverb-de = %{texlive_version} +Requires: texlive-voss-de = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +BuildArch: noarch + +%description collection-documentation-german +The collection-documentation-german package + +%package collection-documentation-italian +Summary: Italian documentation +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22335 +Requires: texlive-amsldoc-it = %{texlive_version} +Requires: texlive-amsmath-it = %{texlive_version} +Requires: texlive-amsthdoc-it = %{texlive_version} +Requires: texlive-fancyhdr-it = %{texlive_version} +Requires: texlive-l2tabu-it = %{texlive_version} +Requires: texlive-latex4wp-it = %{texlive_version} +Requires: texlive-lshort-italian = %{texlive_version} +Requires: texlive-psfrag-italian = %{texlive_version} +Requires: texlive-texlive-it = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +BuildArch: noarch + +%description collection-documentation-italian +The collection-documentation-italian package + +%package collection-documentation-japanese +Summary: Japanese documentation +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13822 +Requires: texlive-lshort-japanese = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +BuildArch: noarch + +%description collection-documentation-japanese +The collection-documentation-japanese package + +%package collection-documentation-korean +Summary: Korean documentation +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13822 +Requires: texlive-lshort-korean = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +BuildArch: noarch + +%description collection-documentation-korean +The collection-documentation-korean package + +%package collection-documentation-mongolian +Summary: Mongolian documentation +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13822 +Requires: texlive-lshort-mongol = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +BuildArch: noarch + +%description collection-documentation-mongolian +The collection-documentation-mongolian package + +%package collection-documentation-polish +Summary: Polish documentation +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13822 +Requires: texlive-lshort-polish = %{texlive_version} +Requires: texlive-tex-virtual-academy-pl = %{texlive_version} +Requires: texlive-texlive-pl = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +BuildArch: noarch + +%description collection-documentation-polish +The collection-documentation-polish package + +%package collection-documentation-portuguese +Summary: Portuguese documentation +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13822 +Requires: texlive-beamer-tut-pt = %{texlive_version} +Requires: texlive-cursolatex = %{texlive_version} +Requires: texlive-latexcheat-ptbr = %{texlive_version} +Requires: texlive-lshort-portuguese = %{texlive_version} +Requires: texlive-xypic-tut-pt = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +BuildArch: noarch + +%description collection-documentation-portuguese +The collection-documentation-portuguese package + +%package collection-documentation-russian +Summary: Russian documentation +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13822 +Requires: texlive-lshort-russian = %{texlive_version} +Requires: texlive-mpman-ru = %{texlive_version} +Requires: texlive-texlive-ru = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +BuildArch: noarch + +%description collection-documentation-russian +The collection-documentation-russian package + +%package collection-documentation-serbian +Summary: Serbian documentation +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn19112 +Requires: texlive-texlive-sr = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +BuildArch: noarch + +%description collection-documentation-serbian +The collection-documentation-serbian package + +%package collection-documentation-slovenian +Summary: Slovenian documentation +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13822 +Requires: texlive-lshort-slovenian = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +BuildArch: noarch + +%description collection-documentation-slovenian +The collection-documentation-slovenian package + +%package collection-documentation-spanish +Summary: Spanish documentation +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn19634 +Requires: texlive-es-tex-faq = %{texlive_version} +Requires: texlive-l2tabu-spanish = %{texlive_version} +Requires: texlive-latex2e-help-texinfo-spanish = %{texlive_version} +Requires: texlive-latexcheat-esmx = %{texlive_version} +Requires: texlive-lshort-spanish = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +BuildArch: noarch + +%description collection-documentation-spanish +The collection-documentation-spanish package + +%package collection-documentation-thai +Summary: Thai documentation +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13822 +Requires: texlive-lshort-thai = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +BuildArch: noarch + +%description collection-documentation-thai +The collection-documentation-thai package + +%package collection-documentation-turkish +Summary: Turkish documentation +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13822 +Requires: texlive-lshort-turkish = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +BuildArch: noarch + +%description collection-documentation-turkish +The collection-documentation-turkish package + +%package collection-documentation-ukrainian +Summary: Ukrainian documentation +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13822 +Requires: texlive-lshort-ukr = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +BuildArch: noarch + +%description collection-documentation-ukrainian +The collection-documentation-ukrainian package + +%package collection-documentation-vietnamese +Summary: Vietnamese documentation +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13822 +Requires: texlive-amsldoc-vn = %{texlive_version} +Requires: texlive-lshort-vietnamese = %{texlive_version} +Requires: texlive-ntheorem-vn = %{texlive_version} +Requires: texlive-collection-documentation-base = %{texlive_version} +BuildArch: noarch + +%description collection-documentation-vietnamese +The collection-documentation-vietnamese package + +%package collection-fontsextra +Summary: Extra fonts +Group: Productivity/Publishing/TeX/Fonts +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn24526 +Requires: texlive-Asana-Math = %{texlive_version} +Requires: texlive-adforn = %{texlive_version} +Requires: texlive-adfsymbols = %{texlive_version} +Requires: texlive-allrunes = %{texlive_version} +Requires: texlive-antiqua = %{texlive_version} +Requires: texlive-antt = %{texlive_version} +Requires: texlive-ar = %{texlive_version} +Requires: texlive-archaic = %{texlive_version} +Requires: texlive-arev = %{texlive_version} +Requires: texlive-ascii = %{texlive_version} +Requires: texlive-astro = %{texlive_version} +Requires: texlive-augie = %{texlive_version} +Requires: texlive-auncial-new = %{texlive_version} +Requires: texlive-aurical = %{texlive_version} +Requires: texlive-b1encoding = %{texlive_version} +Requires: texlive-barcodes = %{texlive_version} +Requires: texlive-baskervald = %{texlive_version} +Requires: texlive-bbding = %{texlive_version} +Requires: texlive-bbm = %{texlive_version} +Requires: texlive-bbm-macros = %{texlive_version} +Requires: texlive-bbold = %{texlive_version} +Requires: texlive-bbold-type1 = %{texlive_version} +Requires: texlive-belleek = %{texlive_version} +Requires: texlive-bera = %{texlive_version} +Requires: texlive-berenisadf = %{texlive_version} +Requires: texlive-blacklettert1 = %{texlive_version} +Requires: texlive-boisik = %{texlive_version} +Requires: texlive-bookhands = %{texlive_version} +Requires: texlive-boondox = %{texlive_version} +Requires: texlive-braille = %{texlive_version} +Requires: texlive-brushscr = %{texlive_version} +Requires: texlive-calligra = %{texlive_version} +Requires: texlive-calligra-type1 = %{texlive_version} +Requires: texlive-cantarell = %{texlive_version} +Requires: texlive-carolmin-ps = %{texlive_version} +Requires: texlive-ccicons = %{texlive_version} +Requires: texlive-cfr-lm = %{texlive_version} +Requires: texlive-cherokee = %{texlive_version} +Requires: texlive-cm-lgc = %{texlive_version} +Requires: texlive-cm-unicode = %{texlive_version} +Requires: texlive-cmbright = %{texlive_version} +Requires: texlive-cmll = %{texlive_version} +Requires: texlive-cmpica = %{texlive_version} +Requires: texlive-cmtiup = %{texlive_version} +Requires: texlive-comfortaa = %{texlive_version} +Requires: texlive-concmath-fonts = %{texlive_version} +Requires: texlive-cookingsymbols = %{texlive_version} +Requires: texlive-courier-scaled = %{texlive_version} +Requires: texlive-cryst = %{texlive_version} +Requires: texlive-cyklop = %{texlive_version} +Requires: texlive-dancers = %{texlive_version} +Requires: texlive-dejavu = %{texlive_version} +Requires: texlive-dice = %{texlive_version} +Requires: texlive-dictsym = %{texlive_version} +Requires: texlive-dingbat = %{texlive_version} +Requires: texlive-doublestroke = %{texlive_version} +Requires: texlive-dozenal = %{texlive_version} +Requires: texlive-droid = %{texlive_version} +Requires: texlive-duerer = %{texlive_version} +Requires: texlive-duerer-latex = %{texlive_version} +Requires: texlive-dutchcal = %{texlive_version} +Requires: texlive-ean = %{texlive_version} +Requires: texlive-ecc = %{texlive_version} +Requires: texlive-eco = %{texlive_version} +Requires: texlive-eiad = %{texlive_version} +Requires: texlive-eiad-ltx = %{texlive_version} +Requires: texlive-electrum = %{texlive_version} +Requires: texlive-elvish = %{texlive_version} +Requires: texlive-epigrafica = %{texlive_version} +Requires: texlive-epsdice = %{texlive_version} +Requires: texlive-esstix = %{texlive_version} +Requires: texlive-esvect = %{texlive_version} +Requires: texlive-eulervm = %{texlive_version} +Requires: texlive-euxm = %{texlive_version} +Requires: texlive-fdsymbol = %{texlive_version} +Requires: texlive-feyn = %{texlive_version} +Requires: texlive-fge = %{texlive_version} +Requires: texlive-foekfont = %{texlive_version} +Requires: texlive-fonetika = %{texlive_version} +Requires: texlive-fourier = %{texlive_version} +Requires: texlive-fouriernc = %{texlive_version} +Requires: texlive-frcursive = %{texlive_version} +Requires: texlive-genealogy = %{texlive_version} +Requires: texlive-gentium = %{texlive_version} +Requires: texlive-gfsartemisia = %{texlive_version} +Requires: texlive-gfsbodoni = %{texlive_version} +Requires: texlive-gfscomplutum = %{texlive_version} +Requires: texlive-gfsdidot = %{texlive_version} +Requires: texlive-gfsneohellenic = %{texlive_version} +Requires: texlive-gfssolomos = %{texlive_version} +Requires: texlive-gillcm = %{texlive_version} +Requires: texlive-gnu-freefont = %{texlive_version} +Requires: texlive-gothic = %{texlive_version} +Requires: texlive-greenpoint = %{texlive_version} +Requires: texlive-grotesq = %{texlive_version} +Requires: texlive-hands = %{texlive_version} +Requires: texlive-hfbright = %{texlive_version} +Requires: texlive-hfoldsty = %{texlive_version} +Requires: texlive-ifsym = %{texlive_version} +Requires: texlive-inconsolata = %{texlive_version} +Requires: texlive-initials = %{texlive_version} +Requires: texlive-iwona = %{texlive_version} +Requires: texlive-jablantile = %{texlive_version} +Requires: texlive-jamtimes = %{texlive_version} +Requires: texlive-junicode = %{texlive_version} +Requires: texlive-kixfont = %{texlive_version} +Requires: texlive-knuthotherfonts = %{texlive_version} +Requires: texlive-kpfonts = %{texlive_version} +Requires: texlive-kurier = %{texlive_version} +Requires: texlive-lato = %{texlive_version} +Requires: texlive-lfb = %{texlive_version} +Requires: texlive-libertine = %{texlive_version} +Requires: texlive-libris = %{texlive_version} +Requires: texlive-linearA = %{texlive_version} +Requires: texlive-lxfonts = %{texlive_version} +Requires: texlive-ly1 = %{texlive_version} +Requires: texlive-mathabx = %{texlive_version} +Requires: texlive-mathabx-type1 = %{texlive_version} +Requires: texlive-mathdesign = %{texlive_version} +Requires: texlive-mdputu = %{texlive_version} +Requires: texlive-mnsymbol = %{texlive_version} +Requires: texlive-nkarta = %{texlive_version} +Requires: texlive-ocherokee = %{texlive_version} +Requires: texlive-ocr-b = %{texlive_version} +Requires: texlive-ocr-b-outline = %{texlive_version} +Requires: texlive-ogham = %{texlive_version} +Requires: texlive-oinuit = %{texlive_version} +Requires: texlive-oldlatin = %{texlive_version} +Requires: texlive-oldstandard = %{texlive_version} +Requires: texlive-opensans = %{texlive_version} +Requires: texlive-orkhun = %{texlive_version} +Requires: texlive-pacioli = %{texlive_version} +Requires: texlive-paratype = %{texlive_version} +Requires: texlive-phaistos = %{texlive_version} +Requires: texlive-phonetic = %{texlive_version} +Requires: texlive-pigpen = %{texlive_version} +Requires: texlive-poltawski = %{texlive_version} +Requires: texlive-prodint = %{texlive_version} +Requires: texlive-psafm = %{texlive_version} +Requires: texlive-pxtxalfa = %{texlive_version} +Requires: texlive-punk = %{texlive_version} +Requires: texlive-punknova = %{texlive_version} +Requires: texlive-recycle = %{texlive_version} +Requires: texlive-romande = %{texlive_version} +Requires: texlive-rsfso = %{texlive_version} +Requires: texlive-sauter = %{texlive_version} +Requires: texlive-sauterfonts = %{texlive_version} +Requires: texlive-semaphor = %{texlive_version} +Requires: texlive-skull = %{texlive_version} +Requires: texlive-staves = %{texlive_version} +Requires: texlive-starfont = %{texlive_version} +Requires: texlive-stix = %{texlive_version} +Requires: texlive-tapir = %{texlive_version} +Requires: texlive-tengwarscript = %{texlive_version} +Requires: texlive-tfrupee = %{texlive_version} +Requires: texlive-tpslifonts = %{texlive_version} +Requires: texlive-trajan = %{texlive_version} +Requires: texlive-txfontsb = %{texlive_version} +Requires: texlive-umtypewriter = %{texlive_version} +Requires: texlive-universa = %{texlive_version} +Requires: texlive-urwchancal = %{texlive_version} +Requires: texlive-venturisadf = %{texlive_version} +Requires: texlive-wsuipa = %{texlive_version} +Requires: texlive-xits = %{texlive_version} +Requires: texlive-yfonts = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-fontsextra +The collection-fontsextra package + +%package collection-fontsrecommended +Summary: Recommended fonts +Group: Productivity/Publishing/TeX/Fonts +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22193 +Requires: texlive-avantgar = %{texlive_version} +Requires: texlive-bookman = %{texlive_version} +Requires: texlive-charter = %{texlive_version} +Requires: texlive-cm-super = %{texlive_version} +Requires: texlive-cmextra = %{texlive_version} +Requires: texlive-courier = %{texlive_version} +Requires: texlive-euro = %{texlive_version} +Requires: texlive-euro-ce = %{texlive_version} +Requires: texlive-eurosym = %{texlive_version} +Requires: texlive-fpl = %{texlive_version} +Requires: texlive-helvetic = %{texlive_version} +Requires: texlive-lm = %{texlive_version} +Requires: texlive-marvosym = %{texlive_version} +Requires: texlive-mathpazo = %{texlive_version} +Requires: texlive-ncntrsbk = %{texlive_version} +Requires: texlive-palatino = %{texlive_version} +Requires: texlive-pxfonts = %{texlive_version} +Requires: texlive-rsfs = %{texlive_version} +Requires: texlive-symbol = %{texlive_version} +Requires: texlive-tex-gyre = %{texlive_version} +Requires: texlive-times = %{texlive_version} +Requires: texlive-tipa = %{texlive_version} +Requires: texlive-txfonts = %{texlive_version} +Requires: texlive-utopia = %{texlive_version} +Requires: texlive-wasy = %{texlive_version} +Requires: texlive-wasysym = %{texlive_version} +Requires: texlive-zapfchan = %{texlive_version} +Requires: texlive-zapfding = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-fontsrecommended +Recommended fonts, including the base 35 PostScript fonts, +Latin Modern, TeX Gyre, and T1 and other encoding support for +Computer Modern, in outline form. + +%package collection-fontutils +Summary: TeX and Outline font utilities +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn24527 +Requires: texlive-collection-basic = %{texlive_version} +Requires: texlive-accfonts = %{texlive_version} +Requires: texlive-afm2pl = %{texlive_version} +Requires: texlive-epstopdf = %{texlive_version} +Requires: texlive-fontware = %{texlive_version} +Requires: texlive-lcdftypetools = %{texlive_version} +Requires: texlive-ps2pkm = %{texlive_version} +Requires: texlive-pstools = %{texlive_version} +Requires: texlive-dvipsconfig = %{texlive_version} +Requires: texlive-fontinst = %{texlive_version} +Requires: texlive-fontools = %{texlive_version} +Requires: texlive-mf2pt1 = %{texlive_version} +Requires: texlive-ttfutils = %{texlive_version} +BuildArch: noarch + +%description collection-fontutils +Programs for conversion between font formats, testing fonts, +virtual fonts, .gf and .pk manipulation, mft, fontinst, etc. +Manipulating OpenType, TrueType, PostScript Type 1, etc. + +%package collection-formatsextra +Summary: Extra formats +Group: Productivity/Publishing/TeX/Frontends +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn21879 +Requires: texlive-edmac = %{texlive_version} +Requires: texlive-eplain = %{texlive_version} +Requires: texlive-mltex = %{texlive_version} +Requires: texlive-psizzl = %{texlive_version} +Requires: texlive-startex = %{texlive_version} +Requires: texlive-texsis = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-formatsextra +Collected TeX `formats', i.e., large-scale macro packages +designed to be dumped into .fmt files, other than most common +ones, such as latex and context. + +%package collection-games +Summary: Games typesetting +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn24714 +Requires: texlive-bartel-chess-fonts = %{texlive_version} +Requires: texlive-chess = %{texlive_version} +Requires: texlive-chess-problem-diagrams = %{texlive_version} +Requires: texlive-chessboard = %{texlive_version} +Requires: texlive-chessfss = %{texlive_version} +Requires: texlive-crossword = %{texlive_version} +Requires: texlive-crosswrd = %{texlive_version} +Requires: texlive-egameps = %{texlive_version} +Requires: texlive-gamebook = %{texlive_version} +Requires: texlive-go = %{texlive_version} +Requires: texlive-hexgame = %{texlive_version} +Requires: texlive-jeopardy = %{texlive_version} +Requires: texlive-othello = %{texlive_version} +Requires: texlive-othelloboard = %{texlive_version} +Requires: texlive-psgo = %{texlive_version} +Requires: texlive-schwalbe-chess = %{texlive_version} +Requires: texlive-sgame = %{texlive_version} +Requires: texlive-skak = %{texlive_version} +Requires: texlive-skaknew = %{texlive_version} +Requires: texlive-sudoku = %{texlive_version} +Requires: texlive-sudokubundle = %{texlive_version} +Requires: texlive-xq = %{texlive_version} +Requires: texlive-xskak = %{texlive_version} +Requires: texlive-collection-latex = %{texlive_version} +BuildArch: noarch + +%description collection-games +Setups for typesetting various games, including chess. + +%package collection-genericextra +Summary: Extra generic packages +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn24576 +Requires: texlive-abbr = %{texlive_version} +Requires: texlive-abstyles = %{texlive_version} +Requires: texlive-barr = %{texlive_version} +Requires: texlive-borceux = %{texlive_version} +Requires: texlive-c-pascal = %{texlive_version} +Requires: texlive-chronosys = %{texlive_version} +Requires: texlive-colorsep = %{texlive_version} +Requires: texlive-dinat = %{texlive_version} +Requires: texlive-dirtree = %{texlive_version} +Requires: texlive-eijkhout = %{texlive_version} +Requires: texlive-encxvlna = %{texlive_version} +Requires: texlive-epigram = %{texlive_version} +Requires: texlive-fenixpar = %{texlive_version} +Requires: texlive-fltpoint = %{texlive_version} +Requires: texlive-fntproof = %{texlive_version} +Requires: texlive-ifetex = %{texlive_version} +Requires: texlive-iftex = %{texlive_version} +Requires: texlive-insbox = %{texlive_version} +Requires: texlive-lecturer = %{texlive_version} +Requires: texlive-librarian = %{texlive_version} +Requires: texlive-mathdots = %{texlive_version} +Requires: texlive-metatex = %{texlive_version} +Requires: texlive-mftoeps = %{texlive_version} +Requires: texlive-midnight = %{texlive_version} +Requires: texlive-multi = %{texlive_version} +Requires: texlive-navigator = %{texlive_version} +Requires: texlive-ofs = %{texlive_version} +Requires: texlive-pdf-trans = %{texlive_version} +Requires: texlive-shade = %{texlive_version} +Requires: texlive-systeme = %{texlive_version} +Requires: texlive-tabto-generic = %{texlive_version} +Requires: texlive-texapi = %{texlive_version} +Requires: texlive-upca = %{texlive_version} +Requires: texlive-xlop = %{texlive_version} +Requires: texlive-yax = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-genericextra +Extra packages that work with multiple formats, typically both +TeX and LaTeX. + +%package collection-genericrecommended +Summary: Recommended generic packages +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn19849 +Requires: texlive-epsf = %{texlive_version} +Requires: texlive-fontname = %{texlive_version} +Requires: texlive-genmisc = %{texlive_version} +Requires: texlive-kastrup = %{texlive_version} +Requires: texlive-multido = %{texlive_version} +Requires: texlive-path = %{texlive_version} +Requires: texlive-tex-ps = %{texlive_version} +Requires: texlive-ulem = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-genericrecommended +Recommended packages that work with multiple formats. + +%package collection-htmlxml +Summary: HTML/SGML/XML support +Group: Productivity/Publishing/TeX/Frontends +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13822 +Requires: texlive-jadetex = %{texlive_version} +Requires: texlive-passivetex = %{texlive_version} +Requires: texlive-tex4ht = %{texlive_version} +Requires: texlive-xmlplay = %{texlive_version} +Requires: texlive-xmltex = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +Requires: texlive-collection-fontsrecommended = %{texlive_version} +Requires: texlive-collection-latex = %{texlive_version} +BuildArch: noarch + +%description collection-htmlxml +Packages to convert LaTeX to XML/HTML, and typset XML/SGML + +%package collection-humanities +Summary: Humanities packages +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn21895 +Requires: texlive-alnumsec = %{texlive_version} +Requires: texlive-arydshln = %{texlive_version} +Requires: texlive-bibleref = %{texlive_version} +Requires: texlive-bibleref-parse = %{texlive_version} +Requires: texlive-covington = %{texlive_version} +Requires: texlive-dramatist = %{texlive_version} +Requires: texlive-ecltree = %{texlive_version} +Requires: texlive-edfnotes = %{texlive_version} +Requires: texlive-ednotes = %{texlive_version} +Requires: texlive-gb4e = %{texlive_version} +Requires: texlive-gmverse = %{texlive_version} +Requires: texlive-jura = %{texlive_version} +Requires: texlive-juraabbrev = %{texlive_version} +Requires: texlive-juramisc = %{texlive_version} +Requires: texlive-jurarsp = %{texlive_version} +Requires: texlive-ledmac = %{texlive_version} +Requires: texlive-lexikon = %{texlive_version} +Requires: texlive-lineno = %{texlive_version} +Requires: texlive-linguex = %{texlive_version} +Requires: texlive-liturg = %{texlive_version} +Requires: texlive-parallel = %{texlive_version} +Requires: texlive-parrun = %{texlive_version} +Requires: texlive-plari = %{texlive_version} +Requires: texlive-play = %{texlive_version} +Requires: texlive-poemscol = %{texlive_version} +Requires: texlive-qobitree = %{texlive_version} +Requires: texlive-qtree = %{texlive_version} +Requires: texlive-rtklage = %{texlive_version} +Requires: texlive-screenplay = %{texlive_version} +Requires: texlive-sides = %{texlive_version} +Requires: texlive-stage = %{texlive_version} +Requires: texlive-tree-dvips = %{texlive_version} +Requires: texlive-verse = %{texlive_version} +Requires: texlive-xyling = %{texlive_version} +Requires: texlive-collection-latex = %{texlive_version} +BuildArch: noarch + +%description collection-humanities +Packages for law, linguistics, the social sciences, the +humanities, etc. + +%package collection-langafrican +Summary: African scripts +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn21061 +Requires: texlive-ethiop = %{texlive_version} +Requires: texlive-ethiop-t1 = %{texlive_version} +Requires: texlive-fc = %{texlive_version} +Requires: texlive-hyphen-ethiopic = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langafrican +Support for typesetting some African scripts + +%package collection-langarabic +Summary: Arabic +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn23724 +Requires: texlive-arabi = %{texlive_version} +Requires: texlive-arabtex = %{texlive_version} +Requires: texlive-bidi = %{texlive_version} +Requires: texlive-hyphen-arabic = %{texlive_version} +Requires: texlive-hyphen-farsi = %{texlive_version} +Requires: texlive-persian-bib = %{texlive_version} +Requires: texlive-persian-modern = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langarabic +Support for typesetting Arabic. + +%package collection-langarmenian +Summary: Armenian +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn20529 +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langarmenian +Support for typesetting Armenian. + +%package collection-langcjk +Summary: Chinese, Japanese, Korean +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn24462 +Requires: texlive-adobemapping = %{texlive_version} +Requires: texlive-arphic = %{texlive_version} +Requires: texlive-c90 = %{texlive_version} +Requires: texlive-cjk = %{texlive_version} +Requires: texlive-cjkpunct = %{texlive_version} +Requires: texlive-cjkutils = %{texlive_version} +Requires: texlive-cns = %{texlive_version} +Requires: texlive-ctex = %{texlive_version} +Requires: texlive-dnp = %{texlive_version} +Requires: texlive-garuda-c90 = %{texlive_version} +Requires: texlive-hyphen-chinese = %{texlive_version} +Requires: texlive-ipaex = %{texlive_version} +Requires: texlive-japanese = %{texlive_version} +Requires: texlive-japanese-otf = %{texlive_version} +Requires: texlive-jsclasses = %{texlive_version} +Requires: texlive-norasi-c90 = %{texlive_version} +Requires: texlive-ptex = %{texlive_version} +Requires: texlive-thailatex = %{texlive_version} +Requires: texlive-uhc = %{texlive_version} +Requires: texlive-wadalab = %{texlive_version} +Requires: texlive-zhmetrics = %{texlive_version} +Requires: texlive-zhspacing = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +Requires: texlive-collection-documentation-chinese = %{texlive_version} +BuildArch: noarch + +%description collection-langcjk +CJK (Chinese, Japanese, Korean) macros, fonts, documentation, +also Thai since there is some overlap in the fonts. + +%package collection-langcroatian +Summary: Croatian +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn21190 +Requires: texlive-hrlatex = %{texlive_version} +Requires: texlive-hyphen-croatian = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langcroatian +Support for typesetting Croatian. + +%package collection-langcyrillic +Summary: Cyrillic +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn21597 +Requires: texlive-cmcyr = %{texlive_version} +Requires: texlive-cyrillic = %{texlive_version} +Requires: texlive-cyrillic-bin = %{texlive_version} +Requires: texlive-cyrplain = %{texlive_version} +Requires: texlive-disser = %{texlive_version} +Requires: texlive-eskd = %{texlive_version} +Requires: texlive-eskdx = %{texlive_version} +Requires: texlive-gost = %{texlive_version} +Requires: texlive-lcyw = %{texlive_version} +Requires: texlive-lh = %{texlive_version} +Requires: texlive-lhcyr = %{texlive_version} +Requires: texlive-ruhyphen = %{texlive_version} +Requires: texlive-russ = %{texlive_version} +Requires: texlive-t2 = %{texlive_version} +Requires: texlive-ukrhyph = %{texlive_version} +Requires: texlive-hyphen-bulgarian = %{texlive_version} +Requires: texlive-hyphen-russian = %{texlive_version} +Requires: texlive-hyphen-ukrainian = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +Requires: texlive-collection-latex = %{texlive_version} +BuildArch: noarch + +%description collection-langcyrillic +Support for typesetting Cyrillic. + +%package collection-langczechslovak +Summary: Czech/Slovak +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn14727 +Requires: texlive-cs = %{texlive_version} +Requires: texlive-csbulletin = %{texlive_version} +Requires: texlive-cslatex = %{texlive_version} +Requires: texlive-csplain = %{texlive_version} +Requires: texlive-vlna = %{texlive_version} +Requires: texlive-hyphen-czech = %{texlive_version} +Requires: texlive-hyphen-slovak = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +Requires: texlive-collection-latex = %{texlive_version} +BuildArch: noarch + +%description collection-langczechslovak +Support for typesetting Czech/Slovak. + +%package collection-langdanish +Summary: Danish +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn14727 +Requires: texlive-hyphen-danish = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langdanish +Support for typesetting Danish. + +%package collection-langdutch +Summary: Dutch +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn14727 +Requires: texlive-hyphen-dutch = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langdutch +Support for typesetting Dutch. + +%package collection-langenglish +Summary: US and UK English +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn18615 +Requires: texlive-hyphen-english = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langenglish +Support for typesetting US and UK English. + +%package collection-langfinnish +Summary: Finnish +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn14727 +Requires: texlive-finbib = %{texlive_version} +Requires: texlive-hyphen-finnish = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langfinnish +Support for typesetting Finnish. + +%package collection-langfrench +Summary: French +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn24092 +Requires: texlive-aeguill = %{texlive_version} +Requires: texlive-bib-fr = %{texlive_version} +Requires: texlive-bibleref-french = %{texlive_version} +Requires: texlive-booktabs-fr = %{texlive_version} +Requires: texlive-facture = %{texlive_version} +Requires: texlive-frenchle = %{texlive_version} +Requires: texlive-frletter = %{texlive_version} +Requires: texlive-impnattypo = %{texlive_version} +Requires: texlive-mafr = %{texlive_version} +Requires: texlive-tabvar = %{texlive_version} +Requires: texlive-tdsfrmath = %{texlive_version} +Requires: texlive-variations = %{texlive_version} +Requires: texlive-hyphen-basque = %{texlive_version} +Requires: texlive-hyphen-french = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langfrench +Support for typesetting French. + +%package collection-langgerman +Summary: German +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn23992 +Requires: texlive-bibleref-german = %{texlive_version} +Requires: texlive-dehyph-exptl = %{texlive_version} +Requires: texlive-dhua = %{texlive_version} +Requires: texlive-booktabs-de = %{texlive_version} +Requires: texlive-csquotes-de = %{texlive_version} +Requires: texlive-etoolbox-de = %{texlive_version} +Requires: texlive-geometry-de = %{texlive_version} +Requires: texlive-german = %{texlive_version} +Requires: texlive-germbib = %{texlive_version} +Requires: texlive-germkorr = %{texlive_version} +Requires: texlive-kalender = %{texlive_version} +Requires: texlive-microtype-de = %{texlive_version} +Requires: texlive-r_und_s = %{texlive_version} +Requires: texlive-tipa-de = %{texlive_version} +Requires: texlive-umlaute = %{texlive_version} +Requires: texlive-hyphen-german = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langgerman +Support for typesetting German. + +%package collection-langgreek +Summary: Greek +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn15748 +Requires: texlive-betababel = %{texlive_version} +Requires: texlive-bgreek = %{texlive_version} +Requires: texlive-cbfonts = %{texlive_version} +Requires: texlive-gfsbaskerville = %{texlive_version} +Requires: texlive-gfsporson = %{texlive_version} +Requires: texlive-greek-inputenc = %{texlive_version} +Requires: texlive-greekdates = %{texlive_version} +Requires: texlive-greektex = %{texlive_version} +Requires: texlive-grverb = %{texlive_version} +Requires: texlive-ibycus-babel = %{texlive_version} +Requires: texlive-ibygrk = %{texlive_version} +Requires: texlive-kerkis = %{texlive_version} +Requires: texlive-levy = %{texlive_version} +Requires: texlive-lgreek = %{texlive_version} +Requires: texlive-mkgrkindex = %{texlive_version} +Requires: texlive-teubner = %{texlive_version} +Requires: texlive-xgreek = %{texlive_version} +Requires: texlive-yannisgr = %{texlive_version} +Requires: texlive-hyphen-greek = %{texlive_version} +Requires: texlive-hyphen-ancientgreek = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langgreek +Support for typesetting Greek. + +%package collection-langhebrew +Summary: Hebrew +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn14727 +Requires: texlive-cjhebrew = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langhebrew +Support for typesetting Hebrew. + +%package collection-langhungarian +Summary: Hungarian +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn14727 +Requires: texlive-magyar = %{texlive_version} +Requires: texlive-hyphen-hungarian = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langhungarian +Support for typesetting Hungarian. + +%package collection-langindic +Summary: Indic scripts +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn24290 +Requires: texlive-bangtex = %{texlive_version} +Requires: texlive-bengali = %{texlive_version} +Requires: texlive-burmese = %{texlive_version} +Requires: texlive-devnag = %{texlive_version} +Requires: texlive-ebong = %{texlive_version} +Requires: texlive-hyphen-indic = %{texlive_version} +Requires: texlive-hyphen-sanskrit = %{texlive_version} +Requires: texlive-itrans = %{texlive_version} +Requires: texlive-malayalam = %{texlive_version} +Requires: texlive-sanskrit = %{texlive_version} +Requires: texlive-velthuis = %{texlive_version} +Requires: texlive-wnri = %{texlive_version} +Requires: texlive-wnri-latex = %{texlive_version} +Requires: texlive-xetex-devanagari = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langindic +Support for typesetting some Indic scripts. + +%package collection-langitalian +Summary: Italian +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn21528 +Requires: texlive-collection-basic = %{texlive_version} +Requires: texlive-hyphen-italian = %{texlive_version} +Requires: texlive-frontespizio = %{texlive_version} +Requires: texlive-itnumpar = %{texlive_version} +Requires: texlive-layaureo = %{texlive_version} +BuildArch: noarch + +%description collection-langitalian +Support for typesetting Italian. + +%package collection-langlatin +Summary: Latin +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn14727 +Requires: texlive-hyphen-latin = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langlatin +Support for typesetting Latin. + +%package collection-langlatvian +Summary: Latvian +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn14727 +Requires: texlive-hyphen-latvian = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langlatvian +Support for typesetting Latvian. + +%package collection-langlithuanian +Summary: Lithuanian +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn14727 +Requires: texlive-lithuanian = %{texlive_version} +Requires: texlive-hyphen-lithuanian = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langlithuanian +Support for typesetting Lithuanian. + +%package collection-langmongolian +Summary: Mongolian +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22468 +Requires: texlive-collection-basic = %{texlive_version} +Requires: texlive-hyphen-mongolian = %{texlive_version} +Requires: texlive-mongolian-babel = %{texlive_version} +Requires: texlive-montex = %{texlive_version} +BuildArch: noarch + +%description collection-langmongolian +Support for typesetting Mongolian. + +%package collection-langnorwegian +Summary: Norwegian +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn14727 +Requires: texlive-hyphen-norwegian = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langnorwegian +Support for typesetting Norwegian. + +%package collection-langother +Summary: Other hyphenation patterns +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22908 +Requires: texlive-hyphen-afrikaans = %{texlive_version} +Requires: texlive-hyphen-armenian = %{texlive_version} +Requires: texlive-hyphen-coptic = %{texlive_version} +Requires: texlive-hyphen-esperanto = %{texlive_version} +Requires: texlive-hyphen-estonian = %{texlive_version} +Requires: texlive-hyphen-icelandic = %{texlive_version} +Requires: texlive-hyphen-indonesian = %{texlive_version} +Requires: texlive-hyphen-interlingua = %{texlive_version} +Requires: texlive-hyphen-irish = %{texlive_version} +Requires: texlive-hyphen-kurmanji = %{texlive_version} +Requires: texlive-hyphen-lao = %{texlive_version} +Requires: texlive-hyphen-romanian = %{texlive_version} +Requires: texlive-hyphen-serbian = %{texlive_version} +Requires: texlive-hyphen-slovenian = %{texlive_version} +Requires: texlive-hyphen-turkish = %{texlive_version} +Requires: texlive-hyphen-uppersorbian = %{texlive_version} +Requires: texlive-hyphen-welsh = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langother +Hyphenation patterns for languages without (much) other +support. + +%package collection-langpolish +Summary: Polish +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn23552 +Requires: texlive-cc-pl = %{texlive_version} +Requires: texlive-gustlib = %{texlive_version} +Requires: texlive-gustprog = %{texlive_version} +Requires: texlive-mex = %{texlive_version} +Requires: texlive-mwcls = %{texlive_version} +Requires: texlive-pl = %{texlive_version} +Requires: texlive-polski = %{texlive_version} +Requires: texlive-przechlewski-book = %{texlive_version} +Requires: texlive-qpxqtx = %{texlive_version} +Requires: texlive-tap = %{texlive_version} +Requires: texlive-utf8mex = %{texlive_version} +Requires: texlive-hyphen-polish = %{texlive_version} +Requires: texlive-collection-latex = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langpolish +Support for typesetting Polish. + +%package collection-langportuguese +Summary: Portuguese +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn21528 +Requires: texlive-ordinalpt = %{texlive_version} +Requires: texlive-hyphen-portuguese = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langportuguese +Support for typesetting Portuguese. + +%package collection-langspanish +Summary: Spanish +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn21528 +Requires: texlive-hyphen-spanish = %{texlive_version} +Requires: texlive-hyphen-catalan = %{texlive_version} +Requires: texlive-hyphen-galician = %{texlive_version} +Requires: texlive-spanish = %{texlive_version} +Requires: texlive-spanish-mx = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langspanish +Support for typesetting Spanish. + +%package collection-langswedish +Summary: Swedish +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn14727 +Requires: texlive-swebib = %{texlive_version} +Requires: texlive-hyphen-swedish = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langswedish +Support for typesetting Swedish. + +%package collection-langtibetan +Summary: Tibetan +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn14727 +Requires: texlive-ctib = %{texlive_version} +Requires: texlive-otibet = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langtibetan +Support for typesetting Tibetan. + +%package collection-langturkmen +Summary: Turkmen +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn17578 +Requires: texlive-turkmen = %{texlive_version} +Requires: texlive-hyphen-turkmen = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langturkmen +Support for typesetting Turkmen. + +%package collection-langvietnamese +Summary: Vietnamese +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn15272 +Requires: texlive-vntex = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-langvietnamese +Support for typesetting Vietnamese. + +%package collection-latex +Summary: Basic LaTeX packages +Group: Productivity/Publishing/TeX/Frontends +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn18674 +Requires: texlive-ae = %{texlive_version} +Requires: texlive-amscls = %{texlive_version} +Requires: texlive-amsmath = %{texlive_version} +Requires: texlive-babel = %{texlive_version} +Requires: texlive-babelbib = %{texlive_version} +Requires: texlive-carlisle = %{texlive_version} +Requires: texlive-colortbl = %{texlive_version} +Requires: texlive-fancyhdr = %{texlive_version} +Requires: texlive-fix2col = %{texlive_version} +Requires: texlive-geometry = %{texlive_version} +Requires: texlive-graphics = %{texlive_version} +Requires: texlive-hyperref = %{texlive_version} +Requires: texlive-latex = %{texlive_version} +Requires: texlive-latex-bin = %{texlive_version} +Requires: texlive-latex-fonts = %{texlive_version} +Requires: texlive-latexconfig = %{texlive_version} +Requires: texlive-ltxmisc = %{texlive_version} +Requires: texlive-mfnfss = %{texlive_version} +Requires: texlive-mptopdf = %{texlive_version} +Requires: texlive-natbib = %{texlive_version} +Requires: texlive-oberdiek = %{texlive_version} +Requires: texlive-pdftex-def = %{texlive_version} +Requires: texlive-pslatex = %{texlive_version} +Requires: texlive-psnfss = %{texlive_version} +Requires: texlive-pspicture = %{texlive_version} +Requires: texlive-tools = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-latex +These packages are mandated by the core LaTeX team, or at least +very strongly recommended. + +%package collection-latexextra +Summary: LaTeX supplementary packages +Group: Productivity/Publishing/TeX/Frontends +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn24708 +Requires: texlive-collection-latex = %{texlive_version} +Requires: texlive-collection-pictures = %{texlive_version} +Requires: texlive-2up = %{texlive_version} +Requires: texlive-AkkTeX = %{texlive_version} +Requires: texlive-ESIEEcv = %{texlive_version} +Requires: texlive-HA-prosper = %{texlive_version} +Requires: texlive-Tabbing = %{texlive_version} +Requires: texlive-a0poster = %{texlive_version} +Requires: texlive-a4wide = %{texlive_version} +Requires: texlive-a5comb = %{texlive_version} +Requires: texlive-abstract = %{texlive_version} +Requires: texlive-achemso = %{texlive_version} +Requires: texlive-acronym = %{texlive_version} +Requires: texlive-acroterm = %{texlive_version} +Requires: texlive-addlines = %{texlive_version} +Requires: texlive-adjmulticol = %{texlive_version} +Requires: texlive-adrconv = %{texlive_version} +Requires: texlive-advdate = %{texlive_version} +Requires: texlive-akletter = %{texlive_version} +Requires: texlive-alterqcm = %{texlive_version} +Requires: texlive-altfont = %{texlive_version} +Requires: texlive-amsaddr = %{texlive_version} +Requires: texlive-animate = %{texlive_version} +Requires: texlive-anonchap = %{texlive_version} +Requires: texlive-answers = %{texlive_version} +Requires: texlive-anyfontsize = %{texlive_version} +Requires: texlive-appendix = %{texlive_version} +Requires: texlive-arcs = %{texlive_version} +Requires: texlive-arrayjobx = %{texlive_version} +Requires: texlive-assignment = %{texlive_version} +Requires: texlive-attachfile = %{texlive_version} +Requires: texlive-authoraftertitle = %{texlive_version} +Requires: texlive-authorindex = %{texlive_version} +Requires: texlive-background = %{texlive_version} +Requires: texlive-bashful = %{texlive_version} +Requires: texlive-bchart = %{texlive_version} +Requires: texlive-beamer2thesis = %{texlive_version} +Requires: texlive-beameraudience = %{texlive_version} +Requires: texlive-beamerposter = %{texlive_version} +Requires: texlive-beamersubframe = %{texlive_version} +Requires: texlive-beamerthemejltree = %{texlive_version} +Requires: texlive-beamerthemenirma = %{texlive_version} +Requires: texlive-begriff = %{texlive_version} +Requires: texlive-beton = %{texlive_version} +Requires: texlive-bez123 = %{texlive_version} +Requires: texlive-bezos = %{texlive_version} +Requires: texlive-bhcexam = %{texlive_version} +Requires: texlive-bigfoot = %{texlive_version} +Requires: texlive-bigints = %{texlive_version} +Requires: texlive-bizcard = %{texlive_version} +Requires: texlive-blindtext = %{texlive_version} +Requires: texlive-blkarray = %{texlive_version} +Requires: texlive-block = %{texlive_version} +Requires: texlive-blowup = %{texlive_version} +Requires: texlive-boites = %{texlive_version} +Requires: texlive-bold-extra = %{texlive_version} +Requires: texlive-bookest = %{texlive_version} +Requires: texlive-booklet = %{texlive_version} +Requires: texlive-boolexpr = %{texlive_version} +Requires: texlive-bophook = %{texlive_version} +Requires: texlive-boxedminipage = %{texlive_version} +Requires: texlive-boxhandler = %{texlive_version} +Requires: texlive-bracketkey = %{texlive_version} +Requires: texlive-braket = %{texlive_version} +Requires: texlive-breakurl = %{texlive_version} +Requires: texlive-bullcntr = %{texlive_version} +Requires: texlive-bussproofs = %{texlive_version} +Requires: texlive-calctab = %{texlive_version} +Requires: texlive-calrsfs = %{texlive_version} +Requires: texlive-cals = %{texlive_version} +Requires: texlive-calxxxx-yyyy = %{texlive_version} +Requires: texlive-cancel = %{texlive_version} +Requires: texlive-canoniclayout = %{texlive_version} +Requires: texlive-capt-of = %{texlive_version} +Requires: texlive-captcont = %{texlive_version} +Requires: texlive-captdef = %{texlive_version} +Requires: texlive-cases = %{texlive_version} +Requires: texlive-casyl = %{texlive_version} +Requires: texlive-catchfilebetweentags = %{texlive_version} +Requires: texlive-catechis = %{texlive_version} +Requires: texlive-catoptions = %{texlive_version} +Requires: texlive-cbcoptic = %{texlive_version} +Requires: texlive-ccaption = %{texlive_version} +Requires: texlive-cclicenses = %{texlive_version} +Requires: texlive-cd = %{texlive_version} +Requires: texlive-cd-cover = %{texlive_version} +Requires: texlive-cdpbundl = %{texlive_version} +Requires: texlive-cellspace = %{texlive_version} +Requires: texlive-censor = %{texlive_version} +Requires: texlive-changebar = %{texlive_version} +Requires: texlive-changelayout = %{texlive_version} +Requires: texlive-changepage = %{texlive_version} +Requires: texlive-changes = %{texlive_version} +Requires: texlive-chappg = %{texlive_version} +Requires: texlive-chapterfolder = %{texlive_version} +Requires: texlive-chet = %{texlive_version} +Requires: texlive-chextras = %{texlive_version} +Requires: texlive-chletter = %{texlive_version} +Requires: texlive-chngcntr = %{texlive_version} +Requires: texlive-chronology = %{texlive_version} +Requires: texlive-circ = %{texlive_version} +Requires: texlive-clefval = %{texlive_version} +Requires: texlive-cleveref = %{texlive_version} +Requires: texlive-clock = %{texlive_version} +Requires: texlive-cmdstring = %{texlive_version} +Requires: texlive-cmdtrack = %{texlive_version} +Requires: texlive-cmsd = %{texlive_version} +Requires: texlive-codedoc = %{texlive_version} +Requires: texlive-codepage = %{texlive_version} +Requires: texlive-collcell = %{texlive_version} +Requires: texlive-collectbox = %{texlive_version} +Requires: texlive-colordoc = %{texlive_version} +Requires: texlive-colorinfo = %{texlive_version} +Requires: texlive-colortab = %{texlive_version} +Requires: texlive-colorwav = %{texlive_version} +Requires: texlive-colourchange = %{texlive_version} +Requires: texlive-combelow = %{texlive_version} +Requires: texlive-combine = %{texlive_version} +Requires: texlive-comma = %{texlive_version} +Requires: texlive-comment = %{texlive_version} +Requires: texlive-concprog = %{texlive_version} +Requires: texlive-constants = %{texlive_version} +Requires: texlive-contour = %{texlive_version} +Requires: texlive-cooking = %{texlive_version} +Requires: texlive-cookybooky = %{texlive_version} +Requires: texlive-cool = %{texlive_version} +Requires: texlive-coollist = %{texlive_version} +Requires: texlive-coolstr = %{texlive_version} +Requires: texlive-cooltooltips = %{texlive_version} +Requires: texlive-coordsys = %{texlive_version} +Requires: texlive-coseoul = %{texlive_version} +Requires: texlive-courseoutline = %{texlive_version} +Requires: texlive-coursepaper = %{texlive_version} +Requires: texlive-coverpage = %{texlive_version} +Requires: texlive-cprotect = %{texlive_version} +Requires: texlive-crbox = %{texlive_version} +Requires: texlive-crossreference = %{texlive_version} +Requires: texlive-csquotes = %{texlive_version} +Requires: texlive-csvsimple = %{texlive_version} +Requires: texlive-csvtools = %{texlive_version} +Requires: texlive-cuisine = %{texlive_version} +Requires: texlive-currfile = %{texlive_version} +Requires: texlive-currvita = %{texlive_version} +Requires: texlive-cutwin = %{texlive_version} +Requires: texlive-cv = %{texlive_version} +Requires: texlive-cweb-latex = %{texlive_version} +Requires: texlive-dashbox = %{texlive_version} +Requires: texlive-dashrule = %{texlive_version} +Requires: texlive-dashundergaps = %{texlive_version} +Requires: texlive-datatool = %{texlive_version} +Requires: texlive-dateiliste = %{texlive_version} +Requires: texlive-datenumber = %{texlive_version} +Requires: texlive-datetime = %{texlive_version} +Requires: texlive-dblfloatfix = %{texlive_version} +Requires: texlive-decimal = %{texlive_version} +Requires: texlive-decorule = %{texlive_version} +Requires: texlive-delim = %{texlive_version} +Requires: texlive-delimtxt = %{texlive_version} +Requires: texlive-diagbox = %{texlive_version} +Requires: texlive-diagnose = %{texlive_version} +Requires: texlive-dichokey = %{texlive_version} +Requires: texlive-dinbrief = %{texlive_version} +Requires: texlive-directory = %{texlive_version} +Requires: texlive-dirtytalk = %{texlive_version} +Requires: texlive-dlfltxb = %{texlive_version} +Requires: texlive-dnaseq = %{texlive_version} +Requires: texlive-docmfp = %{texlive_version} +Requires: texlive-docmute = %{texlive_version} +Requires: texlive-documentation = %{texlive_version} +Requires: texlive-doi = %{texlive_version} +Requires: texlive-dotarrow = %{texlive_version} +Requires: texlive-dotseqn = %{texlive_version} +Requires: texlive-dox = %{texlive_version} +Requires: texlive-dpfloat = %{texlive_version} +Requires: texlive-dprogress = %{texlive_version} +Requires: texlive-drac = %{texlive_version} +Requires: texlive-draftcopy = %{texlive_version} +Requires: texlive-draftwatermark = %{texlive_version} +Requires: texlive-dtk = %{texlive_version} +Requires: texlive-dtxgallery = %{texlive_version} +Requires: texlive-dvdcoll = %{texlive_version} +Requires: texlive-easy = %{texlive_version} +Requires: texlive-easy-todo = %{texlive_version} +Requires: texlive-easyfig = %{texlive_version} +Requires: texlive-easylist = %{texlive_version} +Requires: texlive-ean13isbn = %{texlive_version} +Requires: texlive-ebezier = %{texlive_version} +Requires: texlive-ecclesiastic = %{texlive_version} +Requires: texlive-ecv = %{texlive_version} +Requires: texlive-ed = %{texlive_version} +Requires: texlive-edmargin = %{texlive_version} +Requires: texlive-eemeir = %{texlive_version} +Requires: texlive-egplot = %{texlive_version} +Requires: texlive-ellipsis = %{texlive_version} +Requires: texlive-elmath = %{texlive_version} +Requires: texlive-elpres = %{texlive_version} +Requires: texlive-emarks = %{texlive_version} +Requires: texlive-emptypage = %{texlive_version} +Requires: texlive-emulateapj = %{texlive_version} +Requires: texlive-endfloat = %{texlive_version} +Requires: texlive-endheads = %{texlive_version} +Requires: texlive-endnotes = %{texlive_version} +Requires: texlive-engpron = %{texlive_version} +Requires: texlive-engrec = %{texlive_version} +Requires: texlive-enumitem = %{texlive_version} +Requires: texlive-enumitem-zref = %{texlive_version} +Requires: texlive-envbig = %{texlive_version} +Requires: texlive-environ = %{texlive_version} +Requires: texlive-envlab = %{texlive_version} +Requires: texlive-epigraph = %{texlive_version} +Requires: texlive-epiolmec = %{texlive_version} +Requires: texlive-eqell = %{texlive_version} +Requires: texlive-eqlist = %{texlive_version} +Requires: texlive-eqname = %{texlive_version} +Requires: texlive-eqparbox = %{texlive_version} +Requires: texlive-errata = %{texlive_version} +Requires: texlive-esdiff = %{texlive_version} +Requires: texlive-esint = %{texlive_version} +Requires: texlive-esint-type1 = %{texlive_version} +Requires: texlive-etaremune = %{texlive_version} +Requires: texlive-etextools = %{texlive_version} +Requires: texlive-etoolbox = %{texlive_version} +Requires: texlive-eukdate = %{texlive_version} +Requires: texlive-europecv = %{texlive_version} +Requires: texlive-everyhook = %{texlive_version} +Requires: texlive-everypage = %{texlive_version} +Requires: texlive-exam = %{texlive_version} +Requires: texlive-examdesign = %{texlive_version} +Requires: texlive-examplep = %{texlive_version} +Requires: texlive-excludeonly = %{texlive_version} +Requires: texlive-exercise = %{texlive_version} +Requires: texlive-exp-testopt = %{texlive_version} +Requires: texlive-expdlist = %{texlive_version} +Requires: texlive-export = %{texlive_version} +Requires: texlive-extract = %{texlive_version} +Requires: texlive-facsimile = %{texlive_version} +Requires: texlive-fancynum = %{texlive_version} +Requires: texlive-fancypar = %{texlive_version} +Requires: texlive-fancytabs = %{texlive_version} +Requires: texlive-fancytooltips = %{texlive_version} +Requires: texlive-figsize = %{texlive_version} +Requires: texlive-filecontents = %{texlive_version} +Requires: texlive-filehook = %{texlive_version} +Requires: texlive-fileinfo = %{texlive_version} +Requires: texlive-filemod = %{texlive_version} +Requires: texlive-fink = %{texlive_version} +Requires: texlive-finstrut = %{texlive_version} +Requires: texlive-fixfoot = %{texlive_version} +Requires: texlive-fixme = %{texlive_version} +Requires: texlive-fjodor = %{texlive_version} +Requires: texlive-flabels = %{texlive_version} +Requires: texlive-flacards = %{texlive_version} +Requires: texlive-flagderiv = %{texlive_version} +Requires: texlive-flashcards = %{texlive_version} +Requires: texlive-flashmovie = %{texlive_version} +Requires: texlive-flippdf = %{texlive_version} +Requires: texlive-floatrow = %{texlive_version} +Requires: texlive-flowfram = %{texlive_version} +Requires: texlive-fltpage = %{texlive_version} +Requires: texlive-fmp = %{texlive_version} +Requires: texlive-fmtcount = %{texlive_version} +Requires: texlive-fn2end = %{texlive_version} +Requires: texlive-fnbreak = %{texlive_version} +Requires: texlive-fncychap = %{texlive_version} +Requires: texlive-fncylab = %{texlive_version} +Requires: texlive-fnpara = %{texlive_version} +Requires: texlive-foilhtml = %{texlive_version} +Requires: texlive-fontaxes = %{texlive_version} +Requires: texlive-fonttable = %{texlive_version} +Requires: texlive-footmisc = %{texlive_version} +Requires: texlive-footnpag = %{texlive_version} +Requires: texlive-forarray = %{texlive_version} +Requires: texlive-forloop = %{texlive_version} +Requires: texlive-formlett = %{texlive_version} +Requires: texlive-formular = %{texlive_version} +Requires: texlive-fragments = %{texlive_version} +Requires: texlive-frame = %{texlive_version} +Requires: texlive-framed = %{texlive_version} +Requires: texlive-frankenstein = %{texlive_version} +Requires: texlive-ftcap = %{texlive_version} +Requires: texlive-ftnxtra = %{texlive_version} +Requires: texlive-fullblck = %{texlive_version} +Requires: texlive-fullwidth = %{texlive_version} +Requires: texlive-fundus = %{texlive_version} +Requires: texlive-fwlw = %{texlive_version} +Requires: texlive-g-brief = %{texlive_version} +Requires: texlive-gauss = %{texlive_version} +Requires: texlive-gcard = %{texlive_version} +Requires: texlive-gcite = %{texlive_version} +Requires: texlive-genmpage = %{texlive_version} +Requires: texlive-getfiledate = %{texlive_version} +Requires: texlive-ghab = %{texlive_version} +Requires: texlive-ginpenc = %{texlive_version} +Requires: texlive-gitinfo = %{texlive_version} +Requires: texlive-gloss = %{texlive_version} +Requires: texlive-glossaries = %{texlive_version} +Requires: texlive-gmdoc = %{texlive_version} +Requires: texlive-gmdoc-enhance = %{texlive_version} +Requires: texlive-gmeometric = %{texlive_version} +Requires: texlive-gmiflink = %{texlive_version} +Requires: texlive-gmutils = %{texlive_version} +Requires: texlive-gmverb = %{texlive_version} +Requires: texlive-graphicx-psmin = %{texlive_version} +Requires: texlive-grfpaste = %{texlive_version} +Requires: texlive-grid = %{texlive_version} +Requires: texlive-gridset = %{texlive_version} +Requires: texlive-guitlogo = %{texlive_version} +Requires: texlive-hanging = %{texlive_version} +Requires: texlive-hardwrap = %{texlive_version} +Requires: texlive-harpoon = %{texlive_version} +Requires: texlive-hc = %{texlive_version} +Requires: texlive-he-she = %{texlive_version} +Requires: texlive-hhtensor = %{texlive_version} +Requires: texlive-histogr = %{texlive_version} +Requires: texlive-hitec = %{texlive_version} +Requires: texlive-hletter = %{texlive_version} +Requires: texlive-hpsdiss = %{texlive_version} +Requires: texlive-hrefhide = %{texlive_version} +Requires: texlive-hvindex = %{texlive_version} +Requires: texlive-hypdvips = %{texlive_version} +Requires: texlive-hyper = %{texlive_version} +Requires: texlive-hypernat = %{texlive_version} +Requires: texlive-hyperref-docsrc = %{texlive_version} +Requires: texlive-hyperxmp = %{texlive_version} +Requires: texlive-hyphenat = %{texlive_version} +Requires: texlive-idxlayout = %{texlive_version} +Requires: texlive-ifmslide = %{texlive_version} +Requires: texlive-ifmtarg = %{texlive_version} +Requires: texlive-ifnextok = %{texlive_version} +Requires: texlive-ifoddpage = %{texlive_version} +Requires: texlive-ifplatform = %{texlive_version} +Requires: texlive-image-gallery = %{texlive_version} +Requires: texlive-imakeidx = %{texlive_version} +Requires: texlive-import = %{texlive_version} +Requires: texlive-inlinedef = %{texlive_version} +Requires: texlive-inputtrc = %{texlive_version} +Requires: texlive-interactiveworkbook = %{texlive_version} +Requires: texlive-interfaces = %{texlive_version} +Requires: texlive-inversepath = %{texlive_version} +Requires: texlive-invoice = %{texlive_version} +Requires: texlive-iso = %{texlive_version} +Requires: texlive-iso10303 = %{texlive_version} +Requires: texlive-isodate = %{texlive_version} +Requires: texlive-isonums = %{texlive_version} +Requires: texlive-isodoc = %{texlive_version} +Requires: texlive-isorot = %{texlive_version} +Requires: texlive-isotope = %{texlive_version} +Requires: texlive-iwhdp = %{texlive_version} +Requires: texlive-jlabels = %{texlive_version} +Requires: texlive-jvlisting = %{texlive_version} +Requires: texlive-kantlipsum = %{texlive_version} +Requires: texlive-kerntest = %{texlive_version} +Requires: texlive-keycommand = %{texlive_version} +Requires: texlive-keystroke = %{texlive_version} +Requires: texlive-keyval2e = %{texlive_version} +Requires: texlive-kix = %{texlive_version} +Requires: texlive-koma-moderncvclassic = %{texlive_version} +Requires: texlive-labbook = %{texlive_version} +Requires: texlive-labelcas = %{texlive_version} +Requires: texlive-labels = %{texlive_version} +Requires: texlive-lastpage = %{texlive_version} +Requires: texlive-latex-tds = %{texlive_version} +Requires: texlive-layouts = %{texlive_version} +Requires: texlive-lazylist = %{texlive_version} +Requires: texlive-lcd = %{texlive_version} +Requires: texlive-lcg = %{texlive_version} +Requires: texlive-leading = %{texlive_version} +Requires: texlive-leaflet = %{texlive_version} +Requires: texlive-leftidx = %{texlive_version} +Requires: texlive-lettre = %{texlive_version} +Requires: texlive-lettrine = %{texlive_version} +Requires: texlive-lewis = %{texlive_version} +Requires: texlive-lhelp = %{texlive_version} +Requires: texlive-libgreek = %{texlive_version} +Requires: texlive-limap = %{texlive_version} +Requires: texlive-linegoal = %{texlive_version} +Requires: texlive-lipsum = %{texlive_version} +Requires: texlive-listing = %{texlive_version} +Requires: texlive-listofsymbols = %{texlive_version} +Requires: texlive-listliketab = %{texlive_version} +Requires: texlive-lkproof = %{texlive_version} +Requires: texlive-locality = %{texlive_version} +Requires: texlive-localloc = %{texlive_version} +Requires: texlive-logbox = %{texlive_version} +Requires: texlive-logical-markup-utils = %{texlive_version} +Requires: texlive-logpap = %{texlive_version} +Requires: texlive-lsc = %{texlive_version} +Requires: texlive-ltabptch = %{texlive_version} +Requires: texlive-ltxdockit = %{texlive_version} +Requires: texlive-ltxindex = %{texlive_version} +Requires: texlive-ltxkeys = %{texlive_version} +Requires: texlive-ltxnew = %{texlive_version} +Requires: texlive-ltxtools = %{texlive_version} +Requires: texlive-magaz = %{texlive_version} +Requires: texlive-mailing = %{texlive_version} +Requires: texlive-mailmerge = %{texlive_version} +Requires: texlive-makebarcode = %{texlive_version} +Requires: texlive-makebox = %{texlive_version} +Requires: texlive-makecell = %{texlive_version} +Requires: texlive-makecirc = %{texlive_version} +Requires: texlive-makecmds = %{texlive_version} +Requires: texlive-makedtx = %{texlive_version} +Requires: texlive-makeglos = %{texlive_version} +Requires: texlive-manfnt = %{texlive_version} +Requires: texlive-manuscript = %{texlive_version} +Requires: texlive-marginfix = %{texlive_version} +Requires: texlive-marginnote = %{texlive_version} +Requires: texlive-mathalfa = %{texlive_version} +Requires: texlive-mathastext = %{texlive_version} +Requires: texlive-mathexam = %{texlive_version} +Requires: texlive-maybemath = %{texlive_version} +Requires: texlive-mbenotes = %{texlive_version} +Requires: texlive-mcaption = %{texlive_version} +Requires: texlive-mceinleger = %{texlive_version} +Requires: texlive-mcite = %{texlive_version} +Requires: texlive-mciteplus = %{texlive_version} +Requires: texlive-mdframed = %{texlive_version} +Requires: texlive-meetingmins = %{texlive_version} +Requires: texlive-memexsupp = %{texlive_version} +Requires: texlive-menu = %{texlive_version} +Requires: texlive-method = %{texlive_version} +Requires: texlive-metre = %{texlive_version} +Requires: texlive-mftinc = %{texlive_version} +Requires: texlive-midpage = %{texlive_version} +Requires: texlive-minibox = %{texlive_version} +Requires: texlive-minipage-marginpar = %{texlive_version} +Requires: texlive-minitoc = %{texlive_version} +Requires: texlive-minted = %{texlive_version} +Requires: texlive-minutes = %{texlive_version} +Requires: texlive-misc209 = %{texlive_version} +Requires: texlive-mla-paper = %{texlive_version} +Requires: texlive-mlist = %{texlive_version} +Requires: texlive-mmap = %{texlive_version} +Requires: texlive-moderncv = %{texlive_version} +Requires: texlive-moderntimeline = %{texlive_version} +Requires: texlive-modref = %{texlive_version} +Requires: texlive-modroman = %{texlive_version} +Requires: texlive-moreenum = %{texlive_version} +Requires: texlive-morefloats = %{texlive_version} +Requires: texlive-morehype = %{texlive_version} +Requires: texlive-moresize = %{texlive_version} +Requires: texlive-moreverb = %{texlive_version} +Requires: texlive-morewrites = %{texlive_version} +Requires: texlive-movie15 = %{texlive_version} +Requires: texlive-mparhack = %{texlive_version} +Requires: texlive-msc = %{texlive_version} +Requires: texlive-msg = %{texlive_version} +Requires: texlive-mslapa = %{texlive_version} +Requires: texlive-mtgreek = %{texlive_version} +Requires: texlive-multenum = %{texlive_version} +Requires: texlive-multibbl = %{texlive_version} +Requires: texlive-multicap = %{texlive_version} +Requires: texlive-multirow = %{texlive_version} +Requires: texlive-mversion = %{texlive_version} +Requires: texlive-mylatexformat = %{texlive_version} +Requires: texlive-nag = %{texlive_version} +Requires: texlive-namespc = %{texlive_version} +Requires: texlive-ncclatex = %{texlive_version} +Requires: texlive-ncctools = %{texlive_version} +Requires: texlive-needspace = %{texlive_version} +Requires: texlive-newcommand = %{texlive_version} +Requires: texlive-newfile = %{texlive_version} +Requires: texlive-newlfm = %{texlive_version} +Requires: texlive-newspaper = %{texlive_version} +Requires: texlive-newunicodechar = %{texlive_version} +Requires: texlive-newvbtm = %{texlive_version} +Requires: texlive-newverbs = %{texlive_version} +Requires: texlive-nextpage = %{texlive_version} +Requires: texlive-nfssext-cfr = %{texlive_version} +Requires: texlive-niceframe = %{texlive_version} +Requires: texlive-nicetext = %{texlive_version} +Requires: texlive-nlctdoc = %{texlive_version} +Requires: texlive-noitcrul = %{texlive_version} +Requires: texlive-nolbreaks = %{texlive_version} +Requires: texlive-nomencl = %{texlive_version} +Requires: texlive-nomentbl = %{texlive_version} +Requires: texlive-nonfloat = %{texlive_version} +Requires: texlive-nonumonpart = %{texlive_version} +Requires: texlive-nopageno = %{texlive_version} +Requires: texlive-notes = %{texlive_version} +Requires: texlive-notoccite = %{texlive_version} +Requires: texlive-nowidow = %{texlive_version} +Requires: texlive-ntheorem = %{texlive_version} +Requires: texlive-numname = %{texlive_version} +Requires: texlive-numprint = %{texlive_version} +Requires: texlive-ocgtools = %{texlive_version} +Requires: texlive-ocr-latex = %{texlive_version} +Requires: texlive-octavo = %{texlive_version} +Requires: texlive-oldstyle = %{texlive_version} +Requires: texlive-onlyamsmath = %{texlive_version} +Requires: texlive-opcit = %{texlive_version} +Requires: texlive-optional = %{texlive_version} +Requires: texlive-outline = %{texlive_version} +Requires: texlive-outliner = %{texlive_version} +Requires: texlive-overpic = %{texlive_version} +Requires: texlive-pagecolor = %{texlive_version} +Requires: texlive-pagecont = %{texlive_version} +Requires: texlive-pagenote = %{texlive_version} +Requires: texlive-pagerange = %{texlive_version} +Requires: texlive-pageslts = %{texlive_version} +Requires: texlive-paper = %{texlive_version} +Requires: texlive-papercdcase = %{texlive_version} +Requires: texlive-papermas = %{texlive_version} +Requires: texlive-papertex = %{texlive_version} +Requires: texlive-paracol = %{texlive_version} +Requires: texlive-paralist = %{texlive_version} +Requires: texlive-paresse = %{texlive_version} +Requires: texlive-parselines = %{texlive_version} +Requires: texlive-patch = %{texlive_version} +Requires: texlive-patchcmd = %{texlive_version} +Requires: texlive-pauldoc = %{texlive_version} +Requires: texlive-pawpict = %{texlive_version} +Requires: texlive-pax = %{texlive_version} +Requires: texlive-pbox = %{texlive_version} +Requires: texlive-pbsheet = %{texlive_version} +Requires: texlive-pdf14 = %{texlive_version} +Requires: texlive-pdfcomment = %{texlive_version} +Requires: texlive-pdfcprot = %{texlive_version} +Requires: texlive-pdfmarginpar = %{texlive_version} +Requires: texlive-pdfscreen = %{texlive_version} +Requires: texlive-pdfslide = %{texlive_version} +Requires: texlive-pdfsync = %{texlive_version} +Requires: texlive-pdfwin = %{texlive_version} +Requires: texlive-pdfx = %{texlive_version} +Requires: texlive-pecha = %{texlive_version} +Requires: texlive-perltex = %{texlive_version} +Requires: texlive-permute = %{texlive_version} +Requires: texlive-petiteannonce = %{texlive_version} +Requires: texlive-philex = %{texlive_version} +Requires: texlive-photo = %{texlive_version} +Requires: texlive-piff = %{texlive_version} +Requires: texlive-pittetd = %{texlive_version} +Requires: texlive-placeins = %{texlive_version} +Requires: texlive-plates = %{texlive_version} +Requires: texlive-plantslabels = %{texlive_version} +Requires: texlive-plweb = %{texlive_version} +Requires: texlive-polyglot = %{texlive_version} +Requires: texlive-polynom = %{texlive_version} +Requires: texlive-polynomial = %{texlive_version} +Requires: texlive-polytable = %{texlive_version} +Requires: texlive-postcards = %{texlive_version} +Requires: texlive-poster-mac = %{texlive_version} +Requires: texlive-ppr-prv = %{texlive_version} +Requires: texlive-preprint = %{texlive_version} +Requires: texlive-prettyref = %{texlive_version} +Requires: texlive-preview = %{texlive_version} +Requires: texlive-printlen = %{texlive_version} +Requires: texlive-probsoln = %{texlive_version} +Requires: texlive-program = %{texlive_version} +Requires: texlive-progress = %{texlive_version} +Requires: texlive-progressbar = %{texlive_version} +Requires: texlive-properties = %{texlive_version} +Requires: texlive-prosper = %{texlive_version} +Requires: texlive-protex = %{texlive_version} +Requires: texlive-protocol = %{texlive_version} +Requires: texlive-psfragx = %{texlive_version} +Requires: texlive-pst-pdf = %{texlive_version} +Requires: texlive-pstool = %{texlive_version} +Requires: texlive-pxgreeks = %{texlive_version} +Requires: texlive-qcm = %{texlive_version} +Requires: texlive-quoting = %{texlive_version} +Requires: texlive-qstest = %{texlive_version} +Requires: texlive-qsymbols = %{texlive_version} +Requires: texlive-quotchap = %{texlive_version} +Requires: texlive-quotmark = %{texlive_version} +Requires: texlive-randtext = %{texlive_version} +Requires: texlive-rccol = %{texlive_version} +Requires: texlive-rcs-multi = %{texlive_version} +Requires: texlive-rcsinfo = %{texlive_version} +Requires: texlive-realboxes = %{texlive_version} +Requires: texlive-recipe = %{texlive_version} +Requires: texlive-recipecard = %{texlive_version} +Requires: texlive-rectopma = %{texlive_version} +Requires: texlive-refcheck = %{texlive_version} +Requires: texlive-refman = %{texlive_version} +Requires: texlive-refstyle = %{texlive_version} +Requires: texlive-regcount = %{texlive_version} +Requires: texlive-register = %{texlive_version} +Requires: texlive-regstats = %{texlive_version} +Requires: texlive-relenc = %{texlive_version} +Requires: texlive-relsize = %{texlive_version} +Requires: texlive-repeatindex = %{texlive_version} +Requires: texlive-rjlparshap = %{texlive_version} +Requires: texlive-rlepsf = %{texlive_version} +Requires: texlive-rmpage = %{texlive_version} +Requires: texlive-robustcommand = %{texlive_version} +Requires: texlive-robustindex = %{texlive_version} +Requires: texlive-romanneg = %{texlive_version} +Requires: texlive-romannum = %{texlive_version} +Requires: texlive-rotfloat = %{texlive_version} +Requires: texlive-rotpages = %{texlive_version} +Requires: texlive-rtkinenc = %{texlive_version} +Requires: texlive-rvwrite = %{texlive_version} +Requires: texlive-sauerj = %{texlive_version} +Requires: texlive-savefnmark = %{texlive_version} +Requires: texlive-savesym = %{texlive_version} +Requires: texlive-savetrees = %{texlive_version} +Requires: texlive-scale = %{texlive_version} +Requires: texlive-scalebar = %{texlive_version} +Requires: texlive-sdrt = %{texlive_version} +Requires: texlive-secdot = %{texlive_version} +Requires: texlive-sectionbox = %{texlive_version} +Requires: texlive-sectsty = %{texlive_version} +Requires: texlive-selectp = %{texlive_version} +Requires: texlive-semantic = %{texlive_version} +Requires: texlive-semioneside = %{texlive_version} +Requires: texlive-seqsplit = %{texlive_version} +Requires: texlive-serbian-apostrophe = %{texlive_version} +Requires: texlive-serbian-date-lat = %{texlive_version} +Requires: texlive-serbian-def-cyr = %{texlive_version} +Requires: texlive-serbian-lig = %{texlive_version} +Requires: texlive-serbianc = %{texlive_version} +Requires: texlive-sf298 = %{texlive_version} +Requires: texlive-sffms = %{texlive_version} +Requires: texlive-sfmath = %{texlive_version} +Requires: texlive-shadow = %{texlive_version} +Requires: texlive-shadethm = %{texlive_version} +Requires: texlive-shapepar = %{texlive_version} +Requires: texlive-shipunov = %{texlive_version} +Requires: texlive-shorttoc = %{texlive_version} +Requires: texlive-show2e = %{texlive_version} +Requires: texlive-showexpl = %{texlive_version} +Requires: texlive-showlabels = %{texlive_version} +Requires: texlive-sidecap = %{texlive_version} +Requires: texlive-sidenotes = %{texlive_version} +Requires: texlive-silence = %{texlive_version} +Requires: texlive-simplecd = %{texlive_version} +Requires: texlive-simplecv = %{texlive_version} +Requires: texlive-simplewick = %{texlive_version} +Requires: texlive-sitem = %{texlive_version} +Requires: texlive-skb = %{texlive_version} +Requires: texlive-skeycommand = %{texlive_version} +Requires: texlive-skeyval = %{texlive_version} +Requires: texlive-slantsc = %{texlive_version} +Requires: texlive-smalltableof = %{texlive_version} +Requires: texlive-smartref = %{texlive_version} +Requires: texlive-snapshot = %{texlive_version} +Requires: texlive-soul = %{texlive_version} +Requires: texlive-spanglish = %{texlive_version} +Requires: texlive-sparklines = %{texlive_version} +Requires: texlive-spreadtab = %{texlive_version} +Requires: texlive-spverbatim = %{texlive_version} +Requires: texlive-splitindex = %{texlive_version} +Requires: texlive-spot = %{texlive_version} +Requires: texlive-spotcolor = %{texlive_version} +Requires: texlive-srbook-mem = %{texlive_version} +Requires: texlive-srcltx = %{texlive_version} +Requires: texlive-sseq = %{texlive_version} +Requires: texlive-stack = %{texlive_version} +Requires: texlive-standalone = %{texlive_version} +Requires: texlive-statistik = %{texlive_version} +Requires: texlive-stdclsdv = %{texlive_version} +Requires: texlive-stdpage = %{texlive_version} +Requires: texlive-stex = %{texlive_version} +Requires: texlive-storebox = %{texlive_version} +Requires: texlive-storecmd = %{texlive_version} +Requires: texlive-stringstrings = %{texlive_version} +Requires: texlive-sttools = %{texlive_version} +Requires: texlive-stubs = %{texlive_version} +Requires: texlive-subdepth = %{texlive_version} +Requires: texlive-subeqn = %{texlive_version} +Requires: texlive-subeqnarray = %{texlive_version} +Requires: texlive-subfigmat = %{texlive_version} +Requires: texlive-subfigure = %{texlive_version} +Requires: texlive-subfloat = %{texlive_version} +Requires: texlive-substr = %{texlive_version} +Requires: texlive-supertabular = %{texlive_version} +Requires: texlive-svgcolor = %{texlive_version} +Requires: texlive-svn = %{texlive_version} +Requires: texlive-svn-multi = %{texlive_version} +Requires: texlive-svn-prov = %{texlive_version} +Requires: texlive-svninfo = %{texlive_version} +Requires: texlive-syntax = %{texlive_version} +Requires: texlive-syntrace = %{texlive_version} +Requires: texlive-synttree = %{texlive_version} +Requires: texlive-tabfigures = %{texlive_version} +Requires: texlive-tableaux = %{texlive_version} +Requires: texlive-tablefootnote = %{texlive_version} +Requires: texlive-tablists = %{texlive_version} +Requires: texlive-tabls = %{texlive_version} +Requires: texlive-tabto-ltx = %{texlive_version} +Requires: texlive-tabu = %{texlive_version} +Requires: texlive-tabularborder = %{texlive_version} +Requires: texlive-tabularcalc = %{texlive_version} +Requires: texlive-tabularew = %{texlive_version} +Requires: texlive-tabulary = %{texlive_version} +Requires: texlive-tagging = %{texlive_version} +Requires: texlive-talk = %{texlive_version} +Requires: texlive-taupin = %{texlive_version} +Requires: texlive-tcldoc = %{texlive_version} +Requires: texlive-tdclock = %{texlive_version} +Requires: texlive-technics = %{texlive_version} +Requires: texlive-ted = %{texlive_version} +Requires: texlive-termcal = %{texlive_version} +Requires: texlive-termlist = %{texlive_version} +Requires: texlive-tex-label = %{texlive_version} +Requires: texlive-texlogos = %{texlive_version} +Requires: texlive-texmate = %{texlive_version} +Requires: texlive-texments = %{texlive_version} +Requires: texlive-texpower = %{texlive_version} +Requires: texlive-texshade = %{texlive_version} +Requires: texlive-textfit = %{texlive_version} +Requires: texlive-textgreek = %{texlive_version} +Requires: texlive-textmerg = %{texlive_version} +Requires: texlive-textpos = %{texlive_version} +Requires: texlive-theoremref = %{texlive_version} +Requires: texlive-threeparttable = %{texlive_version} +Requires: texlive-threeparttablex = %{texlive_version} +Requires: texlive-thinsp = %{texlive_version} +Requires: texlive-thmtools = %{texlive_version} +Requires: texlive-thumb = %{texlive_version} +Requires: texlive-thumbs = %{texlive_version} +Requires: texlive-thumby = %{texlive_version} +Requires: texlive-ticket = %{texlive_version} +Requires: texlive-timesht = %{texlive_version} +Requires: texlive-titlefoot = %{texlive_version} +Requires: texlive-titlepic = %{texlive_version} +Requires: texlive-titleref = %{texlive_version} +Requires: texlive-titlesec = %{texlive_version} +Requires: texlive-titling = %{texlive_version} +Requires: texlive-tocbibind = %{texlive_version} +Requires: texlive-tocloft = %{texlive_version} +Requires: texlive-tocvsec2 = %{texlive_version} +Requires: texlive-todo = %{texlive_version} +Requires: texlive-todonotes = %{texlive_version} +Requires: texlive-tokenizer = %{texlive_version} +Requires: texlive-toolbox = %{texlive_version} +Requires: texlive-topfloat = %{texlive_version} +Requires: texlive-totcount = %{texlive_version} +Requires: texlive-totpages = %{texlive_version} +Requires: texlive-tram = %{texlive_version} +Requires: texlive-trfsigns = %{texlive_version} +Requires: texlive-trimspaces = %{texlive_version} +Requires: texlive-trsym = %{texlive_version} +Requires: texlive-trivfloat = %{texlive_version} +Requires: texlive-truncate = %{texlive_version} +Requires: texlive-tucv = %{texlive_version} +Requires: texlive-turnthepage = %{texlive_version} +Requires: texlive-twoinone = %{texlive_version} +Requires: texlive-twoup = %{texlive_version} +Requires: texlive-txgreeks = %{texlive_version} +Requires: texlive-type1cm = %{texlive_version} +Requires: texlive-typogrid = %{texlive_version} +Requires: texlive-ucs = %{texlive_version} +Requires: texlive-uebungsblatt = %{texlive_version} +Requires: texlive-umoline = %{texlive_version} +Requires: texlive-underlin = %{texlive_version} +Requires: texlive-undolabl = %{texlive_version} +Requires: texlive-units = %{texlive_version} +Requires: texlive-upmethodology = %{texlive_version} +Requires: texlive-upquote = %{texlive_version} +Requires: texlive-uri = %{texlive_version} +Requires: texlive-ushort = %{texlive_version} +Requires: texlive-varindex = %{texlive_version} +Requires: texlive-varsfromjobname = %{texlive_version} +Requires: texlive-varwidth = %{texlive_version} +Requires: texlive-verbasef = %{texlive_version} +Requires: texlive-verbatimbox = %{texlive_version} +Requires: texlive-verbatimcopy = %{texlive_version} +Requires: texlive-verbdef = %{texlive_version} +Requires: texlive-verbments = %{texlive_version} +Requires: texlive-version = %{texlive_version} +Requires: texlive-versions = %{texlive_version} +Requires: texlive-vertbars = %{texlive_version} +Requires: texlive-vhistory = %{texlive_version} +Requires: texlive-vmargin = %{texlive_version} +Requires: texlive-volumes = %{texlive_version} +Requires: texlive-vpe = %{texlive_version} +Requires: texlive-vruler = %{texlive_version} +Requires: texlive-vwcol = %{texlive_version} +Requires: texlive-wallpaper = %{texlive_version} +Requires: texlive-warning = %{texlive_version} +Requires: texlive-warpcol = %{texlive_version} +Requires: texlive-was = %{texlive_version} +Requires: texlive-widetable = %{texlive_version} +Requires: texlive-williams = %{texlive_version} +Requires: texlive-wordlike = %{texlive_version} +Requires: texlive-wrapfig = %{texlive_version} +Requires: texlive-xargs = %{texlive_version} +Requires: texlive-xbmc = %{texlive_version} +Requires: texlive-xcomment = %{texlive_version} +Requires: texlive-xhfill = %{texlive_version} +Requires: texlive-xtab = %{texlive_version} +Requires: texlive-xdoc = %{texlive_version} +Requires: texlive-xfor = %{texlive_version} +Requires: texlive-xifthen = %{texlive_version} +Requires: texlive-xmpincl = %{texlive_version} +Requires: texlive-xnewcommand = %{texlive_version} +Requires: texlive-xoptarg = %{texlive_version} +Requires: texlive-xstring = %{texlive_version} +Requires: texlive-xwatermark = %{texlive_version} +Requires: texlive-xytree = %{texlive_version} +Requires: texlive-yafoot = %{texlive_version} +Requires: texlive-yagusylo = %{texlive_version} +Requires: texlive-ydoc = %{texlive_version} +Requires: texlive-yplan = %{texlive_version} +Requires: texlive-zed-csp = %{texlive_version} +Requires: texlive-ziffer = %{texlive_version} +Requires: texlive-zwgetfdate = %{texlive_version} +Requires: texlive-zwpagelayout = %{texlive_version} +BuildArch: noarch + +%description collection-latexextra +A large collection of add-on packages for LaTeX. + +%package collection-latexrecommended +Summary: LaTeX recommended packages +Group: Productivity/Publishing/TeX/Frontends +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn23286 +Requires: texlive-anysize = %{texlive_version} +Requires: texlive-beamer = %{texlive_version} +Requires: texlive-booktabs = %{texlive_version} +Requires: texlive-caption = %{texlive_version} +Requires: texlive-cite = %{texlive_version} +Requires: texlive-cmap = %{texlive_version} +Requires: texlive-collection-latex = %{texlive_version} +Requires: texlive-crop = %{texlive_version} +Requires: texlive-ctable = %{texlive_version} +Requires: texlive-ec = %{texlive_version} +Requires: texlive-eso-pic = %{texlive_version} +Requires: texlive-euler = %{texlive_version} +Requires: texlive-extsizes = %{texlive_version} +Requires: texlive-fancybox = %{texlive_version} +Requires: texlive-fancyref = %{texlive_version} +Requires: texlive-fancyvrb = %{texlive_version} +Requires: texlive-float = %{texlive_version} +Requires: texlive-fontspec = %{texlive_version} +Requires: texlive-fp = %{texlive_version} +Requires: texlive-index = %{texlive_version} +Requires: texlive-jknapltx = %{texlive_version} +Requires: texlive-koma-script = %{texlive_version} +Requires: texlive-l3kernel = %{texlive_version} +Requires: texlive-l3packages = %{texlive_version} +Requires: texlive-l3experimental = %{texlive_version} +Requires: texlive-listings = %{texlive_version} +Requires: texlive-mdwtools = %{texlive_version} +Requires: texlive-memoir = %{texlive_version} +Requires: texlive-metalogo = %{texlive_version} +Requires: texlive-mh = %{texlive_version} +Requires: texlive-microtype = %{texlive_version} +Requires: texlive-ms = %{texlive_version} +Requires: texlive-ntgclass = %{texlive_version} +Requires: texlive-parskip = %{texlive_version} +Requires: texlive-pdfpages = %{texlive_version} +Requires: texlive-powerdot = %{texlive_version} +Requires: texlive-psfrag = %{texlive_version} +Requires: texlive-rcs = %{texlive_version} +Requires: texlive-rotating = %{texlive_version} +Requires: texlive-sansmath = %{texlive_version} +Requires: texlive-section = %{texlive_version} +Requires: texlive-seminar = %{texlive_version} +Requires: texlive-sepnum = %{texlive_version} +Requires: texlive-setspace = %{texlive_version} +Requires: texlive-subfig = %{texlive_version} +Requires: texlive-textcase = %{texlive_version} +Requires: texlive-thumbpdf = %{texlive_version} +Requires: texlive-typehtml = %{texlive_version} +Requires: texlive-underscore = %{texlive_version} +Requires: texlive-url = %{texlive_version} +Requires: texlive-xcolor = %{texlive_version} +Requires: texlive-xkeyval = %{texlive_version} +Requires: texlive-collection-latex = %{texlive_version} +BuildArch: noarch + +%description collection-latexrecommended +A collection of recommended add-on packages for LaTeX which +have widespread use + +%package collection-luatex +Summary: LuaTeX packages +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn23937 +Requires: texlive-collection-basic = %{texlive_version} +Requires: texlive-interpreter = %{texlive_version} +Requires: texlive-luabibentry = %{texlive_version} +Requires: texlive-luacode = %{texlive_version} +Requires: texlive-luaindex = %{texlive_version} +Requires: texlive-luainputenc = %{texlive_version} +Requires: texlive-lualatex-doc = %{texlive_version} +Requires: texlive-lualatex-math = %{texlive_version} +Requires: texlive-lualibs = %{texlive_version} +Requires: texlive-luamplib = %{texlive_version} +Requires: texlive-luaotfload = %{texlive_version} +Requires: texlive-luapersian = %{texlive_version} +Requires: texlive-luasseq = %{texlive_version} +Requires: texlive-luatexbase = %{texlive_version} +Requires: texlive-luatextra = %{texlive_version} +Requires: texlive-showhyphens = %{texlive_version} +BuildArch: noarch + +%description collection-luatex +Packages for LuaTeX, a Unicode-aware extension of pdfTeX, using +Lua as an embedded scripting and extension language. +http://luatex.org/ + +%package collection-mathextra +Summary: Advanced math typesetting +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn21870 +Requires: texlive-12many = %{texlive_version} +Requires: texlive-amstex = %{texlive_version} +Requires: texlive-binomexp = %{texlive_version} +Requires: texlive-boldtensors = %{texlive_version} +Requires: texlive-bosisio = %{texlive_version} +Requires: texlive-ccfonts = %{texlive_version} +Requires: texlive-commath = %{texlive_version} +Requires: texlive-concmath = %{texlive_version} +Requires: texlive-concrete = %{texlive_version} +Requires: texlive-eqnarray = %{texlive_version} +Requires: texlive-extarrows = %{texlive_version} +Requires: texlive-extpfeil = %{texlive_version} +Requires: texlive-faktor = %{texlive_version} +Requires: texlive-ionumbers = %{texlive_version} +Requires: texlive-isomath = %{texlive_version} +Requires: texlive-mathcomp = %{texlive_version} +Requires: texlive-mattens = %{texlive_version} +Requires: texlive-mhequ = %{texlive_version} +Requires: texlive-multiobjective = %{texlive_version} +Requires: texlive-nath = %{texlive_version} +Requires: texlive-ot-tableau = %{texlive_version} +Requires: texlive-oubraces = %{texlive_version} +Requires: texlive-proba = %{texlive_version} +Requires: texlive-realscripts = %{texlive_version} +Requires: texlive-rec-thy = %{texlive_version} +Requires: texlive-shuffle = %{texlive_version} +Requires: texlive-statex = %{texlive_version} +Requires: texlive-statex2 = %{texlive_version} +Requires: texlive-stmaryrd = %{texlive_version} +Requires: texlive-subsupscripts = %{texlive_version} +Requires: texlive-susy = %{texlive_version} +Requires: texlive-syllogism = %{texlive_version} +Requires: texlive-synproof = %{texlive_version} +Requires: texlive-tablor = %{texlive_version} +Requires: texlive-tensor = %{texlive_version} +Requires: texlive-tex-ewd = %{texlive_version} +Requires: texlive-thmbox = %{texlive_version} +Requires: texlive-turnstile = %{texlive_version} +Requires: texlive-unicode-math = %{texlive_version} +Requires: texlive-venn = %{texlive_version} +Requires: texlive-yhmath = %{texlive_version} +Requires: texlive-ytableau = %{texlive_version} +Requires: texlive-collection-fontsrecommended = %{texlive_version} +Requires: texlive-collection-latex = %{texlive_version} +BuildArch: noarch + +%description collection-mathextra +Extra math + +%package collection-metapost +Summary: MetaPost (and Metafont) drawing packages +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn23252 +Requires: texlive-automata = %{texlive_version} +Requires: texlive-bbcard = %{texlive_version} +Requires: texlive-blockdraw_mp = %{texlive_version} +Requires: texlive-bpolynomial = %{texlive_version} +Requires: texlive-cmarrows = %{texlive_version} +Requires: texlive-drv = %{texlive_version} +Requires: texlive-dviincl = %{texlive_version} +Requires: texlive-emp = %{texlive_version} +Requires: texlive-epsincl = %{texlive_version} +Requires: texlive-expressg = %{texlive_version} +Requires: texlive-exteps = %{texlive_version} +Requires: texlive-featpost = %{texlive_version} +Requires: texlive-feynmf = %{texlive_version} +Requires: texlive-garrigues = %{texlive_version} +Requires: texlive-gmp = %{texlive_version} +Requires: texlive-hatching = %{texlive_version} +Requires: texlive-latexmp = %{texlive_version} +Requires: texlive-metago = %{texlive_version} +Requires: texlive-metaobj = %{texlive_version} +Requires: texlive-metaplot = %{texlive_version} +Requires: texlive-metapost = %{texlive_version} +Requires: texlive-metauml = %{texlive_version} +Requires: texlive-mfpic = %{texlive_version} +Requires: texlive-mfpic4ode = %{texlive_version} +Requires: texlive-mp3d = %{texlive_version} +Requires: texlive-mpcolornames = %{texlive_version} +Requires: texlive-mpgraphics = %{texlive_version} +Requires: texlive-mpattern = %{texlive_version} +Requires: texlive-piechartmp = %{texlive_version} +Requires: texlive-roex = %{texlive_version} +Requires: texlive-slideshow = %{texlive_version} +Requires: texlive-splines = %{texlive_version} +Requires: texlive-suanpan = %{texlive_version} +Requires: texlive-textpath = %{texlive_version} +Requires: texlive-threeddice = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-metapost +The collection-metapost package + +%package collection-music +Summary: Music typesetting +Group: Productivity/Publishing/TeX/Frontends +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn24517 +Requires: texlive-abc = %{texlive_version} +Requires: texlive-figbas = %{texlive_version} +Requires: texlive-gchords = %{texlive_version} +Requires: texlive-guitar = %{texlive_version} +Requires: texlive-harmony = %{texlive_version} +Requires: texlive-musixguit = %{texlive_version} +Requires: texlive-musixtex = %{texlive_version} +Requires: texlive-musixtex-fonts = %{texlive_version} +Requires: texlive-songbook = %{texlive_version} +Requires: texlive-collection-latex = %{texlive_version} +BuildArch: noarch + +%description collection-music +Music-related fonts and packages. + +%package collection-omega +Summary: Omega +Group: Productivity/Publishing/TeX/Frontends +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn20778 +Requires: texlive-antomega = %{texlive_version} +Requires: texlive-lambda = %{texlive_version} +Requires: texlive-mxedruli = %{texlive_version} +Requires: texlive-omega = %{texlive_version} +Requires: texlive-aleph = %{texlive_version} +Requires: texlive-omegaware = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +Requires: texlive-collection-latex = %{texlive_version} +BuildArch: noarch + +%description collection-omega +Omega, a 16-bit extended TeX by John Plaice and Yannis +Haralambous + +%package collection-pictures +Summary: Graphics packages and programs +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn24672 +Requires: texlive-adjustbox = %{texlive_version} +Requires: texlive-asyfig = %{texlive_version} +Requires: texlive-autoarea = %{texlive_version} +Requires: texlive-bardiag = %{texlive_version} +Requires: texlive-bloques = %{texlive_version} +Requires: texlive-bodegraph = %{texlive_version} +Requires: texlive-bondgraph = %{texlive_version} +Requires: texlive-braids = %{texlive_version} +Requires: texlive-cachepic = %{texlive_version} +Requires: texlive-chemfig = %{texlive_version} +Requires: texlive-combinedgraphics = %{texlive_version} +Requires: texlive-circuitikz = %{texlive_version} +Requires: texlive-curve = %{texlive_version} +Requires: texlive-curve2e = %{texlive_version} +Requires: texlive-curves = %{texlive_version} +Requires: texlive-dcpic = %{texlive_version} +Requires: texlive-diagmac2 = %{texlive_version} +Requires: texlive-doc-pictex = %{texlive_version} +Requires: texlive-dottex = %{texlive_version} +Requires: texlive-dot2texi = %{texlive_version} +Requires: texlive-dratex = %{texlive_version} +Requires: texlive-drs = %{texlive_version} +Requires: texlive-duotenzor = %{texlive_version} +Requires: texlive-eepic = %{texlive_version} +Requires: texlive-epspdf = %{texlive_version} +Requires: texlive-epspdfconversion = %{texlive_version} +Requires: texlive-esk = %{texlive_version} +Requires: texlive-fig4latex = %{texlive_version} +Requires: texlive-gincltex = %{texlive_version} +Requires: texlive-gnuplottex = %{texlive_version} +Requires: texlive-gradientframe = %{texlive_version} +Requires: texlive-grafcet = %{texlive_version} +Requires: texlive-here = %{texlive_version} +Requires: texlive-hvfloat = %{texlive_version} +Requires: texlive-knitting = %{texlive_version} +Requires: texlive-knittingpattern = %{texlive_version} +Requires: texlive-lapdf = %{texlive_version} +Requires: texlive-lpic = %{texlive_version} +Requires: texlive-mathspic = %{texlive_version} +Requires: texlive-miniplot = %{texlive_version} +Requires: texlive-modiagram = %{texlive_version} +Requires: texlive-numericplots = %{texlive_version} +Requires: texlive-pb-diagram = %{texlive_version} +Requires: texlive-petri-nets = %{texlive_version} +Requires: texlive-pgf = %{texlive_version} +Requires: texlive-pgf-soroban = %{texlive_version} +Requires: texlive-pgf-umlsd = %{texlive_version} +Requires: texlive-pgfgantt = %{texlive_version} +Requires: texlive-pgfmolbio = %{texlive_version} +Requires: texlive-pgfopts = %{texlive_version} +Requires: texlive-pgfplots = %{texlive_version} +Requires: texlive-piano = %{texlive_version} +Requires: texlive-picinpar = %{texlive_version} +Requires: texlive-pict2e = %{texlive_version} +Requires: texlive-pictex = %{texlive_version} +Requires: texlive-pictex2 = %{texlive_version} +Requires: texlive-pinlabel = %{texlive_version} +Requires: texlive-pmgraph = %{texlive_version} +Requires: texlive-prerex = %{texlive_version} +Requires: texlive-productbox = %{texlive_version} +Requires: texlive-randbild = %{texlive_version} +Requires: texlive-randomwalk = %{texlive_version} +Requires: texlive-roundbox = %{texlive_version} +Requires: texlive-rviewport = %{texlive_version} +Requires: texlive-schemabloc = %{texlive_version} +Requires: texlive-swimgraf = %{texlive_version} +Requires: texlive-texdraw = %{texlive_version} +Requires: texlive-tikz-cd = %{texlive_version} +Requires: texlive-tikz-3dplot = %{texlive_version} +Requires: texlive-tikz-dependency = %{texlive_version} +Requires: texlive-tikz-inet = %{texlive_version} +Requires: texlive-tikz-qtree = %{texlive_version} +Requires: texlive-tikz-timing = %{texlive_version} +Requires: texlive-tikzpagenodes = %{texlive_version} +Requires: texlive-tqft = %{texlive_version} +Requires: texlive-tkz-base = %{texlive_version} +Requires: texlive-tkz-berge = %{texlive_version} +Requires: texlive-tkz-doc = %{texlive_version} +Requires: texlive-tkz-euclide = %{texlive_version} +Requires: texlive-tkz-fct = %{texlive_version} +Requires: texlive-tkz-graph = %{texlive_version} +Requires: texlive-tkz-kiviat = %{texlive_version} +Requires: texlive-tkz-linknodes = %{texlive_version} +Requires: texlive-tkz-orm = %{texlive_version} +Requires: texlive-tkz-tab = %{texlive_version} +Requires: texlive-tsemlines = %{texlive_version} +Requires: texlive-tufte-latex = %{texlive_version} +Requires: texlive-xypic = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-pictures +The collection-pictures package + +%package collection-plainextra +Summary: Plain TeX supplementary packages +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn23436 +Requires: texlive-figflow = %{texlive_version} +Requires: texlive-fixpdfmag = %{texlive_version} +Requires: texlive-font-change = %{texlive_version} +Requires: texlive-fontch = %{texlive_version} +Requires: texlive-getoptk = %{texlive_version} +Requires: texlive-graphics-pln = %{texlive_version} +Requires: texlive-hyplain = %{texlive_version} +Requires: texlive-js-misc = %{texlive_version} +Requires: texlive-mkpattern = %{texlive_version} +Requires: texlive-newsletr = %{texlive_version} +Requires: texlive-pitex = %{texlive_version} +Requires: texlive-placeins-plain = %{texlive_version} +Requires: texlive-plnfss = %{texlive_version} +Requires: texlive-present = %{texlive_version} +Requires: texlive-resumemac = %{texlive_version} +Requires: texlive-timetable = %{texlive_version} +Requires: texlive-treetex = %{texlive_version} +Requires: texlive-varisize = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-plainextra +Add-on packages and macros that work with plain TeX. + +%package collection-pstricks +Summary: PSTricks packages +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn23464 +Requires: texlive-auto-pst-pdf = %{texlive_version} +Requires: texlive-bclogo = %{texlive_version} +Requires: texlive-makeplot = %{texlive_version} +Requires: texlive-pdftricks = %{texlive_version} +Requires: texlive-psbao = %{texlive_version} +Requires: texlive-pst-2dplot = %{texlive_version} +Requires: texlive-pst-3d = %{texlive_version} +Requires: texlive-pst-3dplot = %{texlive_version} +Requires: texlive-pst-abspos = %{texlive_version} +Requires: texlive-pst-am = %{texlive_version} +Requires: texlive-pst-asr = %{texlive_version} +Requires: texlive-pst-bar = %{texlive_version} +Requires: texlive-pst-barcode = %{texlive_version} +Requires: texlive-pst-bezier = %{texlive_version} +Requires: texlive-pst-blur = %{texlive_version} +Requires: texlive-pst-bspline = %{texlive_version} +Requires: texlive-pst-calendar = %{texlive_version} +Requires: texlive-pst-circ = %{texlive_version} +Requires: texlive-pst-coil = %{texlive_version} +Requires: texlive-pst-cox = %{texlive_version} +Requires: texlive-pst-dbicons = %{texlive_version} +Requires: texlive-pst-diffraction = %{texlive_version} +Requires: texlive-pst-electricfield = %{texlive_version} +Requires: texlive-pst-eps = %{texlive_version} +Requires: texlive-pst-eucl = %{texlive_version} +Requires: texlive-pst-exa = %{texlive_version} +Requires: texlive-pst-fill = %{texlive_version} +Requires: texlive-pst-fr3d = %{texlive_version} +Requires: texlive-pst-fractal = %{texlive_version} +Requires: texlive-pst-fun = %{texlive_version} +Requires: texlive-pst-func = %{texlive_version} +Requires: texlive-pst-gantt = %{texlive_version} +Requires: texlive-pst-geo = %{texlive_version} +Requires: texlive-pst-ghsb = %{texlive_version} +Requires: texlive-pst-gr3d = %{texlive_version} +Requires: texlive-pst-grad = %{texlive_version} +Requires: texlive-pst-graphicx = %{texlive_version} +Requires: texlive-pst-infixplot = %{texlive_version} +Requires: texlive-pst-jtree = %{texlive_version} +Requires: texlive-pst-knot = %{texlive_version} +Requires: texlive-pst-labo = %{texlive_version} +Requires: texlive-pst-layout = %{texlive_version} +Requires: texlive-pst-lens = %{texlive_version} +Requires: texlive-pst-light3d = %{texlive_version} +Requires: texlive-pst-magneticfield = %{texlive_version} +Requires: texlive-pst-math = %{texlive_version} +Requires: texlive-pst-mirror = %{texlive_version} +Requires: texlive-pst-node = %{texlive_version} +Requires: texlive-pst-ob3d = %{texlive_version} +Requires: texlive-pst-optexp = %{texlive_version} +Requires: texlive-pst-optic = %{texlive_version} +Requires: texlive-pst-osci = %{texlive_version} +Requires: texlive-pst-pad = %{texlive_version} +Requires: texlive-pst-pdgr = %{texlive_version} +Requires: texlive-pst-platon = %{texlive_version} +Requires: texlive-pst-plot = %{texlive_version} +Requires: texlive-pst-poly = %{texlive_version} +Requires: texlive-pst-qtree = %{texlive_version} +Requires: texlive-pst-rubans = %{texlive_version} +Requires: texlive-pst-sigsys = %{texlive_version} +Requires: texlive-pst-slpe = %{texlive_version} +Requires: texlive-pst-spectra = %{texlive_version} +Requires: texlive-pst-solides3d = %{texlive_version} +Requires: texlive-pst-soroban = %{texlive_version} +Requires: texlive-pst-stru = %{texlive_version} +Requires: texlive-pst-support = %{texlive_version} +Requires: texlive-pst-text = %{texlive_version} +Requires: texlive-pst-thick = %{texlive_version} +Requires: texlive-pst-tree = %{texlive_version} +Requires: texlive-pst-tvz = %{texlive_version} +Requires: texlive-pst-uml = %{texlive_version} +Requires: texlive-pst-vowel = %{texlive_version} +Requires: texlive-pst-vue3d = %{texlive_version} +Requires: texlive-pst2pdf = %{texlive_version} +Requires: texlive-pstricks = %{texlive_version} +Requires: texlive-pstricks-add = %{texlive_version} +Requires: texlive-pstricks_calcnotes = %{texlive_version} +Requires: texlive-uml = %{texlive_version} +Requires: texlive-vaucanson-g = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +Requires: texlive-collection-genericrecommended = %{texlive_version} +BuildArch: noarch + +%description collection-pstricks +The collection-pstricks package + +%package collection-publishers +Summary: Support for publishers, theses, standards, conferences, etc. +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn24685 +Requires: texlive-ANUfinalexam = %{texlive_version} +Requires: texlive-IEEEconf = %{texlive_version} +Requires: texlive-IEEEtran = %{texlive_version} +Requires: texlive-aastex = %{texlive_version} +Requires: texlive-acmconf = %{texlive_version} +Requires: texlive-active-conf = %{texlive_version} +Requires: texlive-afthesis = %{texlive_version} +Requires: texlive-aguplus = %{texlive_version} +Requires: texlive-aiaa = %{texlive_version} +Requires: texlive-ametsoc = %{texlive_version} +Requires: texlive-aomart = %{texlive_version} +Requires: texlive-apa = %{texlive_version} +Requires: texlive-apa6 = %{texlive_version} +Requires: texlive-apa6e = %{texlive_version} +Requires: texlive-arsclassica = %{texlive_version} +Requires: texlive-asaetr = %{texlive_version} +Requires: texlive-ascelike = %{texlive_version} +Requires: texlive-beamer-FUBerlin = %{texlive_version} +Requires: texlive-cascadilla = %{texlive_version} +Requires: texlive-chem-journal = %{texlive_version} +Requires: texlive-classicthesis = %{texlive_version} +Requires: texlive-cmpj = %{texlive_version} +Requires: texlive-confproc = %{texlive_version} +Requires: texlive-dfgproposal = %{texlive_version} +Requires: texlive-ebsthesis = %{texlive_version} +Requires: texlive-economic = %{texlive_version} +Requires: texlive-ejpecp = %{texlive_version} +Requires: texlive-elbioimp = %{texlive_version} +Requires: texlive-elsarticle = %{texlive_version} +Requires: texlive-elteikthesis = %{texlive_version} +Requires: texlive-erdc = %{texlive_version} +Requires: texlive-estcpmm = %{texlive_version} +Requires: texlive-euproposal = %{texlive_version} +Requires: texlive-fbithesis = %{texlive_version} +Requires: texlive-fcltxdoc = %{texlive_version} +Requires: texlive-gaceta = %{texlive_version} +Requires: texlive-gatech-thesis = %{texlive_version} +Requires: texlive-har2nat = %{texlive_version} +Requires: texlive-icsv = %{texlive_version} +Requires: texlive-ieeepes = %{texlive_version} +Requires: texlive-ijmart = %{texlive_version} +Requires: texlive-imac = %{texlive_version} +Requires: texlive-imtekda = %{texlive_version} +Requires: texlive-jmlr = %{texlive_version} +Requires: texlive-jpsj = %{texlive_version} +Requires: texlive-kdgdocs = %{texlive_version} +Requires: texlive-kluwer = %{texlive_version} +Requires: texlive-lps = %{texlive_version} +Requires: texlive-macqassign = %{texlive_version} +Requires: texlive-mentis = %{texlive_version} +Requires: texlive-msu-thesis = %{texlive_version} +Requires: texlive-musuos = %{texlive_version} +Requires: texlive-muthesis = %{texlive_version} +Requires: texlive-nature = %{texlive_version} +Requires: texlive-nddiss = %{texlive_version} +Requires: texlive-nih = %{texlive_version} +Requires: texlive-nostarch = %{texlive_version} +Requires: texlive-nrc = %{texlive_version} +Requires: texlive-onrannual = %{texlive_version} +Requires: texlive-philosophersimprint = %{texlive_version} +Requires: texlive-powerdot-FUBerlin = %{texlive_version} +Requires: texlive-pracjourn = %{texlive_version} +Requires: texlive-procIAGssymp = %{texlive_version} +Requires: texlive-ptptex = %{texlive_version} +Requires: texlive-psu-thesis = %{texlive_version} +Requires: texlive-revtex = %{texlive_version} +Requires: texlive-revtex4 = %{texlive_version} +Requires: texlive-ryethesis = %{texlive_version} +Requires: texlive-sageep = %{texlive_version} +Requires: texlive-sapthesis = %{texlive_version} +Requires: texlive-seuthesis = %{texlive_version} +Requires: texlive-soton = %{texlive_version} +Requires: texlive-spie = %{texlive_version} +Requires: texlive-stellenbosch = %{texlive_version} +Requires: texlive-suftesi = %{texlive_version} +Requires: texlive-sugconf = %{texlive_version} +Requires: texlive-texilikechaps = %{texlive_version} +Requires: texlive-texilikecover = %{texlive_version} +Requires: texlive-thesis-titlepage-fhac = %{texlive_version} +Requires: texlive-thuthesis = %{texlive_version} +Requires: texlive-toptesi = %{texlive_version} +Requires: texlive-tugboat = %{texlive_version} +Requires: texlive-tugboat-plain = %{texlive_version} +Requires: texlive-uaclasses = %{texlive_version} +Requires: texlive-uafthesis = %{texlive_version} +Requires: texlive-ucdavisthesis = %{texlive_version} +Requires: texlive-ucthesis = %{texlive_version} +Requires: texlive-uiucthesis = %{texlive_version} +Requires: texlive-umthesis = %{texlive_version} +Requires: texlive-umich-thesis = %{texlive_version} +Requires: texlive-unamthesis = %{texlive_version} +Requires: texlive-ut-thesis = %{texlive_version} +Requires: texlive-uothesis = %{texlive_version} +Requires: texlive-uowthesis = %{texlive_version} +Requires: texlive-uwthesis = %{texlive_version} +Requires: texlive-vancouver = %{texlive_version} +Requires: texlive-york-thesis = %{texlive_version} +Requires: texlive-collection-latex = %{texlive_version} +BuildArch: noarch + +%description collection-publishers +The collection-publishers package + +%package collection-science +Summary: Typesetting for natural and computer sciences +Group: Productivity/Publishing/TeX/Base +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn24717 +Requires: texlive-SIstyle = %{texlive_version} +Requires: texlive-SIunits = %{texlive_version} +Requires: texlive-alg = %{texlive_version} +Requires: texlive-algorithm2e = %{texlive_version} +Requires: texlive-algorithmicx = %{texlive_version} +Requires: texlive-algorithms = %{texlive_version} +Requires: texlive-biocon = %{texlive_version} +Requires: texlive-bpchem = %{texlive_version} +Requires: texlive-bytefield = %{texlive_version} +Requires: texlive-chemarrow = %{texlive_version} +Requires: texlive-chemcompounds = %{texlive_version} +Requires: texlive-chemcono = %{texlive_version} +Requires: texlive-chemexec = %{texlive_version} +Requires: texlive-chemmacros = %{texlive_version} +Requires: texlive-chemnum = %{texlive_version} +Requires: texlive-chemstyle = %{texlive_version} +Requires: texlive-clrscode = %{texlive_version} +Requires: texlive-complexity = %{texlive_version} +Requires: texlive-computational-complexity = %{texlive_version} +Requires: texlive-digiconfigs = %{texlive_version} +Requires: texlive-drawstack = %{texlive_version} +Requires: texlive-dyntree = %{texlive_version} +Requires: texlive-eltex = %{texlive_version} +Requires: texlive-engtlc = %{texlive_version} +Requires: texlive-fouridx = %{texlive_version} +Requires: texlive-functan = %{texlive_version} +Requires: texlive-galois = %{texlive_version} +Requires: texlive-gastex = %{texlive_version} +Requires: texlive-gene-logic = %{texlive_version} +Requires: texlive-gu = %{texlive_version} +Requires: texlive-hep = %{texlive_version} +Requires: texlive-hepnames = %{texlive_version} +Requires: texlive-hepparticles = %{texlive_version} +Requires: texlive-hepthesis = %{texlive_version} +Requires: texlive-hepunits = %{texlive_version} +Requires: texlive-karnaugh = %{texlive_version} +Requires: texlive-mhchem = %{texlive_version} +Requires: texlive-miller = %{texlive_version} +Requires: texlive-mychemistry = %{texlive_version} +Requires: texlive-nuc = %{texlive_version} +Requires: texlive-objectz = %{texlive_version} +Requires: texlive-physymb = %{texlive_version} +Requires: texlive-pseudocode = %{texlive_version} +Requires: texlive-sasnrdisplay = %{texlive_version} +Requires: texlive-scientificpaper = %{texlive_version} +Requires: texlive-sciposter = %{texlive_version} +Requires: texlive-sfg = %{texlive_version} +Requires: texlive-siunitx = %{texlive_version} +Requires: texlive-steinmetz = %{texlive_version} +Requires: texlive-struktex = %{texlive_version} +Requires: texlive-t-angles = %{texlive_version} +Requires: texlive-textopo = %{texlive_version} +Requires: texlive-ulqda = %{texlive_version} +Requires: texlive-unitsdef = %{texlive_version} +Requires: texlive-youngtab = %{texlive_version} +Requires: texlive-collection-latex = %{texlive_version} +BuildArch: noarch + +%description collection-science +Typesetting for natural and computer sciences + +%package collection-texinfo +Summary: GNU Texinfo +Group: Productivity/Publishing/Texinfo +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn15216 +Requires: texlive-texinfo = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-texinfo +TeX macros for the GNU Texinfo documentation system. The +programs and documentation are no longer distributed with TeX +Live; get the original Texinfo package for your system. + +%package collection-xetex +Summary: XeTeX packages +Group: Productivity/Publishing/TeX/Frontends +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn24140 +Requires: texlive-arabxetex = %{texlive_version} +Requires: texlive-euenc = %{texlive_version} +Requires: texlive-fixlatvian = %{texlive_version} +Requires: texlive-fontbook = %{texlive_version} +Requires: texlive-fontwrap = %{texlive_version} +Requires: texlive-mathspec = %{texlive_version} +Requires: texlive-philokalia = %{texlive_version} +Requires: texlive-polyglossia = %{texlive_version} +Requires: texlive-unisugar = %{texlive_version} +Requires: texlive-xecjk = %{texlive_version} +Requires: texlive-xecolor = %{texlive_version} +Requires: texlive-xecyr = %{texlive_version} +Requires: texlive-xeindex = %{texlive_version} +Requires: texlive-xepersian = %{texlive_version} +Requires: texlive-xesearch = %{texlive_version} +Requires: texlive-xetex = %{texlive_version} +Requires: texlive-xetex-def = %{texlive_version} +Requires: texlive-xetex-itrans = %{texlive_version} +Requires: texlive-xetex-pstricks = %{texlive_version} +Requires: texlive-xetexconfig = %{texlive_version} +Requires: texlive-xetexfontinfo = %{texlive_version} +Requires: texlive-xltxtra = %{texlive_version} +Requires: texlive-xunicode = %{texlive_version} +Requires: texlive-collection-basic = %{texlive_version} +BuildArch: noarch + +%description collection-xetex +Packages for XeTeX, the Unicode/OpenType-enabled TeX by +Jonathan Kew, http://scripts.sil.org/xetex. + +%package a2ping-bin +Summary: Binaries of a2ping +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn6834 +Prefix: /usr/bin + +%description a2ping-bin +Binaries of a2ping + +%package accfonts-bin +Summary: Binaries of accfonts +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn12688 +Prefix: /usr/bin + +%description accfonts-bin +Binaries of accfonts + +%package afm2pl-bin +Summary: Binaries of afm2pl +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description afm2pl-bin +Binaries of afm2pl + +%package aleph-bin +Summary: Binaries of aleph +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description aleph-bin +Binaries of aleph + +%package amstex-bin +Summary: Binaries of amstex +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn3006 +Prefix: /usr/bin + +%description amstex-bin +Binaries of amstex + +%package asymptote-bin +Summary: Binaries of asymptote +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn23068 +Prefix: /usr/bin + +%description asymptote-bin +Binaries of asymptote + +%package authorindex-bin +Summary: Binaries of authorindex +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn18790 +Prefix: /usr/bin + +%description authorindex-bin +Binaries of authorindex + +%package biber-bin +Summary: Binaries of biber +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn24683 +Prefix: /usr/bin + +%description biber-bin +Binaries of biber + +%package bibexport-bin +Summary: Binaries of bibexport +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn16219 +Prefix: /usr/bin + +%description bibexport-bin +Binaries of bibexport + +%package bibtex-bin +Summary: Binaries of bibtex +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description bibtex-bin +Binaries of bibtex + +%package bibtex8-bin +Summary: Binaries of bibtex8 +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description bibtex8-bin +Binaries of bibtex8 + +%package bibtexu-bin +Summary: Binaries of bibtexu +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description bibtexu-bin +Binaries of bibtexu + +%package bundledoc-bin +Summary: Binaries of bundledoc +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn17794 +Prefix: /usr/bin + +%description bundledoc-bin +Binaries of bundledoc + +%package cachepic-bin +Summary: Binaries of cachepic +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn15543 +Prefix: /usr/bin + +%description cachepic-bin +Binaries of cachepic + +%package chktex-bin +Summary: Binaries of chktex +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn21010 +Prefix: /usr/bin + +%description chktex-bin +Binaries of chktex + +%package cjkutils-bin +Summary: Binaries of cjkutils +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description cjkutils-bin +Binaries of cjkutils + +%package context-bin +Summary: Binaries of context +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn23104 +Prefix: /usr/bin + +%description context-bin +Binaries of context + +%package cslatex-bin +Summary: Binaries of cslatex +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn3006 +Prefix: /usr/bin + +%description cslatex-bin +Binaries of cslatex + +%package csplain-bin +Summary: Binaries of csplain +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn3006 +Prefix: /usr/bin + +%description csplain-bin +Binaries of csplain + +%package ctie-bin +Summary: Binaries of ctie +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description ctie-bin +Binaries of ctie + +%package cweb-bin +Summary: Binaries of cweb +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description cweb-bin +Binaries of cweb + +%package cyrillic-bin-bin +Summary: Binaries of cyrillic-bin +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn10 +Prefix: /usr/bin + +%description cyrillic-bin-bin +Binaries of cyrillic-bin + +%package de-macro-bin +Summary: Binaries of de-macro +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn17399 +Prefix: /usr/bin + +%description de-macro-bin +Binaries of de-macro + +%package detex-bin +Summary: Binaries of detex +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description detex-bin +Binaries of detex + +%package devnag-bin +Summary: Binaries of devnag +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn18336 +Prefix: /usr/bin + +%description devnag-bin +Binaries of devnag + +%package dtl-bin +Summary: Binaries of dtl +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn18336 +Prefix: /usr/bin + +%description dtl-bin +Binaries of dtl + +%package dviasm-bin +Summary: Binaries of dviasm +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn8329 +Prefix: /usr/bin + +%description dviasm-bin +Binaries of dviasm + +%package dvicopy-bin +Summary: Binaries of dvicopy +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description dvicopy-bin +Binaries of dvicopy + +%package dvidvi-bin +Summary: Binaries of dvidvi +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn14164 +Prefix: /usr/bin + +%description dvidvi-bin +Binaries of dvidvi + +%package dviljk-bin +Summary: Binaries of dviljk +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description dviljk-bin +Binaries of dviljk + +%package dvipdfm-bin +Summary: Binaries of dvipdfm +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13663 +Prefix: /usr/bin + +%description dvipdfm-bin +Binaries of dvipdfm + +%package dvipdfmx-bin +Summary: Binaries of dvipdfmx +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description dvipdfmx-bin +Binaries of dvipdfmx + +%package dvipng-bin +Summary: Binaries of dvipng +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description dvipng-bin +Binaries of dvipng + +%package dvipos-bin +Summary: Binaries of dvipos +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description dvipos-bin +Binaries of dvipos + +%package dvips-bin +Summary: Binaries of dvips +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description dvips-bin +Binaries of dvips + +%package dvisvgm-bin +Summary: Binaries of dvisvgm +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description dvisvgm-bin +Binaries of dvisvgm + +%package ebong-bin +Summary: Binaries of ebong +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn21000 +Prefix: /usr/bin + +%description ebong-bin +Binaries of ebong + +%package eplain-bin +Summary: Binaries of eplain +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn3006 +Prefix: /usr/bin + +%description eplain-bin +Binaries of eplain + +%package epspdf-bin +Summary: Binaries of epspdf +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn20860 +Prefix: /usr/bin + +%description epspdf-bin +Binaries of epspdf + +%package epstopdf-bin +Summary: Binaries of epstopdf +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn18336 +Prefix: /usr/bin + +%description epstopdf-bin +Binaries of epstopdf + +%package fig4latex-bin +Summary: Binaries of fig4latex +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn14752 +Prefix: /usr/bin + +%description fig4latex-bin +Binaries of fig4latex + +%package findhyph-bin +Summary: Binaries of findhyph +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn14758 +Prefix: /usr/bin + +%description findhyph-bin +Binaries of findhyph + +%package fontinst-bin +Summary: Binaries of fontinst +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn10 +Prefix: /usr/bin + +%description fontinst-bin +Binaries of fontinst + +%package fontools-bin +Summary: Binaries of fontools +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn12687 +Prefix: /usr/bin + +%description fontools-bin +Binaries of fontools + +%package fontware-bin +Summary: Binaries of fontware +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description fontware-bin +Binaries of fontware + +%package fragmaster-bin +Summary: Binaries of fragmaster +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13663 +Prefix: /usr/bin + +%description fragmaster-bin +Binaries of fragmaster + +%package glossaries-bin +Summary: Binaries of glossaries +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn6881 +Prefix: /usr/bin + +%description glossaries-bin +Binaries of glossaries + +%package gsftopk-bin +Summary: Binaries of gsftopk +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description gsftopk-bin +Binaries of gsftopk + +%package jadetex-bin +Summary: Binaries of jadetex +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn3006 +Prefix: /usr/bin + +%description jadetex-bin +Binaries of jadetex + +%package kpathsea-bin +Summary: Binaries of kpathsea +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn23152 +Prefix: /usr/bin + +%description kpathsea-bin +Binaries of kpathsea + +%package lacheck-bin +Summary: Binaries of lacheck +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22641 +Prefix: /usr/bin + +%description lacheck-bin +Binaries of lacheck + +%package latex-bin-bin +Summary: Binaries of latex-bin +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn14050 +Prefix: /usr/bin + +%description latex-bin-bin +Binaries of latex-bin + +%package latex2man-bin +Summary: Binaries of latex2man +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13663 +Prefix: /usr/bin + +%description latex2man-bin +Binaries of latex2man + +%package latexdiff-bin +Summary: Binaries of latexdiff +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn16420 +Prefix: /usr/bin + +%description latexdiff-bin +Binaries of latexdiff + +%package latexmk-bin +Summary: Binaries of latexmk +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn10937 +Prefix: /usr/bin + +%description latexmk-bin +Binaries of latexmk + +%package lcdftypetools-bin +Summary: Binaries of lcdftypetools +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description lcdftypetools-bin +Binaries of lcdftypetools + +%package listings-ext-bin +Summary: Binaries of listings-ext +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn15093 +Prefix: /usr/bin + +%description listings-ext-bin +Binaries of listings-ext + +%package luaotfload-bin +Summary: Binaries of luaotfload +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn18579 +Prefix: /usr/bin + +%description luaotfload-bin +Binaries of luaotfload + +%package luatex-bin +Summary: Binaries of luatex +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description luatex-bin +Binaries of luatex + +%package makeindex-bin +Summary: Binaries of makeindex +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description makeindex-bin +Binaries of makeindex + +%package match_parens-bin +Summary: Binaries of match_parens +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn23500 +Prefix: /usr/bin + +%description match_parens-bin +Binaries of match_parens + +%package mathspic-bin +Summary: Binaries of mathspic +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn23661 +Prefix: /usr/bin + +%description mathspic-bin +Binaries of mathspic + +%package metafont-bin +Summary: Binaries of metafont +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description metafont-bin +Binaries of metafont + +%package metapost-bin +Summary: Binaries of metapost +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description metapost-bin +Binaries of metapost + +%package mex-bin +Summary: Binaries of mex +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn3006 +Prefix: /usr/bin + +%description mex-bin +Binaries of mex + +%package mf2pt1-bin +Summary: Binaries of mf2pt1 +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn23406 +Prefix: /usr/bin + +%description mf2pt1-bin +Binaries of mf2pt1 + +%package mfware-bin +Summary: Binaries of mfware +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description mfware-bin +Binaries of mfware + +%package mkgrkindex-bin +Summary: Binaries of mkgrkindex +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn14428 +Prefix: /usr/bin + +%description mkgrkindex-bin +Binaries of mkgrkindex + +%package mkjobtexmf-bin +Summary: Binaries of mkjobtexmf +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn8457 +Prefix: /usr/bin + +%description mkjobtexmf-bin +Binaries of mkjobtexmf + +%package mltex-bin +Summary: Binaries of mltex +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn3006 +Prefix: /usr/bin + +%description mltex-bin +Binaries of mltex + +%package mptopdf-bin +Summary: Binaries of mptopdf +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn18674 +Prefix: /usr/bin + +%description mptopdf-bin +Binaries of mptopdf + +%package musixtex-bin +Summary: Binaries of musixtex +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22187 +Prefix: /usr/bin + +%description musixtex-bin +Binaries of musixtex + +%package omegaware-bin +Summary: Binaries of omegaware +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description omegaware-bin +Binaries of omegaware + +%package patgen-bin +Summary: Binaries of patgen +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22641 +Prefix: /usr/bin + +%description patgen-bin +Binaries of patgen + +%package pax-bin +Summary: Binaries of pax +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn10843 +Prefix: /usr/bin + +%description pax-bin +Binaries of pax + +%package pdfcrop-bin +Summary: Binaries of pdfcrop +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn14387 +Prefix: /usr/bin + +%description pdfcrop-bin +Binaries of pdfcrop + +%package pdfjam-bin +Summary: Binaries of pdfjam +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn17868 +Prefix: /usr/bin + +%description pdfjam-bin +Binaries of pdfjam + +%package pdftex-bin +Summary: Binaries of pdftex +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn23498 +Prefix: /usr/bin + +%description pdftex-bin +Binaries of pdftex + +%package pdftools-bin +Summary: Binaries of pdftools +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22859 +Prefix: /usr/bin + +%description pdftools-bin +Binaries of pdftools + +%package perltex-bin +Summary: Binaries of perltex +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn16181 +Prefix: /usr/bin + +%description perltex-bin +Binaries of perltex + +%package pkfix-helper-bin +Summary: Binaries of pkfix-helper +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13663 +Prefix: /usr/bin + +%description pkfix-helper-bin +Binaries of pkfix-helper + +%package pkfix-bin +Summary: Binaries of pkfix +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13364 +Prefix: /usr/bin + +%description pkfix-bin +Binaries of pkfix + +%package ps2pkm-bin +Summary: Binaries of ps2pkm +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description ps2pkm-bin +Binaries of ps2pkm + +%package pst2pdf-bin +Summary: Binaries of pst2pdf +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn16622 +Prefix: /usr/bin + +%description pst2pdf-bin +Binaries of pst2pdf + +%package pstools-bin +Summary: Binaries of pstools +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22641 +Prefix: /usr/bin + +%description pstools-bin +Binaries of pstools + +%package ptex-bin +Summary: Binaries of ptex +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description ptex-bin +Binaries of ptex + +%package purifyeps-bin +Summary: Binaries of purifyeps +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13663 +Prefix: /usr/bin + +%description purifyeps-bin +Binaries of purifyeps + +%package seetexk-bin +Summary: Binaries of seetexk +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn18336 +Prefix: /usr/bin + +%description seetexk-bin +Binaries of seetexk + +%package splitindex-bin +Summary: Binaries of splitindex +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn12613 +Prefix: /usr/bin + +%description splitindex-bin +Binaries of splitindex + +%package sty2dtx-bin +Summary: Binaries of sty2dtx +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn21215 +Prefix: /usr/bin + +%description sty2dtx-bin +Binaries of sty2dtx + +%package svn-multi-bin +Summary: Binaries of svn-multi +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13663 +Prefix: /usr/bin + +%description svn-multi-bin +Binaries of svn-multi + +%package synctex-bin +Summary: Binaries of synctex +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description synctex-bin +Binaries of synctex + +%package tetex-bin +Summary: Binaries of tetex +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn23150 +Prefix: /usr/bin + +%description tetex-bin +Binaries of tetex + +%package tex-bin +Summary: Binaries of tex +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description tex-bin +Binaries of tex + +%package tex4ht-bin +Summary: Binaries of tex4ht +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description tex4ht-bin +Binaries of tex4ht + +%package texconfig-bin +Summary: Binaries of texconfig +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22544 +Prefix: /usr/bin + +%description texconfig-bin +Binaries of texconfig + +%package texcount-bin +Summary: Binaries of texcount +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13013 +Prefix: /usr/bin + +%description texcount-bin +Binaries of texcount + +%package texdef-bin +Summary: Binaries of texdef +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn21802 +Prefix: /usr/bin + +%description texdef-bin +Binaries of texdef + +%package texdiff-bin +Summary: Binaries of texdiff +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn15506 +Prefix: /usr/bin + +%description texdiff-bin +Binaries of texdiff + +%package texdirflatten-bin +Summary: Binaries of texdirflatten +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn12782 +Prefix: /usr/bin + +%description texdirflatten-bin +Binaries of texdirflatten + +%package texdoc-bin +Summary: Binaries of texdoc +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn12518 +Prefix: /usr/bin + +%description texdoc-bin +Binaries of texdoc + +%package texlive-scripts-bin +Summary: Binaries of texlive-scripts +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13663 +Prefix: /usr/bin + +%description texlive-scripts-bin +Binaries of texlive-scripts + +%package texloganalyser-bin +Summary: Binaries of texloganalyser +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13663 +Prefix: /usr/bin + +%description texloganalyser-bin +Binaries of texloganalyser + +%package texsis-bin +Summary: Binaries of texsis +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn3006 +Prefix: /usr/bin + +%description texsis-bin +Binaries of texsis + +%package texware-bin +Summary: Binaries of texware +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description texware-bin +Binaries of texware + +%package thumbpdf-bin +Summary: Binaries of thumbpdf +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn6898 +Prefix: /usr/bin + +%description thumbpdf-bin +Binaries of thumbpdf + +%package tie-bin +Summary: Binaries of tie +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description tie-bin +Binaries of tie + +%package tpic2pdftex-bin +Summary: Binaries of tpic2pdftex +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description tpic2pdftex-bin +Binaries of tpic2pdftex + +%package ttfutils-bin +Summary: Binaries of ttfutils +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description ttfutils-bin +Binaries of ttfutils + +%package ulqda-bin +Summary: Binaries of ulqda +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn13663 +Prefix: /usr/bin + +%description ulqda-bin +Binaries of ulqda + +%package urlbst-bin +Summary: Binaries of urlbst +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn23262 +Prefix: /usr/bin + +%description urlbst-bin +Binaries of urlbst + +%package vlna-bin +Summary: Binaries of vlna +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22641 +Prefix: /usr/bin + +%description vlna-bin +Binaries of vlna + +%package vpe-bin +Summary: Binaries of vpe +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn6897 +Prefix: /usr/bin + +%description vpe-bin +Binaries of vpe + +%package web-bin +Summary: Binaries of web +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description web-bin +Binaries of web + +%package xdvi-bin +Summary: Binaries of xdvi +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description xdvi-bin +Binaries of xdvi + +%package xetex-bin +Summary: Binaries of xetex +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn22981 +Prefix: /usr/bin + +%description xetex-bin +Binaries of xetex + +%package xmltex-bin +Summary: Binaries of xmltex +Group: Productivity/Publishing/TeX/Utilities +Url: http://www.tug.org/texlive/ +Version: %{texlive_version} +Release: %{texlive_release}.svn3006 +Prefix: /usr/bin + +%description xmltex-bin +Binaries of xmltex + +%package -n libkpathsea6 +License: LGPL +Version: 6.0.1 +Release: 0 +Summary: Path searching library for TeX-related files +Group: System/Libraries +Url: http://www.tug.org/texlive/ +Prefix: /usr/lib + +%description -n libkpathsea6 +Kpathsea is a library and utility programs which provide path +searching facilities for TeX file types, including the self- +locating feature required for movable installations, layered on +top of a general search mechanism. It is not distributed +separately, but rather is released and maintained as part of +the TeX-live sources. + +%package -n %{name}-kpathsea-devel +License: LGPL +Version: 6.0.1 +Release: 0 +Summary: Path searching library for TeX-related files +Group: Development/Libraries/C and C++ +Url: http://www.tug.org/texlive/ +Requires: libkpathsea6 = 6.0.1 + +%description -n %{name}-kpathsea-devel +Kpathsea is a library and utility programs which provide path +searching facilities for TeX file types, including the self- +locating feature required for movable installations, layered on +top of a general search mechanism. It is not distributed +separately, but rather is released and maintained as part of +the TeX-live sources. + +%package -n libptexenc1 +License: BSD +Version: 1.2.0 +Release: 0 +Summary: Libraries of Kanji code convert library for pTeX +Group: System/Libraries +Url: http://www.tug.org/texlive/ +Prefix: /usr/lib + +%description -n libptexenc1 +The ptexenc is a useful library for Japanese pTeX +(which stands for publishing TeX, and is an extension of +TeX by ASCII Co.) and its surrounding tools. + +%package -n %{name}-ptexenc-devel +License: BSD +Version: 1.2.0 +Release: 0 +Summary: Libraries of Kanji code convert library for pTeX +Group: Development/Libraries/C and C++ +Url: http://www.tug.org/texlive/ +Requires: libptexenc1 = 1.2.0 + +%description -n %{name}-ptexenc-devel +This package includes the ptexenc development files. +The ptexenc is a useful library for Japanese pTeX +(which stands for publishing TeX, and is an extension of +TeX by ASCII Co.) and its surrounding tools. + +%prep + OS=%{_target_os} + CPU=%{_target_cpu} +%ifarch ia64 + RPM_OPT_FLAGS=$(echo "${RPM_OPT_FLAGS}"|sed -r 's/-O[0-9]?/-O1/g') +%endif +%ifarch %arm + RPM_OPT_FLAGS=${RPM_OPT_FLAGS/-mthumb/-mthumb-interwork -marm} +%endif + CC=gcc + CXX=g++ + XCFLAGS="$RPM_OPT_FLAGS -D_POSIX_C_SOURCE=200803L -D_XOPEN_SOURCE=600 -D_BSD_SOURCE" + XCXXFLAGS="$XCFLAGS" + cflags () + { + local flag=$1; shift || return + local cvar=$1; shift || return + local xvar=$1; shift || true + if test -z "${flag}" ; then + return + fi + case "$flag" in + -Wl,*) + if test -z "${cvar}" ; then + return + fi + case "${!cvar}" in + *${flag}*) return + esac + if echo 'int main () { return 0; }' | ${CC:-gcc} -Werror $flag -o /dev/null -xc - ; then + eval $cvar=\${$cvar:+\$$cvar\ }$flag + fi + ;; + *) + if test -z "${cvar}" ; then + return + fi + case "${!cvar}" in + *${flag}*) ;; + *) if ${CC:-gcc} -Werror $flag -S -o /dev/null -xc /dev/null ; then + eval $cvar=\${$cvar:+\$$cvar\ }$flag + fi + esac + if test -z "${xvar}" ; then + return + fi + case "${!xvar}" in + *${flag}*) ;; + *) if ${CXX:-g++} -Werror $flag -S -o /dev/null -xc++ /dev/null ; then + eval $xvar=\${$xvar:+\$$xvar\ }$flag + fi + esac + esac > /dev/null 2>&1 + } + cflags -std=gnu89 XCFLAGS + cflags -fno-const-strings XCFLAGS XCXXFLAGS + cflags -fno-strict-aliasing XCFLAGS XCXXFLAGS + cflags -fPIC XCFLAGS XCXXFLAGS + cflags -Wno-write-strings XCFLAGS XCXXFLAGS + cflags -Wno-char-subscripts XCFLAGS XCXXFLAGS + cflags -Wno-unused XCFLAGS XCXXFLAGS + cflags -Wno-uninitialized XCFLAGS XCXXFLAGS + cflags -Wno-return-type XCFLAGS XCXXFLAGS + cflags -Wno-parentheses XCFLAGS XCXXFLAGS + cflags -Wno-sign-compare XCFLAGS XCXXFLAGS + cflags -Wno-unprototyped-calls XCFLAGS + cflags -pipe XCFLAGS XCXXFLAGS + cflags -Wl,-O2 XLDFLAGS + cflags -Wl,--as-needed XLDFLAGS + cflags -Wl,--hash-size=8599 XLDFLAGS + cflags -Wl,-warn-common XLDFLAGS + cflags -Wl,-Bsymbolic-functions XLDFLAGS + HOST=%{_target_cpu}-suse-%{_host_os} + BUILD=%{_target_cpu}-suse-%{_build_os} + BINARY=${CPU}-${OS} + VENDOR="%{vendor}" + VENDOR="${VENDOR%%%%,*}" + + # Generate the Options file + exec 6>&1 + exec 1>|%{options} + + # On error clear + trap 'rm -vf %{options}' ERR + + # Disable MALLOC_PERTURB_ + # echo unset MALLOC_PERTURB_ + + # System wide configuration + echo CPU=\"$CPU\" + echo BINARY=\"${BINARY%%-gnu*}\" + echo XCFLAGS=\"$XCFLAGS\" + echo XCXXFLAGS=\"$XCXXFLAGS\" + echo XLDFLAGS=\"$XLDFLAGS\" + echo HOST=\"${HOST%%-gnu*}\" + echo BUILD=\"${BUILD%%-gnu*}\" + + echo export XCFLAGS XCXXFLAGS XLDFLAGS HOST BUILD BINARY + + # Do not include e.g. from manual build + echo unset TEXINPUTS TEXMF HOME + + # Use a well defined multi byte locale + echo unset ${!LC_*} + echo LANG=POSIX + echo LC_CTYPE=en_US.UTF-8 + echo export LANG LC_CTYPE + + # Environment for configuration + echo CONFIG_SHELL=/bin/bash + echo CC=\"$CC\" + echo CXX=\"$CXX\" + echo CFLAGS=\"$XCFLAGS\" + echo CXXFLAGS=\"$XCXXFLAGS\" + echo LDFLAGS=\"-Wl,-warn-common $XLDFLAGS\" + echo VENDOR=\"${VENDOR}\" + echo ARCH_LIB=%{_lib} + echo export CC CXX CFLAGS CXXFLAGS LDFLAGS VENDOR PATH CONFIG_SHELL ARCH_LIB LANG + + # Do not run TeX engine in fmtutil with batchmode + echo batchmode=no + echo export batchmode +%ifnarch hppa + echo ulimit -s unlimited +%else + # This is the maximum on hppa + echo ulimit -s 81920 +%endif + exec 1>&6- + +%setup -c -q -n texlive -T + + tar --use-compress-program=xz --strip-components=1 -xf %{S:0} + +%patch1 -p0 -b .configure +%patch2 -p0 -b .xdvizilla +%patch3 -p0 -b .arraysubs +%patch5 -p0 -b .texdoc +%patch6 -p0 -b .dviutils +%if %{with psutils} +%patch7 -p0 -b .psutils-flip +%patch8 -p0 -b .psutils +%endif +%patch10 -p0 -b .poppler +%patch11 -p0 -b .lacheck +%patch12 -p0 -b .warns +%patch13 -p0 -b .x11r7 +%patch14 -p0 -b .luatex + rm -vf texk/web2c/luatexdir/pdf/pagetree.h + rm -vf texk/web2c/luatexdir/pdf/pagetree.w + ln -sf pdfpagetree.h texk/web2c/luatexdir/pdf/pagetree.h + ln -sf pdfpagetree.w texk/web2c/luatexdir/pdf/pagetree.w +%patch15 -p0 -b .overflow +%patch17 -p0 -b .64 +%patch18 -p0 -b .a2p +%patch19 -p0 -b .dvipng +%patch0 + + # Correct FHS paths + paths=$(find -name cnf-to-paths.awk) + test -n "$paths" || exit 1 + cp -vf %{S:4} $paths + +%build + # Extend the options file + echo "world=${PWD}/world" >> %{options} + echo "prefix=${PWD}/prefix" >> %{options} + echo "texmfcnf=${PWD}/texk/kpathsea" >> %{options} + + # Read the options file + . %{options} + + # Sanity check for system icu libraries and headers + # Remark: official libicu is _not_ compatible with libicu of XeTeX + if test -s /usr/include/layout/GlyphPositioningTables.h -a \ + -s /usr/include/layout/Features.h -a \ + -s /usr/include/common/cmemory.h \ + && false + then + icu[0]='--with-system-icu' + icu[1]='--with-icu-include=/usr/include/unicode -I/usr/include/layout -I/usr/include/common' + else + icu[0]="" + fi + + # Avoid -rpath as libtool is not configurable at this point + for rp in $(find -name libtool.m4 -or -name configure) ; do + sed -ri 's/(-rpath)/\1-link/g' $rp + done + LD_LIBRARY_PATH=${prefix}/lib:${world}/texk/kpathsea/.libs:${world}/texk/ptexenc/.libs + export LD_LIBRARY_PATH + + # We have an other autoconf/automake version + ./reautoconf libs/icu/dummy + + if [[ $VENDOR =~ opensuse ]] ; then + banner='for opensuse.org' + else + banner='for SUSE Linux' + fi + + # Run configure now ... no reautoconf here as TeX Live uses modified m4 macros + # longinteger and off_t declarations are still inconsistent, do not enable + # largefile unless you are testing. + # Default to building ICU without thread support, since xetex does not need it. + cache=$PWD/config.cache + mkdir -p ${world} + pushd ${world}/ + STRIP=/bin/true \ + STRIPPROG=/bin/true \ + ../configure \ + --host=${HOST} \ + --build=${BUILD} \ + --disable-native-texlive-build \ + --disable-cxx-runtime-hack \ + --cache-file=$cache \ + --disable-multiplatform \ + --prefix=$prefix \ + --datadir=$prefix \ + --datarootdir=$prefix \ + --exec-prefix=$prefix \ + --bindir=$prefix/bin \ + --libdir=$prefix/lib \ + --infodir=$prefix/share/info \ + --mandir=$prefix/share/man \ + --sysconfdir=$prefix/etc \ + --localstatedir=$prefix/var/lib \ + --sharedstatedir=$prefix/var/lib \ + --includedir=$prefix/include \ + --x-libraries=%{_x11lib} \ + --x-includes=%{_x11inc} \ + --disable-cxx-runtime-hack \ + --disable-texinfo \ + --disable-texi2html \ + --disable-dialog \ + --disable-t1utils \ + --disable-dvi2tty \ + --disable-xindy \ + --disable-xindy-docs \ + --disable-xindy-rules \ + --disable-xz \ + --disable-largefile \ + --disable-threads \ + --%{!?with_psutils:disable}%{?with_psutils:enable}-psutils \ + --enable-freetype \ + --enable-musixflx \ + --enable-lacheck \ + --enable-detex \ + --enable-seetexk \ + --enable-tex4htk \ + --enable-shared \ + --with-gnu-ld \ + --with-gnu-libc \ + --with-system-xz \ + --with-system-dialog \ + --with-system-t1utils \ + --with-system-ncurses \ + --with-system-zlib \ + --with-system-expat \ + --with-system-unzip \ + --with-system-poppler \ + --with-system-xpdf \ + --with-system-libpng \ + --with-system-pnglib \ + --with-system-t1lib \ + --with-system-gd \ + --with-system-freetype \ + --with-system-zziplib \ + --with-system-libgs \ + --with-freetype-includes=/usr/include/freetype \ + --with-system-freetype2 \ + --with-freetype2-includes=/usr/include/freetype2 \ + --with-banner-add="/TeX Live $banner" \ + ${icu[0]:+"${icu[@]}"} \ + --enable-epsfwin \ + --enable-mftalkwin \ + --enable-regiswin \ + --enable-tektronixwin \ + --enable-unitermwin \ + --with-ps=gs \ + --with-x \ + --with-mf-x-toolkit \ + --with-xdvi-x-toolkit=xaw3d \ + --with-editor='vi +%%d %%s' + + make %{?_smp_mflags} world STRIP=/bin/true + popd + + pushd utils/asymptote + autoreconf + PATH=$prefix/bin:$PATH \ + TEXMFLOCAL=%{_texmfmaindir} \ + TEXMFCNF=$texmfcnf \ + STRIP=/bin/true \ + STRIPPROG=/bin/true \ + ./configure \ + --host=${HOST} \ + --build=${BUILD} \ + --prefix=%{_prefix} \ + --bindir=%{_bindir} \ + --datadir=%{_texmfmaindir} \ + --disable-texlive-build \ + --enable-readline \ + --enable-gsl \ + --enable-fftw \ + --enable-gc=system \ + --enable-gl + make asy + mkdir -p ${prefix}/bin + mkdir -p ${prefix}/texmf/asymptote/GUI + install -m 0755 asy ${prefix}/bin/ + install -m 0755 GUI/xasy.py ${prefix}/texmf/asymptote/GUI + ln -sf ../texmf/asymptote/GUI/xasy.py ${prefix}/bin/xasy + popd + + # compile nobody + $CC ${RPM_OPT_FLAGS} -o $prefix/bin/nobody %{S:50} + +%install + + # Read the options file + . %{options} + + mkdir -p %{buildroot}%{_bindir} + mkdir -p %{buildroot}%{_libdir} + mkdir -p %{buildroot}%{_includedir} + mkdir -p %{buildroot}%{_infodir} + mkdir -p %{buildroot}%{_mandir} + mkdir -p %{buildroot}%{_mandir}/man1 + mkdir -p %{buildroot}%{_mandir}/man5 + mkdir -p %{buildroot}%{_mandir}/man8 + mkdir -p %{buildroot}%{_texmfmaindir} + mkdir -p %{buildroot}%{_texmfdistdir} + mkdir -p %{buildroot}%{_texmfdistdir}/scripts/match_parens + mkdir -p %{buildroot}%{_texmfdistdir}/scripts/mf2pt1 + mkdir -p %{buildroot}%{_texmfdistdir}/scripts/urlbst + mkdir -p %{buildroot}%{_texmfconfdir}/dvipdfm + mkdir -p %{buildroot}%{_texmfconfdir}/dvipdfmx + mkdir -p %{buildroot}%{_texmfconfdir}/dvips/config + mkdir -p %{buildroot}%{_texmfconfdir}/tex + mkdir -p %{buildroot}%{_texmfconfdir}/web2c + mkdir -p %{buildroot}%{_texmfconfdir}/xdvi + mkdir -p %{buildroot}%{_texmfvardir} + mkdir -p %{buildroot}%{_texmfvardir}/dist + mkdir -p %{buildroot}%{_texmfvardir}/main + mkdir -p %{buildroot}%{_texmfvardir}/md5 + mkdir -p %{buildroot}%{_texmfvardir}/fonts + mkdir -p %{buildroot}%{_texmfvardir}/fonts/dvipdfm + mkdir -p %{buildroot}%{_texmfvardir}/fonts/dvips + mkdir -p %{buildroot}%{_texmfvardir}/fonts/pdftex + mkdir -p %{buildroot}%{_texmfcache} + mkdir -p %{buildroot}%{_fontcache} + mkdir -p %{buildroot}%{_fontcache}/pk + mkdir -p %{buildroot}%{_fontcache}/source + mkdir -p %{buildroot}%{_fontcache}/tfm + mkdir -p %{buildroot}%{_appdefdir} + mkdir -p %{buildroot}%{_sysconfdir}/permissions.d + + mkdir -p %{buildroot}%{_datadir}/texlive + ln -sf ../../share/texmf %{buildroot}%{_datadir}/texlive/texmf-dist + ln -sf ../../lib/texmf %{buildroot}%{_datadir}/texlive/texmf + tar --use-compress-program=xz -xf %{S:1000} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1001} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1002} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1003} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1004} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1005} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1006} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1007} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1008} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1009} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1010} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1011} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1012} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1013} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1014} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1015} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1016} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1017} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1018} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1019} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1020} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1021} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1022} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1023} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1024} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1025} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1026} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1027} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1028} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1029} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1030} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1031} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1032} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1033} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1034} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1035} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1036} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1037} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1038} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1039} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1040} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1041} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1042} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1043} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1044} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1045} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1046} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1047} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1048} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1049} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1050} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1051} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1052} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1053} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1054} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1055} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1056} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1057} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1058} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1059} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1060} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1061} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1062} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1063} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1064} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1065} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1066} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1067} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1068} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1069} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1070} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1071} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1072} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1073} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1074} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1075} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1076} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1077} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1078} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1079} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1080} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1081} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1082} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1083} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1084} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1085} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1086} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1087} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1088} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1089} -C %{buildroot}%{_datadir}/texlive/texmf-dist + tar --use-compress-program=xz -xf %{S:1090} -C %{buildroot}%{_datadir}/texlive/texmf-dist + rm -v %{buildroot}%{_datadir}/texlive/texmf + rm -v %{buildroot}%{_datadir}/texlive/texmf-dist + rm -vr %{buildroot}%{_datadir}/texlive + + pushd ${prefix}/bin/ + tar -cspSf - . | tar -xvspSf - -C %{buildroot}%{_bindir}/ + rm -vf %{buildroot}%{_bindir}/tlmgr + rm -vf %{buildroot}%{_bindir}/installfont-tl + popd + pushd ${prefix}/lib/ + tar -cspSf - *.so* | tar -xvspSf - -C %{buildroot}%{_libdir}/ + popd + pushd ${prefix}/include/ + tar -cspSf - . | tar -xvspSf - -C %{buildroot}%{_includedir}/ + popd + # + # Those lines with exclamation mark have to done in the + # specific spec files + # +#! pushd ${prefix}/share/info/ +#! tar -cspSf - *.info | tar -xvspSf - -C %{buildroot}%{_infodir}/ +#! popd +#! pushd ${prefix}/share/man/ +#! tar -cspSf - . | tar -xvspSf - -C %{buildroot}%{_mandir}/ +#! rm -vf %{buildroot}%{_mandir}/man*/tlmgr* +#! rm -vf %{buildroot}%{_mandir}/man*/installfont-tl* +#! popd + pushd ${prefix}/texmf/ + tar -cspSf - . | tar -xvspSf - -C %{buildroot}%{_texmfmaindir}/ + rm -vrf %{buildroot}%{_texmfmaindir}/texconfig/g + rm -vrf %{buildroot}%{_texmfmaindir}/texconfig/v + rm -vrf %{buildroot}%{_texmfmaindir}/texconfig/x + rm -vrf %{buildroot}%{_texmfmaindir}/tlpkg/tlpobj + rm -vf %{buildroot}%{_texmfmaindir}/texconfig/generic + rm -vf %{buildroot}%{_texmfmaindir}/texconfig/README +#! mv -vf %{buildroot}%{_texmfmaindir}/dvipdfmx/dvipdfmx.cfg \ +#! %{buildroot}%{_texmfconfdir}/dvipdfmx/ +#! ln -sf %{_texmfconfdir}/dvipdfmx/dvipdfmx.cfg \ +#! %{buildroot}%{_texmfmaindir}/dvipdfmx/ + for cnf in %{buildroot}%{_texmfmaindir}/web2c/*.cnf ; do + mv -vf $cnf %{buildroot}%{_texmfconfdir}/web2c/ + ln -sf %{_texmfconfdir}/web2c/${cnf##*/} $cnf + done +#! mv -vf %{buildroot}%{_texmfmaindir}/xdvi/xdvi.cfg \ +#! %{buildroot}%{_texmfconfdir}/xdvi/ +#! ln -sf %{_texmfconfdir}/xdvi/xdvi.cfg \ +#! %{buildroot}%{_texmfmaindir}/xdvi/ +#! mv -vf %{buildroot}%{_texmfmaindir}/xdvi/XDvi \ +#! %{buildroot}%{_texmfconfdir}/xdvi/ +#! ln -sf %{_texmfconfdir}/xdvi/XDvi \ +#! %{buildroot}%{_appdefdir}/ + popd + pushd ${prefix}/texmf-dist/ + tar -cspSf - . | tar -xvspSf - -C %{buildroot}%{_texmfdistdir}/ + rm -vrf %{buildroot}%{_texmfdistdir}/tlpkg/tlpobj + popd + pushd %{buildroot}%{_bindir}/ + # ppower4 (currently) not part of TEX Live + rm -f pdfthumb + rm -f ppower4 + # repair/relocate the script links + find -type l -printf '%f\a%l\n' | \ + while IFS=$'\a' read dst src; do + case "$src" in + */texmf/*) ln -sf ../lib/texmf/${src#../texmf/} $dst ;; + */texmf-dist/*) ln -sf ../share/texmf/${src#../texmf-dist/} $dst ;; + esac + done + # set xasy script link + ln -sf ../lib/texmf/asymptote/GUI/xasy.py xasy + # some scripts not included in main source tar ball + test -e match_parens || ln -sf ../share/texmf/scripts/match_parens/match_parens match_parens + test -e mf2pt1 || ln -sf ../share/texmf/scripts/mf2pt1/mf2pt1.pl mf2pt1 + test -e urlbst || ln -sf ../share/texmf/scripts/urlbst/urlbst urlbst + # set some may missed symbolic links + test -e mfplain || ln -vsf mpost mfplain + test -e texlua || ln -vsf luatex texlua + test -e texluac || ln -vsf luatex texluac + test -e texhash || ln -vsf mktexlsr texhash + test -e rpdfcrop || ln -vsf pdfcrop rpdfcrop + # stolen from texlink script, also added musixtex case + sed -r '\@^[[:blank:]]*(#|$)@d;s@\*@@' < $prefix/texmf/web2c/fmtutil.cnf | \ + awk '{print $1, $2 }' | while read fmt engine ; do + test -f "$engine" || continue + case "$fmt" in + mf) test "$engine" = mf-nowin -a -f mfw && engine=mfw + esac + case "$fmt" in + cont-??|mptopdf|*musixtex) continue ;; + *) test "$fmt" = "$(ls -ld "$fmt" 2> /dev/null | awk '{print $NF}')" || rm -rf "$fmt" + test ! -f "$fmt" || continue + ln -vsf "$engine" "$fmt" + esac + done + # our pdfmusixtex extension of the musixtex lua script + test -e pdfmusixtex || ln -sf musixtex pdfmusixtex + popd + + # clear out all file below texmf tree as this will delivered by texlive tar balls + find %{buildroot}%{_texmfdirs} -type f | xargs -r rm -vf + + # the ls-R file (empty at package time) + > %{buildroot}%{_texmfconfdir}/ls-R + > %{buildroot}%{_fontcache}/ls-R + > %{buildroot}%{_texmfvardir}/ls-R + > %{buildroot}%{_texmfvardir}/dist/ls-R + > %{buildroot}%{_texmfvardir}/main/ls-R + ln -sf %{_texmfvardir}/dist/ls-R %{buildroot}%{_texmfdistdir}/ + ln -sf %{_texmfvardir}/main/ls-R %{buildroot}%{_texmfmaindir}/ + + # the permission files, any change is also required within do.mklists + mkdir -p %{buildroot}%{_sysconfdir}/permissions.d + (cat > %{buildroot}%{_sysconfdir}/permissions.d/texlive) <<-EOF + %{_texmfvardir}/ls-R root:root 0666 + %{_texmfvardir}/dist/ls-R root:root 0666 + %{_texmfvardir}/main/ls-R root:root 0666 + %{_fontcache}/ls-R root:root 0666 + %{_texmfvardir}/ root:root 1755 + %{_texmfvardir}/dist/ root:root 1755 + %{_texmfvardir}/main/ root:root 1755 + %{_texmfvardir}/fonts/ root:root 1755 + %{_texmfvardir}/fonts/dvipdfm/ root:root 1755 + %{_texmfvardir}/fonts/dvips/ root:root 1755 + %{_texmfvardir}/fonts/pdftex/ root:root 1755 + %{_texmfcache}/ root:root 1755 + %{_fontcache}/ root:root 1777 + %{_fontcache}/pk/ root:root 1777 + %{_fontcache}/source/ root:root 1777 + %{_fontcache}/tfm/ root:root 1777 + EOF + (cat > %{buildroot}%{_sysconfdir}/permissions.d/texlive.paranoid) <<-EOF + %{_texmfvardir}/ls-R root:root 0644 + %{_texmfvardir}/dist/ls-R root:root 0644 + %{_texmfvardir}/main/ls-R root:root 0644 + %{_fontcache}/ls-R root:root 0644 + %{_texmfvardir}/ root:root 1755 + %{_texmfvardir}/dist/ root:root 1755 + %{_texmfvardir}/main/ root:root 1755 + %{_texmfvardir}/fonts/ root:root 1755 + %{_texmfvardir}/fonts/dvipdfm/ root:root 1755 + %{_texmfvardir}/fonts/dvips/ root:root 1755 + %{_texmfvardir}/fonts/pdftex/ root:root 1755 + %{_texmfcache}/ root:root 1755 + %{_fontcache}/ root:root 1755 + %{_fontcache}/pk/ root:root 1755 + %{_fontcache}/source/ root:root 1755 + %{_fontcache}/tfm/ root:root 1755 + EOF + while read path rest ; do + echo $path + done < %{buildroot}%{_sysconfdir}/permissions.d/texlive > %{buildroot}/%{_texmfconfdir}/permlist + + # install manual page of nobody + install -m 0644 %{S:51} %{buildroot}%{_mandir}/man8/nobody.8 + + # enviroment + mkdir -p %{buildroot}%{_sysconfdir}/profile.d + install -m 0644 %{S:13} %{buildroot}%{_sysconfdir}/profile.d/ + install -m 0644 %{S:14} %{buildroot}%{_sysconfdir}/profile.d/ + + mkdir -p %{buildroot}%{_sysconfdir}/fonts + mkdir -p %{buildroot}%{_sysconfdir}/fonts/conf.avail + mkdir -p %{buildroot}%{_sysconfdir}/fonts/conf.d + + install -m 0644 %{S:15} %{buildroot}%{_sysconfdir}/fonts/conf.avail/09-texlive.conf + install -m 0644 %{S:16} %{buildroot}%{_sysconfdir}/fonts/conf.avail/09-texlive-type1.conf + install -m 0644 %{S:17} %{buildroot}%{_sysconfdir}/fonts/conf.avail/09-texlive-truetype.conf + ln -sf ../conf.avail/09-texlive.conf \ + %{buildroot}%{_sysconfdir}/fonts/conf.d/ + + mkdir -p %{buildroot}%{_sysconfdir}/skel + install -m 0644 %{S:31} %{buildroot}%{_sysconfdir}/skel/.dvipsrc + + # install config stuff + mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates + install -m 0644 %{S:10} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.texlive + + install -m 0755 %{S:11} %{buildroot}%{_texmfmaindir}/texconfig/update + + mkdir -p %{buildroot}%{_sysconfdir}/cron.daily + install -m 0755 %{S:12} %{buildroot}%{_sysconfdir}/cron.daily/suse-texlive + +%if %{defined verify_permissions} +%verifyscript basesystem +%verify_permissions -f %{_texmfconfdir}/permlist +%verify_permissions -e %{_texmfvardir}/ +%verify_permissions -e %{_texmfvardir}/fonts/ +%verify_permissions -e %{_texmfvardir}/fonts/dvipdfm/ +%verify_permissions -e %{_texmfvardir}/fonts/dvips/ +%verify_permissions -e %{_texmfvardir}/fonts/ls-R +%verify_permissions -e %{_texmfvardir}/fonts/pdftex/ +%verify_permissions -e %{_texmfvardir}/dist/ +%verify_permissions -e %{_texmfvardir}/dist/ls-R +%verify_permissions -e %{_texmfvardir}/ls-R +%verify_permissions -e %{_texmfvardir}/main/ +%verify_permissions -e %{_texmfvardir}/main/ls-R +%verify_permissions -e %{_texmfcache}/ +%verify_permissions -e %{_fontcache}/ +%verify_permissions -e %{_fontcache}/pk/ +%verify_permissions -e %{_fontcache}/source/ +%verify_permissions -e %{_fontcache}/tfm/ +%endif + +%post basesystem +%fillup_only -n texlive +%set_permissions %{_texmfvardir}/ +%set_permissions %{_texmfvardir}/fonts/ +%set_permissions %{_texmfvardir}/fonts/dvipdfm/ +%set_permissions %{_texmfvardir}/fonts/dvips/ +%set_permissions %{_texmfvardir}/fonts/ls-R +%set_permissions %{_texmfvardir}/fonts/pdftex/ +%set_permissions %{_texmfvardir}/dist/ +%set_permissions %{_texmfvardir}/dist/ls-R +%set_permissions %{_texmfvardir}/ls-R +%set_permissions %{_texmfvardir}/main/ +%set_permissions %{_texmfvardir}/main/ls-R +%set_permissions %{_texmfcache}/ +%set_permissions %{_fontcache}/ +%set_permissions %{_fontcache}/pk/ +%set_permissions %{_fontcache}/source/ +mkdir -p /var/run/texlive +> /var/run/texlive/run-texhash + +%posttrans basesystem +%{_texmfmaindir}/texconfig/update + +%post -n libkpathsea6 -p /sbin/ldconfig +%postun -n libkpathsea6 -p /sbin/ldconfig + +%post -n libptexenc1 -p /sbin/ldconfig +%postun -n libptexenc1 -p /sbin/ldconfig + +%files +%defattr(-,root,root,755) +%{_bindir}/nobody + +%files basesystem +%defattr(-,root,root,755) +%dir %{_texmfconfdir} +%dir %{_texmfconfdir}/dvipdfm +%dir %{_texmfconfdir}/dvipdfmx +%dir %{_texmfconfdir}/dvips +%dir %{_texmfconfdir}/dvips/config +%dir %{_texmfconfdir}/tex +%dir %{_texmfconfdir}/web2c +%dir %{_texmfconfdir}/xdvi +%dir %{_texmfmaindir} +%dir %{_texmfmaindir}/web2c +%dir %{_texmfmaindir}/chktex +%dir %{_texmfmaindir}/doc +%dir %{_texmfmaindir}/doc/chktex +%dir %{_texmfmaindir}/doc/bibtex8 +%dir %{_texmfmaindir}/doc/bibtexu +%dir %{_texmfmaindir}/scripts +%dir %{_texmfmaindir}/scripts/chktex +%dir %{_texmfmaindir}/scripts/ps2eps +%dir %{_texmfmaindir}/scripts/tetex +%dir %{_texmfmaindir}/scripts/simpdftex +%dir %{_texmfmaindir}/scripts/a2ping +%dir %{_texmfmaindir}/scripts/texdoc +%dir %{_texmfmaindir}/scripts/texlive +%dir %{_texmfmaindir}/hbf2gf +%dir %{_texmfmaindir}/fonts +%dir %{_texmfmaindir}/fonts/cmap +%dir %{_texmfmaindir}/fonts/cmap/dvipdfmx +%dir %{_texmfmaindir}/fonts/map +%dir %{_texmfmaindir}/fonts/map/dvipdfmx +%dir %{_texmfmaindir}/dvipdfmx +%dir %{_texmfmaindir}/dvips +%dir %{_texmfmaindir}/dvips/base +%dir %{_texmfmaindir}/dvips/gsftopk +%dir %{_texmfmaindir}/xdvi +%dir %{_texmfmaindir}/xdvi/pixmap +%dir %{_texmfmaindir}/texconfig +%dir %{_texmfmaindir}/asymptote +%dir %{_texmfmaindir}/asymptote/GUI +%dir %{_texmfdistdir} +%dir %{_texmfdistdir}/tlpkg +%dir %{_texmfdistdir}/bibtex +%dir %{_texmfdistdir}/bibtex/csf +%dir %{_texmfdistdir}/bibtex/csf/base +%dir %{_texmfdistdir}/fonts +%dir %{_texmfdistdir}/fonts/map +%dir %{_texmfdistdir}/fonts/map/glyphlist +%dir %{_texmfdistdir}/scripts +%dir %{_texmfdistdir}/scripts/tex4ht +%dir %{_texmfdistdir}/scripts/bibexport +%dir %{_texmfdistdir}/scripts/installfont +%dir %{_texmfdistdir}/scripts/listings-ext +%dir %{_texmfdistdir}/scripts/pdfjam +%dir %{_texmfdistdir}/scripts/pst-pdf +%dir %{_texmfdistdir}/scripts/accfonts +%dir %{_texmfdistdir}/scripts/authorindex +%dir %{_texmfdistdir}/scripts/bundledoc +%dir %{_texmfdistdir}/scripts/cachepic +%dir %{_texmfdistdir}/scripts/context +%dir %{_texmfdistdir}/scripts/context/perl +%dir %{_texmfdistdir}/scripts/de-macro +%dir %{_texmfdistdir}/scripts/dviasm +%dir %{_texmfdistdir}/scripts/ebong +%dir %{_texmfdistdir}/scripts/epspdf +%dir %{_texmfdistdir}/scripts/epstopdf +%dir %{_texmfdistdir}/scripts/fig4latex +%dir %{_texmfdistdir}/scripts/findhyph +%dir %{_texmfdistdir}/scripts/fontools +%dir %{_texmfdistdir}/scripts/fragmaster +%dir %{_texmfdistdir}/scripts/glossaries +%dir %{_texmfdistdir}/scripts/latex2man +%dir %{_texmfdistdir}/scripts/latexdiff +%dir %{_texmfdistdir}/scripts/latexmk +%dir %{_texmfdistdir}/scripts/luaotfload +%dir %{_texmfdistdir}/scripts/mathspic +%dir %{_texmfdistdir}/scripts/mkjobtexmf +%dir %{_texmfdistdir}/scripts/mkgrkindex +%dir %{_texmfdistdir}/scripts/musixtex +%dir %{_texmfdistdir}/scripts/oberdiek +%dir %{_texmfdistdir}/scripts/pax +%dir %{_texmfdistdir}/scripts/pdfcrop +%dir %{_texmfdistdir}/scripts/perltex +%dir %{_texmfdistdir}/scripts/pkfix +%dir %{_texmfdistdir}/scripts/pkfix-helper +%dir %{_texmfdistdir}/scripts/ppower4 +%dir %{_texmfdistdir}/scripts/pst2pdf +%dir %{_texmfdistdir}/scripts/purifyeps +%dir %{_texmfdistdir}/scripts/splitindex +%dir %{_texmfdistdir}/scripts/splitindex/perl +%dir %{_texmfdistdir}/scripts/sty2dtx +%dir %{_texmfdistdir}/scripts/svn-multi +%dir %{_texmfdistdir}/scripts/texcount +%dir %{_texmfdistdir}/scripts/texdef +%dir %{_texmfdistdir}/scripts/texdiff +%dir %{_texmfdistdir}/scripts/texdirflatten +%dir %{_texmfdistdir}/scripts/texloganalyser +%dir %{_texmfdistdir}/scripts/thumbpdf +%dir %{_texmfdistdir}/scripts/ulqda +%dir %{_texmfdistdir}/scripts/vpe +%dir %attr(1755,root,root) %{_texmfcache} +%dir %attr(1777,root,root) %{_fontcache} +%dir %attr(1777,root,root) %{_fontcache}/pk +%dir %attr(1777,root,root) %{_fontcache}/source +%dir %attr(1777,root,root) %{_fontcache}/tfm +%dir %attr(1755,root,root) %{_texmfvardir} +%dir %attr(1755,root,root) %{_texmfvardir}/dist +%dir %attr(1755,root,root) %{_texmfvardir}/main +%dir %attr(1755,root,root) %{_texmfvardir}/fonts +%dir %attr(1755,root,root) %{_texmfvardir}/fonts/dvipdfm +%dir %attr(1755,root,root) %{_texmfvardir}/fonts/dvips +%dir %attr(1755,root,root) %{_texmfvardir}/fonts/pdftex +%dir %{_texmfvardir}/md5 +%config %{_sysconfdir}/cron.daily/suse-texlive +%config %{_sysconfdir}/permissions.d/texlive* +%config %{_sysconfdir}/profile.d/texlive* +%config %{_sysconfdir}/skel/.dvipsrc +%config %verify(not md5 size mtime) %{_sysconfdir}/fonts/conf.avail/09-texlive*.conf +%config %verify(not link) %{_sysconfdir}/fonts/conf.d/09-texlive*.conf +%config(noreplace) %verify(not md5 size mtime) %{_texmfconfdir}/web2c/fmtutil.cnf +%config(noreplace) %verify(not md5 size mtime) %{_texmfconfdir}/web2c/texmf.cnf +%verify(link) %{_texmfmaindir}/web2c/fmtutil.cnf +%verify(link) %{_texmfmaindir}/web2c/texmf.cnf +%{_texmfconfdir}/permlist +%attr(0755,root,root) %{_texmfmaindir}/texconfig/update +%verify(link) %{_texmfmaindir}/ls-R +%verify(link) %{_texmfdistdir}/ls-R +%ghost %attr(0644,root,root) %verify(not md5 size mtime) %{_texmfconfdir}/ls-R +%ghost %attr(0666,root,root) %verify(not md5 size mtime) %{_fontcache}/ls-R +%ghost %attr(0666,root,root) %verify(not md5 size mtime) %{_texmfvardir}/ls-R +%ghost %attr(0666,root,root) %verify(not md5 size mtime) %{_texmfvardir}/dist/ls-R +%ghost %attr(0666,root,root) %verify(not md5 size mtime) %{_texmfvardir}/main/ls-R +%{_mandir}/man8/nobody.* +%{_localstatedir}/adm/fillup-templates/sysconfig.texlive + + +%files scheme-basic +%defattr(-,root,root,755) + +%files scheme-context +%defattr(-,root,root,755) + +%files scheme-full +%defattr(-,root,root,755) + +%files scheme-gust +%defattr(-,root,root,755) + +%files scheme-medium +%defattr(-,root,root,755) + +%files scheme-minimal +%defattr(-,root,root,755) + +%files scheme-tetex +%defattr(-,root,root,755) + +%files scheme-xml +%defattr(-,root,root,755) + +%files collection-basic +%defattr(-,root,root,755) + +%files collection-bibtexextra +%defattr(-,root,root,755) + +%files collection-binextra +%defattr(-,root,root,755) + +%files collection-context +%defattr(-,root,root,755) + +%files collection-documentation-arabic +%defattr(-,root,root,755) + +%files collection-documentation-base +%defattr(-,root,root,755) + +%files collection-documentation-bulgarian +%defattr(-,root,root,755) + +%files collection-documentation-chinese +%defattr(-,root,root,755) + +%files collection-documentation-czechslovak +%defattr(-,root,root,755) + +%files collection-documentation-dutch +%defattr(-,root,root,755) + +%files collection-documentation-english +%defattr(-,root,root,755) + +%files collection-documentation-finnish +%defattr(-,root,root,755) + +%files collection-documentation-french +%defattr(-,root,root,755) + +%files collection-documentation-german +%defattr(-,root,root,755) + +%files collection-documentation-italian +%defattr(-,root,root,755) + +%files collection-documentation-japanese +%defattr(-,root,root,755) + +%files collection-documentation-korean +%defattr(-,root,root,755) + +%files collection-documentation-mongolian +%defattr(-,root,root,755) + +%files collection-documentation-polish +%defattr(-,root,root,755) + +%files collection-documentation-portuguese +%defattr(-,root,root,755) + +%files collection-documentation-russian +%defattr(-,root,root,755) + +%files collection-documentation-serbian +%defattr(-,root,root,755) + +%files collection-documentation-slovenian +%defattr(-,root,root,755) + +%files collection-documentation-spanish +%defattr(-,root,root,755) + +%files collection-documentation-thai +%defattr(-,root,root,755) + +%files collection-documentation-turkish +%defattr(-,root,root,755) + +%files collection-documentation-ukrainian +%defattr(-,root,root,755) + +%files collection-documentation-vietnamese +%defattr(-,root,root,755) + +%files collection-fontsextra +%defattr(-,root,root,755) + +%files collection-fontsrecommended +%defattr(-,root,root,755) + +%files collection-fontutils +%defattr(-,root,root,755) + +%files collection-formatsextra +%defattr(-,root,root,755) + +%files collection-games +%defattr(-,root,root,755) + +%files collection-genericextra +%defattr(-,root,root,755) + +%files collection-genericrecommended +%defattr(-,root,root,755) + +%files collection-htmlxml +%defattr(-,root,root,755) + +%files collection-humanities +%defattr(-,root,root,755) + +%files collection-langafrican +%defattr(-,root,root,755) + +%files collection-langarabic +%defattr(-,root,root,755) + +%files collection-langarmenian +%defattr(-,root,root,755) + +%files collection-langcjk +%defattr(-,root,root,755) + +%files collection-langcroatian +%defattr(-,root,root,755) + +%files collection-langcyrillic +%defattr(-,root,root,755) + +%files collection-langczechslovak +%defattr(-,root,root,755) + +%files collection-langdanish +%defattr(-,root,root,755) + +%files collection-langdutch +%defattr(-,root,root,755) + +%files collection-langenglish +%defattr(-,root,root,755) + +%files collection-langfinnish +%defattr(-,root,root,755) + +%files collection-langfrench +%defattr(-,root,root,755) + +%files collection-langgerman +%defattr(-,root,root,755) + +%files collection-langgreek +%defattr(-,root,root,755) + +%files collection-langhebrew +%defattr(-,root,root,755) + +%files collection-langhungarian +%defattr(-,root,root,755) + +%files collection-langindic +%defattr(-,root,root,755) + +%files collection-langitalian +%defattr(-,root,root,755) + +%files collection-langlatin +%defattr(-,root,root,755) + +%files collection-langlatvian +%defattr(-,root,root,755) + +%files collection-langlithuanian +%defattr(-,root,root,755) + +%files collection-langmongolian +%defattr(-,root,root,755) + +%files collection-langnorwegian +%defattr(-,root,root,755) + +%files collection-langother +%defattr(-,root,root,755) + +%files collection-langpolish +%defattr(-,root,root,755) + +%files collection-langportuguese +%defattr(-,root,root,755) + +%files collection-langspanish +%defattr(-,root,root,755) + +%files collection-langswedish +%defattr(-,root,root,755) + +%files collection-langtibetan +%defattr(-,root,root,755) + +%files collection-langturkmen +%defattr(-,root,root,755) + +%files collection-langvietnamese +%defattr(-,root,root,755) + +%files collection-latex +%defattr(-,root,root,755) + +%files collection-latexextra +%defattr(-,root,root,755) + +%files collection-latexrecommended +%defattr(-,root,root,755) + +%files collection-luatex +%defattr(-,root,root,755) + +%files collection-mathextra +%defattr(-,root,root,755) + +%files collection-metapost +%defattr(-,root,root,755) + +%files collection-music +%defattr(-,root,root,755) + +%files collection-omega +%defattr(-,root,root,755) + +%files collection-pictures +%defattr(-,root,root,755) + +%files collection-plainextra +%defattr(-,root,root,755) + +%files collection-pstricks +%defattr(-,root,root,755) + +%files collection-publishers +%defattr(-,root,root,755) + +%files collection-science +%defattr(-,root,root,755) + +%files collection-texinfo +%defattr(-,root,root,755) + +%files collection-xetex +%defattr(-,root,root,755) + +%files a2ping-bin +%defattr(-,root,root,755) +%{_bindir}/a2ping + +%files accfonts-bin +%defattr(-,root,root,755) +%{_bindir}/mkt1font +%{_bindir}/vpl2ovp +%{_bindir}/vpl2vpl + +%files afm2pl-bin +%defattr(-,root,root,755) +%{_bindir}/afm2pl + +%files aleph-bin +%defattr(-,root,root,755) +%{_bindir}/aleph +%{_bindir}/lamed + +%files amstex-bin +%defattr(-,root,root,755) +%{_bindir}/amstex + +%files asymptote-bin +%defattr(-,root,root,755) +%{_bindir}/asy +%{_bindir}/xasy + +%files authorindex-bin +%defattr(-,root,root,755) +%{_bindir}/authorindex + +%files biber-bin +%defattr(-,root,root,755) +%{_bindir}/biber + +%files bibexport-bin +%defattr(-,root,root,755) +%{_bindir}/bibexport + +%files bibtex-bin +%defattr(-,root,root,755) +%{_bindir}/bibtex + +%files bibtex8-bin +%defattr(-,root,root,755) +%{_bindir}/bibtex8 + +%files bibtexu-bin +%defattr(-,root,root,755) +%{_bindir}/bibtexu + +%files bundledoc-bin +%defattr(-,root,root,755) +%{_bindir}/arlatex +%{_bindir}/bundledoc + +%files cachepic-bin +%defattr(-,root,root,755) +%{_bindir}/cachepic + +%files chktex-bin +%defattr(-,root,root,755) +%{_bindir}/chktex +%{_bindir}/chkweb +%{_bindir}/deweb + +%files cjkutils-bin +%defattr(-,root,root,755) +%{_bindir}/bg5+latex +%{_bindir}/bg5+pdflatex +%{_bindir}/bg5conv +%{_bindir}/bg5latex +%{_bindir}/bg5pdflatex +%{_bindir}/cef5conv +%{_bindir}/cef5latex +%{_bindir}/cef5pdflatex +%{_bindir}/cefconv +%{_bindir}/ceflatex +%{_bindir}/cefpdflatex +%{_bindir}/cefsconv +%{_bindir}/cefslatex +%{_bindir}/cefspdflatex +%{_bindir}/extconv +%{_bindir}/gbklatex +%{_bindir}/gbkpdflatex +%{_bindir}/hbf2gf +%{_bindir}/sjisconv +%{_bindir}/sjislatex +%{_bindir}/sjispdflatex + +%files context-bin +%defattr(-,root,root,755) +%{_bindir}/context +%{_bindir}/ctxtools +%{_bindir}/luatools +%{_bindir}/mtxrun +%{_bindir}/pstopdf +%{_bindir}/rlxtools +%{_bindir}/texexec +%{_bindir}/texmfstart + +%files cslatex-bin +%defattr(-,root,root,755) +%{_bindir}/cslatex +%{_bindir}/pdfcslatex + +%files csplain-bin +%defattr(-,root,root,755) +%{_bindir}/csplain +%{_bindir}/pdfcsplain + +%files ctie-bin +%defattr(-,root,root,755) +%{_bindir}/ctie + +%files cweb-bin +%defattr(-,root,root,755) +%{_bindir}/ctangle +%{_bindir}/cweave + +%files cyrillic-bin-bin +%defattr(-,root,root,755) +%{_bindir}/rubibtex +%{_bindir}/rumakeindex + +%files de-macro-bin +%defattr(-,root,root,755) +%{_bindir}/de-macro + +%files detex-bin +%defattr(-,root,root,755) +%{_bindir}/detex + +%files devnag-bin +%defattr(-,root,root,755) +%{_bindir}/devnag + +%files dtl-bin +%defattr(-,root,root,755) +%{_bindir}/dt2dv +%{_bindir}/dv2dt + +%files dviasm-bin +%defattr(-,root,root,755) +%{_bindir}/dviasm + +%files dvicopy-bin +%defattr(-,root,root,755) +%{_bindir}/dvicopy + +%files dvidvi-bin +%defattr(-,root,root,755) +%{_bindir}/dvidvi + +%files dviljk-bin +%defattr(-,root,root,755) +%{_bindir}/dvihp +%{_bindir}/dvilj +%{_bindir}/dvilj2p +%{_bindir}/dvilj4 +%{_bindir}/dvilj4l +%{_bindir}/dvilj6 + +%files dvipdfm-bin +%defattr(-,root,root,755) +%{_bindir}/dvipdfm +%{_bindir}/dvipdft + +%files dvipdfmx-bin +%defattr(-,root,root,755) +%{_bindir}/dvipdfmx +%{_bindir}/ebb +%{_bindir}/extractbb + +%files dvipng-bin +%defattr(-,root,root,755) +%{_bindir}/dvigif +%{_bindir}/dvipng + +%files dvipos-bin +%defattr(-,root,root,755) +%{_bindir}/dvipos + +%files dvips-bin +%defattr(-,root,root,755) +%{_bindir}/afm2tfm +%{_bindir}/dvips + +%files dvisvgm-bin +%defattr(-,root,root,755) +%{_bindir}/dvisvgm + +%files ebong-bin +%defattr(-,root,root,755) +%{_bindir}/ebong + +%files eplain-bin +%defattr(-,root,root,755) +%{_bindir}/eplain + +%files epspdf-bin +%defattr(-,root,root,755) +%{_bindir}/epspdf +%{_bindir}/epspdftk + +%files epstopdf-bin +%defattr(-,root,root,755) +%{_bindir}/epstopdf +%{_bindir}/repstopdf + +%files fig4latex-bin +%defattr(-,root,root,755) +%{_bindir}/fig4latex + +%files findhyph-bin +%defattr(-,root,root,755) +%{_bindir}/findhyph + +%files fontinst-bin +%defattr(-,root,root,755) +%{_bindir}/fontinst + +%files fontools-bin +%defattr(-,root,root,755) +%{_bindir}/afm2afm +%{_bindir}/autoinst +%{_bindir}/cmap2enc +%{_bindir}/font2afm +%{_bindir}/ot2kpx +%{_bindir}/pfm2kpx +%{_bindir}/showglyphs + +%files fontware-bin +%defattr(-,root,root,755) +%{_bindir}/pltotf +%{_bindir}/tftopl +%{_bindir}/vftovp +%{_bindir}/vptovf + +%files fragmaster-bin +%defattr(-,root,root,755) +%{_bindir}/fragmaster + +%files glossaries-bin +%defattr(-,root,root,755) +%{_bindir}/makeglossaries + +%files gsftopk-bin +%defattr(-,root,root,755) +%{_bindir}/gsftopk + +%files jadetex-bin +%defattr(-,root,root,755) +%{_bindir}/jadetex +%{_bindir}/pdfjadetex + +%files kpathsea-bin +%defattr(-,root,root,755) +%{_bindir}/kpseaccess +%{_bindir}/kpsepath +%{_bindir}/kpsereadlink +%{_bindir}/kpsestat +%{_bindir}/kpsetool +%{_bindir}/kpsewhich +%{_bindir}/kpsexpand +%{_bindir}/mkocp +%{_bindir}/mkofm +%{_bindir}/mktexfmt +%{_bindir}/mktexlsr +%{_bindir}/mktexmf +%{_bindir}/mktexpk +%{_bindir}/mktextfm +%{_bindir}/texhash + +%files lacheck-bin +%defattr(-,root,root,755) +%{_bindir}/lacheck + +%files latex-bin-bin +%defattr(-,root,root,755) +%{_bindir}/dvilualatex +%{_bindir}/latex +%{_bindir}/lualatex +%{_bindir}/pdflatex + +%files latex2man-bin +%defattr(-,root,root,755) +%{_bindir}/latex2man + +%files latexdiff-bin +%defattr(-,root,root,755) +%{_bindir}/latexdiff +%{_bindir}/latexdiff-vc +%{_bindir}/latexrevise + +%files latexmk-bin +%defattr(-,root,root,755) +%{_bindir}/latexmk + +%files lcdftypetools-bin +%defattr(-,root,root,755) +%{_bindir}/cfftot1 +%{_bindir}/mmafm +%{_bindir}/mmpfb +%{_bindir}/otfinfo +%{_bindir}/otftotfm +%{_bindir}/t1dotlessj +%{_bindir}/t1lint +%{_bindir}/t1rawafm +%{_bindir}/t1reencode +%{_bindir}/t1testpage +%{_bindir}/ttftotype42 + +%files listings-ext-bin +%defattr(-,root,root,755) +%{_bindir}/listings-ext.sh + +%files luaotfload-bin +%defattr(-,root,root,755) +%{_bindir}/mkluatexfontdb + +%files luatex-bin +%defattr(-,root,root,755) +%{_bindir}/dviluatex +%{_bindir}/luatex +%{_bindir}/texlua +%{_bindir}/texluac + +%files makeindex-bin +%defattr(-,root,root,755) +%{_bindir}/makeindex +%{_bindir}/mkindex + +%files match_parens-bin +%defattr(-,root,root,755) +%{_bindir}/match_parens + +%files mathspic-bin +%defattr(-,root,root,755) +%{_bindir}/mathspic + +%files metafont-bin +%defattr(-,root,root,755) +%{_bindir}/inimf +%{_bindir}/mf +%{_bindir}/mf-nowin + +%files metapost-bin +%defattr(-,root,root,755) +%{_bindir}/dvitomp +%{_bindir}/mfplain +%{_bindir}/mpost + +%files mex-bin +%defattr(-,root,root,755) +%{_bindir}/mex +%{_bindir}/pdfmex +%{_bindir}/utf8mex + +%files mf2pt1-bin +%defattr(-,root,root,755) +%{_bindir}/mf2pt1 + +%files mfware-bin +%defattr(-,root,root,755) +%{_bindir}/gftodvi +%{_bindir}/gftopk +%{_bindir}/gftype +%{_bindir}/mft +%{_bindir}/pktogf +%{_bindir}/pktype + +%files mkgrkindex-bin +%defattr(-,root,root,755) +%{_bindir}/mkgrkindex + +%files mkjobtexmf-bin +%defattr(-,root,root,755) +%{_bindir}/mkjobtexmf + +%files mltex-bin +%defattr(-,root,root,755) +%{_bindir}/mllatex +%{_bindir}/mltex + +%files mptopdf-bin +%defattr(-,root,root,755) +%{_bindir}/mptopdf + +%files musixtex-bin +%defattr(-,root,root,755) +%{_bindir}/musixflx +%{_bindir}/musixtex +%{_bindir}/pdfmusixtex + +%files omegaware-bin +%defattr(-,root,root,755) +%{_bindir}/odvicopy +%{_bindir}/odvitype +%{_bindir}/ofm2opl +%{_bindir}/omfonts +%{_bindir}/opl2ofm +%{_bindir}/otangle +%{_bindir}/otp2ocp +%{_bindir}/outocp +%{_bindir}/ovf2ovp +%{_bindir}/ovp2ovf + +%files patgen-bin +%defattr(-,root,root,755) +%{_bindir}/patgen + +%files pax-bin +%defattr(-,root,root,755) +%{_bindir}/pdfannotextractor + +%files pdfcrop-bin +%defattr(-,root,root,755) +%{_bindir}/pdfcrop +%{_bindir}/rpdfcrop + +%files pdfjam-bin +%defattr(-,root,root,755) +%{_bindir}/pdf180 +%{_bindir}/pdf270 +%{_bindir}/pdf90 +%{_bindir}/pdfbook +%{_bindir}/pdfflip +%{_bindir}/pdfjam +%{_bindir}/pdfjam-pocketmod +%{_bindir}/pdfjam-slides3up +%{_bindir}/pdfjam-slides6up +%{_bindir}/pdfjoin +%{_bindir}/pdfnup +%{_bindir}/pdfpun + +%files pdftex-bin +%defattr(-,root,root,755) +%{_bindir}/etex +%{_bindir}/pdfetex +%{_bindir}/pdftex +%{_bindir}/simpdftex + +%files pdftools-bin +%defattr(-,root,root,755) +%{_bindir}/e2pall +%{_bindir}/pdfatfi +%{_bindir}/pdfclose +%{_bindir}/pdfopen +%{_bindir}/pdftosrc +%{_bindir}/ps4pdf + +%files perltex-bin +%defattr(-,root,root,755) +%{_bindir}/perltex + +%files pkfix-helper-bin +%defattr(-,root,root,755) +%{_bindir}/pkfix-helper + +%files pkfix-bin +%defattr(-,root,root,755) +%{_bindir}/pkfix + +%files ps2pkm-bin +%defattr(-,root,root,755) +%{_bindir}/mag +%{_bindir}/pfb2pfa +%{_bindir}/pk2bm +%{_bindir}/ps2pk + +%files pst2pdf-bin +%defattr(-,root,root,755) +%{_bindir}/pst2pdf + +%files pstools-bin +%defattr(-,root,root,755) +%{_bindir}/bbox +%{_bindir}/ps2eps +%{_bindir}/ps2frag +%{_bindir}/pslatex + +%files ptex-bin +%defattr(-,root,root,755) +%{_bindir}/eptex +%{_bindir}/makejvf +%{_bindir}/mendex +%{_bindir}/pbibtex +%{_bindir}/pdvitype +%{_bindir}/platex +%{_bindir}/ppltotf +%{_bindir}/ptex +%{_bindir}/ptftopl + +%files purifyeps-bin +%defattr(-,root,root,755) +%{_bindir}/purifyeps + +%files seetexk-bin +%defattr(-,root,root,755) +%{_bindir}/dvibook +%{_bindir}/dviconcat +%{_bindir}/dviselect +%{_bindir}/dvitodvi + +%files splitindex-bin +%defattr(-,root,root,755) +%{_bindir}/splitindex + +%files sty2dtx-bin +%defattr(-,root,root,755) +%{_bindir}/sty2dtx + +%files svn-multi-bin +%defattr(-,root,root,755) +%{_bindir}/svn-multi + +%files synctex-bin +%defattr(-,root,root,755) +%{_bindir}/synctex + +%files tetex-bin +%defattr(-,root,root,755) +%{_bindir}/allcm +%{_bindir}/allec +%{_bindir}/allneeded +%{_bindir}/dvi2fax +%{_bindir}/dvired +%{_bindir}/fmtutil +%{_bindir}/fmtutil-sys +%{_bindir}/kpsewhere +%{_bindir}/texconfig-dialog +%{_bindir}/texconfig-sys +%{_bindir}/texlinks +%{_bindir}/updmap +%{_bindir}/updmap-sys + +%files tex-bin +%defattr(-,root,root,755) +%{_bindir}/initex +%{_bindir}/tex + +%files tex4ht-bin +%defattr(-,root,root,755) +%{_bindir}/ht +%{_bindir}/htcontext +%{_bindir}/htlatex +%{_bindir}/htmex +%{_bindir}/httex +%{_bindir}/httexi +%{_bindir}/htxelatex +%{_bindir}/htxetex +%{_bindir}/mk4ht +%{_bindir}/t4ht +%{_bindir}/tex4ht + +%files texconfig-bin +%defattr(-,root,root,755) +%{_bindir}/texconfig + +%files texcount-bin +%defattr(-,root,root,755) +%{_bindir}/texcount + +%files texdef-bin +%defattr(-,root,root,755) +%{_bindir}/texdef + +%files texdiff-bin +%defattr(-,root,root,755) +%{_bindir}/texdiff + +%files texdirflatten-bin +%defattr(-,root,root,755) +%{_bindir}/texdirflatten + +%files texdoc-bin +%defattr(-,root,root,755) +%{_bindir}/texdoc +%{_bindir}/texdoctk + +%files texlive-scripts-bin +%defattr(-,root,root,755) +%{_bindir}/rungs + +%files texloganalyser-bin +%defattr(-,root,root,755) +%{_bindir}/texloganalyser + +%files texsis-bin +%defattr(-,root,root,755) +%{_bindir}/texsis + +%files texware-bin +%defattr(-,root,root,755) +%{_bindir}/dvitype +%{_bindir}/pooltype + +%files thumbpdf-bin +%defattr(-,root,root,755) +%{_bindir}/thumbpdf + +%files tie-bin +%defattr(-,root,root,755) +%{_bindir}/tie + +%files tpic2pdftex-bin +%defattr(-,root,root,755) +%{_bindir}/tpic2pdftex + +%files ttfutils-bin +%defattr(-,root,root,755) +%{_bindir}/ttf2afm +%{_bindir}/ttf2pk +%{_bindir}/ttf2tfm +%{_bindir}/ttfdump + +%files ulqda-bin +%defattr(-,root,root,755) +%{_bindir}/ulqda + +%files urlbst-bin +%defattr(-,root,root,755) +%{_bindir}/urlbst + +%files vlna-bin +%defattr(-,root,root,755) +%{_bindir}/vlna + +%files vpe-bin +%defattr(-,root,root,755) +%{_bindir}/vpe + +%files web-bin +%defattr(-,root,root,755) +%{_bindir}/tangle +%{_bindir}/weave + +%files xdvi-bin +%defattr(-,root,root,755) +%{_bindir}/xdvi +%{_bindir}/xdvi-xaw3d + +%files xetex-bin +%defattr(-,root,root,755) +%{_bindir}/teckit_compile +%{_bindir}/xdvipdfmx +%{_bindir}/xelatex +%{_bindir}/xetex + +%files xmltex-bin +%defattr(-,root,root,755) +%{_bindir}/pdfxmltex +%{_bindir}/xmltex + +%files -n libkpathsea6 +%defattr(-,root,root,755) +%{_libdir}/libkpathsea*.so.* + +%files -n %{name}-kpathsea-devel +%defattr(-,root,root) +%dir %{_includedir}/kpathsea +%{_includedir}/kpathsea/* +%{_libdir}/libkpathsea.so + +%files -n libptexenc1 +%defattr(-,root,root,755) +%{_libdir}/libptexenc*.so.* + +%files -n %{name}-ptexenc-devel +%defattr(-,root,root) +%dir %{_includedir}/ptexenc +%{_includedir}/ptexenc/* +%{_libdir}/libptexenc.so + +%changelog