From 661fb34ced40815e1e5e9073de9c8475127da094 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Fri, 23 Feb 2018 23:32:32 +0100 Subject: 2018-02-23 22:19:00 --- tex/context/base/mkii/cont-fil.mkii | 2 + tex/context/base/mkii/cont-new.mkii | 2 +- tex/context/base/mkii/context.mkii | 2 +- tex/context/base/mkii/mult-pe.mkii | 1 + tex/context/base/mkiv/cont-fil.mkiv | 13 +- tex/context/base/mkiv/cont-new.mkiv | 120 +---- tex/context/base/mkiv/context.mkiv | 5 +- tex/context/base/mkiv/core-def.mkiv | 4 + tex/context/base/mkiv/font-chk.lua | 10 +- tex/context/base/mkiv/mult-ini.mkiv | 447 +++++++++--------- tex/context/base/mkiv/page-ini.mkiv | 9 + tex/context/base/mkiv/page-mak.mkvi | 17 + tex/context/base/mkiv/page-sid.mkiv | 4 +- tex/context/base/mkiv/spac-grd.mkiv | 16 +- tex/context/base/mkiv/spac-ver.lua | 197 +++++--- tex/context/base/mkiv/spac-ver.mkiv | 19 +- tex/context/base/mkiv/status-files.pdf | Bin 25783 -> 25807 bytes tex/context/base/mkiv/status-lua.pdf | Bin 252639 -> 251734 bytes tex/context/base/mkiv/strc-mat.mkiv | 75 +-- tex/context/base/mkiv/supp-box.mkiv | 5 + tex/context/base/mkiv/tabl-ntb.mkiv | 38 +- tex/context/base/mkiv/trac-vis.lua | 16 +- tex/context/base/mkiv/typo-del.mkiv | 2 +- tex/context/interface/mkii/keys-pe.xml | 1 + tex/context/interface/mkiv/context-en.xml | 5 + tex/context/interface/mkiv/i-common-value.xml | 3 +- tex/context/interface/mkiv/i-context.pdf | Bin 848470 -> 848652 bytes tex/context/interface/mkiv/i-readme.pdf | Bin 60775 -> 60774 bytes .../modules/common/s-abbreviations-extras.tex | 56 +++ tex/context/modules/common/s-abr-01.tex | 386 ---------------- tex/context/modules/common/s-abr-02.tex | 22 - tex/context/modules/common/s-abr-03.tex | 22 - tex/context/modules/common/s-abr-04.tex | 24 - tex/context/modules/mkii/s-abr-01.mkii | 30 ++ tex/context/modules/mkii/s-abr-02.mkii | 31 ++ tex/context/modules/mkiv/m-compatible.mkiv | 63 +++ tex/context/modules/mkiv/m-typesetting.mkiv | 22 + .../modules/mkiv/s-abbreviations-mixed.mkiv | 28 ++ .../modules/mkiv/s-abbreviations-pseudocaps.mkiv | 30 ++ .../modules/mkiv/s-abbreviations-smallcaps.mkiv | 31 ++ .../modules/mkiv/s-abbreviations-words.mkiv | 28 ++ tex/context/modules/mkiv/s-art-01.mkiv | 62 --- tex/context/modules/mkiv/s-article-basic.mkiv | 75 +++ tex/context/modules/mkiv/s-fonts-kerns.mkiv | 215 +++++++++ tex/context/modules/mkiv/s-mag-01.mkiv | 505 --------------------- tex/context/modules/mkiv/s-magazine-basic.mkiv | 505 +++++++++++++++++++++ tex/context/modules/mkiv/s-map-10.mkiv | 494 -------------------- tex/context/modules/mkiv/s-maps.mkiv | 494 ++++++++++++++++++++ tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 49 files changed, 2100 insertions(+), 2038 deletions(-) create mode 100644 tex/context/modules/common/s-abbreviations-extras.tex delete mode 100644 tex/context/modules/common/s-abr-01.tex delete mode 100644 tex/context/modules/common/s-abr-02.tex delete mode 100644 tex/context/modules/common/s-abr-03.tex delete mode 100644 tex/context/modules/common/s-abr-04.tex create mode 100644 tex/context/modules/mkii/s-abr-01.mkii create mode 100644 tex/context/modules/mkii/s-abr-02.mkii create mode 100644 tex/context/modules/mkiv/m-compatible.mkiv create mode 100644 tex/context/modules/mkiv/s-abbreviations-mixed.mkiv create mode 100644 tex/context/modules/mkiv/s-abbreviations-pseudocaps.mkiv create mode 100644 tex/context/modules/mkiv/s-abbreviations-smallcaps.mkiv create mode 100644 tex/context/modules/mkiv/s-abbreviations-words.mkiv delete mode 100644 tex/context/modules/mkiv/s-art-01.mkiv create mode 100644 tex/context/modules/mkiv/s-article-basic.mkiv create mode 100644 tex/context/modules/mkiv/s-fonts-kerns.mkiv delete mode 100644 tex/context/modules/mkiv/s-mag-01.mkiv create mode 100644 tex/context/modules/mkiv/s-magazine-basic.mkiv delete mode 100644 tex/context/modules/mkiv/s-map-10.mkiv create mode 100644 tex/context/modules/mkiv/s-maps.mkiv (limited to 'tex') diff --git a/tex/context/base/mkii/cont-fil.mkii b/tex/context/base/mkii/cont-fil.mkii index 604ea233d..1f2923a69 100644 --- a/tex/context/base/mkii/cont-fil.mkii +++ b/tex/context/base/mkii/cont-fil.mkii @@ -100,6 +100,8 @@ \definefilesynonym [abr-pseudocaps] [abr-01] \definefilesynonym [abr-smallcaps] [abr-02] +\definefilesynonym [abr-03] [abr-01] +\definefilesynonym [abr-04] [abr-01] \definefilesynonym [chinese] [chi-00] \definefilesynonym [japanese] [jap-00] diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index d7992c70b..0ae066a63 100644 --- a/tex/context/base/mkii/cont-new.mkii +++ b/tex/context/base/mkii/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2018.02.21 18:19} +\newcontextversion{2018.02.23 22:11} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/mkii/context.mkii b/tex/context/base/mkii/context.mkii index 15ebe39d0..4e584f125 100644 --- a/tex/context/base/mkii/context.mkii +++ b/tex/context/base/mkii/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2018.02.21 18:19} +\edef\contextversion{2018.02.23 22:11} %D For those who want to use this: diff --git a/tex/context/base/mkii/mult-pe.mkii b/tex/context/base/mkii/mult-pe.mkii index 60a772815..5115758ec 100644 --- a/tex/context/base/mkii/mult-pe.mkii +++ b/tex/context/base/mkii/mult-pe.mkii @@ -1162,6 +1162,7 @@ \setinterfaceconstant{sidemethod}{روش‌کنار} \setinterfaceconstant{sidespaceafter}{فضای‌کناری‌بعد} \setinterfaceconstant{sidespacebefore}{فضای‌کناری‌قبل} +\setinterfaceconstant{sidespaceinbetween}{sidespaceinbetween} \setinterfaceconstant{sidethreshold}{sidethreshold} \setinterfaceconstant{sign}{علامت} \setinterfaceconstant{simplecommand}{simplecommand} diff --git a/tex/context/base/mkiv/cont-fil.mkiv b/tex/context/base/mkiv/cont-fil.mkiv index 507effd02..efadd8ca4 100644 --- a/tex/context/base/mkiv/cont-fil.mkiv +++ b/tex/context/base/mkiv/cont-fil.mkiv @@ -101,11 +101,16 @@ \definefilesynonym [pre-random] [present-random] \definefilesynonym [pre-71] [present-random] -\definefilesynonym [abr-pseudocaps] [abr-01] -\definefilesynonym [abr-smallcaps] [abr-02] +\definefilesynonym [abr-01] [abbreviations-pseudocaps] +\definefilesynonym [abr-02] [abbreviations-smallcaps] +\definefilesynonym [abr-03] [abbreviations-words] +\definefilesynonym [abr-04] [abbreviations-mixed] -\definefilesynonym [pracjourn] [ptj-01] -\definefilesynonym [maps] [map-10] +\definefilesynonym [art-01] [article-basic] +\definefilesynonym [article] [article-basic] +\definefilesynonym [mag-01] [magazine-basic] + +\definefilesynonym [map-10] [maps] % for a while \definefilesynonym [mml] [mathml] \definefilesynonym [cml] [chemml] diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index b48f7a39e..d0dc335c9 100644 --- a/tex/context/base/mkiv/cont-new.mkiv +++ b/tex/context/base/mkiv/cont-new.mkiv @@ -11,131 +11,13 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2018.02.21 18:19} +\newcontextversion{2018.02.23 22:11} %D This file is loaded at runtime, thereby providing an excellent place for %D hacks, patches, extensions and new features. -% \usemodule[newotf] -% \usemodule[oldotf] - \unprotect % \writestatus\m!system{beware: some patches loaded from cont-new.mkiv} -% \attribute152\zerocount : marks ... lots of sweeps so best early in list - -%D Maybe: - -% \appendtoks -% \inheritmaintextcolor -% \to \everybeforenoteinsert - -% \appendtoks -% \inheritmaintextcolor -% \to \everymargindatacontent - -% This is experimental; if this changes we need to adapt the mb-mp style too. It's -% not in the core yet. -% -% \def\ActionY{\blank\inleftmargin{\shownofparlines}} -% \def\ActionN{\inleftmargin{\shownofparlines}} -% -% \saveparnumber -% ... -% \checknofparlines -% \ifnum\nofparlines<2 -% \ActionY -% \else -% \ActionN -% \fi -% ... - -\newcount\c_typo_par_current -\newcount\c_typo_par_saved -\newcount\c_typo_par_lines -\newcount\c_typo_par_temp - -\appendtoks - \advance\c_typo_par_current\plusone % local - %\llap{\infofont[\the\c_typo_par_saved:\the\c_typo_par_current]\quad}% -\to \everypar - -\unexpanded\def\saveparnumber % the upcoming number - {\c_typo_par_saved\c_typo_par_current} % local - -\def\savedparnumber {\number\c_typo_par_saved} -\def\currentparnumber{\number\c_typo_par_current} -\def\nofparlines {\number\c_typo_par_lines} -\let\savedparstate \empty - -\unexpanded\def\shownofparlines - {\dontleavehmode\hbox\bgroup - \infofont[\savedparstate]% - \egroup} - -\unexpanded\def\checknofparlines - {\c_typo_par_temp\numexpr\c_typo_par_saved+\plusone\relax - \ifhmode - \c_typo_par_lines\zerocount - \edef\savedparstate{\number\c_typo_par_temp:\number\c_typo_par_current\space-}% - \else\ifnum\c_typo_par_current=\c_typo_par_temp - \c_typo_par_lines\prevgraf - \edef\savedparstate{\number\c_typo_par_temp:\number\c_typo_par_current\space\number\prevgraf}% - \else\ifnum\c_typo_par_temp>\c_typo_par_current - \c_typo_par_lines\zerocount - \edef\savedparstate{\number\c_typo_par_temp:\number\c_typo_par_current\space-}% - \else - \c_typo_par_lines\maxdimen - \edef\savedparstate{\number\c_typo_par_temp:\number\c_typo_par_current\space+}% - \fi\fi\fi} - -%D Maybe: - -\unexpanded\def\tightvbox{\dowithnextbox{\dp\nextbox\zeropoint\box\nextbox}\vbox} -\unexpanded\def\tightvtop{\dowithnextbox{\ht\nextbox\zeropoint\box\nextbox}\vtop} - -%D Needs some work: - -\unexpanded\def\startgridcorrection - {\dosingleempty\spac_grid_correction_start} - -\def\spac_grid_correction_start[#1]% - {\ifgridsnapping - \snaptogrid[#1]\vbox\bgroup - \else - \startbaselinecorrection - \fi} - -\unexpanded\def\stopgridcorrection - {\ifgridsnapping - \egroup - \else - \stopbaselinecorrection - \fi} - -\unexpanded\def\checkgridsnapping - {\lineskip\ifgridsnapping\zeropoint\else\normallineskip\fi} - -%D Probably obsolete: - -\unexpanded\def\startcolumnmakeup % don't change - {\bgroup - \getrawnoflines\textheight % raw as we cna have topskip - \setbox\scratchbox\vbox to \dimexpr\noflines\lineheight-\lineheight+\topskip\relax - \bgroup - \forgetall} - -\unexpanded\def\stopcolumnmakeup - {\egroup - \dp\scratchbox\zeropoint - \wd\scratchbox\textwidth - \box\scratchbox - \egroup - \page_otr_command_synchronize_hsize} - -%D Till we fixed all styles: - -\let\\=\crlf - \protect \endinput diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index 53ef6e71c..2f889f572 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -38,10 +38,11 @@ % \everypar{\writestatus{!!!!}{some spurious input in line \the\inputlineno}\wait} %D The order of loading will change when all modules have been cleaned -%D up and the dependencies are more consistent. +%D up and the dependencies are more consistent. beware, the version number +%D has to match \type {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2018.02.21 18:19} +\edef\contextversion{2018.02.23 22:11} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/mkiv/core-def.mkiv b/tex/context/base/mkiv/core-def.mkiv index 0e7cd2d2e..9dbb16f5c 100644 --- a/tex/context/base/mkiv/core-def.mkiv +++ b/tex/context/base/mkiv/core-def.mkiv @@ -167,4 +167,8 @@ % \setbreakpoints[compound] +%D Till we fixed all styles: + +\let\\=\crlf + \protect \endinput diff --git a/tex/context/base/mkiv/font-chk.lua b/tex/context/base/mkiv/font-chk.lua index b8533986f..3613432c1 100644 --- a/tex/context/base/mkiv/font-chk.lua +++ b/tex/context/base/mkiv/font-chk.lua @@ -85,8 +85,12 @@ local action = false -- to tfmdata.properties ? local function onetimemessage(font,char,message) -- char == false returns table - local tfmdata = fontdata[font] - local shared = tfmdata.shared + local tfmdata = fontdata[font] + local shared = tfmdata.shared + if not shared then + shared = { } + tfmdata.shared = shared + end local messages = shared.messages if not messages then messages = { } @@ -355,7 +359,7 @@ local function getmissing(id) local t = { } for id, d in next, fontdata do local shared = d.shared - local messages = shared.messages + local messages = shared and shared.messages if messages then local filename = d.properties.filename local tf = t[filename] or { } diff --git a/tex/context/base/mkiv/mult-ini.mkiv b/tex/context/base/mkiv/mult-ini.mkiv index 288d19271..d66749d14 100644 --- a/tex/context/base/mkiv/mult-ini.mkiv +++ b/tex/context/base/mkiv/mult-ini.mkiv @@ -11,9 +11,9 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -%D This module is a stripped down version of \type {mult-ini.tex}, -%D which we keep around as \type {mult-kep.tex} for sentimental -%D reasons. There you will find some more historic information. +%D This module is a stripped down version of \type {mult-ini.tex}, which we keep +%D around as \type {mult-kep.tex} for sentimental reasons. There you will find some +%D more historic information. \writestatus{loading}{ConTeXt Multilingual Macros / Initialization} @@ -25,13 +25,11 @@ %D [constanten,variabelen,commands] %D {v!,c!,k!,s!,e!,m!,l!,r!,f!,p!,x!,y!} %D -%D In the system modules we introduced some prefixed constants, -%D variables (both macros) and registers. Apart from a -%D tremendous saving in terms of memory and a gain in speed we -%D use from now on prefixes when possible for just another -%D reason: consistency and multi||linguality. Systematically -%D using prefixed macros enables us to implement a -%D multi||lingual user interface. Redefining these next set of +%D In the system modules we introduced some prefixed constants, variables (both +%D macros) and registers. Apart from a tremendous saving in terms of memory and a +%D gain in speed we use from now on prefixes when possible for just another reason: +%D consistency and multi||linguality. Systematically using prefixed macros enables +%D us to implement a multi||lingual user interface. Redefining these next set of %D prefixes therefore can have desastrous results. %D %D \startlinecorrection @@ -50,9 +48,9 @@ %D \stoptable %D \stoplinecorrection %D -%D In the single||lingual version we used \type{!}, \type{!!}, -%D \type{!!!} and \type{!!!!}. In the meantime some of these -%D are obsolete (we had some 12 originally). +%D In the single||lingual version we used \type {!}, \type {!!}, \type {!!!} and +%D \type {!!!!}. In the meantime some of these are obsolete (we had some 12 +%D originally). \def\c!prefix!{c!} \def\k!prefix!{k!} @@ -66,18 +64,16 @@ %D [constants,variables,commands] %D {@@,??} %D -%D Variables generated by the system can be recognized on their -%D prefix \type{@@}. They are composed of a command (class) -%D specific tag, which can be recognized on \type{??}, and a -%D system constant, which has the prefix \type{c!}. We'll se -%D some more of this. +%D Variables generated by the system can be recognized on their prefix \type {@@}. +%D They are composed of a command (class) specific tag, which can be recognized on +%D \type {??}, and a system constant, which has the prefix \type {c!}. We'll se some +%D more of this. \def\??prefix {??} \def\@@prefix {@@} -%D Just to be complete we repeat some of the already defined -%D system constants here. Maybe their prefix \type{\s!} now -%D falls into place. +%D Just to be complete we repeat some of the already defined system constants here. +%D Maybe their prefix \type {\s!} now falls into place. \def\s!next {next} \def\s!default {default} \def\s!dummy {dummy} \def\s!unknown {unknown} @@ -90,26 +86,24 @@ \def\s!true {true} \def\s!false {false} -%D The word \type{height} takes 6~token memory cells. The -%D control sequence \type{\height} on the other hand uses only -%D one. Knowing this, we can improve the performance of \TEX, -%D both is terms of speed and memory usage, by using control +%D The word \type {height} takes 6~token memory cells. The control sequence \type +%D {\height} on the other hand uses only one. Knowing this, we can improve the +%D performance of \TEX, both is terms of speed and memory usage, by using control %D sequences instead of the words written in full. %D -%D Where in the \ASCII\ file the second lines takes nine extra -%D characters, \TEX\ saves us 13~tokens. +%D Where in the \ASCII\ file the second lines takes nine extra characters, \TEX\ +%D saves us 13~tokens. %D %D \starttyping %D \hrule width 10pt height 2pt depth 1pt %D \hrule \s!width 10pt \s!height 2pt \s!depth 1pt %D \stoptyping %D -%D One condition is that we have defined \type {\s!height}, -%D \type {\s!width} and \type {\s!depth} as respectively -%D \type {height}, \type {width} and \type {depth}. Using this -%D scheme therefore only makes sense when a token sequence is -%D used more than once. Savings like this should of course be -%D implemented in english, just because \TEX\ is english. +%D One condition is that we have defined \type {\s!height}, \type {\s!width} and +%D \type {\s!depth} as respectively \type {height}, \type {width} and \type {depth}. +%D Using this scheme therefore only makes sense when a token sequence is used more +%D than once. Savings like this should of course be implemented in english, just +%D because \TEX\ is english. \def\s!width {width} \let\!!width \s!width % obsolete \def\s!height{height} \let\!!height\s!height % obsolete @@ -142,19 +136,16 @@ %D definemessageconstant, %D definefileconstant} %D -%D The first part of this module is dedicated to dealing with -%D multi||lingual constants and variables. When \CONTEXT\ grew -%D bigger and bigger in terms of bytes and used string space, -%D we switched to predefined constants. At the cost of more -%D hash table entries, the macros not only becase more compact, -%D they became much faster too. Maybe an even bigger advantage -%D was that mispelling could no longer lead to problems. Even a -%D multi||lingual interface became possible. +%D The first part of this module is dedicated to dealing with multi||lingual +%D constants and variables. When \CONTEXT\ grew bigger and bigger in terms of bytes +%D and used string space, we switched to predefined constants. At the cost of more +%D hash table entries, the macros not only becase more compact, they became much +%D faster too. Maybe an even bigger advantage was that mispelling could no longer +%D lead to problems. Even a multi||lingual interface became possible. %D -%D Constants --- we'll introduce the concept of variables later -%D on --- are preceded by a type specific prefix, followed by a -%D \type{!}. To force consistency, we provide a few commands -%D for defining such constants. +%D Constants |<|we'll introduce the concept of variables later on|>| are preceded by +%D a type specific prefix, followed by a \type {!}. To force consistency, we provide +%D a few commands for defining such constants. %D %D \starttyping %D \defineinterfaceconstant {name} {meaning} @@ -192,10 +183,9 @@ \unexpanded\def\definesystemconstant #1{\expandafter\def\csname\s!prefix!#1\endcsname{#1}} \unexpanded\def\definemessageconstant #1{\expandafter\def\csname\m!prefix!#1\endcsname{#1}} -%D In a parameter driven system, some parameters are shared -%D by more system components. In \CONTEXT\ we can distinguish -%D parameters by a unique prefix. Such a prefix is defined -%D with: +%D In a parameter driven system, some parameters are shared by more system +%D components. In \CONTEXT\ we can distinguish parameters by a unique prefix. Such a +%D prefix is defined with: %D %D \starttyping %D \definesystemvariable {name} @@ -209,16 +199,14 @@ %D {selectinterface, %D defaultinterface, currentinterface, currentresponses} %D -%D With \type{\selectinterface} we specify the language we are -%D going to use. The system asks for the language wanted, and -%D defaults to \type{\currentinterface} when we just give -%D \type{enter}. By default the message system uses the -%D current interface language, but \type{\currentresponses} -%D can specify another language too. +%D With \type {\selectinterface} we specify the language we are going to use. The +%D system asks for the language wanted, and defaults to \type {\currentinterface} +%D when we just give \type {enter}. By default the message system uses the current +%D interface language, but \type {\currentresponses} can specify another language +%D too. %D -%D Because we want to generate formats directly too, we do -%D not ask for interface specifications when these are already -%D defined (like in cont-nl.tex and alike). +%D Because we want to generate formats directly too, we do not ask for interface +%D specifications when these are already defined (like in cont-nl.tex and alike). \ifdefined\defaultinterface @@ -257,9 +245,8 @@ %D \macros %D {startinterface} %D -%D Sometimes we want to define things only for specific -%D interface languages. This can be done by means of the -%D selector: +%D Sometimes we want to define things only for specific interface languages. This +%D can be done by means of the selector: %D %D \starttyping %D \startinterface language @@ -273,24 +260,22 @@ {\doifnot{#1}{all}{\doifnotinset\currentinterface{#1}{\gobbleuntil\stopinterface}}} \let\stopinterface\relax - + %D \macros %D {startmessages, %D getmessage, %D showmessage, %D makemessage} %D -%D A package as large as \CONTEXT\ can hardly function without -%D a decent message mechanism. Due to its multi||lingual -%D interface, the message subsystem has to be multi||lingual -%D too. A major drawback of this feature is that we have to -%D code messages. As a result, the source becomes less self -%D documented. On the other hand, consistency will improve. +%D A package as large as \CONTEXT\ can hardly function without a decent message +%D mechanism. Due to its multi||lingual interface, the message subsystem has to be +%D multi||lingual too. A major drawback of this feature is that we have to code +%D messages. As a result, the source becomes less self documented. On the other +%D hand, consistency will improve. %D -%D Because the overhead in terms of entries in the (already -%D exhausted) hash table has to be minimal, messages are packed -%D in libraries. We can extract a message from such a library -%D in three ways: +%D Because the overhead in terms of entries in the (already exhausted) hash table +%D has to be minimal, messages are packed in libraries. We can extract a message +%D from such a library in three ways: %D %D \starttyping %D \getmessage {library} {tag} @@ -298,13 +283,11 @@ %D \makemessage {library} {tag} {data} %D \stoptyping %D -%D The first command gets the message \type{tag} from the -%D \type{library} specified. The other commands take an extra -%D argument: a list of items to be inserted in the message -%D text. While \type{\showmessage} shows the message at the -%D terminal, the other commands generate the message as text. -%D Before we explain the \type{data} argument, we give an -%D example of a library. +%D The first command gets the message \type {tag} from the \type {library} +%D specified. The other commands take an extra argument: a list of items to be +%D inserted in the message text. While \type {\showmessage} shows the message at the +%D terminal, the other commands generate the message as text. Before we explain the +%D \type {data} argument, we give an example of a library. %D %D \starttyping %D \startmessages english library: alfa @@ -332,12 +315,11 @@ %D something : second (and last) message to you %D \stoptyping %D -%D As we can see, the title entry is shown with the message. -%D The data fields are comma separated and are specified in the -%D message text by \type{--}. +%D As we can see, the title entry is shown with the message. The data fields are +%D comma separated and are specified in the message text by \type {--}. %D -%D It is not required to define all messages in a library at -%D once. We can add messages to a library in the following way: +%D It is not required to define all messages in a library at once. We can add +%D messages to a library in the following way: %D %D \starttyping %D \startmessages english library: alfa @@ -345,21 +327,17 @@ %D \stopmessages %D \stoptyping %D -%D Because such definitions can take place in different -%D modules, the system gives a warning when a tag occurs more -%D than once. The first occurrence takes preference over later -%D ones, so we had better use a save offset, as shown in the -%D example. As we can see, the title field is specified only -%D the first time! +%D Because such definitions can take place in different modules, the system gives a +%D warning when a tag occurs more than once. The first occurrence takes preference +%D over later ones, so we had better use a save offset, as shown in the example. As +%D we can see, the title field is specified only the first time! %D -%D Because we want to check for duplicate tags, the macros -%D are a bit more complicated than neccessary. The \NEWLINE\ -%D token is used as message separator. +%D Because we want to check for duplicate tags, the macros are a bit more +%D complicated than neccessary. The \NEWLINE\ token is used as message separator. +%D +%D For internal purposes one can use \type {\setmessagetext}, which puts the message +%D text asked for in \type {\currentmessagetext}. %D -%D For internal purposes one can use \type {\setmessagetext}, -%D which puts the message text asked for in \type -%D {\currentmessagetext}. - %D These will become obsolete: \unexpanded\def\startmessages #1 library: #2 % @@ -399,17 +377,16 @@ %D \macros %D {ifshowwarnings, ifshowmessages} %D -%D Sometimes displaying message can slow down processing -%D considerably. We therefore introduce warnings. Users can -%D turn of warnings and messages by saying: +%D Sometimes displaying message can slow down processing considerably. We therefore +%D introduce warnings. Users can turn of warnings and messages by saying: %D %D \starttyping %D \showwarningstrue %D \showmessagestrue %D \stoptyping %D -%D Turning off messages also turns off warnings, which is -%D quote logical because they are less important. +%D Turning off messages also turns off warnings, which is quote logical because they +%D are less important. % not yet mkiv @@ -435,13 +412,12 @@ %D \macros %D {dosetvalue,dosetevalue,dosetgvalue,dosetxvalue,docopyvalue,doresetvalue} % dogetvalue %D -%D We already defined these auxiliary macros in the system -%D modules. Starting with this module however, we have to take -%D multi||linguality a bit more serious. - -%D In due time, when we exclusively use the parameter handler code, we can drop -%D the backmapping (\type{\c!k...}) and make \type {\c!c...} similar to -%D \type {\v!...}. In that case we can simply the following setters. +%D We already defined these auxiliary macros in the system modules. Starting with +%D this module however, we have to take multi||linguality a bit more serious. +%D +%D In due time, when we exclusively use the parameter handler code, we can drop the +%D backmapping (\type{\c!k...}) and make \type {\c!c...} similar to \type {\v!...}. +%D In that case we can simply the following setters. \unexpanded\def\doletvalue #1#2{\expandafter\let \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname} \unexpanded\def\dosetvalue #1#2{\expandafter\def \csname#1\ifcsname\k!prefix!#2\endcsname\csname\k!prefix!#2\endcsname\else#2\fi\endcsname} @@ -476,16 +452,16 @@ \stopinterface -%D We can now redefine some messages that will be -%D introduced in the multi||lingual system module. +%D We can now redefine some messages that will be introduced in the multi||lingual +%D system module. \unexpanded\def\showassignerror #1#2{\showmessage\m!check1{#1,#2}\waitonfatalerror} \unexpanded\def\showargumenterror#1#2{\showmessage\m!check2{#1,#2}\waitonfatalerror} \unexpanded\def\showdefinederror #1#2{\showmessage\m!check3{#1,#2}\waitonfatalerror} -%D \CONTEXT\ is a parameter driven package. This means that -%D users instruct the system by means of variables, values and -%D keywords. These instructions take the form: +%D \CONTEXT\ is a parameter driven package. This means that users instruct the +%D system by means of variables, values and keywords. These instructions take the +%D form: %D %D \starttyping %D \setupsomething[some variable=some value, another one=a keyword] @@ -497,13 +473,11 @@ %D \dosomething[this way,that way,no way] %D \stoptyping %D -%D Because the same variables can occur in more than one setup -%D command, we have to be able to distinguish them. This is -%D achieved by assigning them a unique prefix. +%D Because the same variables can occur in more than one setup command, we have to +%D be able to distinguish them. This is achieved by assigning them a unique prefix. %D -%D Imagine a setup command for boxed text, that enables us to -%D specify the height and width of the box. Behide the scenes -%D the command +%D Imagine a setup command for boxed text, that enables us to specify the height and +%D width of the box. Behide the scenes the command %D %D \starttyping %D \setupbox [width=12cm, height=3cm] @@ -517,16 +491,16 @@ %D \stoptyping %D %D while a similar command for specifying the page dimensions -%D of an \cap{A4} page results in: +%D of an \cap {A4} page results in: %D %D \starttyping %D \ {21.0cm} %D \ {27.9cm} %D \stoptyping %D -%D The prefixes \type{} and \type{} are hidden from -%D users and can therefore be language independant. Variables -%D on the other hand, differ for each language: +%D The prefixes \type {} and \type {} are hidden from users and can +%D therefore be language independant. Variables on the other hand, differ for each +%D language: %D %D \starttyping %D \ {} @@ -534,28 +508,24 @@ %D \ {} %D \stoptyping %D -%D In this example we can see that the assigned values or -%D keywords are language dependant too. This will be a -%D complication when defining multi||lingual setup files. +%D In this example we can see that the assigned values or keywords are language +%D dependant too. This will be a complication when defining multi||lingual setup +%D files. %D -%D A third phenomena is that variables and values can have a -%D similar meaning. +%D A third phenomena is that variables and values can have a similar meaning. %D %D \starttyping %D \ {} %D \ {12cm} %D \stoptyping %D -%D A (minor) complication is that where in english we use -%D \type{}, in dutch we find both \type{} and -%D \type{}. This means that when we use some sort of -%D translation table, we have to distinguish between the -%D variables at the left side and the fixed values at the -%D right. +%D A (minor) complication is that where in english we use \type {}, in dutch +%D we find both \type {} and \type {}. This means that when we use +%D some sort of translation table, we have to distinguish between the variables at +%D the left side and the fixed values at the right. %D -%D The same goes for commands that are composed of different -%D user supplied and/or language specific elements. In english -%D we can use: +%D The same goes for commands that are composed of different user supplied and/or +%D language specific elements. In english we can use: %D %D \starttyping %D \
@@ -569,14 +539,13 @@ %D \ %D \stoptyping %D -%D These subtle differences automatically lead to a solution -%D where variables, values, elements and other components have -%D a similar logical name (used in macro's) but a different -%D meaning (supplied by the user). +%D These subtle differences automatically lead to a solution where variables, +%D values, elements and other components have a similar logical name (used in +%D macro's) but a different meaning (supplied by the user). %D -%D Our solution is one in which the whole system is programmed -%D in terms of identifiers with language specific meanings. In -%D such an implementation, each fixed variable is available as: +%D Our solution is one in which the whole system is programmed in terms of +%D identifiers with language specific meanings. In such an implementation, each +%D fixed variable is available as: %D %D \starttyping %D \ @@ -594,75 +563,66 @@ %D \def\boxwidth{12cm} %D \stoptyping %D -%D because we don't want to recode the source, a setup command -%D in another language has to expand to this variable, so: +%D because we don't want to recode the source, a setup command in another language +%D has to expand to this variable, so: %D %D \starttyping %D \setupblock[width=12cm] %D \stoptyping %D -%D has to result in the definition of \type{\boxwidth} too. -%D This method enables us to build compact, fast and readable -%D code. +%D has to result in the definition of \type {\boxwidth} too. This method enables us +%D to build compact, fast and readable code. %D -%D An alternative method, which we considered using, uses a -%D more indirect way. In this case, both calls generate a -%D different variable: +%D An alternative method, which we considered using, uses a more indirect way. In +%D this case, both calls generate a different variable: %D %D \starttyping %D \def\boxwidth {12cm} %D \def\boxbreedte {12cm} %D \stoptyping %D -%D And because we don't want to recode those megabytes of -%D already developed code, this variable has to be called with -%D something like: +%D And because we don't want to recode those megabytes of already developed code, +%D this variable has to be called with something like: %D %D \starttyping %D \valueof\box\width %D \stoptyping %D -%D where \type{\valueof} takes care of the translation of -%D \type{width} or \type{breedte} to \type{width} and -%D combining this with \type{box} to \type{\boxwidth}. +%D where \type {\valueof} takes care of the translation of \type {width} or \type +%D {breedte} to \type {width} and combining this with \type {box} to \type +%D {\boxwidth}. %D -%D One advantage of this other scheme is that, within certain -%D limits, we can implement an interface that can be switched -%D to another language at will, while the current approach -%D fixes the interface at startup. There are, by the way, -%D other reasons too for not choosing this scheme. Switching -%D user generated commands is for instance impossible and a -%D dual interface would therefore give a strange mix of -%D languages. +%D One advantage of this other scheme is that, within certain limits, we can +%D implement an interface that can be switched to another language at will, while +%D the current approach fixes the interface at startup. There are, by the way, other +%D reasons too for not choosing this scheme. Switching user generated commands is +%D for instance impossible and a dual interface would therefore give a strange mix +%D of languages. %D -%D Now let's work out the first scheme. Although the left hand -%D of the assignment is a variable from the users point of -%D view, it is a constant in terms of the system. Both -%D \type{width} and \type{breedte} expand to \type{width} -%D because in the source we only encounter \type{width}. Such -%D system constants are presented as +%D Now let's work out the first scheme. Although the left hand of the assignment is +%D a variable from the users point of view, it is a constant in terms of the system. +%D Both \type {width} and \type {breedte} expand to \type {width} because in the +%D source we only encounter \type {width}. Such system constants are presented as %D %D \starttyping %D \c!width %D \stoptyping %D -%D This constant is always equivalent to \type{width}. As we -%D can see, we use \type{c!} to mark this one as constant. Its -%D dutch counterpart is: +%D This constant is always equivalent to \type {width}. As we can see, we use \type +%D {c!} to mark this one as constant. Its dutch counterpart is: %D %D \starttyping %D breedte %D \stoptyping %D -%D When we interpret a setup command each variable is -%D translated to it's \type{c!} counterpart. This means that -%D \type{breedte} and \type{width} expand to \type{breedte} -%D and \type{\c!width} which both expand to \type{width}. That -%D way user variables become system constants. +%D When we interpret a setup command each variable is translated to it's \type{c!} +%D counterpart. This means that \type {breedte} and \type{width} expand to \type +%D {breedte} and \type {\c!width} which both expand to \type {width}. That way user +%D variables become system constants. %D -%D The interpretation is done by means of a general setup -%D command \type{\getparameters} that we introduced in the -%D system module. Let us define some simple setup command: +%D The interpretation is done by means of a general setup command \type +%D {\getparameters} that we introduced in the system module. Let us define some +%D simple setup command: %D %D \starttyping %D \unexpanded\def\setupbox[#1]% @@ -675,27 +635,25 @@ %D \setupbox [width=3cm, height=1cm] %D \stoptyping %D -%D Afterwards we have two variables \type{\@@bxwidth} and -%D \type{\@@bxheight} which have the values \type{3cm} and -%D \type{1cm} assigned. These variables are a combinatiom of -%D the setup prefix \type{\??bx}, which expands to \type{@@bx} -%D and the translated user supplied variables \type{width} and -%D \type{height} or \type{breedte} and \type{hoogte}, -%D depending on the actual language. In dutch we just say: +%D Afterwards we have two variables \type {\@@bxwidth} and \type {\@@bxheight} which +%D have the values \type {3cm} and \type {1cm} assigned. These variables are a +%D combinatiom of the setup prefix \type {\??bx}, which expands to \type {@@bx} and +%D the translated user supplied variables \type {width} and \type {height} or \type +%D {breedte} and \type {hoogte}, depending on the actual language. In dutch we just +%D say: %D %D \starttyping %D \stelblokin [breedte=3cm,hoogte=1cm] %D \stoptyping %D -%D and get ourselves \type{\@@bxwidth} and \type{\@@bxheight} -%D too. In the source of \CONTEXT, we can recognize constants -%D and variables on their leading \type{c!}, \type{v!} etc., -%D prefixes on \type{??} and composed variables on \type{@@}. +%D and get ourselves \type {\@@bxwidth} and \type {\@@bxheight} too. In the source +%D of \CONTEXT, we can recognize constants and variables on their leading \type +%D {c!}, \type {v!} etc., prefixes on \type {??} and composed variables on \type +%D {@@}. %D -%D We already saw that user supplied keywords need some -%D special treatment too. This time we don't translate the -%D keyword, but instead use in the source a variable which -%D meaning depends on the interface language. +%D We already saw that user supplied keywords need some special treatment too. This +%D time we don't translate the keyword, but instead use in the source a variable +%D which meaning depends on the interface language. %D %D \starttyping %D \v!left @@ -711,16 +669,14 @@ %D \v!right=>\dosomethingontheright] %D \stoptyping %D -%D Because variables like \type{\@@bxlocation} can have a lot -%D of meanings, including tricky expandable tokens, we cannot -%D translate this meaning when we compare. This means that -%D \type{\@@bxlocation} can be \type{left} of \type{links} of -%D whatever meaning suits the language. But because -%D \type{\v!left} also has a meaning that suits the language, -%D we are able to compare. +%D Because variables like \type {\@@bxlocation} can have a lot of meanings, +%D including tricky expandable tokens, we cannot translate this meaning when we +%D compare. This means that \type {\@@bxlocation} can be \type {left} of \type +%D {links} of whatever meaning suits the language. But because \type {\v!left} also +%D has a meaning that suits the language, we are able to compare. %D -%D Although we know it sounds confusing we want to state two -%D important characteristics of the interface as described: +%D Although we know it sounds confusing we want to state two important +%D characteristics of the interface as described: %D %D \startnarrower \em %D user variables become system constants @@ -731,11 +687,10 @@ %D \startnarrower \em %D user constants (keywords) become system variables %D \stopnarrower - -%D The \type {\c!internal} is a left over from the time that -%D the user interface documents were not using a specification -%D alongside a keyword specification but used a shared file in -%D which case we need to go in both directions. +%D +%D The \type {\c!internal} is a left over from the time that the user interface +%D documents were not using a specification alongside a keyword specification but +%D used a shared file in which case we need to go in both directions. % temporary mkiv hack (we can best just store the whole table in memory) @@ -750,10 +705,9 @@ %D \macros %D {defineinterfaceconstant} %D -%D Next we redefine a previously defined macro to take care of -%D interface translation too. It's a bit redundant, because -%D in these situations we could use the c||version, but for -%D documentation purposes the x||alternative comes in handy. +%D Next we redefine a previously defined macro to take care of interface translation +%D too. It's a bit redundant, because in these situations we could use the +%D c||version, but for documentation purposes the x||alternative comes in handy. \unexpanded\def\defineinterfaceconstant#1#2% {\expandafter\def\csname\c!prefix!#1\endcsname{#2}} @@ -761,16 +715,14 @@ %D \macros %D {startelements} %D -%D Due to the object oriented nature of \CONTEXT, we also need -%D to define the elements that are used to build commands. +%D Due to the object oriented nature of \CONTEXT, we also need to define the +%D elements that are used to build commands. %D -%D Such elements sometimes are the same in diferent -%D languages, but mostly they differ. Things can get even -%D confusing when we look at for instance the setup commands. -%D In english we say \type{\setup}, but in dutch we -%D have: \type{\stelin}. Such split elements are no -%D problem, because we just define two elements. When no second -%D part is needed, we use a \type{-}: +%D Such elements sometimes are the same in different languages, but mostly they +%D differ. Things can get even confusing when we look at for instance the setup +%D commands. In english we say \type{\setup}, but in dutch we have: \type +%D {\stelin}. Such split elements are no problem, because we just define two +%D elements. When no second part is needed, we use a \type {-}: \unexpanded\def\setinterfaceelement#1#2% {\clf_setinterfaceelement{#1}{#2}% @@ -820,15 +772,18 @@ \stopinterface -%D So much for the basic multi||lingual interface commands. The -%D macro's can be enhanced with more testing facilities, but -%D for the moment they suffice. +%D So much for the basic multi||lingual interface commands. The macro's can be +%D enhanced with more testing facilities, but for the moment they suffice. \ifdefined\zwnj \else \edef\zwnj{\directlua{utf.char(\number"200C)}} \fi % needed for cont-pe % maybe to char-utf.mkiv \ifdefined\zwj \else \edef\zwj {\directlua{utf.char(\number"200D)}} \fi % needed for cont-pe % maybe to char-utf.mkiv -%D Out of convenience we define the banners here. This might move -%D to the \LUA\ end. + +%D \macros +%D {contextversion, contextversionnumber, contextversionno, +%D contextbanner, showcontextbanner, formatversion} +%D +%D Out of convenience we define the banners here. This might move to the \LUA\ end. \def\contextbanner {ConTeXt \space @@ -837,28 +792,34 @@ int: \currentinterface/\currentresponses} \unexpanded\def\showcontextbanner - %{\writeline - % \writestring\contextbanner - % \writeline} {\writestatus\m!system\empty \writestatus\m!system\contextbanner \writestatus\m!system\empty} \edef\formatversion - {\the\normalyear .\the\normalmonth.\the\normalday} + {\the\normalyear.\the\normalmonth.\the\normalday} + +\newcount\contextversionno \ifx\contextversion\undefined - \def\contextversion {unknown} - \def\contextversionnumber{0} -\else - %\def\contextversionnumber#1.#2.#3 #4:#5\relax{#1\ifnum#2<10 0\fi#2\ifnum#3<10 0\fi#3 #4:#5} - \def\contextversionnumber#1.#2.#3 #4:#5\relax{#1\ifnum#2<10 0\fi\purenumber{#2}\ifnum#3<10 0\fi\purenumber{#3} #4:#5} - \edef\contextversionnumber{\expandafter\contextversionnumber\contextversion\relax\space\contextmark} + \edef\contextversion{\the\normalyear.\the\normalmonth.\the\normalday\space 00:00} \fi +% \def\contextversionnumber#1.#2.#3 #4:#5\relax{#1\ifnum#2<10 0\fi\purenumber{#2}\ifnum#3<10 0\fi\purenumber{#3} #4:#5} +% \edef\contextversionnumber{\expandafter\contextversionnumber\contextversion\relax\space\contextmark} + +\unexpanded\def \contextversionnumber #1.#2.#3 #4:#5\relax{#1#2#3} + \contextversionno \expandafter\contextversionnumber\contextversion\relax + \edef \contextversionnumber {\the\contextversionno\space\contextmark} + +%D \macros +%D {everydump} +%D +%D This one is only used when we generate the format. + \ifx\undefined\everydump - \newtoks\everydump - \def\dump{\the\everydump\normaldump} + \newtoks\everydump + \def\dump{\the\everydump\normaldump} \fi % \appendtoks \showcontextbanner \to \everydump diff --git a/tex/context/base/mkiv/page-ini.mkiv b/tex/context/base/mkiv/page-ini.mkiv index 5402bd71d..a2559481a 100644 --- a/tex/context/base/mkiv/page-ini.mkiv +++ b/tex/context/base/mkiv/page-ini.mkiv @@ -332,4 +332,13 @@ {\clf_forcestrutdepth\normalpagebox\strutdp\c_page_force_strut_depth_trace_mode \unvbox\normalpagebox} +% maybe better: +% +% \installoutputroutine\doforcestrutdepth +% {\clf_forcestrutdepth\normalpagebox\strutdp\c_page_force_strut_depth_trace_mode +% \unvbox\normalpagebox} +% +% \unexpanded\def\forcestrutdepth +% {\par\ifvmode\ifinner\else\doforcestrutdepth\fi\fi} + \protect \endinput diff --git a/tex/context/base/mkiv/page-mak.mkvi b/tex/context/base/mkiv/page-mak.mkvi index bbb7cc148..d64000542 100644 --- a/tex/context/base/mkiv/page-mak.mkvi +++ b/tex/context/base/mkiv/page-mak.mkvi @@ -201,6 +201,23 @@ \emptyhbox \page} +%D Probably obsolete (but used in one manual by Taco): + +\unexpanded\def\startcolumnmakeup % don't change + {\bgroup + \getrawnoflines\textheight % raw as we can have topskip + \setbox\scratchbox\vbox to \dimexpr\noflines\lineheight-\lineheight+\topskip\relax + \bgroup + \forgetall} + +\unexpanded\def\stopcolumnmakeup + {\egroup + \dp\scratchbox\zeropoint + \wd\scratchbox\textwidth + \box\scratchbox + \egroup + \page_otr_command_synchronize_hsize} + %D The text surrounding the main body text can be influenced %D by setting their associated status variables. The %D connection between them is made by the following macro diff --git a/tex/context/base/mkiv/page-sid.mkiv b/tex/context/base/mkiv/page-sid.mkiv index a777efa32..5742ce8c4 100644 --- a/tex/context/base/mkiv/page-sid.mkiv +++ b/tex/context/base/mkiv/page-sid.mkiv @@ -29,7 +29,8 @@ %D This code had been redone many times because we kept running into spacing issues %D and it's not that much fun (or rewarding). It's probably the module that made %D me go into distraciton mode most often (like watching amusing Walk of The -%D Earth or sophisticated Massive Attack video clips). +%D Earth, sophisticated Massive Attack video clips, impressive Davie504 movies +%D and so on). \newdimen \d_page_sides_height % includes the topskip \newdimen \d_page_sides_width @@ -692,6 +693,7 @@ \advance\scratchdimentwo -.5\strutdp \or % verytolerant + % \advance\scratchdimenone -\onepoint (maybe) \else \advance\scratchdimentwo -\strutdp \fi diff --git a/tex/context/base/mkiv/spac-grd.mkiv b/tex/context/base/mkiv/spac-grd.mkiv index 66e582879..73c6e0dd1 100644 --- a/tex/context/base/mkiv/spac-grd.mkiv +++ b/tex/context/base/mkiv/spac-grd.mkiv @@ -323,13 +323,13 @@ % \fi % \endgroup} -\unexpanded\def\fakenextstrutline - {\par - \begingroup - \reseteverypar - \forgetall - \dontleavehmode\hpack{\strut}\par - \clf_removelastline - \endgroup} +% \unexpanded\def\fakenextstrutline +% {\par +% \begingroup +% \reseteverypar +% \forgetall +% \dontleavehmode\hpack{\strut}\par +% \clf_removelastline +% \endgroup} \protect \endinput diff --git a/tex/context/base/mkiv/spac-ver.lua b/tex/context/base/mkiv/spac-ver.lua index aee61adf9..3d263dafd 100644 --- a/tex/context/base/mkiv/spac-ver.lua +++ b/tex/context/base/mkiv/spac-ver.lua @@ -171,6 +171,7 @@ local new_rule = nodepool.rule local nodecodes = nodes.nodecodes local skipcodes = nodes.skipcodes +local penaltycodes = nodes.penaltycodes local penalty_code = nodecodes.penalty local kern_code = nodecodes.kern @@ -180,16 +181,19 @@ local hlist_code = nodecodes.hlist local vlist_code = nodecodes.vlist local localpar_code = nodecodes.localpar -local userskip_code = skipcodes.userskip -local lineskip_code = skipcodes.lineskip -local baselineskip_code = skipcodes.baselineskip -local parskip_code = skipcodes.parskip +local linebreak_code = penaltycodes.linebreakpenalty + +local userskip_code = skipcodes.userskip +local lineskip_code = skipcodes.lineskip +local baselineskip_code = skipcodes.baselineskip +local parskip_code = skipcodes.parskip +local topskip_code = skipcodes.topskip +local splittopskip_code = skipcodes.splittopskip + local abovedisplayskip_code = skipcodes.abovedisplayskip local belowdisplayskip_code = skipcodes.belowdisplayskip local abovedisplayshortskip_code = skipcodes.abovedisplayshortskip local belowdisplayshortskip_code = skipcodes.belowdisplayshortskip -local topskip_code = skipcodes.topskip -local splittopskip_code = skipcodes.splittopskip local vspacing = builders.vspacing or { } builders.vspacing = vspacing @@ -1249,8 +1253,6 @@ end -- topskip -- splittopskip -local experiment = true directives.register("vspacing.experiment",function(v) experiment = v end) - local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also pass tail if trace then reset_tracing(head) @@ -1558,7 +1560,7 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also glue_order, glue_data = 0, nil elseif sc == disable or sc == enable then local next = getnext(current) - if not experiment or next then + if next then ignore_following = sc == disable if trace then trace_skip(sc == disable and "disable" or "enable",sc,so,sp,current) @@ -1569,7 +1571,7 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also end elseif sc == together then local next = getnext(current) - if not experiment or next then + if next then keep_together = true if trace then trace_skip("together",sc,so,sp,current) @@ -1580,7 +1582,7 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also end elseif sc == nowhite then local next = getnext(current) - if not experiment or next then + if next then ignore_whitespace = true head, current = remove_node(head, current, true) else @@ -2015,34 +2017,108 @@ end do - local outer = texnest[0] - local reset = true - local trace = false - local report = logs.reporter("vspacing") - - directives.register("vspacing.resetprevdepth",function(v) reset = v end) - trackers.register ("vspacing.resetprevdepth",function(v) trace = v end) + local outer = texnest[0] + local enabled = true + local count = true + local trace = false + local report = logs.reporter("vspacing") + + trackers.register("vspacing.synchronizepage",function(v) + trace = v + end) + + directives.register("vspacing.synchronizepage",function(v) + if v == true or v == "count" then + enabled = true + count = true + elseif v == "first" then + enabled = true + count = false + else + enabled = false + count = false + end + end) + + -- hm, check the old one + + -- function vspacing.synchronizepage() + -- if enabled then + -- local head = texlists.hold_head + -- local skip = 0 + -- while head and head.id == insert_code do + -- head = head.next + -- skip = skip + 1 + -- end + -- if head then + -- outer.prevdepth = 0 + -- end + -- if trace then + -- report("prevdepth %s at page %i, skipped %i, value %p", + -- head and "reset" or "kept",texgetcount("realpageno"),skip,outer.prevdepth) + -- end + -- end + -- end - -- use getid and getnext + local ignoredepth = -65536000 - function vspacing.resetprevdepth() - if reset then - local head = texlists.hold_head + function vspacing.synchronizepage() + if enabled then + local newdepth = outer.prevdepth + local olddepth = newdepth + local oldlines = outer.prevgraf + local newlines = 0 + local boxfound = false + local head = texlists.contrib_head if head then - head = tonut(head) - local skip = 0 - while head and getid(head) == insert_code do - head = getnext(head) - skip = skip + 1 - end - if head then - outer.prevdepth = 0 - end - if trace then - report("prevdepth %s at page %i, skipped %i, value %p", - head and "reset" or "kept",texgetcount("realpageno"),skip,outer.prevdepth) + local tail = find_node_tail(tonut(head)) + while tail do + local id = getid(tail) + if id == hlist_code then + if not boxfound then + newdepth = getdepth(tail) + boxfound = true + end + newlines = newlines + 1 + if not count then + break + end + elseif id == vlist_code then + if not boxfound then + newdepth = getdepth(tail) + boxfound = true + end + break + elseif id == glue_code then + local subtype = getsubtype(tail) + if not (subtype == baselineskip_code or subtype == lineskip_code) then + break + elseif boxfound and not count then + break + end + elseif id == penalty_code then + if boxfound and not count then + break + end + else + -- ins, mark, kern, rule, boundary, whatsit + break + end + tail = getprev(tail) end end + if boxfound then + -- what if newdepth ... + else + texset("prevdepth",ignoredepth) + outer.prevdepth = ignoredepth + end + texset("prevgraf", newlines) + outer.prevgraf = newlines + if trace then + report("page %i, prevdepth %p (last depth %p), prevgraf %i (from %i), %sboxes", + texgetcount("realpageno"),olddepth,newdepth,oldlines,newlines,boxfound and "" or "no ") + end end end @@ -2050,27 +2126,6 @@ do trackers.register("vspacing.forcestrutdepth",function(v) trace = v end) --- function vspacing.forcestrutdepth(n,depth,trace_mode) --- local box = texgetbox(n) --- if box then --- box = tonut(box) --- local dp = getdepth(box) --- if dp < depth then --- local head = getlist(box) --- if head then --- local tail = find_node_tail(head) --- if tail and getid(tail) == hlist_code then --- setdepth(tail,depth) --- outer.prevdepth = depth --- if trace or trace_mode > 0 then --- nuts.setvisual(tail,"depth") --- end --- end --- end --- end --- end --- end - function vspacing.forcestrutdepth(n,depth,trace_mode) local box = texgetbox(n) if box then @@ -2106,8 +2161,8 @@ do } implement { - name = "resetprevdepth", - actions = vspacing.resetprevdepth, + name = "synchronizepage", + actions = vspacing.synchronizepage, scope = "private" } @@ -2160,20 +2215,20 @@ do arguments = { "string", "string" } } - local remove_node = nodes.remove - local find_node_tail = nodes.tail - - interfaces.implement { - name = "fakenextstrutline", - actions = function() - local head = texlists.page_head - if head then - local head = remove_node(head,find_node_tail(head),true) - texlists.page_head = head - buildpage() - end - end - } + -- local remove_node = nodes.remove + -- local find_node_tail = nodes.tail + -- + -- interfaces.implement { + -- name = "fakenextstrutline", + -- actions = function() + -- local head = texlists.page_head + -- if head then + -- local head = remove_node(head,find_node_tail(head),true) + -- texlists.page_head = head + -- buildpage() + -- end + -- end + -- } interfaces.implement { name = "removelastline", diff --git a/tex/context/base/mkiv/spac-ver.mkiv b/tex/context/base/mkiv/spac-ver.mkiv index 0927758c2..98e46fa39 100644 --- a/tex/context/base/mkiv/spac-ver.mkiv +++ b/tex/context/base/mkiv/spac-ver.mkiv @@ -527,7 +527,6 @@ \unexpanded\def\spac_lines_start_correction[#1]% {\edef\m_spac_lines_around{#1}% - % todo: play with \fakenextstrutline \spac_lines_action_around \d_spac_prevdepth\prevdepth \spac_lines_initialize_corrections @@ -1309,7 +1308,7 @@ \let\normaloffinterlineskip\offinterlineskip % knuth's original \appendtoks - \ifvmode\clf_resetprevdepth\fi % a nasty hack (tested for a while now) + \ifvmode\clf_synchronizepage\fi % a nasty hack (tested for a while now) \to \everyafteroutput %D My own one: @@ -2505,22 +2504,6 @@ \prevdepth\zeropoint -% not ok, so we need to figure out another way to fix this messy prevdepth-across-page issue -% as encountered in forced blank skips (see lua code) -% -% \appendtoks -% \ifvmode\clf_resetprevdepth\fi -% \to \everyafteroutput -% -% this should only happen when there is nothing left over (how to detemine that) .. testcase: -% -% \dorecurse{41}{line\par} -% \starttyping -% line 1 -% line 2 -% line 3 -% \stoptyping - %D Helper: \unexpanded\def\checkedblank[#1]% diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf index b5d8fd91c..ea587d3a0 100644 Binary files a/tex/context/base/mkiv/status-files.pdf and b/tex/context/base/mkiv/status-files.pdf differ diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf index 01bfb9e13..d8c1b019b 100644 Binary files a/tex/context/base/mkiv/status-lua.pdf and b/tex/context/base/mkiv/status-lua.pdf differ diff --git a/tex/context/base/mkiv/strc-mat.mkiv b/tex/context/base/mkiv/strc-mat.mkiv index c6b277991..775d2aca1 100644 --- a/tex/context/base/mkiv/strc-mat.mkiv +++ b/tex/context/base/mkiv/strc-mat.mkiv @@ -566,7 +566,7 @@ \newconstant\c_strc_math_vertical % experiment \c_strc_formulas_mode \plustwo % 0=native 1=simple (old) 2=align (new) -\c_strc_formulas_space_model\plusthree % replaces \plusone +\c_strc_formulas_space_model\plusthree % replaces \plusone, we might use \plusfour in the future \newconditional\c_strc_formulas_tight @@ -641,33 +641,6 @@ \directvspacing\p_spaceafter \fi} -% \def\strc_math_obey_depth -% {\ifvmode\ifdim\prevdepth<\zeropoint\else\ifdim\prevdepth<\strutdp -% % maybe add a tracing option here -% \ifgridsnapping -% \directvspacing\v!depth -% \else -% \kern\dimexpr\strutdp-\prevdepth\relax -% \prevdepth\strutdp -% \fi -% \fi\fi\fi} -% -% \setvalue{\??mathdisplayspacemodel\v!before:3}% -% {% not ok, try \stopformula\par\startformula vs \stopformula\startformula -% \ifdim\lastskip>\zeropoint -% % bah -% \else -% \strc_math_obey_depth % somehow \fakenextstrutline doesn't work here -% \nointerlineskip -% \fi -% \ifx\p_spacebefore\v!none -% % nothing -% \else\ifx\p_spacebefore\empty -% \directvspacing\currentvspacing -% \else -% \directvspacing\p_spacebefore -% \fi\fi} - \setvalue{\??mathdisplayspacemodel\v!before:3}% {% not ok, try \stopformula\par\startformula vs \stopformula\startformula \let\m_spacebefore\empty @@ -714,6 +687,49 @@ \directvspacing\p_spaceafter \fi\fi} +\newconditional\c_math_model_four_indeed + +\setvalue{\??mathdisplayspacemodel\v!before:4}% + {% not ok, try \stopformula\par\startformula vs \stopformula\startformula + \ifvmode + \ifinner + \csname\??mathdisplayspacemodel\v!before:3\endcsname + \else + \settrue\c_math_model_four_indeed + \forcestrutdepth + \nointerlineskip + \ifx\p_spacebefore\v!none + % nothing + \else\ifx\p_spacebefore\empty + \directvspacing\currentvspacing + \else + \directvspacing{\p_spacebefore,\the\scratchdimen}% + \fi\fi + \fi + \else + \csname\??mathdisplayspacemodel\v!before:3\endcsname + \fi} + +\setvalue{\??mathdisplayspacemodel\v!after:4}% + {\ifconditional\c_math_model_four_indeed + \setfalse\c_math_model_four_indeed + \forcestrutdepth + \else + \prevdepth\strutdp % \directvspacing\v!depth + \fi + \ifx\p_spaceafter\v!none + % nothing + \else\ifx\p_spaceafter\empty + \directvspacing\currentvspacing + \else + \directvspacing\p_spaceafter + \fi\fi} + +\unexpanded\def\setdisplaymathspacemodel[#1]% + {\ifcsname\??mathdisplayspacemodel\v!before:\number#1\endcsname + \c_strc_formulas_space_model#1\relax + \fi} + % \newtoks\everybeforedisplay % \appendtoks\page_sides_check_floats_indeed\to\everybeforedisplay @@ -785,6 +801,9 @@ {\d_strc_formulas_display_skip_left \zeropoint \d_strc_formulas_display_skip_right\zeropoint} +\setvalue{\??formulaoption\v!depth}% + {\c_strc_formulas_space_model\plusfour} + \setvalue{\??formulaoption\v!line}% {\ifgridsnapping \setformulaparameter\c!grid{\v!math:\v!line}% diff --git a/tex/context/base/mkiv/supp-box.mkiv b/tex/context/base/mkiv/supp-box.mkiv index 1e85d3421..d187518fe 100644 --- a/tex/context/base/mkiv/supp-box.mkiv +++ b/tex/context/base/mkiv/supp-box.mkiv @@ -2969,6 +2969,11 @@ \unexpanded\def\lastlinewidth{\dimexpr\clf_lastlinelength\scaledpoint\relax} +%D Keep as reference: + +% \unexpanded\def\tightvbox{\dowithnextbox{\dp\nextbox\zeropoint\box\nextbox}\vbox} +% \unexpanded\def\tightvtop{\dowithnextbox{\ht\nextbox\zeropoint\box\nextbox}\vtop} + \protect \endinput % a bit of test code: diff --git a/tex/context/base/mkiv/tabl-ntb.mkiv b/tex/context/base/mkiv/tabl-ntb.mkiv index b74694c02..9acf2ef36 100644 --- a/tex/context/base/mkiv/tabl-ntb.mkiv +++ b/tex/context/base/mkiv/tabl-ntb.mkiv @@ -331,6 +331,20 @@ \def\tabl_ntb_col_doif #1#2{\ifcsname\??naturaltablecol\m_tabl_tbl_level:\number#1:\number#2\endcsname\expandafter\firstofoneargument \else\expandafter\gobbleoneargument \fi} \def\tabl_ntb_col_doifnot #1#2{\ifcsname\??naturaltablecol\m_tabl_tbl_level:\number#1:\number#2\endcsname\expandafter\gobbleoneargument \else\expandafter\firstofoneargument \fi} +%D If we ever run into memory issues we can do: +% +% \def\tabl_ntb_let_tag#1#2#3% +% {\ifx#3\c_tabl_ntb_none\else +% \expandafter\let\csname\??naturaltabletag\m_tabl_tbl_level:\number#1:\number#2\endcsname#3% +% \fi} +% +% \def\tabl_ntb_get_tag#1#2% +% {\ifcsname\??naturaltabletag\m_tabl_tbl_level:\number#1:\number#2\endcsname +% \lastnamedcs +% \else +% \c_tabl_ntb_none +% \fi} + % not used % % \def\tabl_ntb_tag_state#1#2{\ifcsname\??naturaltabletag\m_tabl_tbl_level:\number#1:\number#2\endcsname\zerocount\else\plusone\fi} @@ -1493,18 +1507,18 @@ \def\tabl_ntb_table_get_max_width {\scratchdimen\wd\scratchbox\relax} -% first needs testing (in projects), see cont-loc for final version: -% -% \def\tabl_ntb_table_get_max_width_step -% {\advance\scratchdimen\tabl_ntb_get_wid\fastloopindex -% \advance\scratchdimen\tabl_ntb_get_dis\fastloopindex} -% -% \def\tabl_ntb_table_get_max_width -% {\scratchdimen\zeropoint -% \dofastloopcs\c_tabl_ntb_maximum_col\tabl_ntb_table_get_max_width_step -% \ifdim\scratchdimen<\wd\scratchbox\relax -% \scratchdimen\wd\scratchbox\relax -% \fi} +% enable dper 2018-02-22 + +\def\tabl_ntb_table_get_max_width_step + {\advance\scratchdimen\tabl_ntb_get_wid\fastloopindex + \advance\scratchdimen\tabl_ntb_get_dis\fastloopindex} + +\def\tabl_ntb_table_get_max_width + {\scratchdimen\zeropoint + \dofastloopcs\c_tabl_ntb_maximum_col\tabl_ntb_table_get_max_width_step + \ifdim\scratchdimen<\wd\scratchbox\relax + \scratchdimen\wd\scratchbox\relax + \fi} \def\tabl_ntb_table_stop {\forgetall % new, here see narrower-004.tex diff --git a/tex/context/base/mkiv/trac-vis.lua b/tex/context/base/mkiv/trac-vis.lua index 839d78b0c..0e37752db 100644 --- a/tex/context/base/mkiv/trac-vis.lua +++ b/tex/context/base/mkiv/trac-vis.lua @@ -668,16 +668,14 @@ end local ruleddepth do - ruleddepth = function(current) - local depth = getdepth(current) - if depth ~= 0 then - local width = getwidth(current) - local rule = new_rule(width,0,depth) - local kern = new_kern(-width) + ruleddepth = function(current,wd,ht,dp) + local wd, ht, dp = getwhd(current) + if dp ~= 0 then + local rule = new_rule(wd,0,dp) setcolor(rule,c_depth) settransparency(rule,c_zero) setattr(rule,a_layer,l_depth) - setlist(current,new_hlist(setlink(rule,kern,getlist(current)))) + setlist(current,setlink(rule,new_kern(-wd),getlist(current))) end end @@ -712,7 +710,7 @@ local ruledbox do setboth(current) local linewidth = emwidth/fraction local size = 2*linewidth - local baseline, baseskip + -- local baseline, baseskip -- if dp ~= 0 and ht ~= 0 then -- if wd > 20*linewidth then -- local targetsize = wd - size @@ -859,11 +857,11 @@ local ruledglyph do local prev = previous setboth(current) local linewidth = emwidth/(2*fraction) - local baseline local info -- -- original -- + -- local baseline -- if (dp >= 0 and ht >= 0) or (dp <= 0 and ht <= 0) then -- baseline = new_rule(wd-2*linewidth,linewidth,0) -- end diff --git a/tex/context/base/mkiv/typo-del.mkiv b/tex/context/base/mkiv/typo-del.mkiv index 33688b9d3..d12be6bcf 100644 --- a/tex/context/base/mkiv/typo-del.mkiv +++ b/tex/context/base/mkiv/typo-del.mkiv @@ -140,7 +140,7 @@ % \def\beforesubsentence{\removeunwantedspaces} % \def\aftersubsentence {\ignorespaces} -\newconditional\c_typo_subsentence_cleanup % \settrue\c_typo_subsentence_cleanup +\newconditional\c_typo_subsentence_cleanup \settrue\c_typo_subsentence_cleanup \def\typo_subsentence_cleanup_start {\ifconditional\c_typo_subsentence_cleanup diff --git a/tex/context/interface/mkii/keys-pe.xml b/tex/context/interface/mkii/keys-pe.xml index 58f26400d..486c8f530 100644 --- a/tex/context/interface/mkii/keys-pe.xml +++ b/tex/context/interface/mkii/keys-pe.xml @@ -1168,6 +1168,7 @@ + diff --git a/tex/context/interface/mkiv/context-en.xml b/tex/context/interface/mkiv/context-en.xml index 08d28f944..84101f798 100644 --- a/tex/context/interface/mkiv/context-en.xml +++ b/tex/context/interface/mkiv/context-en.xml @@ -13032,6 +13032,7 @@ + @@ -13146,6 +13147,7 @@ + @@ -13167,6 +13169,7 @@ + @@ -13183,6 +13186,7 @@ + @@ -13221,6 +13225,7 @@ + diff --git a/tex/context/interface/mkiv/i-common-value.xml b/tex/context/interface/mkiv/i-common-value.xml index 81b672e7b..c362779c4 100644 --- a/tex/context/interface/mkiv/i-common-value.xml +++ b/tex/context/interface/mkiv/i-common-value.xml @@ -587,6 +587,7 @@ + @@ -682,4 +683,4 @@ - \ No newline at end of file + diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf index f1f8d70ea..320425cce 100644 Binary files a/tex/context/interface/mkiv/i-context.pdf and b/tex/context/interface/mkiv/i-context.pdf differ diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf index bbbe01dac..be59353a2 100644 Binary files a/tex/context/interface/mkiv/i-readme.pdf and b/tex/context/interface/mkiv/i-readme.pdf differ diff --git a/tex/context/modules/common/s-abbreviations-extras.tex b/tex/context/modules/common/s-abbreviations-extras.tex new file mode 100644 index 000000000..7ee6e1553 --- /dev/null +++ b/tex/context/modules/common/s-abbreviations-extras.tex @@ -0,0 +1,56 @@ +%D \module +%D [ file=s-abbrevations-extras.tex, % was: s-abr-01 +%D version=1996.01.01, +%D title=\CONTEXT\ Style File, +%D subtitle=General Abbreviated Extras, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\startmodule[abbreviations-extras] + +\def\SystemSpecialA#1{$\langle\it#1\rangle$} +\def\SystemSpecialB#1{{\tttf<#1>}} + +\unexpanded\def\CATCODE {\SystemSpecialA{catcode}} +\unexpanded\def\CATCODES {\SystemSpecialA{catcodes}} +\unexpanded\def\DIMENSION {\SystemSpecialA{dimension}} +\unexpanded\def\DIMENSIONS {\SystemSpecialA{dimensions}} +\unexpanded\def\COUNTER {\SystemSpecialA{counter}} +\unexpanded\def\COUNTERS {\SystemSpecialA{counters}} +\unexpanded\def\HBOX {\SystemSpecialA{hbox}} +\unexpanded\def\HBOXES {\SystemSpecialA{hboxes}} +\unexpanded\def\VBOX {\SystemSpecialA{vbox}} +\unexpanded\def\VBOXES {\SystemSpecialA{vboxes}} +\unexpanded\def\BOX {\SystemSpecialA{box}} +\unexpanded\def\BOXES {\SystemSpecialA{boxes}} +\unexpanded\def\TOKENLIST {\SystemSpecialA{token list}} +\unexpanded\def\TOKENLISTS {\SystemSpecialA{token lists}} +\unexpanded\def\NEWLINE {\SystemSpecialA{newline}} +\unexpanded\def\SKIP {\SystemSpecialA{skip}} +\unexpanded\def\SKIPS {\SystemSpecialA{skips}} +\unexpanded\def\MUSKIP {\SystemSpecialA{muskip}} +\unexpanded\def\MUSKIPS {\SystemSpecialA{muskips}} +\unexpanded\def\MARK {\SystemSpecialA{mark}} +\unexpanded\def\MARKS {\SystemSpecialA{marks}} + +\unexpanded\def\SPACE {\SystemSpecialB{space}} +\unexpanded\def\EOF {\SystemSpecialB{eof}} +\unexpanded\def\TAB {\SystemSpecialB{tab}} +\unexpanded\def\NEWPAGE {\SystemSpecialB{newpage}} +\unexpanded\def\NEWLINE {\SystemSpecialB{newline}} + +\unexpanded\def\LUWATEEKH {لُواتيخ} % kh ī t ā w [u] l +\unexpanded\def\luwateekh {luwātīkh} + +\doifmodeelse {mkiv} { + \unexpanded\def\THANH{H\agrave n Th\ecircumflexacute\ Th\agrave nh} +} { + \unexpanded\def\THANH{H\`an Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh} +} + +\stopmodule diff --git a/tex/context/modules/common/s-abr-01.tex b/tex/context/modules/common/s-abr-01.tex deleted file mode 100644 index b36ae7a0d..000000000 --- a/tex/context/modules/common/s-abr-01.tex +++ /dev/null @@ -1,386 +0,0 @@ -%D \module -%D [ file=s-abr-01, -%D version=1996.01.01, -%D title=\CONTEXT\ Style File, -%D subtitle=General Abbreviations 1, -%D author=Hans Hagen, -%D date=\currentdate, -%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] -%C -%C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. - -\unprotect - -\setupsorting[logo][\c!style=\v!capital] - -\setupcapitals[\c!title=\v!no] - -\protect - -\logo [MKI] {MkI} % joke -\logo [MKII] {MkII} -\logo [MKIII] {MkIII} % joke -\logo [MKIV] {MkIV} -\logo [MKVI] {MkVI} -\logo [MKIX] {MkIX} -\logo [MKXI] {MkXI} -\logo [MKIC] {MkIC} -\logo [MKCI] {MkCI} -\logo [MPII] {MpII} -\logo [MPIV] {MpIV} - -%logo [FGA] {fga} -%logo [FGBBS] {fgbbs} -\logo [AI] {ai} -\logo [ACROBAT] {Acro\-bat} -\logo [APA] {apa} -\logo [AFM] {afm} -\logo [API] {api} -\logo [ALEPH] {Aleph} % {\mathematics{\aleph}} -\logo [ALGOL] {ALGOL} -\logo [AMS] {ams} -\logo [AMSLATEX] {\AmSLaTeX} -\logo [AMSTEX] {\AmSTeX} -\logo [ANSI] {ansi} -\logo [ARABTEX] {Arab\TeXsuffix} -\logo [ASCII] {ascii} -\logo [ASCIITEX] {ascii\TeXsuffix} -\logo [ASCIIMATH] {AsciiMath} -\logo [BACHOTEX] {Bacho\TeXsuffix} -\logo [BIBTEX] {bib\TeXsuffix} -\logo [MLBIBTEX] {MLbib\TeXsuffix} -\logo [BLUESKY] {BlueSky} -\logo [BMP] {bmp} -\logo [BSD] {bsd} -\logo [CCODE] {C} -\logo [CPLUSPLUS] {C\high{++}} -\logo [CALCMATH] {CalcMath} -\logo [CLD] {cld} -\logo [CD] {cd} -\logo [CPU] {cpu} -\logo [CDROM] {cdrom} -\logo [CID] {cid} -\logo [CJK] {cjk} -\logo [CMR] {cmr} -\logo [CNC] {cnc} -\logo [CLD] {cld} -\logo [CMYK] {cmyk} -\logo [CODHOST] {CodHost} -\logo [CONTEXT] {\ConTeXt} -\logo [CONTEXTWIKI] {\ConTeXt\ Wiki} -\logo [CONTEXTGROUP] {\ConTeXt\ Group} -\logo [CSS] {css} -\logo [CTAN] {ctan} -\logo [CTXTOOLS] {ctxtools} -\logo [CWEB] {cweb} -\logo [CSTUG] {cstug} -\logo [DAC] {dac} -\logo [DANTE] {Dante} -\logo [DECTEN] {dec-10} -\logo [DNA] {dna} -\logo [DISTILLER] {distiller} -\logo [DPI] {dpi} -\logo [DRATEX] {Dra\TeXsuffix} -\logo [DSC] {dsc} -\logo [DTD] {dtd} -\logo [DTK] {dtk} -\logo [DTP] {dtp} -\logo [DVD] {dvd} -\logo [DVI] {dvi} -\logo [DVIPDFM] {dvipdfm} -\logo [DVIPDFMX] {dvipdfmx} -\logo [DVIPOS] {dvipos} -\logo [DVIPS] {dvips} -\logo [DVIPSONE] {dvipsone} -\logo [DVISCR] {dviscr} -\logo [DVIWINDO] {dviwindo} -\logo [EBCDIC] {ebcdic} -\logo [EC] {ec} -\logo [EIFFEL] {Eiffel} -\logo [EMACS] {emacs} -\logo [EMTEX] {em\TeXsuffix} -\logo [ENCODING] {enc} -\logo [ENCTEX] {enc\TeXsuffix} -\logo [EPUB] {ePub} -\logo [EPS] {eps} -\logo [ETEX] {\eTeX} -\logo [EUROBACHOTEX] {EuroBacho\TeXsuffix} -\logo [EUROMATH] {EuroMath} -\logo [EUROTEX] {Euro\TeXsuffix} -\logo [EXAMPLE] {eXaMpLe} -\logo [EXAMPLED] {exampled} -\logo [EXAMPLEQ] {exampleq} -\logo [EXAMPLER] {exampler} -\logo [EXAMPLET] {examplet} -\logo [EXAMPLEX] {examplex} -\logo [EXIMPLE] {eXiMpLe} -\logo [FLAC] {flac} -\logo [FAQ] {faq} -\logo [FDF] {fdf} -\logo [FFI] {ffi} -\logo [FONTFORGE] {FontForge} -\logo [FOXET] {foXet} -\logo [FPTEX] {fp\TeXsuffix} -\logo [FREEBSD] {FreeBSD} -\logo [FTP] {ftp} -\logo [GHOSTSCRIPT] {Ghost\-script} -\logo [GHOSTVIEW] {Ghost\-view} -\logo [GIF] {gif} -\logo [GNU] {gnu} -\logo [GNUPLOT] {gnuplot} -\logo [GS] {Ghost\-Script} -\logo [GUST] {Gust} -\logo [GCC] {gcc} -\logo [GWTEX] {gw\TeXsuffix} -\logo [HSB] {hsb} % ? -\logo [HSV] {hsv} -\logo [HTML] {html} -\logo [HTTP] {http} -\logo [HZ] {hz} -\logo [IBM] {ibm} -\logo [IMAGEMAGICK] {ImageMagick} -\logo [INITEX] {ini\TeXsuffix} -\logo [INRSTEX] {inrs\TeXsuffix} -\logo [IO] {io} -\logo [IRCNET] {IRCnet} -\logo [ISO] {iso} -\logo [JAVA] {Java} -\logo [JAVASCRIPT] {Java\-Script} -\logo [JPEG] {jpeg} -\logo [JPG] {jpg} -\logo [JBIG] {jbig} -\logo [JSON] {json} -\logo [KPATHSEA] {kpathsea} -\logo [KPSE] {kpse} -\logo [KVM] {kvm} -\logo [KPSEWHICH] {kpsewhich} -\logo [MKTEXLSR] {mktexlsr} -\logo [MYSQL] {MySQL} -\logo [LAMSTEX] {\LamSTeX} -\logo [LATEX] {\LaTeX} -\logo [LATEXTE] {\LaTeX2e} -\logo [LATEXTN] {\LaTeX2.09} -\logo [LCD] {lcd} -\logo [LINUX] {linux} -\logo [LISP] {Lisp} -\logo [LPEG] {lpeg} -\logo [LUA] {Lua} -\logo [LUAJIT] {LuaJIT} -\logo [LUAJITTEX] {Luajit\TeXsuffix} -\logo [LUATEX] {Lua\TeXsuffix} -\logo [LUATOOLS] {luatools} -\logo [LMX] {lmx} -\logo [MACOSX] {MacOSX} -\logo [MACROTEX] {Macro\TeXsuffix} -\logo [MAKEMPY] {MakeMPY} -\logo [MAPPING] {map} -\logo [MAPS] {Maps} -\logo [MATHML] {MathML} -\logo [METAFONT] {\MetaFont} -\logo [METAPOST] {\MetaPost} -\logo [METATEX] {Meta\TeXsuffix} -\logo [MIKTEX] {Mik\TeXsuffix} -\logo [MINGW] {MingW} -\logo [MLTEX] {ml\TeXsuffix} -\logo [METATYPE] {MetaType1} -\logo [MODULA] {Modula} -\logo [MOV] {mov} -\logo [MPEG] {mpeg} -\logo [MPS] {mps} -\logo [MPTOPDF] {mptopdf} -\logo [MPLIB] {mplib} -\logo [MSDOS] {msdos} -\logo [MICROSOFT] {Microsoft} -\logo [MSWINDOWS] {MS~Windows} -\logo [MSWORD] {MS~Word} -\logo [MTXRUN] {mtxrun} -\logo [MTXTOOLS] {mtxtools} -\logo [NETPBM] {NetPBM} -\logo [NTG] {ntg} -\logo [NTS] {nts} -\logo [OFM] {ofm} -\logo [OMEGA] {Omega} -\logo [OPENMATH] {OpenMath} -\logo [OPENTYPE] {OpenType} -\logo [OPI] {opi} -\logo [OTEX] {Oriental \TeXsuffix} -\logo [OTF] {otf} -\logo [OTP] {otp} -\logo [OVF] {ovf} -\logo [PASCAL] {Pascal} -\logo [PCTEX] {pc\TeXsuffix} -\logo [PFA] {pfa} -\logo [PFB] {pfb} -\logo [PDF] {pdf} -\logo [PDFETEX] {pdfe\TeXsuffix} -\logo [PDFTEX] {pdf\TeXsuffix} -\logo [PDFTOOLS] {pdftools} -\logo [PDFTOPS] {pdftops} -\logo [PERL] {Perl} -\logo [PERLTK] {Perl/Tk} -\logo [PICTEX] {\PiCTeX} -\logo [PK] {pk} -\logo [PLAIN] {Plain} -\logo [PNG] {png} -\logo [POSIX] {posix} -\logo [POSTSCRIPT] {Post\-Script} -\logo [PPCHTEX] {\PPCHTeX} -\logo [PRAGMA] {Pragma ADE} -\logo [PRESS] {press} -\logo [PRIFIL] {prifil} -\logo [PS] {Post\-Script} -\logo [PSCHECK] {pscheck} -\logo [PSTOEDIT] {pstoedit} -\logo [PSTOPAGE] {pstopage} -\logo [PSTOPDF] {pstopdf} -\logo [PSTRICKS] {pstricks} -\logo [RAID] {raid} -\logo [RAM] {ram} -\logo [RCA] {RCA} -\logo [READER] {Acro\-bat Reader} -\logo [RELAXNG] {Relax\kern.125emNG} -\logo [RGB] {rgb} -\logo [RLXTOOLS] {rlxtools} -\logo [RUBY] {Ruby} -\logo [SCITE] {SciTE} -\logo [SGML] {sgml} -\logo [SI] {si} -\logo [SQL] {sql} -\logo [SSD] {ssd} -\logo [SVG] {svg} -\logo [STIX] {Stix} -\logo [SUMATRAPDF] {SumatraPDF} -\logo [SYNCTEX] {Sync\TeX} -\logo [SWIG] {swig} -\logo [SWIGLIB] {SwigLib} -\logo [TABLE] {\TaBlE} -\logo [TCPIP] {tcp/ip} -\logo [TDS] {tds} % no sc te -\logo [TEI] {tei} % no sc te -\logo [TETEX] {te\TeXsuffix} % no sc te -\logo [TEX] {\TeX} -\logo [TEXADRES] {\TeXprefix adress} -\logo [TEXBASE] {\TeXprefix base} -\logo [TEXEDIT] {\TeXprefix edit} -\logo [TEXEXEC] {\TeXprefix exec} -\logo [TEXFONT] {\TeXprefix font} -\logo [TEXFORM] {\TeXprefix form} -\logo [TEXLIVE] {\TeXprefix Live} -\logo [TEXLUA] {\TeXprefix Lua} -\logo [TEXMF] {texmf} -\logo [TEXMFSTART] {texmfstart} -\logo [TEXNL] {tex-nl} -\logo [TEXSHOW] {\TeXprefix show} -\logo [TEXSPELL] {\TeXprefix spell} -\logo [TEXGYRE] {\TeX\ Gyre} -\logo [TEXSYNC] {texsync} -\logo [TEXTMATE] {TextMate} -\logo [TEXTOOLS] {\TeXprefix tools} -\logo [TEXUTIL] {\TeXprefix util} -\logo [TEXWORK] {\TeXprefix work} -\logo [TEXWORKS] {\TeXprefix works} -\logo [TEXXET] {\TeX\XeT} \def\XeT{XeT} -\logo [TFM] {tfm} -\logo [THREED] {3D} -\logo [TIF] {tif} -\logo [TIFF] {tiff} -\logo [TIFFINFO] {tiffinfo} -\logo [TIFFTAGS] {tifftags} -\logo [TMFTOOLS] {tmftools} -\logo [TPIC] {tpic} -\logo [TPM] {tpm} -\logo [TRUETYPE] {TrueType} -\logo [TTC] {ttc} -\logo [TTF] {ttf} -\logo [TUG] {tug} -\logo [TUGBOAT] {Tug\-Boat} -\logo [TUGNEWS] {Tug\-News} -\logo [TYPEONE] {Type1} -\logo [UCS] {ucs} -\logo [UNICODE] {Uni\-code} -\logo [UNIX] {Unix} -\logo [URI] {uri} -\logo [URL] {url} -\logo [USA] {usa} -\logo [USENET] {usenet} -\logo [UTF] {utf} -\logo [USB] {usb} -\logo [VF] {vf} -\logo [WDT] {wdt} -\logo [WEB] {web} -\logo [WEBC] {web2c} -\logo [WIKI] {Wiki} -\logo [WINDOWS] {Windows} -\logo [WINNT] {WinNT} -\logo [WINNX] {Win9x} -\logo [WWW] {www} -\logo [WTHREEC] {W3C} -\logo [WYSIWYG] {wysiwyg} -\logo [XDVI] {Xdvi} -\logo [XETEX] {\XeTeX} -\logo [XFDF] {xfdf} -\logo [XHTML] {xhtml} -\logo [XINDY] {Xindy} -\logo [XITS] {Xits} -\logo [XML] {xml} -\logo [XPATH] {xpath} -\logo [XMLTOOLS] {xmltools} -\logo [XPDFETEX] {xpdfe\TeXsuffix} -\logo [XSL] {xsl} -\logo [XSLFO] {xsl-fo} -\logo [XSLT] {xslt} -\logo [XSLTPROC] {xsltproc} -\logo [XYPIC] {XYPIC} % wrong logo -\logo [VAX] {vax} -\logo [VMWARE] {VMWare} -\logo [YOUTUBE] {YouTube} -\logo [YandY] {y\&y} -\logo [ZIP] {zip} - -\def\METAFUN {\MetaFun} - -\logo [METAFUN] {\MetaFun} - -\def\SystemSpecialA#1{$\langle\it#1\rangle$} -\def\SystemSpecialB#1{{\tttf<#1>}} - -\unexpanded\def\CATCODE {\SystemSpecialA{catcode}} -\unexpanded\def\CATCODES {\SystemSpecialA{catcodes}} -\unexpanded\def\DIMENSION {\SystemSpecialA{dimension}} -\unexpanded\def\DIMENSIONS {\SystemSpecialA{dimensions}} -\unexpanded\def\COUNTER {\SystemSpecialA{counter}} -\unexpanded\def\COUNTERS {\SystemSpecialA{counters}} -\unexpanded\def\HBOX {\SystemSpecialA{hbox}} -\unexpanded\def\HBOXES {\SystemSpecialA{hboxes}} -\unexpanded\def\VBOX {\SystemSpecialA{vbox}} -\unexpanded\def\VBOXES {\SystemSpecialA{vboxes}} -\unexpanded\def\BOX {\SystemSpecialA{box}} -\unexpanded\def\BOXES {\SystemSpecialA{boxes}} -\unexpanded\def\TOKENLIST {\SystemSpecialA{token list}} -\unexpanded\def\TOKENLISTS {\SystemSpecialA{token lists}} -\unexpanded\def\NEWLINE {\SystemSpecialA{newline}} -\unexpanded\def\SKIP {\SystemSpecialA{skip}} -\unexpanded\def\SKIPS {\SystemSpecialA{skips}} -\unexpanded\def\MUSKIP {\SystemSpecialA{muskip}} -\unexpanded\def\MUSKIPS {\SystemSpecialA{muskips}} -\unexpanded\def\MARK {\SystemSpecialA{mark}} -\unexpanded\def\MARKS {\SystemSpecialA{marks}} - -\unexpanded\def\SPACE {\SystemSpecialB{space}} -\unexpanded\def\EOF {\SystemSpecialB{eof}} -\unexpanded\def\TAB {\SystemSpecialB{tab}} -\unexpanded\def\NEWPAGE {\SystemSpecialB{newpage}} -\unexpanded\def\NEWLINE {\SystemSpecialB{newline}} - -\unexpanded\def\LUWATEEKH {لُواتيخ} % kh ī t ā w [u] l -\unexpanded\def\luwateekh {luwātīkh} - -\doifmodeelse {mkiv} { - \unexpanded\def\THANH{H\agrave n Th\ecircumflexacute\ Th\agrave nh} -} { - \unexpanded\def\THANH{H\`an Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh} -} - -\endinput diff --git a/tex/context/modules/common/s-abr-02.tex b/tex/context/modules/common/s-abr-02.tex deleted file mode 100644 index 8bb6a2898..000000000 --- a/tex/context/modules/common/s-abr-02.tex +++ /dev/null @@ -1,22 +0,0 @@ -%D \module -%D [ file=s-abr-02, -%D version=1996.01.01, -%D title=\CONTEXT\ Style File, -%D subtitle=General Abbreviations 2, -%D author=Hans Hagen, -%D date=\currentdate, -%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] -%C -%C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. - -\usemodule[abr-01] - -\unprotect - -\setupsorting[logo][\c!style=\v!smallcaps] - -\setupcapitals[\c!title=\v!no] - -\protect \endinput diff --git a/tex/context/modules/common/s-abr-03.tex b/tex/context/modules/common/s-abr-03.tex deleted file mode 100644 index 8247b68a9..000000000 --- a/tex/context/modules/common/s-abr-03.tex +++ /dev/null @@ -1,22 +0,0 @@ -%D \module -%D [ file=s-abr-03, -%D version=1998.08.10, -%D title=\CONTEXT\ Style File, -%D subtitle=General Abbreviations 3, -%D author=Hans Hagen, -%D date=\currentdate, -%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] -%C -%C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. - -\usemodule[abr-01] - -\unprotect - -\setupsorting[logo][\c!style=\v!WORD] - -\protect - -\endinput diff --git a/tex/context/modules/common/s-abr-04.tex b/tex/context/modules/common/s-abr-04.tex deleted file mode 100644 index 23940b526..000000000 --- a/tex/context/modules/common/s-abr-04.tex +++ /dev/null @@ -1,24 +0,0 @@ -%D \module -%D [ file=s-abr-04, -%D version=1996.01.01, -%D title=\CONTEXT\ Style File, -%D subtitle=General Abbreviations 2, -%D author=Hans Hagen, -%D date=\currentdate, -%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] -%C -%C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. - -\usemodule[abr-01] - -\unprotect - -% \definealternativestyle [\v!mixed] [\font_style_pseudoMixedCapped] [\font_style_pseudoMixedCapped] - -\setupsorting[logo][\c!style=\font_style_pseudoMixedCapped] - -% \setupcapitals[\c!title=\v!no] - -\protect \endinput diff --git a/tex/context/modules/mkii/s-abr-01.mkii b/tex/context/modules/mkii/s-abr-01.mkii new file mode 100644 index 000000000..6e147a701 --- /dev/null +++ b/tex/context/modules/mkii/s-abr-01.mkii @@ -0,0 +1,30 @@ +%D \module +%D [ file=s-abr-01, +%D version=1996.01.01, +%D title=\CONTEXT\ Style File, +%D subtitle=General Abbreviations 1, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\unprotect + +\setupsorting + [logo] + [\c!style=\v!capital] + +\setupcapitals + [\c!title=\v!no] + +\protect + +\startmodule[abr-01] + +\usemodule[abbreviations-logos] +\usemodule[abbreviations-extras] + +\stopmodule diff --git a/tex/context/modules/mkii/s-abr-02.mkii b/tex/context/modules/mkii/s-abr-02.mkii new file mode 100644 index 000000000..bf3265073 --- /dev/null +++ b/tex/context/modules/mkii/s-abr-02.mkii @@ -0,0 +1,31 @@ +%D \module +%D [ file=s-abr-02, +%D version=1996.01.01, +%D title=\CONTEXT\ Style File, +%D subtitle=General Abbreviations 2, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\unprotect + +\setupsorting + [logo] + [\c!style=\v!smallcaps] + +\setupcapitals + [\c!title=\v!no] + +\protect + +\startmodule[abr-02] + +\usemodule[abbreviations-logos] +\usemodule[abbreviations-extras] + +\stopmodule + diff --git a/tex/context/modules/mkiv/m-compatible.mkiv b/tex/context/modules/mkiv/m-compatible.mkiv new file mode 100644 index 000000000..0e056180a --- /dev/null +++ b/tex/context/modules/mkiv/m-compatible.mkiv @@ -0,0 +1,63 @@ +%D \module +%D [ file=m-compatibility, +%D version=2018.02.21, +%D title=\CONTEXT\ System Macros, +%D subtitle=ConTeXt Compatibility Layer, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D I fear that I will not keep up in this file so feel free to contribute to the +%D following. The idea is nto to load this file but more to have some insight in +%D how to control compatibility (to some extent). + +\writestatus{loading}{ConTeXt Compatibility Layer} + +%D The side float mechanism has been redone and is not space compatible. Hopefully +%D it will become stable soon and after that we will not touch it unless we have a +%D real bug. There might be more control options. The problem is that there are too +%D many combinations of content before and after a side float possible. + +\ifnum\contextversionno<20180101\relax + % nothing here +\fi + +%D Picking up the right last line depth is sort of tricky when we cross a page and +%D have some left|-|over material. The sychronizer is normally not needed but for +%D now turned on by default. + +\ifnum\contextversionno<20180221\relax + \disabledirectives[vspacing.synchronizepage] +\fi + +%D Some day we might default to the following which is a bit more conistent but +%D not compatible. + +% \setdisplaymathspacemodel[4] +% +% \ifnum\contextversionno<20180221\relax +% \setdisplaymathspacemodel[3] +% \fi + +%D Currently this is in \type {cont-loc.mkiv} but some day we might do: + +% \definemixedcolumns +% [\v!columns] +% % compatible with columns default : +% [\c!balance=\v!yes, +% \c!blank={\v!line,\v!fixed}] +% +% \unexpanded\def\setupcolumns +% {\setupmixedcolumns[\v!columns]} + +%D as well as: + +% \input page-cst.mkiv + + + +\endinput diff --git a/tex/context/modules/mkiv/m-typesetting.mkiv b/tex/context/modules/mkiv/m-typesetting.mkiv index 56cf85bbe..4456778ff 100644 --- a/tex/context/modules/mkiv/m-typesetting.mkiv +++ b/tex/context/modules/mkiv/m-typesetting.mkiv @@ -99,6 +99,28 @@ \stoplinecorrection \stoptexdefinition +\starttexdefinition unexpanded FourPairs #1 + \startlinecorrection[blank] + \startcombination[fourpages][2*2] + {\typesetfile[#1.tex][page=1,width=\measure{firstpages}]} {1} + {\WhenValidPage{2}{\typesetfile[#1.tex][page=2,width=\measure{firstpages}]}} {\WhenValidPage{2}{2}} + {\WhenValidPage{3}{\typesetfile[#1.tex][page=3,width=\measure{firstpages}]}} {\WhenValidPage{3}{3}} + {\WhenValidPage{4}{\typesetfile[#1.tex][page=4,width=\measure{firstpages}]}} {\WhenValidPage{4}{4}} + \stopcombination + \stoplinecorrection +\stoptexdefinition + +% \starttexdefinition unexpanded FourPagesTwo #1#2 +% \startlinecorrection[blank] +% \startcombination[fourpages][4*1] +% {\typesetfile[#1.tex][page=1,width=\measure{fourpages}]} {1} +% {\WhenValidPage{2}{\typesetfile[#1.tex][page=2,width=\measure{fourpages}]}} {\WhenValidPage{2}{2}} +% {\typesetfile[#2.tex][page=1,width=\measure{fourpages}]} {1} +% {\WhenValidPage{2}{\typesetfile[#2.tex][page=2,width=\measure{fourpages}]}} {\WhenValidPage{2}{2}} +% \stopcombination +% \stoplinecorrection +% \stoptexdefinition + \starttexdefinition unexpanded FourSpread #1 \startlinecorrection[blank] \startcombination[fourpages][4*1] diff --git a/tex/context/modules/mkiv/s-abbreviations-mixed.mkiv b/tex/context/modules/mkiv/s-abbreviations-mixed.mkiv new file mode 100644 index 000000000..f7b2121d0 --- /dev/null +++ b/tex/context/modules/mkiv/s-abbreviations-mixed.mkiv @@ -0,0 +1,28 @@ +%D \module +%D [ file= s-abbreviations-mixed, % was: s-abr-04 +%D version=1996.01.01, +%D title=\CONTEXT\ Style File, +%D subtitle=General Abbreviations Mixed, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\unprotect + +\setupsorting + [logo] + [\c!style=\font_style_pseudoMixedCapped] + +\protect + +\startmodule[abbreviations-mixed] + +\usemodule[abbreviations-logos] +\usemodule[abbreviations-extras] + +\stopmodule + diff --git a/tex/context/modules/mkiv/s-abbreviations-pseudocaps.mkiv b/tex/context/modules/mkiv/s-abbreviations-pseudocaps.mkiv new file mode 100644 index 000000000..fa8606a7b --- /dev/null +++ b/tex/context/modules/mkiv/s-abbreviations-pseudocaps.mkiv @@ -0,0 +1,30 @@ +%D \module +%D [ file= s-abbreviations-pseudocaps, % was: s-abr-01 +%D version=1996.01.01, +%D title=\CONTEXT\ Style File, +%D subtitle=General Abbreviations Pseudocaps, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\unprotect + +\setupsorting + [logo] + [\c!style=\v!capital] + +\setupcapitals + [\c!title=\v!no] + +\protect + +\startmodule[abbreviations-pseudocaps] + +\usemodule[abbreviations-logos] +\usemodule[abbreviations-extras] + +\stopmodule diff --git a/tex/context/modules/mkiv/s-abbreviations-smallcaps.mkiv b/tex/context/modules/mkiv/s-abbreviations-smallcaps.mkiv new file mode 100644 index 000000000..2ce86ca33 --- /dev/null +++ b/tex/context/modules/mkiv/s-abbreviations-smallcaps.mkiv @@ -0,0 +1,31 @@ +%D \module +%D [ file= s-abbreviations-smallcaps, % was: s-abr-02 +%D version=1996.01.01, +%D title=\CONTEXT\ Style File, +%D subtitle=General Abbreviations Smallcaps, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\unprotect + +\setupsorting + [logo] + [\c!style=\v!smallcaps] + +\setupcapitals + [\c!title=\v!no] + +\protect + +\startmodule[abbreviations-smallcaps] + +\usemodule[abbreviations-logos] +\usemodule[abbreviations-extras] + +\stopmodule + diff --git a/tex/context/modules/mkiv/s-abbreviations-words.mkiv b/tex/context/modules/mkiv/s-abbreviations-words.mkiv new file mode 100644 index 000000000..2b7d7cedc --- /dev/null +++ b/tex/context/modules/mkiv/s-abbreviations-words.mkiv @@ -0,0 +1,28 @@ +%D \module +%D [ file= s-abbreviations-words, % was: s-abr-32 +%D version=1998.08.10, +%D title=\CONTEXT\ Style File, +%D subtitle=General Abbreviations Words, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\unprotect + +\setupsorting + [logo] + [\c!style=\v!WORD] + +\protect + +\startmodule[abbreviations-words] + +\usemodule[abbreviations-logos] +\usemodule[abbreviations-extras] + +\stopmodule + diff --git a/tex/context/modules/mkiv/s-art-01.mkiv b/tex/context/modules/mkiv/s-art-01.mkiv deleted file mode 100644 index 601ee1adc..000000000 --- a/tex/context/modules/mkiv/s-art-01.mkiv +++ /dev/null @@ -1,62 +0,0 @@ -\unprotect - -\startmodule[art-01] - -\definemeasure [article:margin] [\paperheight/20] % was 15, see xtables-mkiv for results -\definemeasure [overview:margin] [\paperheight/30] - -\definelayout - [article] - [\c!topspace=\measure{article:margin}, - \c!bottomspace=\measure{article:margin}, - \c!backspace=\measure{article:margin}, - \c!header=\measure{article:margin}, - \c!footer=0pt, - \c!width=\v!middle, - \c!height=\v!middle] - - -\definelayout - [overview] - [\c!topspace=\measure{overview:margin}, - \c!bottomspace=\measure{overview:margin}, - \c!backspace=\measure{overview:margin}, - \c!header=\measure{overview:margin}, - \c!footer=0pt, - \c!width=\v!middle, - \c!height=\v!middle] - -\setuplayout - [article] - -\setupbodyfont - [dejavu,10pt] % 12pt is just to large and we use this for all kind of demos - -\setupwhitespace - [\v!big] - -\setuphead - [\v!chapter] - [\c!style=\bfc, - \c!headerstate=\v!high, - \c!interaction=\v!all] - -\setuphead - [\v!section] - [\c!style=\bfb] - -\setuphead - [\v!subsection] - [\c!style=\bfa] - -\setuphead - [\v!subsubsection] - [\c!style=\bf, - \c!after=] - -\setuplist - [\c!interaction=\v!all] - -\protect - -\stopmodule diff --git a/tex/context/modules/mkiv/s-article-basic.mkiv b/tex/context/modules/mkiv/s-article-basic.mkiv new file mode 100644 index 000000000..69a577961 --- /dev/null +++ b/tex/context/modules/mkiv/s-article-basic.mkiv @@ -0,0 +1,75 @@ +%D \module +%D [ file=s-article-basic, +%D version=2010.01.01, % long ago, just for me +%D title=\CONTEXT\ Style File, +%D subtitle=Article Basic Setup, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\startmodule[article-basic] + +\unprotect + +\definemeasure [article:margin] [\paperheight/20] % was 15, see xtables-mkiv for results +\definemeasure [overview:margin] [\paperheight/30] + +\definelayout + [article] + [\c!topspace=\measure{article:margin}, + \c!bottomspace=\measure{article:margin}, + \c!backspace=\measure{article:margin}, + \c!header=\measure{article:margin}, + \c!footer=0pt, + \c!width=\v!middle, + \c!height=\v!middle] + + +\definelayout + [overview] + [\c!topspace=\measure{overview:margin}, + \c!bottomspace=\measure{overview:margin}, + \c!backspace=\measure{overview:margin}, + \c!header=\measure{overview:margin}, + \c!footer=0pt, + \c!width=\v!middle, + \c!height=\v!middle] + +\setuplayout + [article] + +\setupbodyfont + [dejavu,10pt] % 12pt is just to large and we use this for all kind of demos + +\setupwhitespace + [\v!big] + +\setuphead + [\v!chapter] + [\c!style=\bfc, + \c!headerstate=\v!high, + \c!interaction=\v!all] + +\setuphead + [\v!section] + [\c!style=\bfb] + +\setuphead + [\v!subsection] + [\c!style=\bfa] + +\setuphead + [\v!subsubsection] + [\c!style=\bf, + \c!after=] + +\setuplist + [\c!interaction=\v!all] + +\protect + +\stopmodule diff --git a/tex/context/modules/mkiv/s-fonts-kerns.mkiv b/tex/context/modules/mkiv/s-fonts-kerns.mkiv new file mode 100644 index 000000000..c3a5637c3 --- /dev/null +++ b/tex/context/modules/mkiv/s-fonts-kerns.mkiv @@ -0,0 +1,215 @@ +%D \module +%D [ file=s-fonts-kerns, +%D version=2018.02.20, % was s-fnt-40 (given the kin dof code < 2010) +%D title=\CONTEXT\ Style File, +%D subtitle=Show Fonts Kerns, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D This is real old code but we keep it around for educational purposes. it's +%D not that efficient and we have better ways. +%D +%D \starttyping +%D \showfontkerns +%D \stoptyping +%D +%D This one shows all kerns so it's s bit different and as we use it in the +%D manual \unknown + +\startluacode + + local nodecodes = nodes.nodecodes + + local disc_code = nodecodes.disc + local kern_code = nodecodes.kern + local glyph_code = nodecodes.glyph + local hlist_code = nodecodes.hlist + + -- local function flatten(l) + -- while l do + -- local id = l.id + -- if id == disc_code then + -- local r = l.replace + -- if r then + -- local p = l.prev + -- local n = l.next + -- if n and p and n.id == glyph_code and p.id == glyph_code then + -- local s = node.slide(r) + -- p.next = r + -- n.prev = s + -- r.prev = p + -- s.next= n + -- l.replace = nil + -- node.free(l) + -- end + -- end + -- elseif id == hlist_code then + -- flatten(l.list) + -- end + -- l = l.next + -- end + -- end + + local function mark(l,c) + while l do + local id = l.id + if id == kern_code then + context.showkern(l.kern,c) + elseif id == disc_code then + mark(l.pre,2) + mark(l.post,3) + mark(l.replace,4) + elseif id == hlist_code then + mark(l.list,c) + end + l = l.next + end + end + + local function collect(l) + local m = { } + while l do + local id = l.id + if id == hlist_code then + m[#m+1] = l + end + l = l.next + end + return m + end + + local function inject(l,m,i) + local x = l + i = i or 0 + while l do + local id = l.id + if id == kern_code then + i = i + 1 + node.insert_before(x,l,node.copy(m[i])) + elseif id == disc_code then + i = inject(l.pre,m,i) + i = inject(l.post,m,i) + i = inject(l.replace,m,i) + elseif id == hlist_code then + i = inject(l.list,m,i) + end + l = l.next + end + return i + end + + moduledata.fonts = moduledata.fonts or { } + moduledata.fonts.kerns = moduledata.fonts.kerns or { } + + function moduledata.fonts.kerns._show_(n) + inject(tex.box[n].list,collect(tex.box[6].list)) + end + + function moduledata.fonts.kerns.show(n) + context("\\bgroup") + context("\\setbox6\\vbox\\bgroup\\forgetall") + -- flatten(tex.box[n].list) + mark(tex.box[n].list,1) + context("\\egroup") + context("\\ctxlua{moduledata.fonts.kerns._show_('%s')}",n) + context("\\egroup") + end + +\stopluacode + +\setupcolors[state=start] + +\definefont[VerySmall][Mono at 4pt] + +\definecolor[kern:0][s=.5] +\definecolor[kern:1][b=.5] +\definecolor[kern:2][r=.5] +\definecolor[kern:3][g=.5] +\definecolor[kern:4][r=.5,g=.5] + +\def\showkernwidthfactor{1} + +\newconditional\showkernstate +\settrue \showexplicitkerns + +\unexpanded\def\showkern#1#2% + {\begingroup + \dontcomplain + \setbox\scratchbox\hbox to \zeropoint \bgroup + \ifcase#2\or + \ifconditional\showkernstate + \color[kern:0]{\dovlwdhtdp\showkernwidthfactor{0.75}{0.5}}% + \global\setfalse\showkernstate + \raise.8\strutht + \else + \color[kern:0]{\dovlwdhtdp\showkernwidthfactor{1.05}{0.5}}% + \global\settrue\showkernstate + \raise1.1\strutht + \fi + \else\ifconditional\showexplicitkerns % if other kerns + \color[kern:0]{\dovlwdhtdp\showkernwidthfactor{0.75}{0.5}}% + \lower1.2\strutdp + \fi\fi + \hbox to 0pt{\hss\VerySmall\color[kern:#2]{\expandafter\withoutpt\the\dimexpr#1sp}\hss}% + \egroup + \smashbox\scratchbox + \box\scratchbox + \endgroup + \par} + +\newbox\KernBox + +\unexpanded\def\ShowKerns#1% + {\global\setfalse + \showkernstate\ctxlua{moduledata.fonts.kerns.show("#1")}} + +\unexpanded\def\ShowKernedVBox#1% + {\global\setfalse\showkernstate + \setbox\KernBox\vbox{#1}% + \ShowKerns{KernBox}% + \unvbox\KernBox} + +\unexpanded\def\ShowKernedHBox#1% + {\global\setfalse\showkernstate + \setbox\KernBox\hbox{#1}% + \ShowKerns{KernBox}% + \unhbox\KernBox} + +\continueifinputfile{s-fonts-kerns.mkiv} + +\setupinterlinespace[1.5] % \setfalse\showexplicitkerns + +\definefontfeature[default][default][mode=node] % ,script=latn] + +\starttext + +% \enabletrackers[otf.kerns] + +\setuplayout[width=middle,height=middle] + +\usetypescript[modern] \setupbodyfont[modern] +\setbox\KernBox\vbox{\input knuth } \ShowKerns{KernBox} \copy\KernBox \blank + +\ShowKernedHBox{Very often glyphs get very small spaces inserted horizontally.} + +\usetypescript[cambria] \setupbodyfont[cambria] +\setbox\KernBox\vbox{\input knuth } \ShowKerns{KernBox} \copy\KernBox \blank + +\ShowKernedHBox{Very often glyphs get very small spaces inserted horizontally.} + +\usetypescript[palatino] \setupbodyfont[palatino] +\setbox\KernBox\vbox{\input knuth } \ShowKerns{KernBox} \copy\KernBox \blank + +\ShowKernedHBox{Very often glyphs get very small spaces inserted horizontally.} + +\usetypescript[dejavu] \setupbodyfont[dejavu] +\setbox\KernBox\vbox{\input knuth } \ShowKerns{KernBox} \copy\KernBox \blank + +\ShowKernedHBox{Very often glyphs get very small spaces inserted horizontally.} + +\stoptext diff --git a/tex/context/modules/mkiv/s-mag-01.mkiv b/tex/context/modules/mkiv/s-mag-01.mkiv deleted file mode 100644 index 7191d760c..000000000 --- a/tex/context/modules/mkiv/s-mag-01.mkiv +++ /dev/null @@ -1,505 +0,0 @@ -%D \module -%D [ file=s-mag-01, -%D version=2016.09.12, % mkiv version of 2002.12.14, -%D title=\CONTEXT\ Style File, -%D subtitle=\CONTEXT\ Magazine Base Style, -%D author=Hans Hagen, -%D date=\currentdate, -%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] -%C -%C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See mreadme.pdf for -%C details. - -%D This style is used for producing explanationary documents. Don't misuse it for -%D other purposes, since it may confuse users. Don't change the title either, since -%D it provides a way to categorize documents. Numbers are disabled in instances -%D produced outside PRAGMA ADE. -%D -%D The layout setup is such that one has several text areas available: headers and -%D footers, margins and edges as well as the main text area. The surrounding (gray) -%D makes the main page stand out and is suitable for viewing in spread mode. -%D -%D Since this style is under constant construction, messing around with settings -%D will produce unwanted side effects. So, if some feature or settings is needed, -%D let me know. - -% These are reserved for PRAGMA-ADE, don't use them yourself! - -% \setupdocument[main=Tricky] -% \setupdocument[main=Update] -% \setupdocument[main=HOWTO] - -% \setupdocument[main=This Way] % preludes to a/the manual -% \setupdocument[main=A Better Way] % dirty versus clean -% \setupdocument[main=No Way] % how users should not do it -% \setupdocument[main=Your Way] % how users do it -% \setupdocument[main=My Way] % how users do it -% \setupdocument[main=Our Way] % how we do things at pragma -% \setupdocument[main=Their Way] % how to do latex things in context - -\usemodule[narrowtt,scite] - -\definepapersize - [magazine] - [width=\dimexpr\paperwidth-.1\paperwidth\relax, - height=\dimexpr\paperheight-.1\paperheight\relax] - -\setuppapersize - [magazine] - [A4] - -\setupinteractionscreen - [option=doublesided] - -\setupexternalfigures - [location={local,default}] - -\definecolor[OuterColor][s=.3] -\definecolor[InnerColor][s=.8] -\definecolor[MainColor] [s=.2] -\definecolor[TitleColor][s=.9] - -\definecolor[MyRed] [r=.6] -\definecolor[MyGreen][g=.6] -\definecolor[MyBlue] [b=.6] - -\startreusableMPgraphic{middlepaper} - fill OverlayBox - withshademethod "circular" - withshadecenter center (0.5,0.5) - withshadecolors ("InnerColor","OuterColor") ; -\stopreusableMPgraphic - -\startreusableMPgraphic{rightpaper} - fill OverlayBox - withshademethod "circular" - withshadecenter center (0,0.5) - withshadecolors ("InnerColor","OuterColor") ; -\stopreusableMPgraphic - -\startreusableMPgraphic{leftpaper} - fill OverlayBox - withshademethod "circular" - withshadecenter center (1,0.5) - withshadecolors ("InnerColor","OuterColor") ; -\stopreusableMPgraphic - -\startreusableMPgraphic{page} - fill OverlayBox withcolor white ; -\stopreusableMPgraphic - -\startusableMPgraphic{text} - StartPage ; - for i = Header,Text,Footer : - for j = LeftEdge, LeftMargin, Text, RightMargin, RightEdge : - draw Field[i][j] withpen pencircle scaled .5pt ; - endfor ; - endfor ; - StopPage ; - setbounds currentpicture to Field[Text][Text] ; -\stopusableMPgraphic - -\startsetups[paper] - - \doifmodeelse{*makeup} { - \reuseMPgraphic{middlepaper} - } { - \doifoddpageelse { - \reuseMPgraphic{rightpaper} - } { - \reuseMPgraphic{leftpaper}} - } - -\stopsetups - -\defineoverlay[paper] [\setups{paper}] -\defineoverlay[page] [\reuseMPgraphic{page}] -\defineoverlay[text] [\doifmode{frame}{\useMPgraphic{text}}] - -\setupbackgrounds [paper] [background=paper] -\setupbackgrounds [page] [background={page,title}] -\setupbackgrounds [text] [background=text] - -\definelayer - [title] - [state=repeat, - hoffset=-1cm, - voffset=1cm, - width=\paperwidth, - height=\paperheight] - -\setuplayout - [width=middle, - topspace=1.5cm, - height=middle, - header=1.5cm, - footer=1cm, - %grid=yes, - headerdistance=.25cm, - footerdistance=.5cm, - backspace=3cm, - margin=1.5cm, - margindistance=.25cm, - edge=.75cm, - edgedistance=.25cm, - bottomdistance=1.5cm, - bottom=.1\printpaperheight] - -\definelayout - [listing] - [backspace=15mm, - curspace=15mm] - -\definelayout - [makeup] - [topspace=1cm, - backspace=1cm, - header=0pt, - footer=0pt, - bottom=0pt] - -\setuppagenumbering - [alternative=doublesided] - -\setupbodyfont - [pagella,10pt] - -\setuptolerance - [verytolerant,stretch] - -\appendtoks - \setups[papershift]% -\to \beforeeverypage - -\startsetups[papershift] - - \setuppapersize[top=\vskip.5cm,bottom=\vss] - - \doifmodeelse{*makeup} { - \setuppapersize[left=\hfill,right=\hfill] - } { - \doifoddpageelse { - \setuppapersize[right=\hfill] - } { - \setuppapersize[left=\hfill] - } - } - -\stopsetups - -\setupbottomtexts - [\setups{rightbanner}] [] - [] [\setups{leftbanner}] - -\startsetups [leftbanner] - - \definedfont[Regular*default at \the\bottomheight] - - \TitleColor - - \setbox\scratchbox\hbox { - \documentvariable{main} - } - \ht\scratchbox\exheight - \dp\scratchbox\zeropoint - - \definedfont[Regular*default sa 2] - \doifsomething {\documentvariable{number}} { - \doifnot {\documentvariable{number}} {0} { - \#\documentvariable{number} - } - } - \quad - \currentdate - \quad - \scale - [height=.25\bottomheight] - {\box\scratchbox} - \quad - \hbox to 1.5em{\hss\pagenumber\hss} - \quad - \hskip-\backspace - -\stopsetups - -\startsetups [rightbanner] - - \definedfont[Regular*default at \the\bottomheight] - - \TitleColor - - \setbox\scratchbox\hbox { - \documentvariable{main} - } - \ht\scratchbox\exheight - \dp\scratchbox\zeropoint - - \hskip-\backspace - \definedfont[Regular*default sa 2] - \quad - \hbox to 1.5em{\hss\pagenumber\hss} - \quad - \scale - [height=.25\bottomheight] - {\box\scratchbox} - \quad - \currentdate - \quad - \doifmode {atpragma} { - \#\documentvariable{number} - } - -\stopsetups - -\startsetups[titlepage] - - \disablemode[frame] - - \doifmode {atpragma} { - \definecolor[pragmacolor] [r=1,g=.62,b=.06] % (Pantone 138 CV) - \definecolor[OuterColor][.3(\documentvariable{color})] - } - - \setuplayout[makeup] - - \startstandardmakeup[doublesided=no] - - \dontcomplain - - \definelayer - [makeup] - [width=\textwidth, - height=\textheight] - - \setlayerframed [ - makeup - ] [ - corner={left,top}, - location={right,bottom} - ] [ - frame=off, - foregroundcolor=MainColor - ] { - \scale - [width=\makeupwidth] - { - \definedfont[Regular*default sa 10] - \documentvariable{main} - } - } - - \setlayerframed [ - makeup - ] [ - corner={right,top}, - location={left}, - y=.4\textheight - ] [ - frame=off, - foregroundcolor=MainColor, - width=\textwidth, - align=left - ] { - \definedfont[Regular*default sa 2.5] - \setupinterlinespace - \startmode[atpragma] - \strut \ConTeXt\ magazine \#\documentvariable{number}\endgraf - \stopmode - \strut \documentvariable{date} \endgraf - \blank - \strut \documentvariable{title}\endgraf - \doifsomething {\documentvariable{author}} { - \strut \documentvariable{author}\endgraf - } - \doifsomething {\documentvariable{affiliation}} { - \strut \documentvariable{affiliation}\endgraf - } - } - - \setlayerframed [ - makeup - ] [ - corner={right,bottom}, - location={left,top} - ] [ - frame=off, - align=normal, - width=.8\textwidth, - foregroundcolor=MainColor - ] { - \getbuffer[abstract] - } - - \flushlayer[makeup] - - \stopstandardmakeup - - \setuplayout[reset] - -\stopsetups - -\startsetups[cleanup] - - \page - - \setuptexttexts - [margin] - [] [] - -\stopsetups - -\startsetups[listing] - - \page \disablemode[frame] - - \setuptexttexts [][] \setuptexttexts [] - \setupheadertexts[][] \setupheadertexts[source code of this document] - \setupfootertexts[][] \setupfootertexts[] - - \setuplayout[listing] - - \start - - \dontcomplain - - \switchtobodyfont[8pt] - - \scitefile[\jobfilefullname] - - \page - - \stop - - \setuplayout - -\stopsetups - -\startsetups[lastpage] - - \page \disablemode[frame] \page[even] - - \doifoddpageelse { - } { - \setuplayout[makeup] - \startstandardmakeup[doublesided=no,page=] - \stopstandardmakeup - \setuplayout[reset] - } - -\stopsetups - -\startsetups[title] - - \disablemode[frame] - - \setlayerframed [ - title - ] [ - corner={left,top}, - location={left,bottom}, - rotation=90 - ] [ - frame=off, - foregroundcolor=TitleColor - ] { - \definedfont[RegularBold*default sa 2] - \strut\documentvariable{title} - } - - \setlayerframed [ - title - ] [ - corner={right,top}, - rotation=270 - ] [ - frame=off, - foregroundcolor=TitleColor - ] { - \definedfont[RegularBold*default sa 2] - \strut\documentvariable{title} - } - - \doifsomething {\documentvariable{subtitle}} { - \setupheadertexts[\documentvariable{subtitle}] - } - -\stopsetups - -\startbuffer[abstract] - % no abstract -\stopbuffer - -\setuphead - [chapter] - [page=yes, - after={\blank[2*big]}, - color=MainColor, - style=\bfc] - -\setuphead - [section] - [before={\blank[2*big]}, - after=\blank, - color=MainColor, - style=\bfb] - -\setuphead - [subsection] - [before=\blank, - after=, - color=MainColor, - style=\bf] - -\setupwhitespace - [big] - -\definetyping[xtyping] [style=\ttx] -\definetyping[xxtyping][style=\ttxx] - -\definetyping[ntyping] \setuptyping[ntyping][style=\narrowtt] -\definetype [ntype] \setuptype [ntype] [style=\narrowtt] - -\setupdocument - [main={\doifelsemode{atpragma}{This Way}{My Way}}, - %color=pragmacolor, - title={No Title}, - subtitle=, - author={No Author}, - affiliation=, - date={No Date}, - number=0, - before={\setups[titlepage,title]}, - after={\setups[cleanup,listing,lastpage]}] - -\continueifinputfile {s-mag-01.mkiv} - -\startbuffer[abstract] - This is the zero issue of a semi periodical. The associated style can be used - by \CONTEXT\ users to typeset and publish their own issues. -\stopbuffer - -\startdocument - [title={Introduction}, - subtitle={Welcome}, - author={Hans Hagen}, - affiliation=PRAGMA ADE, - date=Januari 2003, - number=0 \MKIV] - -This is the zero issue of a range of \CONTEXT\ related publications, in most -cases short introductions to new functionality. The style may be used by users -for providing similar documents, but preferably not for other purposes, since it -may confuse readers in their expectations. - -We've chosen a layout which is more functional than beautiful. This layout -provides several text areas: headers and footers, margins and edges as well as a -main text area. The surrounding (gray or color) makes the main page (which is -slightly smaller than A4) stand out and is suitable for viewing in spread mode. - -The documents produced at \PRAGMA\ are called {\bf This Way}, user documents gets -the title {\bf My Way}. The \PRAGMA\ issues are numbered. We strongly advise you -not to use the \type {mag-} prefix for your issues, since this may lead to -clashes with files distributed by \PRAGMA. - -\stopdocument diff --git a/tex/context/modules/mkiv/s-magazine-basic.mkiv b/tex/context/modules/mkiv/s-magazine-basic.mkiv new file mode 100644 index 000000000..267bf50d8 --- /dev/null +++ b/tex/context/modules/mkiv/s-magazine-basic.mkiv @@ -0,0 +1,505 @@ +%D \module +%D [ file=s-magazine-basic, % was: s-mag-01 +%D version=2016.09.12, % mkiv version of 2002.12.14, +%D title=\CONTEXT\ Style File, +%D subtitle=\CONTEXT\ Magazine Base Style, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D This style is used for producing explanationary documents. Don't misuse it for +%D other purposes, since it may confuse users. Don't change the title either, since +%D it provides a way to categorize documents. Numbers are disabled in instances +%D produced outside PRAGMA ADE. +%D +%D The layout setup is such that one has several text areas available: headers and +%D footers, margins and edges as well as the main text area. The surrounding (gray) +%D makes the main page stand out and is suitable for viewing in spread mode. +%D +%D Since this style is under constant construction, messing around with settings +%D will produce unwanted side effects. So, if some feature or settings is needed, +%D let me know. + +% These are reserved for PRAGMA-ADE, don't use them yourself! + +% \setupdocument[main=Tricky] +% \setupdocument[main=Update] +% \setupdocument[main=HOWTO] + +% \setupdocument[main=This Way] % preludes to a/the manual +% \setupdocument[main=A Better Way] % dirty versus clean +% \setupdocument[main=No Way] % how users should not do it +% \setupdocument[main=Your Way] % how users do it +% \setupdocument[main=My Way] % how users do it +% \setupdocument[main=Our Way] % how we do things at pragma +% \setupdocument[main=Their Way] % how to do latex things in context + +\usemodule[narrowtt,scite] + +\definepapersize + [magazine] + [width=\dimexpr\paperwidth-.1\paperwidth\relax, + height=\dimexpr\paperheight-.1\paperheight\relax] + +\setuppapersize + [magazine] + [A4] + +\setupinteractionscreen + [option=doublesided] + +\setupexternalfigures + [location={local,default}] + +\definecolor[OuterColor][s=.3] +\definecolor[InnerColor][s=.8] +\definecolor[MainColor] [s=.2] +\definecolor[TitleColor][s=.9] + +\definecolor[MyRed] [r=.6] +\definecolor[MyGreen][g=.6] +\definecolor[MyBlue] [b=.6] + +\startreusableMPgraphic{middlepaper} + fill OverlayBox + withshademethod "circular" + withshadecenter center (0.5,0.5) + withshadecolors ("InnerColor","OuterColor") ; +\stopreusableMPgraphic + +\startreusableMPgraphic{rightpaper} + fill OverlayBox + withshademethod "circular" + withshadecenter center (0,0.5) + withshadecolors ("InnerColor","OuterColor") ; +\stopreusableMPgraphic + +\startreusableMPgraphic{leftpaper} + fill OverlayBox + withshademethod "circular" + withshadecenter center (1,0.5) + withshadecolors ("InnerColor","OuterColor") ; +\stopreusableMPgraphic + +\startreusableMPgraphic{page} + fill OverlayBox withcolor white ; +\stopreusableMPgraphic + +\startusableMPgraphic{text} + StartPage ; + for i = Header,Text,Footer : + for j = LeftEdge, LeftMargin, Text, RightMargin, RightEdge : + draw Field[i][j] withpen pencircle scaled .5pt ; + endfor ; + endfor ; + StopPage ; + setbounds currentpicture to Field[Text][Text] ; +\stopusableMPgraphic + +\startsetups[paper] + + \doifmodeelse{*makeup} { + \reuseMPgraphic{middlepaper} + } { + \doifoddpageelse { + \reuseMPgraphic{rightpaper} + } { + \reuseMPgraphic{leftpaper}} + } + +\stopsetups + +\defineoverlay[paper] [\setups{paper}] +\defineoverlay[page] [\reuseMPgraphic{page}] +\defineoverlay[text] [\doifmode{frame}{\useMPgraphic{text}}] + +\setupbackgrounds [paper] [background=paper] +\setupbackgrounds [page] [background={page,title}] +\setupbackgrounds [text] [background=text] + +\definelayer + [title] + [state=repeat, + hoffset=-1cm, + voffset=1cm, + width=\paperwidth, + height=\paperheight] + +\setuplayout + [width=middle, + topspace=1.5cm, + height=middle, + header=1.5cm, + footer=1cm, + %grid=yes, + headerdistance=.25cm, + footerdistance=.5cm, + backspace=3cm, + margin=1.5cm, + margindistance=.25cm, + edge=.75cm, + edgedistance=.25cm, + bottomdistance=1.5cm, + bottom=.1\printpaperheight] + +\definelayout + [listing] + [backspace=15mm, + curspace=15mm] + +\definelayout + [makeup] + [topspace=1cm, + backspace=1cm, + header=0pt, + footer=0pt, + bottom=0pt] + +\setuppagenumbering + [alternative=doublesided] + +\setupbodyfont + [pagella,10pt] + +\setuptolerance + [verytolerant,stretch] + +\appendtoks + \setups[papershift]% +\to \beforeeverypage + +\startsetups[papershift] + + \setuppapersize[top=\vskip.5cm,bottom=\vss] + + \doifmodeelse{*makeup} { + \setuppapersize[left=\hfill,right=\hfill] + } { + \doifoddpageelse { + \setuppapersize[right=\hfill] + } { + \setuppapersize[left=\hfill] + } + } + +\stopsetups + +\setupbottomtexts + [\setups{rightbanner}] [] + [] [\setups{leftbanner}] + +\startsetups [leftbanner] + + \definedfont[Regular*default at \the\bottomheight] + + \TitleColor + + \setbox\scratchbox\hbox { + \documentvariable{main} + } + \ht\scratchbox\exheight + \dp\scratchbox\zeropoint + + \definedfont[Regular*default sa 2] + \doifsomething {\documentvariable{number}} { + \doifnot {\documentvariable{number}} {0} { + \#\documentvariable{number} + } + } + \quad + \currentdate + \quad + \scale + [height=.25\bottomheight] + {\box\scratchbox} + \quad + \hbox to 1.5em{\hss\pagenumber\hss} + \quad + \hskip-\backspace + +\stopsetups + +\startsetups [rightbanner] + + \definedfont[Regular*default at \the\bottomheight] + + \TitleColor + + \setbox\scratchbox\hbox { + \documentvariable{main} + } + \ht\scratchbox\exheight + \dp\scratchbox\zeropoint + + \hskip-\backspace + \definedfont[Regular*default sa 2] + \quad + \hbox to 1.5em{\hss\pagenumber\hss} + \quad + \scale + [height=.25\bottomheight] + {\box\scratchbox} + \quad + \currentdate + \quad + \doifmode {atpragma} { + \#\documentvariable{number} + } + +\stopsetups + +\startsetups[titlepage] + + \disablemode[frame] + + \doifmode {atpragma} { + \definecolor[pragmacolor] [r=1,g=.62,b=.06] % (Pantone 138 CV) + \definecolor[OuterColor][.3(\documentvariable{color})] + } + + \setuplayout[makeup] + + \startstandardmakeup[doublesided=no] + + \dontcomplain + + \definelayer + [makeup] + [width=\textwidth, + height=\textheight] + + \setlayerframed [ + makeup + ] [ + corner={left,top}, + location={right,bottom} + ] [ + frame=off, + foregroundcolor=MainColor + ] { + \scale + [width=\makeupwidth] + { + \definedfont[Regular*default sa 10] + \documentvariable{main} + } + } + + \setlayerframed [ + makeup + ] [ + corner={right,top}, + location={left}, + y=.4\textheight + ] [ + frame=off, + foregroundcolor=MainColor, + width=\textwidth, + align=left + ] { + \definedfont[Regular*default sa 2.5] + \setupinterlinespace + \startmode[atpragma] + \strut \ConTeXt\ magazine \#\documentvariable{number}\endgraf + \stopmode + \strut \documentvariable{date} \endgraf + \blank + \strut \documentvariable{title}\endgraf + \doifsomething {\documentvariable{author}} { + \strut \documentvariable{author}\endgraf + } + \doifsomething {\documentvariable{affiliation}} { + \strut \documentvariable{affiliation}\endgraf + } + } + + \setlayerframed [ + makeup + ] [ + corner={right,bottom}, + location={left,top} + ] [ + frame=off, + align=normal, + width=.8\textwidth, + foregroundcolor=MainColor + ] { + \getbuffer[abstract] + } + + \flushlayer[makeup] + + \stopstandardmakeup + + \setuplayout[reset] + +\stopsetups + +\startsetups[cleanup] + + \page + + \setuptexttexts + [margin] + [] [] + +\stopsetups + +\startsetups[listing] + + \page \disablemode[frame] + + \setuptexttexts [][] \setuptexttexts [] + \setupheadertexts[][] \setupheadertexts[source code of this document] + \setupfootertexts[][] \setupfootertexts[] + + \setuplayout[listing] + + \start + + \dontcomplain + + \switchtobodyfont[8pt] + + \scitefile[\jobfilefullname] + + \page + + \stop + + \setuplayout + +\stopsetups + +\startsetups[lastpage] + + \page \disablemode[frame] \page[even] + + \doifoddpageelse { + } { + \setuplayout[makeup] + \startstandardmakeup[doublesided=no,page=] + \stopstandardmakeup + \setuplayout[reset] + } + +\stopsetups + +\startsetups[title] + + \disablemode[frame] + + \setlayerframed [ + title + ] [ + corner={left,top}, + location={left,bottom}, + rotation=90 + ] [ + frame=off, + foregroundcolor=TitleColor + ] { + \definedfont[RegularBold*default sa 2] + \strut\documentvariable{title} + } + + \setlayerframed [ + title + ] [ + corner={right,top}, + rotation=270 + ] [ + frame=off, + foregroundcolor=TitleColor + ] { + \definedfont[RegularBold*default sa 2] + \strut\documentvariable{title} + } + + \doifsomething {\documentvariable{subtitle}} { + \setupheadertexts[\documentvariable{subtitle}] + } + +\stopsetups + +\startbuffer[abstract] + % no abstract +\stopbuffer + +\setuphead + [chapter] + [page=yes, + after={\blank[2*big]}, + color=MainColor, + style=\bfc] + +\setuphead + [section] + [before={\blank[2*big]}, + after=\blank, + color=MainColor, + style=\bfb] + +\setuphead + [subsection] + [before=\blank, + after=, + color=MainColor, + style=\bf] + +\setupwhitespace + [big] + +\definetyping[xtyping] [style=\ttx] +\definetyping[xxtyping][style=\ttxx] + +\definetyping[ntyping] \setuptyping[ntyping][style=\narrowtt] +\definetype [ntype] \setuptype [ntype] [style=\narrowtt] + +\setupdocument + [main={\doifelsemode{atpragma}{This Way}{My Way}}, + %color=pragmacolor, + title={No Title}, + subtitle=, + author={No Author}, + affiliation=, + date={No Date}, + number=0, + before={\setups[titlepage,title]}, + after={\setups[cleanup,listing,lastpage]}] + +\continueifinputfile {s-mag-01.mkiv} + +\startbuffer[abstract] + This is the zero issue of a semi periodical. The associated style can be used + by \CONTEXT\ users to typeset and publish their own issues. +\stopbuffer + +\startdocument + [title={Introduction}, + subtitle={Welcome}, + author={Hans Hagen}, + affiliation=PRAGMA ADE, + date=Januari 2003, + number=0 \MKIV] + +This is the zero issue of a range of \CONTEXT\ related publications, in most +cases short introductions to new functionality. The style may be used by users +for providing similar documents, but preferably not for other purposes, since it +may confuse readers in their expectations. + +We've chosen a layout which is more functional than beautiful. This layout +provides several text areas: headers and footers, margins and edges as well as a +main text area. The surrounding (gray or color) makes the main page (which is +slightly smaller than A4) stand out and is suitable for viewing in spread mode. + +The documents produced at \PRAGMA\ are called {\bf This Way}, user documents gets +the title {\bf My Way}. The \PRAGMA\ issues are numbered. We strongly advise you +not to use the \type {mag-} prefix for your issues, since this may lead to +clashes with files distributed by \PRAGMA. + +\stopdocument diff --git a/tex/context/modules/mkiv/s-map-10.mkiv b/tex/context/modules/mkiv/s-map-10.mkiv deleted file mode 100644 index c7541babc..000000000 --- a/tex/context/modules/mkiv/s-map-10.mkiv +++ /dev/null @@ -1,494 +0,0 @@ -%D \module -%D [file=s-map-10.mkiv, -%D version=2012.06.06, -%D title=\CONTEXT\ Style File, -%D subtitle=\MAPS\ journal style, -%D author={Hans Hagen, Taco Hoekwater and Siep Kroonenberg}, -%D date=\currentdate, -%D copyright=NTG/MAPS] - -% This module implements the MAPS style for use with the Context -% macro package. The original MAPS layout was designed and -% implemented in LaTeX by Taco Hoekwater and Siep Kroonenberg. - -% - three layouts: -% 1. two columns -% 2. one column, with wide outer margins (option onecolumn) -% 3. one column, with wide left margin (option asym) -% - font sizes deviate from TeX's usual geometric progression -% - use of sans-serif for headers and various details -% - option realfonts uses Linux Libertine, Euler Math and Inconsolata. -% This is used for final typesetting. -% The default font setup, intended for authors, uses Computer -% Modern Math instead of Euler Math (which is still in beta), -% and LM Mono instead of Inconsolata. - -% A mode nosubsub defines only two levels of sectioning. If you -% don't need more and use the two-column layout, then this option -% will probably improve the looks of your paper. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\newif\ifMapsInColumns -\doifmode{asym}{\enablemode[onecolumn]} % implies onecolumn -\doifnotmode{onecolumn}{\MapsInColumnstrue} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% fonts - -%%%%%%%%% first, font sizes -\definebodyfontenvironment [7pt][% LaTeX: scriptsize - interlinespace=8pt, - big=8pt, - small=6pt% -] - -\definebodyfontenvironment [8pt][% LaTeX: footnotesize - interlinespace=9pt, - big=9pt, - small=7pt, - x=6pt% -] - -\definebodyfontenvironment [9pt][% LaTeX: small - interlinespace=10pt, - big=10pt, - small=8pt,% - x=7pt,% - script=6pt% -] - -\definebodyfontenvironment [10pt][% LaTeX: normalsize - interlinespace=11pt, - big=11pt, - a=11pt, - small=9pt,% - x=8pt,% - script=7pt% -] - -\definebodyfontenvironment [11pt][% LaTeX: large - interlinespace=11pt, - big=11pt, - small=10pt,% - x=9pt,% - script=8pt% -] - -\definebodyfontenvironment [14pt][% - interlinespace=14pt, - big=18pt, - small=11pt, - x=10pt% -] - -\definebodyfontenvironment [18pt][% - interlinespace=18pt, - big=24pt, - small=14pt, - x=10pt% -] - -\definebodyfontenvironment [24pt][% - interlinespace=24pt, - big=24pt, - small=18pt, - x=11pt% -] - -%%% font families - -\starttypescript [maps] -\definetypeface [maps] [rm] [serif] [modern] [default] [rscale=0.95] -\definetypeface [maps] [mm] [math] [modern] [latin-modern] -\definetypeface [maps] [tt] [mono] [modern] [default] [rscale=0.90] -\definetypeface [maps] [ss] [sans] [modern] [default] [rscale=0.95] -\stoptypescript - -\startmode[realfonts] -\usetypescriptfile[type-libertine] - -\usetypescriptfile[type-inconsolata] - -\starttypescript [maps] -\definetypeface [maps] [rm] [serif] [libertine] [default] -\definetypeface [maps] [mm] [math] [euler] [default] [rscale=0.9] -\definetypeface [maps] [tt] [mono] [inconsolata] [default] [rscale=0.92] -\definetypeface [maps] [ss] [sans] [modern] [default] [rscale=0.95] -\stoptypescript -\stopmode - -\setupbodyfont[maps,10pt,rm] - -% activate protruding -\setupinterlinespace[line=11pt] - -\setupfontsynonym[handling=pure] - -\setupalign[hanging] - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% additional general typographic details - -\setupindenting [yes,next,11pt] % indenting after enumerations etc. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% 3 versions of layout with matching headers - -\definepapersize - [maps] - [width=21cm,height=26.5cm] - -\setuppapersize - [maps][maps] - -\setuplayout[ - [topspace=40pt, - height=688pt, - header=33pt, - margin=106pt, - leftmargindistance=11pt, - rightmargindistance=11pt] - -\setupblank[5.5pt] - -\setuppagenumbering [location=] - -\definetyping [widetyping] - -\setupheader [style=\ss] -\setupfooter [style=\ss] - -\def\AuHead{\MapsRunningAuthor} -\def\TiHead{\ifnum\pageno=\MapsPage \relax \MapsRunningAuthor \else \MapsRunningTitle\fi} - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% sectioning - -\setupheads[sectionnumber=no, align=right] - -\def\hfonti{\ssbfa} -\def\hfontii{\ssbf} -\def\hfontiii{\rm\it} - -\doifelsemode{nosubsub}{% -\setuphead [section][% - style=\hfontii, - before={\blank[line]}, - after={}% -] -\setuphead [subsection][% - style=\hfontiii, - alternative=text, - distance=6pt, - before={\blank[halfline]}% -]}{% -\setuphead [section][% - style=\hfonti, - before={\blank[line]}, - after={\blank[halfline]}% -] -\setuphead [subsection][% - style=\hfontii, - before={\blank[halfline]}, - after={}% -] -\setuphead [subsubsection][% - style=\hfontiii, - distance=6pt, - alternative=text, - before={\blank[halfline]}% -]} - -\doifelsemode{nosubsub}{% -\setuphead [subject][% - style=\hfontii, - before={\blank[halfline]}, - after={}% -] -\setuphead [subsubject][% - style=\hfontiii, - alternative=text, - before={\blank[halfline]}% -]}{% -\setuphead [subject][% - style=\hfonti, - before={\blank}, - after={\blank[halfline]}% -] -\setuphead [subsubject][% - style=\hfontii, - before={\blank[halfline]}, - after={}% -] -\setuphead [subsubsubject][% - style=\hfontiii, - alternative=text, - before={\blank[halfline]}% -]} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% floats - -\setupfloats [location=center, before={\ss}] -\setupcaptions [headstyle={\ssbf},style={\ssx}, - suffix=.,distance=6pt, - inbetween={\blank[halfline]}] - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% various document elements - -\definesymbol [1][\getnamedglyphdirect{file:stmary10}{boxempty}] - -\setupitemize[1][packed] - -\setupitemize [each][% - indentnext=no, - align=right, - width=1em, - distance=0pt% -] - -% an outer form of itemize that does not indent -% the paragraph. - -\definecomplexorsimpleempty\startouteritemize -\def\complexstartouteritemize[#1]{\begingroup - \startitemize[width=1sp,#1] - \let\doitem\item - \def\item{\doitem[]\hbox{}\kern12pt\rightskip=0pt}% -} - -\def\stopouteritemize{\stopitemize\endgroup} - - -\setupenumerations [indentnext=no] - -\setupdescriptions [indentnext=no] - -\unexpanded\def\smalltyping{% - \switchtobodyfont[tt]% - \parindent=0pt -} - -% typing: -% - prettyverbatim is NOT the default -% - smaller size - -\unexpanded\def - \XeTeX{X\lower.5ex\hbox{\kern-.1em\mirror{E}}\kern-.1667em\TeX} - -\setuptyping [% - style={\smalltyping}, - option=none, - indentnext=no% -] - -\def\footnum#1{#1.} - -\setupnotation - [footnote] - [alternative=serried, - before=, - after=, - location=none, - width=\textwidth, - before={\blank}, - numbercommand=, - command=\footnum, - distance=0.5em] - -\setuptabulate - [before=\blank, - inner=\ss, - after=\blank] - -\def\startIntroEntry#1% - {\startlinecorrection - \bgroup - \setupalign[right] - \setuptolerance[verytolerant] - \setupindenting[no] - \noindent - \switchtobodyfont[9pt]% - \setuplocalinterlinespace[line=10pt]% - %\hyphenpenalty10000 - \parfillskip 0pt plus 1fill - \rightskip6pt plus 1fill - \ss - \bgroup\bf #1\par\egroup - \ignorespaces } - -\def\stopIntroEntry - {\par\egroup \stoplinecorrection - \blank[line] } - -\def\defineIntroEntry[#1][#2][#3]% - {\setvalue{start#1}{\startIntroEntry{#2}}% - \setvalue {stop#1}{\stopIntroEntry#3}} - -\defineIntroEntry[Keywords][Keywords][] -\defineIntroEntry[Abstract][Abstract][] - -% article parameters (other fields and defaults) -\def\MapsBibData[#1]% - {\getparameters [Maps] - [SubTitle=, - RunningAuthor=, - RunningTitle=, - Email=, - Address=, - Page=1, - Title=, - Author=, - Period=, - Number=, - Year=, - #1]% - \doifnothing{\MapsPeriod}{% - \ifnum \normalmonth<6 \gdef\MapsPeriod{VOORJAAR}\else \gdef\MapsPeriod{NAJAAR}\fi} - \doifelseinstring{oorjaar}{\MapsPeriod}{\gdef\MapsPeriod{VOORJAAR}}{}% - \doifelseinstring{pring}{\MapsPeriod}{\gdef\MapsPeriod{VOORJAAR}}{}% - \doifelseinstring{ajaar}{\MapsPeriod}{\gdef\MapsPeriod{NAJAAR}}{}% - \doifelseinstring{utumn}{\MapsPeriod}{\gdef\MapsPeriod{NAJAAR}}{}% - \doifnothing{\MapsYear}{\gdef\MapsYear{\the\year}}% - \doifnothing{\MapsNumber}{% - \ifnum \normalmonth<6 - \xdef\MapsNumber{\the\numexpr (\the\year-1990)*2\relax}% - \else - \xdef\MapsNumber{\the\numexpr (\the\year-1990)*2+1\relax}% - \fi }% - \doifnothing\MapsRunningAuthor - {\global\let\MapsRunningAuthor\MapsAuthor}% - \doifnothing\MapsRunningTitle - {\global\let\MapsRunningTitle\MapsTitle}}% - -\def\dostartArticle[#1]{% - \MapsBibData[#1] - \pageno=\MapsPage - \setupuserpagenumber[start=\MapsPage] - \startbaselinecorrection - \bgroup - \hsize = 457pt - \let\\\crlf - \blank[35pt,force] - \switchtobodyfont[24pt] - \setupalign[right] - {\noindent\bf\MapsTitle\par} - \ifx\MapsSubTitle\empty - \blank[30pt] - \else - \bgroup - \blank[12pt] - \switchtobodyfont[18pt]\noindent \it - \advance \rightskip 0pt plus 2em - \MapsSubTitle\par - \egroup - \blank[30pt] - \fi - \egroup - \setupalign[width] - \switchtobodyfont[rm,10pt] - \stopbaselinecorrection - \ifMapsInColumns - \startcolumns\hyphenpenalty1000 - \else - \clubpenalty10000 - \widowpenalty10000 - \fi -} - -\def\startArticle{\dosingleempty\dostartArticle} - -\def\signArticle{% - \blank\let\\\crlf - \noindent\switchtobodyfont[ss,9pt]% - \MapsAuthor - \doifsomething{\MapsAddress}{\\\MapsAddress}% - \doifsomething{\MapsEmail}{\\\MapsEmail}% - \switchtobodyfont[10pt]% - \def\signArticle{}% -} - -\def\stopArticle{% - \par\signArticle - \ifMapsInColumns \stopcolumns \fi - \page -} - -\installpagebreakmethod{last}{} - -%%% `logos' %%%%%%%%%%%%%%%%%%%%%%%%%% - -\unexpanded\def\LaTeX % requested by erik frambach - {{\setbox\scratchbox\hbox{L}% - \scratchdimen\ht\scratchbox - \setbox\scratchbox\hbox{\switchtobodyfont[script]A}% - L\kern-.55\wd\scratchbox - \raise\scratchdimen\hbox{\lower\ht\scratchbox\copy\scratchbox}% - \kern-.2\wd\scratchbox\TeX}} - - -\def\CONTEXT{Con{\TeX}t} -\def\ConTeXt{Con{\TeX}t} -\def\METAFONT{Metafont} -\def\METAPOST{MetaPost} -\def\POSTSCRIPT{PostScript} - -\def\acro#1{{\switchtobodyfont[9pt]#1}} - - -%%%%%%%%%%% - -\doifelsemode{onecolumn}{% - \setuplayout[width=340pt] - \doifelsemode{asym}{% one col, asymmetric - \setuplayout[backspace=187.3pt]% - \setuptyping [widetyping][oddmargin=-117pt] - \setuppagenumbering [alternative={singlesided,doublesided}] - \setupheadertexts - [{\hbox{}\hskip-117pt\TiHead}] - [{\cap{\MapsPeriod\ \MapsYear}\quad\bf \pagenumber\hskip-30pt\hbox{}}] - [{\hbox{}\hskip-147pt{\bf \pagenumber}\quad \cap {maps\ \MapsNumber}}] - [\AuHead] - \setupfootertexts - }{% one col, symmetric - \setuplayout[backspace=70.3pt] - \setuppagenumbering [alternative=doublesided] - \setuptyping[blank=halfline] - \setupheadertexts - [\TiHead] - [{\cap{\MapsPeriod\ \MapsYear}\quad\bf \pagenumber\hskip-147pt\hbox{}}] - [{\hbox{}\hskip-147pt{\bf \pagenumber}\quad \cap {maps\ \MapsNumber}}] - [\AuHead] - \setupfootertexts -}}{% two col - \setuplayout[width=457pt] - \setupcolumns[n=2,tolerance=verytolerant,distance=11pt] - \setuplayout[backspace=70.3pt,grid=yes] - \setuppagenumbering [alternative=doublesided] - \setuptyping[blank=halfline] - \setupheadertexts - [\TiHead] - [{\cap{\MapsPeriod\ \MapsYear}\quad\bf \pagenumber\hskip-30pt\hbox{}}] - [{\hbox{}\hskip-30pt{\bf \pagenumber}\quad \cap {maps\ \MapsNumber}}] - [\AuHead] - \setupfootertexts -} - -\def\fulltextwidth{457pt} - -\def\startdescription - {\blank - \bgroup - \def\sym##1{\par\noindent\hbox{\bf\kern -16pt ##1}\hskip 12pt} - \startnarrower[left] - } -\def\stopdescription - {\par \stopnarrower \egroup \blank \noindentation } - -\frenchspacing -\setuptolerance[tolerant] - -\endinput diff --git a/tex/context/modules/mkiv/s-maps.mkiv b/tex/context/modules/mkiv/s-maps.mkiv new file mode 100644 index 000000000..c7541babc --- /dev/null +++ b/tex/context/modules/mkiv/s-maps.mkiv @@ -0,0 +1,494 @@ +%D \module +%D [file=s-map-10.mkiv, +%D version=2012.06.06, +%D title=\CONTEXT\ Style File, +%D subtitle=\MAPS\ journal style, +%D author={Hans Hagen, Taco Hoekwater and Siep Kroonenberg}, +%D date=\currentdate, +%D copyright=NTG/MAPS] + +% This module implements the MAPS style for use with the Context +% macro package. The original MAPS layout was designed and +% implemented in LaTeX by Taco Hoekwater and Siep Kroonenberg. + +% - three layouts: +% 1. two columns +% 2. one column, with wide outer margins (option onecolumn) +% 3. one column, with wide left margin (option asym) +% - font sizes deviate from TeX's usual geometric progression +% - use of sans-serif for headers and various details +% - option realfonts uses Linux Libertine, Euler Math and Inconsolata. +% This is used for final typesetting. +% The default font setup, intended for authors, uses Computer +% Modern Math instead of Euler Math (which is still in beta), +% and LM Mono instead of Inconsolata. + +% A mode nosubsub defines only two levels of sectioning. If you +% don't need more and use the two-column layout, then this option +% will probably improve the looks of your paper. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\newif\ifMapsInColumns +\doifmode{asym}{\enablemode[onecolumn]} % implies onecolumn +\doifnotmode{onecolumn}{\MapsInColumnstrue} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% fonts + +%%%%%%%%% first, font sizes +\definebodyfontenvironment [7pt][% LaTeX: scriptsize + interlinespace=8pt, + big=8pt, + small=6pt% +] + +\definebodyfontenvironment [8pt][% LaTeX: footnotesize + interlinespace=9pt, + big=9pt, + small=7pt, + x=6pt% +] + +\definebodyfontenvironment [9pt][% LaTeX: small + interlinespace=10pt, + big=10pt, + small=8pt,% + x=7pt,% + script=6pt% +] + +\definebodyfontenvironment [10pt][% LaTeX: normalsize + interlinespace=11pt, + big=11pt, + a=11pt, + small=9pt,% + x=8pt,% + script=7pt% +] + +\definebodyfontenvironment [11pt][% LaTeX: large + interlinespace=11pt, + big=11pt, + small=10pt,% + x=9pt,% + script=8pt% +] + +\definebodyfontenvironment [14pt][% + interlinespace=14pt, + big=18pt, + small=11pt, + x=10pt% +] + +\definebodyfontenvironment [18pt][% + interlinespace=18pt, + big=24pt, + small=14pt, + x=10pt% +] + +\definebodyfontenvironment [24pt][% + interlinespace=24pt, + big=24pt, + small=18pt, + x=11pt% +] + +%%% font families + +\starttypescript [maps] +\definetypeface [maps] [rm] [serif] [modern] [default] [rscale=0.95] +\definetypeface [maps] [mm] [math] [modern] [latin-modern] +\definetypeface [maps] [tt] [mono] [modern] [default] [rscale=0.90] +\definetypeface [maps] [ss] [sans] [modern] [default] [rscale=0.95] +\stoptypescript + +\startmode[realfonts] +\usetypescriptfile[type-libertine] + +\usetypescriptfile[type-inconsolata] + +\starttypescript [maps] +\definetypeface [maps] [rm] [serif] [libertine] [default] +\definetypeface [maps] [mm] [math] [euler] [default] [rscale=0.9] +\definetypeface [maps] [tt] [mono] [inconsolata] [default] [rscale=0.92] +\definetypeface [maps] [ss] [sans] [modern] [default] [rscale=0.95] +\stoptypescript +\stopmode + +\setupbodyfont[maps,10pt,rm] + +% activate protruding +\setupinterlinespace[line=11pt] + +\setupfontsynonym[handling=pure] + +\setupalign[hanging] + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% additional general typographic details + +\setupindenting [yes,next,11pt] % indenting after enumerations etc. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% 3 versions of layout with matching headers + +\definepapersize + [maps] + [width=21cm,height=26.5cm] + +\setuppapersize + [maps][maps] + +\setuplayout[ + [topspace=40pt, + height=688pt, + header=33pt, + margin=106pt, + leftmargindistance=11pt, + rightmargindistance=11pt] + +\setupblank[5.5pt] + +\setuppagenumbering [location=] + +\definetyping [widetyping] + +\setupheader [style=\ss] +\setupfooter [style=\ss] + +\def\AuHead{\MapsRunningAuthor} +\def\TiHead{\ifnum\pageno=\MapsPage \relax \MapsRunningAuthor \else \MapsRunningTitle\fi} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% sectioning + +\setupheads[sectionnumber=no, align=right] + +\def\hfonti{\ssbfa} +\def\hfontii{\ssbf} +\def\hfontiii{\rm\it} + +\doifelsemode{nosubsub}{% +\setuphead [section][% + style=\hfontii, + before={\blank[line]}, + after={}% +] +\setuphead [subsection][% + style=\hfontiii, + alternative=text, + distance=6pt, + before={\blank[halfline]}% +]}{% +\setuphead [section][% + style=\hfonti, + before={\blank[line]}, + after={\blank[halfline]}% +] +\setuphead [subsection][% + style=\hfontii, + before={\blank[halfline]}, + after={}% +] +\setuphead [subsubsection][% + style=\hfontiii, + distance=6pt, + alternative=text, + before={\blank[halfline]}% +]} + +\doifelsemode{nosubsub}{% +\setuphead [subject][% + style=\hfontii, + before={\blank[halfline]}, + after={}% +] +\setuphead [subsubject][% + style=\hfontiii, + alternative=text, + before={\blank[halfline]}% +]}{% +\setuphead [subject][% + style=\hfonti, + before={\blank}, + after={\blank[halfline]}% +] +\setuphead [subsubject][% + style=\hfontii, + before={\blank[halfline]}, + after={}% +] +\setuphead [subsubsubject][% + style=\hfontiii, + alternative=text, + before={\blank[halfline]}% +]} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% floats + +\setupfloats [location=center, before={\ss}] +\setupcaptions [headstyle={\ssbf},style={\ssx}, + suffix=.,distance=6pt, + inbetween={\blank[halfline]}] + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% various document elements + +\definesymbol [1][\getnamedglyphdirect{file:stmary10}{boxempty}] + +\setupitemize[1][packed] + +\setupitemize [each][% + indentnext=no, + align=right, + width=1em, + distance=0pt% +] + +% an outer form of itemize that does not indent +% the paragraph. + +\definecomplexorsimpleempty\startouteritemize +\def\complexstartouteritemize[#1]{\begingroup + \startitemize[width=1sp,#1] + \let\doitem\item + \def\item{\doitem[]\hbox{}\kern12pt\rightskip=0pt}% +} + +\def\stopouteritemize{\stopitemize\endgroup} + + +\setupenumerations [indentnext=no] + +\setupdescriptions [indentnext=no] + +\unexpanded\def\smalltyping{% + \switchtobodyfont[tt]% + \parindent=0pt +} + +% typing: +% - prettyverbatim is NOT the default +% - smaller size + +\unexpanded\def + \XeTeX{X\lower.5ex\hbox{\kern-.1em\mirror{E}}\kern-.1667em\TeX} + +\setuptyping [% + style={\smalltyping}, + option=none, + indentnext=no% +] + +\def\footnum#1{#1.} + +\setupnotation + [footnote] + [alternative=serried, + before=, + after=, + location=none, + width=\textwidth, + before={\blank}, + numbercommand=, + command=\footnum, + distance=0.5em] + +\setuptabulate + [before=\blank, + inner=\ss, + after=\blank] + +\def\startIntroEntry#1% + {\startlinecorrection + \bgroup + \setupalign[right] + \setuptolerance[verytolerant] + \setupindenting[no] + \noindent + \switchtobodyfont[9pt]% + \setuplocalinterlinespace[line=10pt]% + %\hyphenpenalty10000 + \parfillskip 0pt plus 1fill + \rightskip6pt plus 1fill + \ss + \bgroup\bf #1\par\egroup + \ignorespaces } + +\def\stopIntroEntry + {\par\egroup \stoplinecorrection + \blank[line] } + +\def\defineIntroEntry[#1][#2][#3]% + {\setvalue{start#1}{\startIntroEntry{#2}}% + \setvalue {stop#1}{\stopIntroEntry#3}} + +\defineIntroEntry[Keywords][Keywords][] +\defineIntroEntry[Abstract][Abstract][] + +% article parameters (other fields and defaults) +\def\MapsBibData[#1]% + {\getparameters [Maps] + [SubTitle=, + RunningAuthor=, + RunningTitle=, + Email=, + Address=, + Page=1, + Title=, + Author=, + Period=, + Number=, + Year=, + #1]% + \doifnothing{\MapsPeriod}{% + \ifnum \normalmonth<6 \gdef\MapsPeriod{VOORJAAR}\else \gdef\MapsPeriod{NAJAAR}\fi} + \doifelseinstring{oorjaar}{\MapsPeriod}{\gdef\MapsPeriod{VOORJAAR}}{}% + \doifelseinstring{pring}{\MapsPeriod}{\gdef\MapsPeriod{VOORJAAR}}{}% + \doifelseinstring{ajaar}{\MapsPeriod}{\gdef\MapsPeriod{NAJAAR}}{}% + \doifelseinstring{utumn}{\MapsPeriod}{\gdef\MapsPeriod{NAJAAR}}{}% + \doifnothing{\MapsYear}{\gdef\MapsYear{\the\year}}% + \doifnothing{\MapsNumber}{% + \ifnum \normalmonth<6 + \xdef\MapsNumber{\the\numexpr (\the\year-1990)*2\relax}% + \else + \xdef\MapsNumber{\the\numexpr (\the\year-1990)*2+1\relax}% + \fi }% + \doifnothing\MapsRunningAuthor + {\global\let\MapsRunningAuthor\MapsAuthor}% + \doifnothing\MapsRunningTitle + {\global\let\MapsRunningTitle\MapsTitle}}% + +\def\dostartArticle[#1]{% + \MapsBibData[#1] + \pageno=\MapsPage + \setupuserpagenumber[start=\MapsPage] + \startbaselinecorrection + \bgroup + \hsize = 457pt + \let\\\crlf + \blank[35pt,force] + \switchtobodyfont[24pt] + \setupalign[right] + {\noindent\bf\MapsTitle\par} + \ifx\MapsSubTitle\empty + \blank[30pt] + \else + \bgroup + \blank[12pt] + \switchtobodyfont[18pt]\noindent \it + \advance \rightskip 0pt plus 2em + \MapsSubTitle\par + \egroup + \blank[30pt] + \fi + \egroup + \setupalign[width] + \switchtobodyfont[rm,10pt] + \stopbaselinecorrection + \ifMapsInColumns + \startcolumns\hyphenpenalty1000 + \else + \clubpenalty10000 + \widowpenalty10000 + \fi +} + +\def\startArticle{\dosingleempty\dostartArticle} + +\def\signArticle{% + \blank\let\\\crlf + \noindent\switchtobodyfont[ss,9pt]% + \MapsAuthor + \doifsomething{\MapsAddress}{\\\MapsAddress}% + \doifsomething{\MapsEmail}{\\\MapsEmail}% + \switchtobodyfont[10pt]% + \def\signArticle{}% +} + +\def\stopArticle{% + \par\signArticle + \ifMapsInColumns \stopcolumns \fi + \page +} + +\installpagebreakmethod{last}{} + +%%% `logos' %%%%%%%%%%%%%%%%%%%%%%%%%% + +\unexpanded\def\LaTeX % requested by erik frambach + {{\setbox\scratchbox\hbox{L}% + \scratchdimen\ht\scratchbox + \setbox\scratchbox\hbox{\switchtobodyfont[script]A}% + L\kern-.55\wd\scratchbox + \raise\scratchdimen\hbox{\lower\ht\scratchbox\copy\scratchbox}% + \kern-.2\wd\scratchbox\TeX}} + + +\def\CONTEXT{Con{\TeX}t} +\def\ConTeXt{Con{\TeX}t} +\def\METAFONT{Metafont} +\def\METAPOST{MetaPost} +\def\POSTSCRIPT{PostScript} + +\def\acro#1{{\switchtobodyfont[9pt]#1}} + + +%%%%%%%%%%% + +\doifelsemode{onecolumn}{% + \setuplayout[width=340pt] + \doifelsemode{asym}{% one col, asymmetric + \setuplayout[backspace=187.3pt]% + \setuptyping [widetyping][oddmargin=-117pt] + \setuppagenumbering [alternative={singlesided,doublesided}] + \setupheadertexts + [{\hbox{}\hskip-117pt\TiHead}] + [{\cap{\MapsPeriod\ \MapsYear}\quad\bf \pagenumber\hskip-30pt\hbox{}}] + [{\hbox{}\hskip-147pt{\bf \pagenumber}\quad \cap {maps\ \MapsNumber}}] + [\AuHead] + \setupfootertexts + }{% one col, symmetric + \setuplayout[backspace=70.3pt] + \setuppagenumbering [alternative=doublesided] + \setuptyping[blank=halfline] + \setupheadertexts + [\TiHead] + [{\cap{\MapsPeriod\ \MapsYear}\quad\bf \pagenumber\hskip-147pt\hbox{}}] + [{\hbox{}\hskip-147pt{\bf \pagenumber}\quad \cap {maps\ \MapsNumber}}] + [\AuHead] + \setupfootertexts +}}{% two col + \setuplayout[width=457pt] + \setupcolumns[n=2,tolerance=verytolerant,distance=11pt] + \setuplayout[backspace=70.3pt,grid=yes] + \setuppagenumbering [alternative=doublesided] + \setuptyping[blank=halfline] + \setupheadertexts + [\TiHead] + [{\cap{\MapsPeriod\ \MapsYear}\quad\bf \pagenumber\hskip-30pt\hbox{}}] + [{\hbox{}\hskip-30pt{\bf \pagenumber}\quad \cap {maps\ \MapsNumber}}] + [\AuHead] + \setupfootertexts +} + +\def\fulltextwidth{457pt} + +\def\startdescription + {\blank + \bgroup + \def\sym##1{\par\noindent\hbox{\bf\kern -16pt ##1}\hskip 12pt} + \startnarrower[left] + } +\def\stopdescription + {\par \stopnarrower \egroup \blank \noindentation } + +\frenchspacing +\setuptolerance[tolerant] + +\endinput diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index f1719781a..f274c4319 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/sources/luatex-fonts.lua --- merge date : 02/21/18 18:19:44 +-- merge date : 02/23/18 22:11:13 do -- begin closure to overcome local limits and interference -- cgit v1.2.3