diff options
author | Karl Berry <karl@freefriends.org> | 2015-04-26 23:17:22 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-04-26 23:17:22 +0000 |
commit | 6965b2104705d52d748f4d8d31280d33965586ad (patch) | |
tree | 17562cbe9913ee3fb915c5e6f860f3ea2293b4c7 /Master/texmf-dist/doc/luatex/base/luatexref-env.tex | |
parent | 12346f374269fba3d836f8e1ad11ceb9662d3f74 (diff) |
luatex doc update from https://foundry.supelec.fr/scm/viewvc.php/tags/beta-0.80.0/manual/?root=luatex, minus function stuff and man page per hans
git-svn-id: svn://tug.org/texlive/trunk@37066 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/luatex/base/luatexref-env.tex')
-rw-r--r-- | Master/texmf-dist/doc/luatex/base/luatexref-env.tex | 152 |
1 files changed, 75 insertions, 77 deletions
diff --git a/Master/texmf-dist/doc/luatex/base/luatexref-env.tex b/Master/texmf-dist/doc/luatex/base/luatexref-env.tex index 5cb29ec5cbe..8c9fd6477af 100644 --- a/Master/texmf-dist/doc/luatex/base/luatexref-env.tex +++ b/Master/texmf-dist/doc/luatex/base/luatexref-env.tex @@ -2,19 +2,38 @@ \startenvironment luatexref-env -% something rests this, but i hav eno time not to see where - \usemodule[abr-02] % \tex : tex command % \lua : native lua code % \luatex : lua lib, function, value defined in luatex -\nonknuthmode +% \nonknuthmode + +\setuplayout + [height=middle, + width=middle, + backspace=2cm, + topspace=2cm] + +\setuppagenumbering + [alternative=doublesided] + +\setuptolerance + [stretch,tolerant] + +\setuptype + [lines=hyphenated] + +\setuptyping + [lines=hyphenated] -\setuptolerance[stretch,tolerant] +\setupitemize + [each] + [packed] -\setuptype[lines=hyphenated] \setuptyping[lines=hyphenated] +\setupwhitespace + [medium] \let\lua \type \let\luatex \type @@ -40,30 +59,20 @@ { do local t = string.split('#1',',') tex.sprint('\\type{'.. node.id(t[1]) .. '}') - if t[2] then + if t[2] then tex.sprint(', \\type{'.. node.subtype(t[2]) .. '}') end end }% } -\def\todo#1% - {\dontleavehmode{\bf\red <TODO: #1>}} +\starttexdefinition unexpanded todo #1 + \dontleavehmode + \startcolor[red] + \bf<TODO: #1> + \stopcolor +\stoptexdefinition -\setuplayout - [height=middle, - width=middle, - backspace=2cm, - topspace=2cm] - -\setuppagenumbering - [alternative=doublesided] - -\setupitemize[each][packed] - -\setupwhitespace[medium] - -\preloadtypescripts \definetypeface[mainfacenormal] [ss][sans] [iwona] [default] \definetypeface[mainfacenormal] [rm][serif][palatino] [default] @@ -77,7 +86,8 @@ \definetypeface[mainfacenarrowtt][tt][mono] [modern] [default][rscale=1.1] -\setupbodyfont[mainfacenormal,11pt] +\setupbodyfont + [mainfacenormal,11pt] \definehead [remark] @@ -91,18 +101,14 @@ \setupheadertexts [] -\setupcolors - [state=start] - \setuptyping - [color=blue, -]% style=\mainfacenarrowtt] + [color=blue] % style=\mainfacenarrowtt -\definetyping[functioncall] +\definetyping + [functioncall] \setuptype - [color=blue, -]% style=\mainfacenarrowtt] + [color=blue] % style=\mainfacenarrowtt \definecolor[blue] [b=.5] \definecolor[red] [r=.5] @@ -141,19 +147,15 @@ StopPage ; \stopuseMPgraphic -\def\luaextraangle{\directlua{ - if \lastpage == 0 then - luaextraangle = 0; - else - luaextraangle = \realfolio*360/\lastpage; - end - tex.print(luaextraangle) -}} +\starttexdefinition luaextraangle + % we can also just access the last page and so in mp directly + \ctxlua { + context(\lastpage == 0 and 0 or \realfolio*360/\lastpage) + } +\stoptexdefinition \startuseMPgraphic{luanumber} \includeMPgraphic{lualogo} - % luaextraangle := \realfolio*360/\lastpage ; - % luaextraangle := 10 * ( (\realfolio-2)/(\lastpage-2)*36 ) ; luaextraangle := \luaextraangle; picture p ; p := lualogo ; setbounds p to boundingbox fullcircle ; @@ -282,52 +284,45 @@ \def\nonterminal#1>{\mathematics{\langle\hbox{{\rm #1}}\rangle}} -\ifx\directlua\undefined - - \definetyping[syntax] - \definetype[syntax] - -\else - - % taco's brainwave -) +% taco's brainwave -) - \newcatcodetable\syntaxcodetable +\newcatcodetable\syntaxcodetable - \def\makesyntaxcodetable - {\begingroup - \catcode`\<=13 \catcode`\|=12 - \catcode`\!= 0 \catcode`\\=12 - \savecatcodetable\syntaxcodetable - \endgroup} +\def\makesyntaxcodetable + {\begingroup + \catcode`\<=13 \catcode`\|=12 + \catcode`\!= 0 \catcode`\\=12 + \savecatcodetable\syntaxcodetable + \endgroup} - \makesyntaxcodetable +\makesyntaxcodetable - \def\startsyntax {\begingroup\catcodetable\syntaxcodetable \dostartsyntax} - \def\syntax {\begingroup\catcodetable\syntaxcodetable \dosyntax} +\def\startsyntax {\begingroup\catcodetable\syntaxcodetable \dostartsyntax} +\def\syntax {\begingroup\catcodetable\syntaxcodetable \dosyntax} - \def\syntaxenvbody#1% - {\par - \tt - \startnarrower - {\blue #1}% - \stopnarrower - \par} +\def\syntaxenvbody#1% + {\par + \tt + \startnarrower + {\blue #1}% + \stopnarrower + \par} - \def\syntaxbody#1% - {{\blue \tt #1}} +\def\syntaxbody#1% + {{\blue \tt #1}} - \bgroup \catcodetable\syntaxcodetable +\bgroup \catcodetable\syntaxcodetable - !gdef!dostartsyntax#1\stopsyntax{!let<!nonterminal!syntaxenvbody{#1}!endgroup} - !gdef!dosyntax #1{!let<!nonterminal!syntaxbody{#1}!endgroup} +!gdef!dostartsyntax#1\stopsyntax{!let<!nonterminal!syntaxenvbody{#1}!endgroup} +!gdef!dosyntax #1{!let<!nonterminal!syntaxbody{#1}!endgroup} - !egroup +!egroup -\fi +% end of wave \setupinteraction [state=start, - focus=standard, + focus=standard, color=, contrastcolor=] @@ -336,12 +331,15 @@ \setuplist [chapter,section,subsection,subsubsection] - [interaction=all] + [interaction=all] -% Hans doesn't like the bookmarks opening by default +% Hans doesn't like the bookmarks opening by default so we comment this: +% % \setupinteractionscreen[option=bookmark] -\appendtoks\let\luatex\firstofoneargument\to\simplifiedcommands +\appendtoks + \let\luatex\firstofoneargument +\to \simplifiedcommands \stopenvironment |