From 32f8047624c2fa49c3031a66edb5a039a813f276 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Sun, 4 Jun 2017 17:42:38 +0200 Subject: 2017-06-04 17:01:00 --- .../documents/general/manuals/rules-mkiv.pdf | Bin 155730 -> 155746 bytes doc/context/documents/general/qrcs/setup-cs.pdf | Bin 843684 -> 845018 bytes doc/context/documents/general/qrcs/setup-de.pdf | Bin 841934 -> 842943 bytes doc/context/documents/general/qrcs/setup-en.pdf | Bin 846823 -> 847214 bytes doc/context/documents/general/qrcs/setup-fr.pdf | Bin 840815 -> 841488 bytes doc/context/documents/general/qrcs/setup-it.pdf | Bin 842897 -> 843081 bytes doc/context/documents/general/qrcs/setup-nl.pdf | Bin 839028 -> 840035 bytes doc/context/documents/general/qrcs/setup-ro.pdf | Bin 839482 -> 840119 bytes .../presentations/examples/present-weird-001.pdf | Bin 0 -> 334905 bytes .../presentations/examples/present-weird-001.tex | 113 +++++++++++++++++++++ .../general/manuals/luatex/luatex-fonts.tex | 64 +++++++++--- .../sources/general/manuals/rules/rules-mkiv.tex | 2 +- 12 files changed, 166 insertions(+), 13 deletions(-) create mode 100644 doc/context/presentations/examples/present-weird-001.pdf create mode 100644 doc/context/presentations/examples/present-weird-001.tex (limited to 'doc') diff --git a/doc/context/documents/general/manuals/rules-mkiv.pdf b/doc/context/documents/general/manuals/rules-mkiv.pdf index 97ac2fe4d..6e4da3ec8 100644 Binary files a/doc/context/documents/general/manuals/rules-mkiv.pdf and b/doc/context/documents/general/manuals/rules-mkiv.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf index 3fc137d65..b60b34a12 100644 Binary files a/doc/context/documents/general/qrcs/setup-cs.pdf and b/doc/context/documents/general/qrcs/setup-cs.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-de.pdf b/doc/context/documents/general/qrcs/setup-de.pdf index 9c2207d89..8555bebb8 100644 Binary files a/doc/context/documents/general/qrcs/setup-de.pdf and b/doc/context/documents/general/qrcs/setup-de.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-en.pdf b/doc/context/documents/general/qrcs/setup-en.pdf index ba034bb5c..068bac6cb 100644 Binary files a/doc/context/documents/general/qrcs/setup-en.pdf and b/doc/context/documents/general/qrcs/setup-en.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-fr.pdf b/doc/context/documents/general/qrcs/setup-fr.pdf index 4c1affb39..576e2e9f5 100644 Binary files a/doc/context/documents/general/qrcs/setup-fr.pdf and b/doc/context/documents/general/qrcs/setup-fr.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-it.pdf b/doc/context/documents/general/qrcs/setup-it.pdf index 1b39b9ed8..64554d876 100644 Binary files a/doc/context/documents/general/qrcs/setup-it.pdf and b/doc/context/documents/general/qrcs/setup-it.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-nl.pdf b/doc/context/documents/general/qrcs/setup-nl.pdf index ccb328a6b..4aa4dc2f6 100644 Binary files a/doc/context/documents/general/qrcs/setup-nl.pdf and b/doc/context/documents/general/qrcs/setup-nl.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-ro.pdf b/doc/context/documents/general/qrcs/setup-ro.pdf index d31367ab2..a21665aff 100644 Binary files a/doc/context/documents/general/qrcs/setup-ro.pdf and b/doc/context/documents/general/qrcs/setup-ro.pdf differ diff --git a/doc/context/presentations/examples/present-weird-001.pdf b/doc/context/presentations/examples/present-weird-001.pdf new file mode 100644 index 000000000..e3533a31e Binary files /dev/null and b/doc/context/presentations/examples/present-weird-001.pdf differ diff --git a/doc/context/presentations/examples/present-weird-001.tex b/doc/context/presentations/examples/present-weird-001.tex new file mode 100644 index 000000000..7049bac59 --- /dev/null +++ b/doc/context/presentations/examples/present-weird-001.tex @@ -0,0 +1,113 @@ +\usemodule[present-weird] + +\starttext + +\TitlePage{About Text\\Today's Talk\\Hans Hagen} + +\StartPage{The First Page} + + \StartTopic{Some Text} + \StartText \input tufte \StopText + \StartText \input knuth \StopText + \StartText \input zapf \StopText + \StartText \input knuth \StopText + \StopTopic + + \StartTopic{Another Text} + \StartText \input tufte \StopText + \StartText \input zapf \StopText + \StartText \input knuth \StopText + \StopTopic + + \StartTopic{Some More Text} + \StartText \input tufte \StopText + \StartText \input knuth \StopText + \StartText \input zapf \StopText + \StartText \input tufte \StopText + \StopTopic + + \StartTopic{Some Text Again} + \StartText \input tufte \StopText + \StartText \input zapf \StopText + \StartText \input knuth \StopText + \StartText \input tufte \StopText + \StopTopic + +\StopPage + +\StartPage{The Second Page} + + \StartTopic{Some Text} + \StartText \input tufte \StopText + \StartText \input knuth \StopText + \StartText \input zapf \StopText + \StartText \input tufte \StopText + \StartText \input knuth \StopText + \StartText \input zapf \StopText + \StopTopic + + \StartTopic{Another Text} + \StartText \input tufte \StopText + \StartText \input knuth \StopText + \StartText \input zapf \StopText + \StopTopic + + \StartTopic{Some Nice Text} + \StartText \input tufte \StopText + \StartText \input knuth \StopText + \StartText \input zapf \StopText + \StartText \input tufte \StopText + \StartText \input tufte \StopText + \StopTopic + + \StartTopic{Some Funny Text} + \StartText \input tufte \StopText + \StartText \input knuth \StopText + \StopTopic + + \StartTopic{Quite Some Text} + \StartText \input tufte \StopText + \StartText \input knuth \StopText + \StartText \input zapf \StopText + \StartText \input tufte \StopText + \StartText \input knuth \StopText + \StartText \input zapf \StopText + \StartText \input tufte \StopText + \StartText \input knuth \StopText + \StartText \input zapf \StopText + \StopTopic + + \StartTopic{Even More Text} + \StartText \input knuth \StopText + \StartText \input zapf \StopText + \StartText \input tufte \StopText + \StartText \input knuth \StopText + \StartText \input zapf \StopText + \StopTopic + +\StopPage + +\StartPage{The Third Page} + + \StartTopic{Some Short Text} + \StartText \input tufte \StopText + \StartText \input knuth \StopText + \StartText \input zapf \StopText + \StopTopic + + \StartTopic{Some Minimal Text} + \StartText \input tufte \StopText + \StartText \input zapf \StopText + \StopTopic + + \StartTopic{Some More Text} + \StartText \input tufte \StopText + \StartText \input knuth \StopText + \StartText \input zapf \StopText + \StartText \input tufte \StopText + \StartText \input tufte \StopText + \StopTopic + +\StopPage + +\stoptext diff --git a/doc/context/sources/general/manuals/luatex/luatex-fonts.tex b/doc/context/sources/general/manuals/luatex/luatex-fonts.tex index 221c0ce85..793189d1c 100644 --- a/doc/context/sources/general/manuals/luatex/luatex-fonts.tex +++ b/doc/context/sources/general/manuals/luatex/luatex-fonts.tex @@ -460,7 +460,7 @@ parameters to that command. The allowed commands and their arguments are: and move right by the character's width\NC\NR \NC node \NC 1 \NC node \NC output this node (list), and move right by the width of this list\NC\NR -\NC slot \NC 2 \NC number \NC a shortcut for the combination of a font and char command\NC\NR +\NC slot \NC 2 \NC 2 numbers \NC a shortcut for the combination of a font and char command\NC\NR \NC push \NC 0 \NC \NC save current position\NC\NR \NC nop \NC 0 \NC \NC do nothing \NC\NR \NC pop \NC 0 \NC \NC pop position \NC\NR @@ -468,6 +468,8 @@ parameters to that command. The allowed commands and their arguments are: \NC down \NC 1 \NC number \NC move down on the page\NC\NR \NC right \NC 1 \NC number \NC move right on the page\NC\NR \NC special \NC 1 \NC string \NC output a \type {\special} command\NC\NR +\NC pdf \NC 2 \NC 2 strings \NC output a \PDF\ literal, the first string is one of \type {origin}, + \type {page}, \type {direct} or \type {raw}\NC\NR \NC lua \NC 1 \NC string \NC execute a \LUA\ script (at \type {\latelua} time)\NC\NR \NC image \NC 1 \NC image \NC output an image (the argument can be either an \type {} variable or an \type {image_spec} table)\NC\NR @@ -484,15 +486,17 @@ Here is a rather elaborate glyph commands example: \starttyping ... commands = { - { 'push' }, -- remember where we are - { 'right', 5000 }, -- move right about 0.08pt - { 'font', 3 }, -- select the fonts[3] entry - { 'char', 97 }, -- place character 97 (ASCII 'a') - { 'pop' }, -- go all the way back - { 'down', -200000 }, -- move upwards by about 3pt - { 'special', 'pdf: 1 0 0 rg' } -- switch to red color - { 'rule', 500000, 20000 } -- draw a bar - { 'special','pdf: 0 g' } -- back to black + { "push" }, -- remember where we are + { "right", 5000 }, -- move right about 0.08pt + { "font", 3 }, -- select the fonts[3] entry + { "char", 97 }, -- place character 97 (ASCII 'a') + { "pop" }, -- go all the way back + { "down", -200000 }, -- move upwards by about 3pt + { "special", "pdf: 1 0 0 rg" } -- switch to red color + -- { "pdf", "origin", "1 0 0 rg" } -- switch to red color (alternative) + { "rule", 500000, 20000 } -- draw a bar + { "special", "pdf: 0 g" } -- back to black + -- { "pdf", "origin", "0 g" } -- back to black (alternative) } ... \stoptyping @@ -511,6 +515,10 @@ output pointer will always move by exactly the width that was given in the \type {width} key of the character hash. Any movements that take place inside the \type {commands} array are ignored on the upper level. +The special can have a \type {pdf:}, \type {pdf:origin:}, \type {pdf:page:}, +\type {pdf:direct:} or \type {pdf:raw:} prefix. When you have to concatenate +strings using the \type {pdf} command might be more efficient. + \subsection{Artificial fonts} Even in a \quote {real} font, there can be virtual characters. When \LUATEX\ @@ -662,7 +670,32 @@ You can define your own font into \type {font.fonts} by calling this function: The return value is the internal id number of the defined font (the index into \type {font.fonts}). If the font creation fails, an error is raised. The table -is a font structure, as explained in \in {chapter} [fonts]. +is a font structure, as explained in \in {chapter} [fonts]. An alternative call +is: + +\startfunctioncall + i = + font.define( n, f) +\stopfunctioncall + +Where the first argument is a reserved font id (see below). + +\subsection{Extending a font} + +Within reasonable bounds you can extend a font after it has been defined. Because +some properties are best left unchanged this is limited to adding characters. + +\startfunctioncall +font.addcharacters(,
f) +\stopfunctioncall + +The table passed can have the fields \type {characters} which is a (sub)table +like the one used in define, and for virtual fonts a \type {fonts} table can be +added. The characters defined in the \type {characters} table are added (when not +yet present) or replace an existing entry. Keep in mind that replacing can have +side effects because a character already can have been used. Instead of posing +restrictions we expect the user to be careful. (The \type {setfont} helper is +a more drastic replacer.) \subsection{Projected next font id} @@ -673,7 +706,14 @@ is a font structure, as explained in \in {chapter} [fonts]. This returns the font id number that would be returned by a \type {font.define} call if it was executed at this spot in the code flow. This is useful for virtual -fonts that need to reference themselves. +fonts that need to reference themselves. If you pass \type {true} as argument, +the id gets reserved and you can pass to \type {font.define} as first argument. +This can be handy when you create complex virtual fonts. + +\startfunctioncall + i = + font.nextid(true) +\stopfunctioncall \subsection{Font id} diff --git a/doc/context/sources/general/manuals/rules/rules-mkiv.tex b/doc/context/sources/general/manuals/rules/rules-mkiv.tex index 536a37aea..00ab49c25 100644 --- a/doc/context/sources/general/manuals/rules/rules-mkiv.tex +++ b/doc/context/sources/general/manuals/rules/rules-mkiv.tex @@ -627,7 +627,7 @@ primitive here, so we follow the \TEX\ conventions of keywords. \hskip-100mm \darkred \frule width 100mm height 10mm depth 8mm radius 2mm line 2pt\relax \hskip-100mm - \hbox to 100mm{\white \bold \hfill some handy word with frames\hfill} + \hbox to 100mm{\white \bold \hfill some handy word with frames\hfill}% \egroup \stopbuffer -- cgit v1.2.3