texlive[73877] Master/texmf-dist: typewriter (11feb25)
commits+karl at tug.org
commits+karl at tug.org
Tue Feb 11 21:48:52 CET 2025
Revision: 73877
https://tug.org/svn/texlive?view=revision&revision=73877
Author: karl
Date: 2025-02-11 21:48:52 +0100 (Tue, 11 Feb 2025)
Log Message:
-----------
typewriter (11feb25)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/lualatex/typewriter/typewriter-guide.pdf
trunk/Master/texmf-dist/doc/lualatex/typewriter/typewriter-guide.tex
trunk/Master/texmf-dist/tex/lualatex/typewriter/typewriter.sty
Added Paths:
-----------
trunk/Master/texmf-dist/tex/lualatex/typewriter/typewriter.lua
Modified: trunk/Master/texmf-dist/doc/lualatex/typewriter/typewriter-guide.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/lualatex/typewriter/typewriter-guide.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/typewriter/typewriter-guide.tex 2025-02-11 20:48:39 UTC (rev 73876)
+++ trunk/Master/texmf-dist/doc/lualatex/typewriter/typewriter-guide.tex 2025-02-11 20:48:52 UTC (rev 73877)
@@ -1,16 +1,28 @@
\documentclass{article}
\usepackage{amsmath}
+\providecommand\ttbasefont{QTAntiquePost.otf}
+\providecommand\ttmathfont{cmuntt.otf}
+
+\providecommand\ttoverprintnormal{0}
+\providecommand\ttoverprintbolda{1}
+\providecommand\ttoverprintboldb{0}
+\providecommand\ttoverprintboldc{0}
+\providecommand\ttgreynormala{0.5}
+\providecommand\ttrotatenormal{3}
+
\usepackage{typewriter}
+\raggedright
\begin{document}
\title{The Typewriter Package for LaTeX}
-\author{David Carlisle \thanks{https://github.com/davidcarlisle/dpctex/}}
-\date{2018-02-10}
+\author{David Carlisle\thanks{With Contributions from Udi Fogiel}
+ \thanks{https://github.com/davidcarlisle/dpctex/}}
+\date{2025-02-10}
\maketitle
\section{Introduction}
-The typewriter Package uses the OpenType Computer Modern Unicode
+The typewriter package uses (by default) the OpenType Computer Modern Unicode
Typewriter font, together with a LuaTeX virtual font setup that
introduces random variability in grey level and angle of each
character. It was originally an answer to a question on stackexchange,
@@ -24,26 +36,48 @@
commands may be defined before loading the package to change the defaults shown below.
\begin{verbatim}
-\providecommand\ttgreyone{0.6}
-\providecommand\ttgreytwo{0.3}
+\providecommand\ttgreybolda{0.6}
+\providecommand\ttgreyboldb{0.3}
\providecommand\ttrotatebold{12}
\providecommand\ttdownbold{20000}
\providecommand\ttrightbold{35000}
-\providecommand\ttdownshifttwo{20000}
+\providecommand\ttoverprintbolda{1}
+\providecommand\ttoverprintboldb{1}
+\providecommand\ttoverprintboldc{1}
+\providecommand\ttgreynormala{0.3}
+\providecommand\ttgreynormalb{0.5}
\providecommand\ttrotatenormal{8}
\providecommand\ttrightnormal{20000}
\providecommand\ttdownnormal{20000}
+\providecommand\ttoverprintnormal{1}
+
+\providecommand\ttbasefont{cmuntt.otf}
+\providecommand\ttmathfont{\ttbasefont}
+\providecommand\ttfontsize{12pt}
\end{verbatim}
The grey levels should be between 0 and 1 and control the maximim
-amount grey level.
+amount of grey level.
-The rotate values can be any angle (measured degrees), but setting values more than 20 makes the text more or less unreadable.
+The rotate values can be any angle (measured in degrees), but setting
+values more than 20 makes the text more or less unreadable.
The right and down offsets (which are in the font design units) control the
maximum horizontal and vertical offsets of the overprinted characters
+The flags such ttoverprintnormal control whether multiple characters are printed
+By default bold font has four characters with different offsets, normal has two.
+Setting the flags to 0 stops this over-printing.
+
+By default the same font is used for text and math, but you may set
+ttbasefont to the filename for the base font, and
+ttmathfont to a different font, this may be useful if the main font
+does not have math characters.
+
+
+\hrule
+
There is random variability in each letter as you can see by repeating
a letter repeatededly:
@@ -60,7 +94,7 @@
\textbf{one two three}
-[some greek text θ]
+[some greek text $θ$]
a rule: \rule{3cm}{1pt}
Added: trunk/Master/texmf-dist/tex/lualatex/typewriter/typewriter.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/typewriter/typewriter.lua (rev 0)
+++ trunk/Master/texmf-dist/tex/lualatex/typewriter/typewriter.lua 2025-02-11 20:48:52 UTC (rev 73877)
@@ -0,0 +1,157 @@
+-- Lua code for LaTeX typewriter.sty
+-- 2025-02-08
+--
+
+-- Use local functions
+local getmacro = token.get_macro
+local sp = tex.sp
+local definefont = tex.definefont
+local define_font = luaotfload.define_font
+local getfont = font.getfont
+local nextid = font.nextid
+local setfont = font.setfont
+local random, rad = math.random, math.rad
+local cos, sin, floor = math.cos, math.sin, math.floor
+local pdfprint = pdf.print
+local format = string.format
+local insert = table.insert
+
+-- set the options
+local ttgreybolda = getmacro("ttgreybolda") and tonumber(getmacro("ttgreybolda")) or 0.6
+local ttgreyboldb = getmacro("ttgreyboldb") and tonumber(getmacro("ttgreyboldb")) or 0.3
+local ttrotatebold = getmacro("ttrotatebold") and tonumber(getmacro("ttrotatebold")) or 12
+local ttdownbold = getmacro("ttdownbold") and tonumber(getmacro("ttdownbold")) or 20000
+local ttrightbold = getmacro("ttrightbold") and tonumber(getmacro("ttrightbold")) or 35000
+local ttoverprintbolda = getmacro("ttoverprintbolda") and tonumber(getmacro("ttoverprintbolda")) or 1
+local ttoverprintboldb = getmacro("ttoverprintboldb") and tonumber(getmacro("ttoverprintboldb")) or 1
+local ttoverprintboldc = getmacro("ttoverprintboldc") and tonumber(getmacro("ttoverprintboldc")) or 1
+
+local ttgreynormala = getmacro("ttgreynormala") and tonumber(getmacro("ttgreynormala")) or 0.3
+local ttgreynormalb = getmacro("ttgreynormalb") and tonumber(getmacro("ttgreynormalb")) or 0.5
+local ttrotatenormal = getmacro("ttrotatenormal") and tonumber(getmacro("ttrotatenormal")) or 10
+local ttrightnormal = getmacro("ttrightnormal") and tonumber(getmacro("ttrightnormal")) or 20000
+local ttdownnormal = getmacro("ttdownnormal") and tonumber(getmacro("ttdownnormal")) or 20000
+local ttoverprintnormal = getmacro("ttoverprintnormal") and tonumber(getmacro("ttoverprintnormal")) or 1
+
+local ttbasefont = getmacro("ttbasefont") or "cmuntt.otf"
+local ttmathfont = getmacro("ttmathfont") or ttbasefont
+local ttfontsize = getmacro("ttfontsize") and sp(getmacro("ttfontsize")) or sp("12pt")
+
+-- load the data of the base font. If the id is not passed to luaotfload.define_font
+-- as the third argument, the new id is the return value, otherwise
+-- the font data is returned.
+
+local base_id = define_font("file:" .. ttbasefont, ttfontsize)
+local base_math_id
+if ttbasefont == ttmathfont then
+ base_math_id = base_id
+else
+ base_math_id = define_font("file:" .. ttmathfont, ttfontsize)
+end
+
+-- define \cmuntt as a font selection macro for the
+-- base font, and set the base font as the current
+-- active font
+
+definefont("cmuntt", base_id)
+font.current(base_id)
+
+-- Some helper functions
+
+local function rotate(num)
+ local r = rad(0.1*num*random(-10,10))
+ pdfprint(format(" q %f %f %f %f 0 0 cm ",
+ cos(r), - sin(r), sin(r), cos(r)))
+end
+
+local function define_normal_tt_font(characters)
+ for j,v in pairs(characters) do
+ local greynormala = ttgreynormala*random()
+ local greynormalb = ttgreynormalb*random()
+ local cmd = {}
+ cmd = {
+ {'lua', function() rotate(ttrotatenormal) end},
+ {'pdf', ' ' .. greynormala .. ' g'},
+ {'push'},
+ {'right', random(-ttrightnormal, ttrightnormal)},
+ {'down', random(-ttdownnormal, ttdownnormal)},
+ {'char',j},
+ {'pop'},
+ {'lua', function() pdfprint(" Q ") end}
+ }
+
+ if ttoverprintnormal == 1 then
+ insert(cmd, {'down', random(-ttdownnormal, ttdownnormal)})
+ insert(cmd, {'pdf', ' ' .. greynormalb .. ' g'})
+ insert(cmd, {'char',j})
+ insert(cmd, {'pdf', ' 0 g'})
+ end
+ v.commands = cmd
+ end
+end
+
+local function define_bold_tt_font(characters)
+ for j, v in pairs(characters) do
+ local greybolda = ttgreybolda*random()
+ local greyboldb = ttgreyboldb*random()
+ local cmd = {}
+ cmd = {
+ {'lua', function() rotate(ttrotatebold) end},
+ {'pdf', ' ' .. format("%f", greybolda) .. ' g'},
+ {'push'},
+ {'right', random(-ttrightbold, ttrightbold)},
+ {'down', random(-ttdownbold, ttdownbold)},
+ {'char',j},
+ {'pop'},
+ {'lua', function() pdfprint(" Q ") end}
+ }
+
+ if ttoverprintbolda == 1 then
+ insert(cmd, {'push'})
+ insert(cmd, {'right', random(-ttrightbold, ttrightbold)})
+ insert(cmd, {'down', random(-ttdownbold, ttdownbold)})
+ insert(cmd, {'char',j})
+ insert(cmd, {'pop'})
+ end
+
+ if ttoverprintboldb == 1 then
+ insert(cmd, {'push'})
+ insert(cmd, {'right', random(-ttrightbold, ttrightbold)})
+ insert(cmd, {'down', random(-ttdownbold, ttdownbold)})
+ insert(cmd, {'char',j})
+ insert(cmd, {'pop'})
+ insert(cmd, {'push'})
+ insert(cmd, {'down', random(-ttdownbold, ttdownbold)})
+ insert(cmd, {'pdf', ' ' .. format("%f", greyboldb) .. ' g'})
+ insert(cmd, {'char',j})
+ insert(cmd, {'pdf', ' 0 g'})
+ insert(cmd, {'pop'})
+ end
+ v.commands = cmd
+ end
+end
+
+-- Now the main function
+
+local function define_tt_font(baseid, basename, name, csname, size, bold)
+ local f = getfont(baseid)
+ f.name = name
+ f.type = 'virtual'
+ f.fonts = {{ name = "file:"..basename, size = size}}
+ if bold then
+ define_bold_tt_font(f.characters)
+ else
+ define_normal_tt_font(f.characters)
+ end
+ local id = nextid(true)
+ setfont(id, f)
+ definefont(csname, id)
+end
+
+define_tt_font(base_id, ttbasefont, "cmtt10x", "myfont", ttfontsize, false)
+define_tt_font(base_math_id, ttmathfont, "cmtt10mx", "mymfont", ttfontsize, false)
+define_tt_font(base_math_id, ttmathfont, "cmtt10mx", "mymfonts", floor(0.75*ttfontsize), false)
+define_tt_font(base_id, ttbasefont, "cmtt10bx", "mybfont", ttfontsize, true)
+define_tt_font(base_math_id, ttmathfont, "cmtt10mbx", "mymbfont", ttfontsize, true)
+define_tt_font(base_math_id, ttmathfont, "cmtt10mbx", "mymbfonts", floor(0.75*ttfontsize), true)
+
Property changes on: trunk/Master/texmf-dist/tex/lualatex/typewriter/typewriter.lua
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/lualatex/typewriter/typewriter.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/typewriter/typewriter.sty 2025-02-11 20:48:39 UTC (rev 73876)
+++ trunk/Master/texmf-dist/tex/lualatex/typewriter/typewriter.sty 2025-02-11 20:48:52 UTC (rev 73877)
@@ -1,115 +1,15 @@
% typewriter.sty
-% David Carlisle 2016-2018
+% David Carlisle 2016-2025
% Licence: LPPL
% See http://tex.stackexchange.com/questions/344214/use-latex-to-simulate-old-typewriter-written-texts
+\ProvidesPackage{typewriter}[2025-02-10 v1.3 typewriter package]
-\ProvidesPackage{typewriter}[2018-02-10 v1.1 typewriter package]
-
\ifx\directlua\@undefined
\endinput\PackageError{typewriter}{LuaLaTeX required for this package}\@ehc\fi
-\providecommand\ttgreyone{0.6}
-\providecommand\ttgreytwo{0.3}
-\providecommand\ttrotatebold{12}
-\providecommand\ttdownbold{20000}
-\providecommand\ttrightbold{35000}
-\providecommand\ttdownshifttwo{20000}
+\directlua{require('typewriter.lua')}
-
-\providecommand\ttrotatenormal{8}
-\providecommand\ttrightnormal{20000}
-\providecommand\ttdownnormal{20000}
-
-% luaotfload exlicitly loaded for latex formats before 2017/01/01
-\usepackage{luaotfload}
-
-% load cmuntt here not from lua (for everyone except me, it seems)
-\font\cmuntt = file:cmuntt.otf at 12pt \cmuntt
-\edef\cmunttid{\fontid\cmuntt}
-
-
-\expandafter\let\expandafter\%\csname @percentchar\endcsname
-\directlua {
- local cbl=luatexbase.callback_descriptions('define_font')
-% print('\string\n======' .. cbl[1] .. '===\string\n')
-original_fontloader=luatexbase.remove_from_callback('define_font',cbl[1])
-luatexbase.add_to_callback('define_font',
-function(name,size,i)
- if (name=='cmtt10x' or name=='cmtt10bx') then
-% this works in my dev version but for older setups
-% make sure cmuntt.otf has been loaded before we mess
-% up the font loader.
-% f = original_fontloader('cmuntt.otf',size)
- f = font.getfont(\cmunttid)
- f.name = 'cmtt10x'
- f.type = 'virtual'
- f.fonts = {{ name = 'file:cmuntt', size = size}}
-for j,v in pairs(f.characters) do
- local gr = \ttgreyone*math.random()
- local gr2 = \ttgreytwo*math.random()
-if name == 'cmtt10bx' then
- v.commands = {
-{'lua','
- r1 = math.rad(0.1*\ttrotatebold*math.random(-10,10))
-pdf.print
-(string.format(" q \%f \%f \%f \%f 0 0 cm ",
-math.cos(r1), - math.sin(r1), math.sin(r1), math.cos(r1)
-))'},
- {'special','pdf: ' .. string.format("\%f",gr2) .. ' g'},
-{'push'},
-{'right', math.random(-\ttrightbold,\ttrightbold)},
-{'down', math.random(-\ttdownbold,\ttdownbold)},
- {'char',j},
-{'pop'},
-{'push'},
-{'right', math.random(-\ttrightbold,\ttrightbold)},
-{'down', math.random(-\ttdownbold,\ttdownbold)},
- {'char',j},
-{'pop'},
-{'push'},
-{'right', math.random(-\ttrightbold,\ttrightbold)},
-{'down', math.random(-\ttdownbold,\ttdownbold)},
- {'char',j},
-{'pop'},
-{'lua','pdf.print(" Q ")'},
-{'down', math.random(-\ttdownbold,\ttdownbold)},
- {'special','pdf: ' .. string.format("\%f",gr) .. ' g'},
- {'char',j},
- {'special','pdf: 0 g'}
-
- }
-else
- v.commands = {
-{'lua','
- r1 = math.rad(0.1*\ttrotatenormal*math.random(-10,10))
-pdf.print
-(string.format(" q \%f \%f \%f \%f 0 0 cm ",
-math.cos(r1), math.sin(r1), - math.sin(r1), math.cos(r1)
-))'},
- {'special','pdf: ' .. gr2 .. ' g'},
-{'push'},
-{'right', math.random(-\ttrightnormal,\ttrightnormal)},
-{'down', math.random(-\ttdownshifttwo,\ttdownshifttwo)},
- {'char',j},
-{'pop'},
-{'lua','pdf.print(" Q ")'},
-{'down', math.random(-\ttdownnormal,\ttdownnormal)},
- {'special','pdf: ' .. gr .. ' g'},
- {'char',j},
- {'special','pdf: 0 g'}
-
- }
-end
-end
-return f
-else
-return original_fontloader(name,size,i)
-end
-end,
-'define font')
-}
-
{\count0=0
\loop
\global\mathcode\count0=\count0
@@ -119,17 +19,50 @@
}
\def\boldmath{%
-\textfont0=\mybfont \scriptfont0=\mybfonts \scriptscriptfont0=\mybfonts
-\textfont1=\mybfont \textfont2=\mybfont \textfont3=\mybfont
+\textfont0=\mymbfont \scriptfont0=\mymbfonts \scriptscriptfont0=\mymbfonts
+\textfont1=\mymbfont \textfont2=\mymbfont \textfont3=\mymbfont
}
\AtBeginDocument{%
\sbox0{$\relax$}%
-\font\myfont= cmtt10x at 12pt \myfont
-\font\myfonts= cmtt10x at 9pt
-\font\mybfont= cmtt10bx at 12pt
-\font\mybfonts= cmtt10bx at 9pt
+\myfont
+
+%if it is a monospace font force monospace space
+\ifdim\fontcharwd\myfont`.=\fontcharwd\myfont`M
+\fontdimen6\myfont=\fontcharwd\myfont`x
+\fontdimen2\myfont=\fontdimen6\myfont
+\fontdimen3\myfont=\z@
+\fontdimen4\myfont=\z@
+\fontdimen7\myfont=\fontdimen6\myfont
+
+\fontdimen6\mymfont=\fontcharwd\mymfont`x
+\fontdimen2\mymfont=\fontdimen6\mymfont
+\fontdimen3\mymfont=\z@
+\fontdimen4\mymfont=\z@
+\fontdimen7\mymfont=\fontdimen6\mymfont
+
+\fontdimen6\mymfonts=\fontcharwd\mymfonts`x
+\fontdimen2\mymfonts=\fontdimen6\mymfonts
+\fontdimen3\mymfonts=\z@
+\fontdimen4\mymfonts=\z@
+\fontdimen7\mymfonts=\fontdimen6\mymfonts
+
+\fontdimen6\mymbfont=\fontcharwd\mymbfont`x
+\fontdimen2\mymbfont=\fontdimen6\mymbfont
+\fontdimen3\mymbfont=\z@
+\fontdimen4\mymbfont=\z@
+\fontdimen7\mymbfont=\fontdimen6\mymbfont
+
+\fontdimen6\mymbfonts=\fontcharwd\mymbfonts`x
+\fontdimen2\mymbfonts=\fontdimen6\mymbfonts
+\fontdimen3\mymbfonts=\z@
+\fontdimen4\mymbfonts=\z@
+\fontdimen7\mymbfonts=\fontdimen6\mymbfonts
+
+\else
+\fi
+
\let\bfseries\mybfont
\let\selectfont\relax
\let\large\relax
@@ -137,8 +70,8 @@
\let\small\relax
\let\footnotesize\relax
-\textfont0=\myfont \scriptfont0=\myfonts \scriptscriptfont0=\myfonts
-\textfont1=\myfont \textfont2=\myfont \textfont3=\myfont
+\textfont0=\mymfont \scriptfont0=\mymfonts \scriptscriptfont0=\mymfonts
+\textfont1=\mymfont \textfont2=\mymfont \textfont3=\mymfont
}
@@ -145,14 +78,6 @@
\emergencystretch\textwidth
-
-
-
-% must find a better tt int.
-\def\int{\mathop{\leavevmode\strut\raise.5ex\hbox to 1em{$\scriptstyle\mathchar"352$}}\nolimits}
-\setbox0\hbox{$\int$}\setbox0\hbox{}
-\def\sum{\mathop{\char"03A3\relax}}
-
\renewcommand\sqrt[2][\relax]{%
\ifx\relax#1\relax\else{}^{#1}\fi
^^^^221a\overline{#2}}
@@ -598,7 +523,11 @@
\xUnicodeMathSymbol{"0220E}{\QED }{\mathord}{end of proof}%
\xUnicodeMathSymbol{"0220F}{\prod }{\mathop}{product operator}%
\xUnicodeMathSymbol{"02210}{\coprod }{\mathop}{coproduct operator}%
-\xUnicodeMathSymbol{"02211}{\sum }{\mathop}{summation operator}%
+\iffontchar\textfont0 "2211
+ \xUnicodeMathSymbol{"02211}{\sum }{\mathop}{summation operator}%
+\else
+ \def\sum{\mathop{\char"03A3\relax}}%
+\fi
\xUnicodeMathSymbol{"02212}{\minus }{\mathbin}{minus sign}%
\xUnicodeMathSymbol{"02213}{\mp }{\mathbin}{minus-or-plus sign}%
\xUnicodeMathSymbol{"02214}{\dotplus }{\mathbin}{plus sign, dot above}%
@@ -624,7 +553,13 @@
\xUnicodeMathSymbol{"02228}{\vee }{\mathbin}{/vee /lor b: logical or}%
\xUnicodeMathSymbol{"02229}{\cap }{\mathbin}{intersection}%
\xUnicodeMathSymbol{"0222A}{\cup }{\mathbin}{union or logical sum}%
-%\xUnicodeMathSymbol{"0222B}{\int }{\mathop}{integral operator}%
+\iffontchar\textfont0 "222B
+ \xUnicodeMathSymbol{"0222B}{\int }{\mathop}{integral operator}%
+\else
+ % must find a better tt int.
+ \def\int{\mathop{\leavevmode\strut\raise.5ex\hbox to 1em{$\scriptstyle\mathchar"352$\hss}}\nolimits}%
+ \setbox0\hbox{$\int$}\setbox0\hbox{}%
+\fi
\xUnicodeMathSymbol{"0222C}{\iint }{\mathop}{double integral operator}%
\xUnicodeMathSymbol{"0222D}{\iiint }{\mathop}{triple integral operator}%
\xUnicodeMathSymbol{"0222E}{\oint }{\mathop}{contour integral operator}%
@@ -2734,65 +2669,26 @@
|\hskip -.5\arrayrulewidth}}
\let\oldhrule\hrule
-\def\hrule{\directlua{
-local h,w,d,hh,ww,dd,lw
-h=token.scan_keyword("height")
-if(h) then
-hh=token.scan_dimen()
+\protected\def\hrule{\directlua{
+local h,w,d,lw
+local keyword = token.scan_keyword
+local scandimen = token.scan_dimen
+while true do
+ if keyword("height") then
+ h = scandimen()
+ elseif keyword("depth") then
+ d = scandimen()
+ elseif keyword("width") then
+ w = scandimen()
+ else
+ break
+ end
end
-d=token.scan_keyword("depth")
-if(d) then
-dd=token.scan_dimen()
-end
-w=token.scan_keyword("width")
-if(w) then
-ww=token.scan_dimen()
-end
-if(not(h)) then
-h=token.scan_keyword("height")
-if(h) then
-hh=token.scan_dimen()
-end
-end
-if(not(d)) then
-d=token.scan_keyword("depth")
-if(d) then
-dd=token.scan_dimen()
-end
-end
-if(not(w)) then
-w=token.scan_keyword("width")
-if(w) then
-ww=token.scan_dimen()
-end
-end
-if(not(h)) then
-h=token.scan_keyword("height")
-if(h) then
-hh=token.scan_dimen()
-end
-end
-if(not(d)) then
-d=token.scan_keyword("depth")
-if(d) then
-dd=token.scan_dimen()
-end
-end
-if(not(w)) then
-w=token.scan_keyword("width")
-if(w) then
-ww=token.scan_dimen()
-end
-end
-%print('\string\n=====')
-%print('h' .. tostring(h) .. (hh or '*'))
-%print('d' .. tostring(d) .. (dd or '*'))
-%print('w' .. tostring(w) .. (ww or '*'))
-%print('=====\string\n')
-if(ww) then
-lw="\string\\hskip " .. ww .. "sp\string\\hbox{}"
+if w then
+ lw = "\string\\hskip " .. w .. "sp\string\\hbox{}"
else
-lw="\string\\hfill\string\\space"
+ lw = "\string\\hfill\string\\space"
end
-tex.sprint('\string\\par\string\\noindent\string\\leaders\string\\hbox{\string\\string_}' .. lw)%
-}}
\ No newline at end of file
+tex.sprint(\number\catcodetable at latex,
+ '\string\\par\string\\noindent\string\\leaders\string\\hbox{\string\\string_}' .. lw)%
+}}
More information about the tex-live-commits
mailing list.