summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/modules
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-03-05 00:48:46 +0000
committerKarl Berry <karl@freefriends.org>2020-03-05 00:48:46 +0000
commitf210bce174e1f2f05305ab03e88e120a1cbfc4da (patch)
tree5c4e2ad096b5c745e859516ac3196fa0864292d5 /Master/texmf-dist/tex/context/modules
parent35fd641a3546acc0c62e0aa7f134888e36da30d4 (diff)
context (from cont-tmf.zip of Feb 17 16:00, size 116339406)
git-svn-id: svn://tug.org/texlive/trunk@54086 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/modules')
-rw-r--r--Master/texmf-dist/tex/context/modules/common/s-abbreviations-logos.tex38
-rw-r--r--Master/texmf-dist/tex/context/modules/common/s-abbreviations-mixed.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-asymptote.lua4
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-catchword.mkiv136
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-chart.lua7
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-chart.mkvi2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-markdown.lua824
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-markdown.mkiv88
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-punk.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-scite.mkiv20
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-simulate.mkiv222
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-sql.mkiv5
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/m-zint.mkiv112
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-abbreviations-mixed.mkiv2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-cgj.mkiv750
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-fonts-features.lua1
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-fonts-system.lua2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-fonts-tables.lua2
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.mkiv34
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-inf-01.mkvi52
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-inf-03.mkiv11
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-magazine-basic.mkiv14
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-maps.mkiv820
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-present-luatex.mkiv118
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-tugboat.mkiv818
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/x-asciimath.lua35
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/x-pandoc.mkiv152
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/x-setups-basics.mkiv4
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/x-setups-overview.mkiv39
29 files changed, 2173 insertions, 2145 deletions
diff --git a/Master/texmf-dist/tex/context/modules/common/s-abbreviations-logos.tex b/Master/texmf-dist/tex/context/modules/common/s-abbreviations-logos.tex
index 203ee936b98..11c5b9725d2 100644
--- a/Master/texmf-dist/tex/context/modules/common/s-abbreviations-logos.tex
+++ b/Master/texmf-dist/tex/context/modules/common/s-abbreviations-logos.tex
@@ -20,10 +20,13 @@
\logo [MKVI] {MkVI}
\logo [MKIX] {MkIX}
\logo [MKXI] {MkXI}
-\logo [MKIC] {MkIC}
-\logo [MKCI] {MkCI}
+\logo [MKXL] {MkXL}
+\logo [MKLX] {MkLX}
\logo [MPII] {MpII}
\logo [MPIV] {MpIV}
+\logo [MPVI] {MpVI}
+\logo [MPLX] {MpLX}
+\logo [MPXL] {MpXL}
\logo [LMTX] {lmtx}
\logo [ACROBAT] {Acro\-bat}
@@ -43,6 +46,7 @@
\logo [ASCIIMATH] {AsciiMath}
\logo [ASCIITEX] {ascii\TeXsuffix}
\logo [BACHOTEX] {Bacho\TeXsuffix}
+\logo [BASIC] {Basic}
\logo [BIBTEX] {bib\TeXsuffix}
\logo [BLUESKY] {BlueSky}
\logo [BMP] {bmp}
@@ -53,7 +57,7 @@
\logo [CDROM] {cdrom}
\logo [CID] {cid}
\logo [CJK] {cjk}
-\logo [CLD] {cld}
+\logo [CLANG] {clang}
\logo [CLD] {cld}
\logo [CMAKE] {cmake}
\logo [CMR] {cmr}
@@ -66,8 +70,10 @@
\logo [CPLUSPLUS] {C\high{++}}
\logo [CPU] {cpu}
\logo [CSS] {css}
+\logo [CSV] {csv}
\logo [CTAN] {ctan}
\logo [CTXTOOLS] {ctxtools}
+\logo [CURL] {Curl}
\logo [CWEB] {cweb}
\logo [DAC] {dac}
\logo [DARWIN] {Darwin}
@@ -91,6 +97,7 @@
\logo [DVIWINDO] {dviwindo}
\logo [EBCDIC] {ebcdic}
\logo [EC] {ec}
+\logo [ECMASCRIPT] {ecmascript}
\logo [EIFFEL] {Eiffel}
\logo [EMACS] {emacs}
\logo [EMTEX] {em\TeXsuffix}
@@ -127,6 +134,7 @@
\logo [GIF] {gif}
\logo [GNU] {gnu}
\logo [GNUPLOT] {gnuplot}
+\logo [GRAPHICSMAGICK]{GraphicsMagick}
\logo [GS] {Ghost\-Script}
\logo [GUST] {Gust}
\logo [GWTEX] {gw\TeXsuffix}
@@ -141,14 +149,17 @@
\logo [INITEX] {ini\TeXsuffix}
\logo [INRSTEX] {inrs\TeXsuffix}
\logo [IO] {io}
+\logo [INKSCAPE] {Inkscape}
\logo [IRCNET] {IRCnet}
\logo [ISO] {iso}
\logo [JAVA] {Java}
\logo [JAVASCRIPT] {Java\-Script}
\logo [JBIG] {jbig}
+\logo [JIT] {jit}
\logo [JPEG] {jpeg}
\logo [JPG] {jpg}
\logo [JSON] {json}
+\logo [KB] {KB}
\logo [KPATHSEA] {kpathsea}
\logo [KPSE] {kpse}
\logo [KPSEWHICH] {kpsewhich}
@@ -163,9 +174,10 @@
\logo [LMX] {lmx}
\logo [LPEG] {lpeg}
\logo [LUA] {Lua}
-\logo [LUAJIT] {LuaJIT}
-\logo [LUAJITTEX] {Luajit\TeXsuffix}
-\logo [LUATEX] {Lua\TeXsuffix}
+\logo [LUAJIT] {Lua\wordboundary JIT}
+\logo [LUAJITTEX] {Lua\wordboundary jit\TeXsuffix}
+\logo [LUAMETATEX] {\Lua\wordboundary Meta\wordboundary\TeXsuffix}
+\logo [LUATEX] {Lua\wordboundary\TeXsuffix}
\logo [LUATOOLS] {luatools}
\logo [MACOSX] {MacOSX}
%logo [MACROTEX] {Macro\TeXsuffix}
@@ -174,6 +186,7 @@
\logo [MAPS] {Maps}
\logo [MATHML] {MathML}
\logo [METAFONT] {\MetaFont}
+\logo [LUAMETAFUN] {\Lua\wordboundary\MetaFun}
\logo [METAFUN] {\MetaFun}
\logo [METAPOST] {\MetaPost}
\logo [METATEX] {Meta\TeXsuffix}
@@ -192,6 +205,7 @@
\logo [MPTOPDF] {mptopdf}
\logo [MSDOS] {msdos}
\logo [MSEXCEL] {MS~Excel}
+\logo [MSVC] {MSVC}
\logo [MSWINDOWS] {MS~Windows}
\logo [MSWORD] {MS~Word}
\logo [MTXRUN] {mtxrun}
@@ -206,6 +220,7 @@
\logo [OPENBSD] {OpenBSD}
\logo [OPENMATH] {OpenMath}
\logo [OPENTYPE] {OpenType}
+\logo [OPENOFFICE] {OpenOffice}
\logo [OPI] {opi}
\logo [OSX] {os-x}
\logo [OTEX] {Oriental \TeXsuffix}
@@ -213,6 +228,7 @@
\logo [OTP] {otp}
\logo [OVF] {ovf}
\logo [PASCAL] {Pascal}
+\logo [PATGEN] {Patgen}
\logo [PCTEX] {pc\TeXsuffix}
\logo [PDF] {pdf}
\logo [PDFETEX] {pdfe\TeXsuffix}
@@ -228,6 +244,7 @@
\logo [PLAIN] {Plain}
\logo [PNG] {png}
\logo [POSIX] {posix}
+\logo [POSTGRESS] {Post\-gress}
\logo [POSTSCRIPT] {Post\-Script}
\logo [PPCHTEX] {\PPCHTeX}
\logo [PRAGMA] {Pragma ADE}
@@ -261,6 +278,7 @@
\logo [SWIG] {swig}
\logo [SWIGLIB] {SwigLib}
\logo [SYNCTEX] {Sync\TeX}
+\logo [SQLITE] {SQLite}
\logo [TABLE] {\TaBlE}
\logo [TCPIP] {tcp/ip}
\logo [TDS] {tds} % no sc te
@@ -304,6 +322,7 @@
\logo [TUGBOAT] {Tug\-Boat}
\logo [TUGNEWS] {Tug\-News}
\logo [TYPEONE] {Type1}
+\logo [TYPETHREE] {Type3}
\logo [UCS] {ucs}
\logo [UNICODE] {Uni\-code}
\logo [UNIX] {Unix}
@@ -325,6 +344,7 @@
%logo [WINNX] {Win9x}
\logo [WTHREEC] {W3C}
\logo [WWW] {www}
+\logo [WIKIPEDIA] {Wikipedia} % WikipediA (looks too weird)
\logo [WYSIWYG] {wysiwyg}
%logo [XDVI] {Xdvi}
\logo [XETEX] {\XeTeX}
@@ -344,5 +364,11 @@
\logo [YandY] {y\&y}
\logo [YOUTUBE] {YouTube}
\logo [ZIP] {zip}
+\logo [ZINT] {zint}
+
+\logo [KB] {KB}
+\logo [MB] {MB}
+\logo [GB] {GB}
+\logo [TB] {TB}
\stopmodule
diff --git a/Master/texmf-dist/tex/context/modules/common/s-abbreviations-mixed.mkiv b/Master/texmf-dist/tex/context/modules/common/s-abbreviations-mixed.mkiv
index f7b2121d042..d5294fd56e2 100644
--- a/Master/texmf-dist/tex/context/modules/common/s-abbreviations-mixed.mkiv
+++ b/Master/texmf-dist/tex/context/modules/common/s-abbreviations-mixed.mkiv
@@ -1,5 +1,5 @@
%D \module
-%D [ file= s-abbreviations-mixed, % was: s-abr-04
+%D [ file=s-abbreviations-mixed, % was: s-abr-04
%D version=1996.01.01,
%D title=\CONTEXT\ Style File,
%D subtitle=General Abbreviations Mixed,
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-asymptote.lua b/Master/texmf-dist/tex/context/modules/mkiv/m-asymptote.lua
index 39a0d987bee..31a81433fba 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-asymptote.lua
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-asymptote.lua
@@ -17,7 +17,7 @@ sandbox.registerrunner {
name = "asymptote prc",
program = "asy",
method = "execute",
- template = '-noV -config="" -tex=context -outformat="prc" "%filename%"',
+ template = [[-noV -config="" -tex=context -outformat="prc" %filename%]],
checkers = { filename = "readable" },
}
@@ -25,7 +25,7 @@ sandbox.registerrunner {
name = "asymptote pdf",
program = "asy",
method = "execute",
- template = '-noV -config="" -tex=context -outformat="pdf" "%filename%"',
+ template = [[-noV -config="" -tex=context -outformat="pdf" %filename%]],
checkers = { filename = "readable" },
}
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-catchword.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/m-catchword.mkiv
new file mode 100644
index 00000000000..70d713e44c1
--- /dev/null
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-catchword.mkiv
@@ -0,0 +1,136 @@
+%D \module
+%D [ file=m-catchword,
+%D version=2019.08.09,
+%D title=\CONTEXT\ Extra Modules,
+%D subtitle=Catchwords,
+%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.
+
+\startluacode
+
+-- If someone realy need it there probably is no need for speed, so we do
+-- it quick and dirty.
+
+local nodecodes = nodes.nodecodes
+local kerncodes = nodes.kerncodes
+
+local glyph_code = nodecodes.glyph
+local disc_code = nodecodes.disc
+local kern_code = nodecodes.kern
+local hlist_code = nodecodes.hlist
+
+local fontkern_code = kerncodes.fontkern
+
+local function set_catchword(t)
+ local nextpage = tex.lists.contrib_head
+ if not nextpage then
+ return
+ end
+ local firstline = nil
+ for n in nodes.traverse_id(hlist_code,nextpage) do
+ firstline = n
+ break
+ end
+ if not firstline then
+ return
+ end
+ local list = firstline.list
+ if not list then
+ return
+ end
+ local first = nil
+ local last = nil
+ for n, id, subtype in nodes.traverse(list) do
+ if id == glyph_code or id == disc_code or (id == kern_code and subtype == fontkern_code) then
+ if not first then
+ first = n
+ end
+ last = n
+ elseif first then
+ break
+ end
+ end
+ if not first then
+ return
+ end
+ local page = tex.getbox(t.box)
+ local head = nodes.copy_list(first,last.next)
+ head = nodes.insert_before(head,head,nodes.pool.glue(1,1,1))
+ local line = nodes.hpack(head,page.width,"exactly")
+ if CONTEXTLMTXMODE > 0 then
+ line.yoffset = -t.voffset
+ line.xoffset = t.hoffset
+ else
+ line.shift = t.hoffset
+ line = nodes.insert_before(line,line,nodes.pool.kern(t.voffset-line.height))
+ line = nodes.vpack(line)
+ end
+ line.height = 0
+ line.depth = 0
+ node.insert_after(page.list,nodes.tail(page.list),line)
+ logs.report("catchword","appending %a on page %i",nodes.toutf(head),tex.getcount("realpageno"))
+end
+
+interfaces.implement {
+ name = "set_catchword",
+ actions = set_catchword,
+ arguments = {
+ {
+ { "box", "integer" },
+ { "hoffset", "dimension" },
+ { "voffset", "dimension" },
+ },
+ },
+}
+
+\stopluacode
+
+\unprotect
+
+\installcorenamespace {catchword}
+
+\installsimplecommandhandler \??catchword {catchword}
+
+\setupcatchword
+ [\c!state=\v!stop,
+ \c!hoffset=\zeropoint,
+ \c!voffset=\lineheight]
+
+\def\page_check_catchword_yes#1%
+ {\clf_set_catchword
+ box #1
+ hoffset \catchwordparameter\c!hoffset
+ voffset \catchwordparameter\c!voffset
+ \relax}
+
+\let\page_check_catchword_nop\gobbleoneargument
+
+\appendtoks
+ \doifelse{\catchwordparameter\c!state}\v!start
+ {\let\page_check_catchword\page_check_catchword_yes}%
+ {\let\page_check_catchword\page_check_catchword_nop}%
+\to \everysetupcatchword
+
+\appendtoks
+ \page_check_catchword\b_page_postprocessor
+\to \t_page_postprocessors_page
+
+\protect
+
+\continueifinputfile{m-catchword.mkiv}
+
+\setupcatchword
+ [state=start,
+ hoffset=.75em,
+ voffset=1cm]
+
+\starttext
+
+ \dorecurse{100}{\input ward }
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-chart.lua b/Master/texmf-dist/tex/context/modules/mkiv/m-chart.lua
index 7973640a783..1cdfd9f65d8 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-chart.lua
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-chart.lua
@@ -648,8 +648,8 @@ end
-- todo : make lpeg for splitter
-local sign = S("+p") / "1"
- + S("-m") / "-1"
+local sign = S("+p") / "1"
+ + S("-mn") / "-1"
local full = C(P("left"))
+ C(P("right"))
@@ -962,6 +962,7 @@ local function makechart_indeed(chart)
local labeloffset = chartsettings.labeloffset
local exitoffset = chartsettings.exitoffset
local commentoffset = chartsettings.commentoffset
+ local clipoffset = chartsettings.clipoffset
ctx_tographic(g,"flow_grid_width := %p ;", gridwidth)
ctx_tographic(g,"flow_grid_height := %p ;", gridheight)
ctx_tographic(g,"flow_shape_width := %p ;", shapewidth)
@@ -996,6 +997,7 @@ local function makechart_indeed(chart)
offset = radius -- or rulethickness?
end
ctx_tographic(g,"flow_chart_offset := %p ;",offset)
+ ctx_tographic(g,"flow_chart_clip_offset := %p ;",clipoffset)
--
ctx_tographic(g,"flow_reverse_y := true ;")
if chartsettings.option == v_test then
@@ -1126,6 +1128,7 @@ implement {
{ "ny", "integer" },
{ "x", "integer" },
{ "y", "integer" },
+ { "clipoffset", "dimension" },
{ "labeloffset", "dimension" },
{ "commentoffset", "dimension" },
{ "exitoffset", "dimension" },
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-chart.mkvi b/Master/texmf-dist/tex/context/modules/mkiv/m-chart.mkvi
index 4c5ea7e021c..a9d3dfdd931 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-chart.mkvi
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-chart.mkvi
@@ -52,6 +52,7 @@
[\c!width=12\bodyfontsize,
\c!height=7\bodyfontsize,
\c!offset=\FLOWlineparameter\c!rulethickness,
+ \c!clipoffset=\bodyfontsize,
\c!dx=2\bodyfontsize,
\c!dy=2\bodyfontsize,
\c!nx=0,
@@ -203,6 +204,7 @@
dx \dimexpr\FLOWchartparameter\c!dx\relax
dy \dimexpr\FLOWchartparameter\c!dy\relax
offset \dimexpr\FLOWchartparameter\c!offset\relax
+ clipoffset \dimexpr\FLOWchartparameter\c!clipoffset\relax
% bodyfont {\FLOWchartparameter\c!bodyfont}
dot {\FLOWchartparameter\c!dot} % private option
hcompact {\FLOWchartparameter\c!hcompact} % undocumented option
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-markdown.lua b/Master/texmf-dist/tex/context/modules/mkiv/m-markdown.lua
deleted file mode 100644
index 1f9402f60e3..00000000000
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-markdown.lua
+++ /dev/null
@@ -1,824 +0,0 @@
-if not modules then modules = { } end modules ['m-markdown'] = {
- version = 1.002,
- comment = "companion to m-markdown.mkiv",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "see below",
- license = "see context related readme files"
-}
-
---[[
-Copyright (C) 2009 John MacFarlane / Khaled Hosny / Hans Hagen
-
-The main parser is derived from the lunamark parser written by John MacFarlane. You
-can download lunamark from:
-
- http://github.com/jgm/lunamark.git
-
-Khaled Hosny provided the context writer for lunamark and that was used as starting
-point for the mapping. The original code can be fetched from the above location.
-
-While playing with the original code I got the feeling that lpeg could perform better.
-The slowdown was due to the fact that the parser's lpeg was reconstructed each time a
-nested parse was needed. After changing that code a bit I could bring down parsing of
-some test code from 2 seconds to less than 0.1 second so I decided to stick to this
-parser instead of writing my own. After all, the peg code looks pretty impressive and
-visiting Johns pandoc pages is worth the effort:
-
- http://johnmacfarlane.net/pandoc/
-
-The code here is mostly meant for processing snippets embedded in a context
-documents and is no replacement for pandoc at all. Therefore an alternative is to use
-pandoc in combination with Aditya's filter module.
-
-As I changed (and optimized) the original code, it will be clear that all errors
-are mine. Eventually I might also adapt the parser code a bit more. When I ran into of
-closure stack limitations I decided to flatten the code. The following implementation
-seems to be a couple of hundred times faster than what I started with which is not that
-bad.
-
-This is a second rewrite. The mentioned speed gain largely depended on the kind of
-content: blocks, references and items can be rather demanding. Also, There were
-some limitations with respect to the captures. So, table storage has been removed in
-favor of strings, and nesting has been simplified. The first example at the end of this
-file now takes .33 seconds for 567KB code (resulting in over 1MB) so we're getting there.
-
-There will be a third rewrite eventually.
-]]--
-
--- todo: we have better quote and tag scanners in ctx
--- todo: provide an xhtml mapping
--- todo: add a couple of extensions
--- todo: check patches to the real peg
-
-local type, next, tonumber = type, next, tonumber
-local lower, upper, gsub, rep, gmatch, format, length = string.lower, string.upper, string.gsub, string.rep, string.gmatch, string.format, string.len
-local concat = table.concat
-local P, R, S, V, C, Ct, Cg, Cb, Cmt, Cc, Cf, Cs = lpeg.P, lpeg.R, lpeg.S, lpeg.V, lpeg.C, lpeg.Ct, lpeg.Cg, lpeg.Cb, lpeg.Cmt, lpeg.Cc, lpeg.Cf, lpeg.Cs
-local lpegmatch = lpeg.match
-local utfbyte, utfchar = utf.byte, utf.char
-
-moduledata = moduledata or { }
-moduledata.markdown = moduledata.markdown or { }
-local markdown = moduledata.markdown
-
-local nofruns, nofbytes, nofhtmlblobs = 0, 0, 0
-
----------------------------------------------------------------------------------------------
-
-local nestedparser
-local syntax
-
-nestedparser = function(str) return lpegmatch(syntax,str) end
-
----------------------------------------------------------------------------------------------
-
-local asterisk = P("*")
-local dash = P("-")
-local plus = P("+")
-local underscore = P("_")
-local period = P(".")
-local hash = P("#")
-local ampersand = P("&")
-local backtick = P("`")
-local less = P("<")
-local more = P(">")
-local space = P(" ")
-local squote = P("'")
-local dquote = P('"')
-local lparent = P("(")
-local rparent = P(")")
-local lbracket = P("[")
-local rbracket = P("]")
-local slash = P("/")
-local equal = P("=")
-local colon = P(":")
-local semicolon = P(";")
-local exclamation = P("!")
-
-local digit = R("09")
-local hexdigit = R("09","af","AF")
-local alphanumeric = R("AZ","az","09")
-
-local doubleasterisks = P("**")
-local doubleunderscores = P("__")
-local fourspaces = P(" ")
-
-local any = P(1)
-local always = P("")
-
-local tab = P("\t")
-local spacechar = S("\t ")
-local spacing = S(" \n\r\t")
-local newline = P("\r")^-1 * P("\n")
-local spaceornewline = spacechar + newline
-local nonspacechar = any - spaceornewline
-local optionalspace = spacechar^0
-local spaces = spacechar^1
-local eof = - any
-local nonindentspace = space^-3
-local blankline = optionalspace * C(newline)
-local blanklines = blankline^0
-local skipblanklines = (optionalspace * newline)^0
-local linechar = P(1 - newline)
-local indent = fourspaces + (nonindentspace * tab) / ""
-local indentedline = indent /"" * C(linechar^1 * (newline + eof))
-local optionallyindentedline = indent^-1 /"" * C(linechar^1 * (newline + eof))
-local spnl = optionalspace * (newline * optionalspace)^-1
-local specialchar = S("*_`*&[]<!\\")
-local normalchar = any - (specialchar + spaceornewline)
-local line = C((any - newline)^0 * newline)
- + C(any^1 * eof)
-local nonemptyline = (any - newline)^1 * newline
-
----------------------------------------------------------------------------------------------
-
-local function lineof(c)
- return (nonindentspace * (P(c) * optionalspace)^3 * newline * blankline^1)
-end
-
-local lineof_asterisks = lineof(asterisk)
-local lineof_dashes = lineof(dash)
-local lineof_underscores = lineof(underscore)
-
-local bullet = nonindentspace * (plus + (asterisk - lineof_asterisks) + (dash - lineof_dashes)) * spaces
-local enumerator = nonindentspace * digit^1 * period * spaces
-
----------------------------------------------------------------------------------------------
-
-local openticks = Cg(backtick^1, "ticks")
-local closeticks = space^-1 * Cmt(C(backtick^1) * Cb("ticks"), function(s,i,a,b) return #a == #b and i end)
-local intickschar = (any - S(" \n\r`"))
- + (newline * -blankline)
- + (space - closeticks)
- + (backtick^1 - closeticks)
-local inticks = openticks * space^-1 * C(intickschar^1) * closeticks
-
----------------------------------------------------------------------------------------------
-
-local leader = space^-3
-local nestedbrackets = P { lbracket * ((1 - lbracket - rbracket) + V(1))^0 * rbracket }
-local tag = lbracket * C((nestedbrackets + 1 - rbracket)^0) * rbracket
-local url = less * C((1-more)^0) * more
- + C((1-spacing- rparent)^1) -- sneaky: ) for resolver
-local title_s = squote * lpeg.C((1-squote )^0) * squote
-local title_d = dquote * lpeg.C((1-dquote )^0) * dquote
-local title_p = lparent * lpeg.C((1-rparent)^0) * rparent
-local title = title_s + title_d + title_p
-local optionaltitle = ((spacing^0 * title * spacechar^0) + lpeg.Cc(""))
-
-local references = { }
-
-local function register_link(tag,url,title)
- tag = lower(gsub(tag, "[ \n\r\t]+", " "))
- references[tag] = { url, title }
-end
-
-local function direct_link(label,url,title) -- title is typical html thing
- return label, url, title
-end
-
-local function indirect_link(label,tag)
- if tag == "" then
- tag = label
- end
- tag = lower(gsub(tag, "[ \n\r\t]+", " "))
- local r = references[tag]
- if r then
- return label, r[1], r[2]
- else
- return label, tag, ""
- end
-end
-
-local define_reference_parser = (leader * tag * colon * spacechar^0 * url * optionaltitle) / register_link
-local direct_link_parser = tag * spacechar^0 * lparent * (url + Cc("")) * optionaltitle * rparent / direct_link
-local indirect_link_parser = tag * spacechar^0 * tag / indirect_link
-
-local rparser = (define_reference_parser+1)^0
-
-local function referenceparser(str)
- references = { }
- lpegmatch(rparser,str)
-end
-
--- local reftest = [[
--- [1]: <http://example.com/>
--- [3]:http://example.com/ (Optional Title Here)
--- [2]: http://example.com/ 'Optional Title Here'
--- [a]: http://example.com/ "Optional *oeps* Title Here"
--- ]]
---
--- local linktest = [[
--- [This link] (http://example.net/)
--- [an example] (http://example.com/ "Title")
--- [an example][1]
--- [an example] [2]
--- ]]
---
--- lpeg.match((define_reference_parser+1)^0,reftest)
---
--- inspect(references)
---
--- lpeg.match((direct_link_parser/print + indirect_link_parser/print + 1)^0,linktest)
-
----------------------------------------------------------------------------------------------
-
-local blocktags = table.tohash {
- "address", "blockquote" , "center", "dir", "div", "p", "pre",
- "li", "ol", "ul", "dl", "dd",
- "form", "fieldset", "isindex", "menu", "noframes", "frameset",
- "h1", "h2", "h3", "h4", "h5", "h6",
- "hr", "ht", "script", "noscript",
- "table", "tbody", "tfoot", "thead", "th", "td", "tr",
-}
-
------ htmlattributevalue = squote * C((any - (blankline + squote))^0) * squote
------ + dquote * C((any - (blankline + dquote))^0) * dquote
------ + (any - S("\t >"))^1 -- any - tab - space - more
------ htmlattribute = (alphanumeric + S("_-"))^1 * spnl * (equal * spnl * htmlattributevalue)^-1 * spnl
------ htmlcomment = P("<!--") * (any - P("-->"))^0 * P("-->")
-
------ htmltag = less * spnl * slash^-1 * alphanumeric^1 * spnl * htmlattribute^0 * slash^-1 * spnl * more
------
------ blocktag = Cmt(C(alphanumeric^1), function(s,i,a) return blocktags[lower(a)] and i, a end)
------
------ openblocktag = less * Cg(blocktag, "opentag") * spnl * htmlattribute^0 * more
------ closeblocktag = less * slash * Cmt(C(alphanumeric^1) * Cb("opentag"), function(s,i,a,b) return lower(a) == lower(b) and i end) * spnl * more
------ selfclosingblocktag = less * blocktag * spnl * htmlattribute^0 * slash * more
------
------ displayhtml = Cs { "HtmlBlock",
------ InBlockTags = openblocktag * (V("HtmlBlock") + (any - closeblocktag))^0 * closeblocktag,
------ HtmlBlock = C(V("InBlockTags") + selfclosingblocktag + htmlcomment),
------ }
------
------ inlinehtml = Cs(htmlcomment + htmltag)
-
--- There is no reason to support crappy html, so we expect proper attributes.
-
-local htmlattributevalue = squote * C((any - (blankline + squote))^0) * squote
- + dquote * C((any - (blankline + dquote))^0) * dquote
-local htmlattribute = (alphanumeric + S("_-"))^1 * spnl * equal * spnl * htmlattributevalue * spnl
-
-local htmlcomment = P("<!--") * (any - P("-->"))^0 * P("-->")
-local htmlinstruction = P("<?") * (any - P("?>" ))^0 * P("?>" )
-
--- We don't care too much about matching elements and there is no reason why display elements could not
--- have inline elements so the above should be patched then. Well, markdown mixed with html is not meant
--- for anything else than webpages anyway.
-
-local blocktag = Cmt(C(alphanumeric^1), function(s,i,a) return blocktags[lower(a)] and i, a end)
-
-local openelement = less * alphanumeric^1 * spnl * htmlattribute^0 * more
-local closeelement = less * slash * alphanumeric^1 * spnl * more
-local emptyelement = less * alphanumeric^1 * spnl * htmlattribute^0 * slash * more
-
-local displaytext = (any - less)^1
-local inlinetext = displaytext / nestedparser
-
-local displayhtml = #(less * blocktag * spnl * htmlattribute^0 * more)
- * Cs { "HtmlBlock",
- InBlockTags = openelement * (V("HtmlBlock") + displaytext)^0 * closeelement,
- HtmlBlock = (V("InBlockTags") + emptyelement + htmlcomment + htmlinstruction),
- }
-
-local inlinehtml = Cs { "HtmlBlock",
- InBlockTags = openelement * (V("HtmlBlock") + inlinetext)^0 * closeelement,
- HtmlBlock = (V("InBlockTags") + emptyelement + htmlcomment + htmlinstruction),
- }
-
----------------------------------------------------------------------------------------------
-
-local hexentity = ampersand * hash * S("Xx") * C(hexdigit ^1) * semicolon
-local decentity = ampersand * hash * C(digit ^1) * semicolon
-local tagentity = ampersand * C(alphanumeric^1) * semicolon
-
----------------------------------------------------------------------------------------------
-
--- --[[
-
-local escaped = {
- ["{" ] = "",
- ["}" ] = "",
- ["$" ] = "",
- ["&" ] = "",
- ["#" ] = "",
- ["~" ] = "",
- ["|" ] = "",
- ["%%"] = "",
- ["\\"] = "",
-}
-
-for k, v in next, escaped do
- escaped[k] = "\\char" .. utfbyte(k) .. "{}"
-end
-
-local function c_string(s) -- has to be done more often
- return (gsub(s,".",escaped))
-end
-
-local c_linebreak = "\\crlf\n" -- is this ok?
-local c_space = " "
-
-local function c_paragraph(c)
- return c .. "\n\n" -- { "\\startparagraph ", c, " \\stopparagraph\n" }
-end
-
-local function listitem(c)
- return format("\n\\startitem\n%s\n\\stopitem\n",nestedparser(c))
-end
-
-local function c_tightbulletlist(c)
- return format("\n\\startmarkdownitemize[packed]\n%s\\stopmarkdownitemize\n",c)
-end
-
-local function c_loosebulletlist(c)
- return format("\n\\startmarkdownitemize\n\\stopmarkdownitemize\n",c)
-end
-
-local function c_tightorderedlist(c)
- return format("\n\\startmarkdownitemize[n,packed]\n%s\\stopmarkdownitemize\n",c)
-end
-
-local function c_looseorderedlist(c)
- return format("\n\\startmarkdownitemize[n]\n%s\\stopmarkdownitemize\n",c)
-end
-
-local function c_inline_html(content)
- nofhtmlblobs = nofhtmlblobs + 1
- return format("\\markdowninlinehtml{%s}",content)
-end
-
-local function c_display_html(content)
- nofhtmlblobs = nofhtmlblobs + 1
- return format("\\startmarkdowndisplayhtml\n%s\n\\stopmarkdowndisplayhtml",content)
-end
-
-local function c_emphasis(c)
- return format("\\markdownemphasis{%s}",c)
-end
-
-local function c_strong(c)
- return format("\\markdownstrong{%s}",c)
-end
-
-local function c_blockquote(c)
- return format("\\startmarkdownblockquote\n%s\\stopmarkdownblockquote\n",nestedparser(c))
-end
-
-local function c_verbatim(c)
- return format("\\startmarkdowntyping\n%s\\stopmarkdowntyping\n",c)
-end
-
-local function c_code(c)
- return format("\\markdowntype{%s}",c)
-end
-
-local levels = { "", "", "", "", "", "" }
-
-local function c_start_document()
- levels = { "", "", "", "", "", "" }
- return ""
-end
-
-local function c_stop_document()
- return concat(levels,"\n") or ""
-end
-
-local function c_heading(level,c)
- if level > #levels then
- level = #levels
- end
- local finish = concat(levels,"\n",level) or ""
- for i=level+1,#levels do
- levels[i] = ""
- end
- levels[level] = "\\stopstructurelevel"
- return format("%s\\startstructurelevel[markdown][title={%s}]\n",finish,c)
-end
-
-local function c_hrule()
- return "\\markdownrule\n"
-end
-
-local function c_link(lab,src,tit)
- return format("\\goto{%s}[url(%s)]",nestedparser(lab),src)
-end
-
-local function c_image(lab,src,tit)
- return format("\\externalfigure[%s]",src)
-end
-
-local function c_email_link(address)
- return format("\\goto{%s}[url(mailto:%s)]",c_string(address),address)
-end
-
-local function c_url_link(url)
- return format("\\goto{%s}[url(%s)]",c_string(url),url)
-end
-
-local function f_heading(c,n)
- return c_heading(n,c)
-end
-
-local function c_hex_entity(s)
- return utfchar(tonumber(s,16))
-end
-
-local function c_dec_entity(s)
- return utfchar(tonumber(s))
-end
-
-local function c_tag_entity(s)
- return s -- we can use the default resolver
-end
-
---]]
-
----------------------------------------------------------------------------------------------
-
---[[
-
-local escaped = {
- ["<"] = "&lt;",
- [">"] = "&gt;",
- ["&"] = "&amp;",
- ['"'] = "&quot;",
-}
-
-local function c_string(s) -- has to be done more often
- return (gsub(s,".",escaped))
-end
-
-local c_linebreak = "<br/>"
-local c_space = " "
-
-local function c_paragraph(c)
- return format("<p>%s</p>\n", c)
-end
-
-local function listitem(c)
- return format("<li>%s</li>",nestedparser(c))
-end
-
-local function c_tightbulletlist(c)
- return format("<ul>\n%s\n</ul>\n",c)
-end
-
-local function c_loosebulletlist(c)
- return format("<ul>\n%s\n</ul>\n",c)
-end
-
-local function c_tightorderedlist(c)
- return format("<ol>\n%s\n</ol>\n",c)
-end
-
-local function c_looseorderedlist(c)
- return format("<ol>\n%s\n</ol>\n",c)
-end
-
-local function c_inline_html(content)
- nofhtmlblobs = nofhtmlblobs + 1
- return content
-end
-
-local function c_display_html(content)
- nofhtmlblobs = nofhtmlblobs + 1
- return format("\n%s\n",content)
-end
-
-local function c_emphasis(c)
- return format("<em>%s</em>",c)
-end
-
-local function c_strong(c)
- return format("<strong>%s</strong>",c)
-end
-
-local function c_blockquote(c)
- return format("<blockquote>\n%s\n</blockquote>",nestedparser(c))
-end
-
-local function c_verbatim(c)
- return format("<pre><code>%s</code></pre>",c)
-end
-
-local function c_code(c)
- return format("<code>%s</code>",c)
-end
-
-local c_start_document = ""
-local c_stop_document = ""
-
-local function c_heading(level,c)
- return format("<h%d>%s</h%d>\n",level,c,level)
-end
-
-local function c_hrule()
- return "<hr/>\n"
-end
-
-local function c_link(lab,src,tit)
- local titattr = #tit > 0 and format(" title=%q",tit) or ""
- return format("<a href=%q%s>%s</a>",src,titattr,nestedparser(lab))
-end
-
-local function c_image(lab,src,tit)
- return format("<img href=%q title=%q>%s</a>",src,tit,nestedparser(lab))
-end
-
-local function c_email_link(address)
- return format("<a href=%q>%s</a>","mailto:",address,c_escape(address))
-end
-
-local function c_url_link(url)
- return format("<a href=%q>%s</a>",url,c_string(url))
-end
-
-local function f_heading(c,n)
- return c_heading(n,c)
-end
-
-local function c_hex_entity(s)
- return utfchar(tonumber(s,16))
-end
-
-local function c_dec_entity(s)
- return utfchar(tonumber(s))
-end
-
-local function c_tag_entity(s)
- return format("&%s;",s)
-end
-
---]]
-
----------------------------------------------------------------------------------------------
-
-local Str = normalchar^1 / c_string
-local Space = spacechar^1 / c_space
-local Symbol = specialchar / c_string
-local Code = inticks / c_code
-
-local HeadingStart = C(hash * hash^-5) / length
-local HeadingStop = optionalspace * hash^0 * optionalspace * newline * blanklines
-local HeadingLevel = equal^3 * Cc(1)
- + dash ^3 * Cc(2)
-
-local NormalEndline = optionalspace * newline * -(
- blankline
- + more
- + HeadingStart
- + ( line * (P("===")^3 + P("---")^3) * newline )
- ) / c_space
-
-local LineBreak = P(" ") * NormalEndline / c_linebreak
-
-local TerminalEndline = optionalspace * newline * eof / ""
-
-local Endline = LineBreak
- + TerminalEndline
- + NormalEndline
-
-local AutoLinkUrl = less * C(alphanumeric^1 * P("://") * (any - (newline + more))^1) * more / c_url_link
-local AutoLinkEmail = less * C((alphanumeric + S("-_+"))^1 * P("@") * (any - (newline + more))^1) * more / c_email_link
-
-local DirectLink = direct_link_parser / c_link
-local IndirectLink = indirect_link_parser / c_link
-
-local ImageLink = exclamation * (direct_link_parser + indirect_link_parser) / c_image -- we can combine this with image ... smaller lpeg
-
-local UlOrStarLine = asterisk^4
- + underscore^4
- + (spaces * S("*_")^1 * #spaces) / c_string
-
-local EscapedChar = P("\\") * C(P(1 - newline)) / c_string
-
-local InlineHtml = inlinehtml / c_inline_html
-local DisplayHtml = displayhtml / c_display_html
-local HtmlEntity = hexentity / c_hex_entity
- + decentity / c_dec_entity
- + tagentity / c_tag_entity
-
-local NestedList = Cs(optionallyindentedline - (bullet + enumerator))^1 / nestedparser
-
-local ListBlockLine = -blankline * -(indent^-1 * (bullet + enumerator)) * optionallyindentedline
-
-local Verbatim = Cs(blanklines * (indentedline - blankline)^1) / c_verbatim
- * (blankline^1 + eof) -- not really needed, probably capture trailing? we can do that beforehand
-
-local Blockquote = Cs((
- ((nonindentspace * more * space^-1)/"" * linechar^0 * newline)^1
- * ((linechar - blankline)^1 * newline)^0
- * blankline^0
- )^1) / c_blockquote
-
-local HorizontalRule = (lineof_asterisks + lineof_dashes + lineof_underscores) / c_hrule
-
-local Reference = define_reference_parser / ""
-
--- could be a mini grammar
-
-local ListBlock = line * ListBlockLine^0
-local ListContinuationBlock = blanklines * indent * ListBlock
-local ListItem = Cs(ListBlock * (NestedList + ListContinuationBlock^0)) / listitem
-
----- LeadingLines = blankline^0 / ""
----- TrailingLines = blankline^1 * #(any) / "\n"
-
-syntax = Cs { "Document",
-
- Document = V("Display")^0,
-
- Display = blankline -- ^1/"\n"
- + Blockquote
- + Verbatim
- + Reference
- + HorizontalRule
- + HeadingStart * optionalspace * Cs((V("Inline") - HeadingStop)^1) * HeadingStop / c_heading
- + Cs((V("Inline") - Endline)^1) * newline * HeadingLevel * newline * blanklines / f_heading
- + Cs((bullet /"" * ListItem)^1) * blanklines * -bullet / c_tightbulletlist
- + Cs((bullet /"" * ListItem * C(blanklines))^1) / c_loosebulletlist
- + Cs((enumerator /"" * ListItem)^1) * blanklines * -enumerator / c_tightorderedlist
- + Cs((enumerator /"" * ListItem * C(blanklines))^1) / c_looseorderedlist
- + DisplayHtml
- + nonindentspace * Cs(V("Inline")^1)* newline * blankline^1 / c_paragraph
- + V("Inline")^1,
-
- Inline = Str
- + Space
- + Endline
- + UlOrStarLine -- still needed ?
- + doubleasterisks * -spaceornewline * Cs((V("Inline") - doubleasterisks )^1) * doubleasterisks / c_strong
- + doubleunderscores * -spaceornewline * Cs((V("Inline") - doubleunderscores)^1) * doubleunderscores / c_strong
- + asterisk * -spaceornewline * Cs((V("Inline") - asterisk )^1) * asterisk / c_emphasis
- + underscore * -spaceornewline * Cs((V("Inline") - underscore )^1) * underscore / c_emphasis
- + ImageLink
- + DirectLink
- + IndirectLink
- + AutoLinkUrl
- + AutoLinkEmail
- + Code
- + InlineHtml
- + HtmlEntity
- + EscapedChar
- + Symbol,
-
-}
-
----------------------------------------------------------------------------------------------
-
-local function convert(str)
- nofruns = nofruns + 1
- nofbytes = nofbytes + #str
- statistics.starttiming(markdown)
- referenceparser(str)
- local result = c_start_document() .. nestedparser(str) .. c_stop_document()
- statistics.stoptiming(markdown)
- return result
-end
-
-markdown.convert = convert
-
-function markdown.typesetstring(data)
- if data and data ~= "" then
- local result = convert(data)
- context.viafile(result)
- end
-end
-
-function markdown.typesetbuffer(name)
- markdown.typesetstring(buffers.getcontent(name))
-end
-
-function markdown.typesetfile(name)
- local fullname = resolvers.findctxfile(name)
- if fullname and fullname ~= "" then
- markdown.typesetstring(io.loaddata(fullname))
- end
-end
-
-statistics.register("markdown",function()
- if nofruns > 0 then
- return format("%s bytes converted, %s runs, %s html blobs, %s seconds used",
- nofbytes, nofruns, nofhtmlblobs, statistics.elapsedtime(markdown))
- end
-end)
-
----------------------------------------------------------------------------------------------
-
---~ context.starttext()
---~ moduledata.markdown.convert(str)
---~ context.stoptext()
-
-if not tex.jobname then
-
- local one = [[
-Test *123*
-==========
-
-<b>BOLD *BOLD* BOLD</b>
-
-<pre>PRE <b>PRE</b> PRE</pre>
-
-
-* Test
-** Test
-* Test1
- * Test2
-* Test
-
-Test
-====
-
-> test
-> test **123** *123*
-> test `code`
-
-test
-
-Test
-====
-
-> test
-> test
-> test
-
-test
-oeps
-
-more
-
- code
- code
-
-oeps
-
-[an example][a]
-
-[an example] [2]
-
-[a]: http://example.com/ "Optional *oeps* Title Here"
-[2]: http://example.com/ 'Optional Title Here'
-[3]: http://example.com/ (Optional Title Here)
-
-[an example][a]
-
-[an example] [2]
-
-[an [tricky] example](http://example.com/ "Title")
-
-[This **xx** link](http://example.net/)
- ]]
-
--- This snippet takes some 4 seconds in the original parser (the one that is
--- a bit clearer from the perspective of grammars but somewhat messy with
--- respect to the captures. In the above parser it takes .1 second. Also,
--- in the later case only memory is the limit.
-
- local two = [[
-Test
-====
-* Test
-** Test
-* Test
-** Test
-* Test
-
-Test
-====
-
-> test
-> test
-> test
-
-test
-
-Test
-====
-
-> test
-> test
-> test
-
-test
- ]]
-
- local function test(str)
- local n = 1 -- 000
- local t = os.clock()
- local one = convert(str)
- -- print("runtime",1,#str,#one,os.clock()-t)
- str = string.rep(str,n)
- local t = os.clock()
- local two = convert(str)
- print(two)
- -- print("runtime",n,#str,#two,os.clock()-t)
- -- print(format("==============\n%s\n==============",one))
- end
-
- -- test(one)
- -- test(two)
- -- test(io.read("*all"))
-
-
-end
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-markdown.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/m-markdown.mkiv
deleted file mode 100644
index 29d41341e4e..00000000000
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-markdown.mkiv
+++ /dev/null
@@ -1,88 +0,0 @@
-%D \module
-%D [ file=x-markdown,
-%D version=2011.07.19,
-%D title=\CONTEXT\ Modules,
-%D subtitle=Processing MarkDown,
-%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.
-
-\writestatus{loading}{ConTeXt Modules / MarkDown Renderer}
-
-%D This module deals with markdown which is a document encoding that
-%D some \CONTEXT\ like much. It reminds me of the kind of minimal coding
-%D we used before we ran into \TEX\ and were using a somewhat simple
-%D rendering (pagination, etc) of documents. As I'm no user myself, it
-%D is up to others to provide documentation and examples.
-
-\registerctxluafile{m-markdown}{}
-
-\unprotect
-
-% basic interface
-
-\definebuffer[markdown]
-
-\unexpanded\def\stopmarkdown
- {\ctxlua{moduledata.markdown.typesetbuffer("\thedefinedbuffer{markdown}")}}
-
-\unexpanded\def\processmarkdownfile#1% maybe [] or both
- {\ctxlua{moduledata.markdown.typesetfile("#1")}}
-
-\unexpanded\def\markdown#1% maybe [] or both
- {\ctxlua{moduledata.markdown.typesetstring(\!!bs#1\!!es)}}
-
-% commands
-
-\defineitemgroup
- [markdownitemize]
-
-\definetyping
- [markdowntyping]
-
-\definetype
- [markdowntype]
-
-\definetype
- [markdowninlinehtml]
-
-\definetyping
- [markdowndisplayhtml]
-
-\definedelimitedtext
- [markdownblockquote]
- [quotation]
-
-\definehighlight
- [markdownemphasis]
- [style=\em]
-
-\definehighlight
- [markdownstrong]
- [style=\bf]
-
-\definestructurelevels
- [markdown]
- [\v!chapter,
- \v!section,
- \v!subsection,
- \v!subsubsection,
- \v!subsubsubsection,
- \v!subsubsubsubsection]
-
-\unexpanded\def\markdownrule
- {\hairline\par}
-
-\protect
-
-\continueifinputfile{m-markdown.mkiv}
-
-\starttext
- \startmarkdown
- % some examples needed
- \stopmarkdown
-\stoptext
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-punk.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/m-punk.mkiv
index 29a6d8cca75..47f1a0177ff 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-punk.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-punk.mkiv
@@ -63,8 +63,8 @@ local flusher = {
boundingbox = { 0, -d, w, h },
}
characters[n] = {
- commands = { -- todo: xforms, should happen in backend
- { "special", "pdf: " .. concat(l," ") },
+ commands = { -- todo: type 3 in lmtx
+ { "pdf", concat(l," ") },
}
}
else
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-scite.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/m-scite.mkiv
index 9182fa2ecb5..315cb3bed8b 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-scite.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-scite.mkiv
@@ -289,6 +289,7 @@ visualizers.register("cld", visualizer)
visualizers.register("tex", visualizer)
visualizers.register("lua", visualizer)
visualizers.register("mps", visualizer)
+visualizers.register("mp", visualizer)
visualizers.register("pdf", visualizer)
visualizers.register("xml", visualizer)
visualizers.register("bibtex",visualizer)
@@ -300,13 +301,21 @@ visualizers.register("bnf", visualizer)
visualizers.register("sql", visualizer)
visualizers.register("json", visualizer)
+visualizers.register("sas", visualizer)
+
+function scite.register(name)
+ visualizers.register(name,visualizer)
+end
+
+moduledata.scite = scite
+
\stopluacode
\definetyping[TEX] [option=cld]
\definetyping[LUA] [option=lua]
\definetyping[BTX] [option=bibtex]
\definetyping[MPS] [option=mps]
-\definetyping[MP] [option=mps]
+\definetyping[MP] [option=mp]
\definetyping[PDF] [option=pdf]
\definetyping[CPP] [option=web]
\definetyping[WEB] [option=web]
@@ -316,6 +325,8 @@ visualizers.register("json", visualizer)
\definetyping[JSON][option=json] % To be tested in an upcoming manual.
\definetyping[NONE][option=none]
+\definetyping[SAS] [option=sas]
+
% This is a preliminary interface.
\unprotect
@@ -323,9 +334,12 @@ visualizers.register("json", visualizer)
\newdimen\scitespaceskip
\unexpanded\def\buff_scite_slxb#1%
- {\hangindent\numexpr#1+2\relax\scitespaceskip
+ {% we can have a side float
+ \advance\hangindent\numexpr#1+2\relax\scitespaceskip
\begstrut\hskip#1\scitespaceskip
- \hangafter 1\relax}
+ \ifcase\hangafter
+ \hangafter\plusone\relax
+ \fi}
\unexpanded\def\buff_scite_slxe
{\endstrut\par}
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-simulate.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/m-simulate.mkiv
new file mode 100644
index 00000000000..dc444890308
--- /dev/null
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-simulate.mkiv
@@ -0,0 +1,222 @@
+%D \module
+%D [ file=m-simulate,
+%D version=2016.02.18, % follow up on m-visual of 2000.01.10
+%D title=\CONTEXT\ Extra Modules,
+%D subtitle=Visualization and Faking Redone,
+%D author={Hans Hagen \& Ton Otten},
+%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
+
+\definepalet
+ [fakerule]
+ [fr1c=darkred,
+ fr2c=darkgreen,
+ fr3c=darkblue,
+ fr4c=darkyellow,
+ fr5c=darkgray,
+ fr6c=darkred,
+ fr7c=darkgreen,
+ fr8c=darkblue,
+ fr9c=darkyellow,
+ fr0c=darkgray]
+
+\installcorenamespace {simulatewords}
+
+\installcommandhandler \??simulatewords {simulatewords} \??simulatewords
+
+\setupsimulatewords
+ [\c!n =\plusten,
+ \c!m =40,
+ \c!min =\plusone,
+ \c!max =\plusfive,
+ \c!minwidth=0.50\emwidth,
+ \c!maxwidth=1.25\emwidth,
+ \c!color =\empty,
+ \c!hyphen =\v!yes,
+ \c!distance=-.2\onebasepoint]
+
+\unexpanded\def\dosimulatedword
+ {\clf_fakeword
+ factor \exheight
+ name {\p_line}
+ min \scratchdimenone
+ max \scratchdimentwo
+ \relax}
+
+\def\simulatedhyphen
+ {\kern.2\points-\kern.2\points}
+
+\unexpanded\def\simulatewords
+ {\dodoubleempty\dosimulatewords}
+
+\unexpanded\def\dosimulatewords[#1][#2]%
+ {\dontleavehmode
+ \begingroup
+ \begstrut
+ \ifsecondargument
+ \edef\currentsimulatewords{#1}%
+ \setupcurrentsimulatewords[#2]%
+ \else
+ \doifassignmentelse{#1}
+ {\let\currentsimulatewords\empty
+ \setupcurrentsimulatewords[#1]}
+ {\edef\currentsimulatewords{#1}%
+ \setupcurrentsimulatewords[#2]}%
+ \fi
+ \scratchcounterone\simulatewordsparameter\c!n
+ \scratchcountertwo\simulatewordsparameter\c!m
+ \scratchmin \simulatewordsparameter\c!min
+ \scratchmax \simulatewordsparameter\c!max
+ \scratchdimenone \simulatewordsparameter\c!minwidth
+ \scratchdimentwo \simulatewordsparameter\c!maxwidth
+ \scratchdimenthree\simulatewordsparameter\c!distance
+ \edef\p_random{\simulatewordsparameter\c!random}%
+ \edef\p_color {\simulatewordsparameter\c!color}%
+ \edef\p_line {\simulatewordsparameter\c!line}%
+ \edef\p_hyphen{\simulatewordsparameter\c!hyphen}%
+ \edef\p_line {fake:\ifx\p_line\v!yes word\else rule\fi}%
+ \ifx\p_color\v!text
+ % no need
+ \else
+ \setuppalet[fakerule]%
+ \ifx\p_color\empty
+ \directcolored[fakerulecolor]%
+ \else\ifx\p_color\v!auto
+ % different
+ \else
+ \directcolored[\p_color]%
+ \fi\fi
+ \fi
+ \edef\p_hyphen
+ {\ifx\p_hyphen\v!yes
+ \discretionary{\bf\simulatedhyphen}{}{\kern\scratchdimenthree}%
+ \else\ifx\p_hyphen\v!margin
+ \discretionary{\hpack to \zeropoint{\bf\simulatedhyphen\hss}}{}{\kern\scratchdimenthree}%
+ \else\ifx\p_hyphen\v!none
+ \allowbreak\kern\scratchdimenthree
+ \else\ifx\p_hyphen\v!no
+ \allowbreak\kern\scratchdimenthree
+ \else\ifx\p_hyphen\v!both
+ \discretionary{\bf\simulatedhyphen}{\bf\simulatedhyphen}{\kern\scratchdimenthree}%
+ \else\ifx\p_hyphen\empty
+ \allowbreak\kern\scratchdimenthree
+ \else
+ \discretionary{\p_hyphen}{}{\kern\scratchdimenthree}%
+ \fi\fi\fi\fi\fi\fi}%
+ \edef\truncated##1##2\relax{##1}%
+ % trialtypesetting: tricky
+ \ifx\p_random\empty \else
+ \pushrandomseed
+ \setrandomseed\p_random
+ \fi
+ \dorecurse{\randomnumber\scratchcounterone\scratchcountertwo} {%
+ \let\dosimulatedhyphen\relax
+ \dorecurse{\randomnumber\scratchmin\scratchmax} {%
+ \dosimulatedhyphen
+ \begingroup
+ \ifx\p_color\v!auto
+ \directcolored[fr\truncated####1\relax c]%
+ \fi
+ \dosimulatedword
+ \endgroup
+ \let\dosimulatedhyphen\p_hyphen
+ }%
+ \relax
+ \space
+ }%
+ \ifx\p_random\empty \else
+ \poprandomseed
+ \fi
+ \removeunwantedspaces
+ \endstrut
+ \endgroup}
+
+%D For old times sake:
+
+\unexpanded\def\fakewords#1#2%
+ {\simulatewords[\c!n=#1,\c!m=#2,\c!min=1,\c!max=5,\c!hyphen=\v!none,\c!color=\v!text,\c!line=\v!yes]}
+
+%D Lines
+
+\unexpanded\def\fakeline
+ {\dosingleempty\dofakeline}
+
+\unexpanded\def\dofakeline[#1]%
+ {\par
+ \dontleavehmode
+ \hpack\bgroup
+ \scratchwidth \availablehsize
+ \scratchheight.8\strutht
+ \scratchdepth .8\strutdp
+ \iffirstargument
+ \letsimulatewordsparameter\c!width \scratchwidth
+ \letsimulatewordsparameter\c!height\scratchheight
+ \letsimulatewordsparameter\c!depth \scratchdepth
+ \getcurrentsimulatewords[#1]%
+ \scratchwidth \simulatewordsparameter\c!width
+ \scratchheight\simulatewordsparameter\c!height
+ \scratchdepth \simulatewordsparameter\c!depth
+ \fi
+ \edef\p_color{\simulatewordsparameter\c!color}%
+ \begingroup
+ \ifx\p_color\empty
+ \directcolored[fakerulecolor]%
+ \else\ifx\p_color\v!auto
+ % text color
+ \else
+ \directcolored[\p_color]%
+ \fi\fi
+ \vrule
+ \s!width \scratchwidth
+ \s!height\scratchheight
+ \s!depth \scratchdepth
+ \endgroup
+ \hskip-\scratchwidth
+ \directcolored[\s!white]%
+ \scratchdimen.5\onepoint
+ \vrule
+ \s!width \scratchwidth
+ \s!height\scratchdimen
+ \s!depth \scratchdimen
+ \egroup
+ \par}
+
+\protect
+
+\continueifinputfile{m-simulate.mkiv}
+
+\starttext
+
+ \simulatewords[n=50,m=100,min=1,max=5,color=auto,hyphen=margin,line=yes]\par
+ \simulatewords[n=50,m=100,min=3,max=9,color=auto,hyphen=margin,line=yes]\par
+ \simulatewords[n=50,m=100,min=3,max=9,color=auto,hyphen=margin,line=yes]\par
+ \page
+ \simulatewords[n=50,m=100,min=2,max=6,hyphen=yes]\par
+ \simulatewords[n=50,m=100,min=2,max=6,hyphen=both]\par
+ \simulatewords[n=50,m=100,min=2,max=6,hyphen=both]\par
+
+ \startcolor[red]
+ \simulatewords[n=50,m=100,min=2,max=6,color=text]\par
+ \stopcolor
+
+ \definesimulatewords[foo][n=50,m=100,min=2,max=6,color=text]
+
+ \startcolor[green]
+ \simulatewords[foo][color=darkyellow,random=1234]
+ \stopcolor
+
+ \page
+
+ \fakeline
+
+ \startnarrower
+ \fakeline
+ \stopnarrower
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-sql.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/m-sql.mkiv
index f1df2833a00..ed9dae99a4e 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-sql.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/m-sql.mkiv
@@ -16,6 +16,11 @@
\registerctxluafile{util-tpl}{}
\registerctxluafile{util-sql}{}
+\ifcase\contextlmtxmode\else
+ \registerctxluafile{libs-imp-mysql}{}
+ \registerctxluafile{libs-imp-sqlite}{}
+\fi
+
\setupmodule
\doifsomething {\currentmoduleparameter{method}}{
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/m-zint.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/m-zint.mkiv
deleted file mode 100644
index 4957c846173..00000000000
--- a/Master/texmf-dist/tex/context/modules/mkiv/m-zint.mkiv
+++ /dev/null
@@ -1,112 +0,0 @@
-%D \module
-%D [ file=m-zint,
-%D version=2010.12.07,
-%D title=\CONTEXT\ Extra Modules,
-%D subtitle=Zint Barcode Generator,
-%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 Using \type {zint} seems to be the easiest way to generate
-%D (PDF417) barcodes so therefore we now have this module. There
-%D are proper (also windows) binaries at:
-%D
-%D \starttyping
-%D http://www.zint.org.uk
-%D \stoptyping
-%D
-%D There is a bit more code than needed as we want to be able to
-%D feed names.
-
-\startluacode
-
-moduledata.zint = { }
-
-local format, lower, gsub = string.format, string.lower, string.gsub
-local patterns = lpeg.patterns
-
-local zint = "zint" -- '"c:/program files/zint/zint.exe"'
-local defaultcode = "PDF417"
-
-local whitespace = patterns.whitespace
-local spaces = whitespace^0
-local key = (spaces / "") * patterns.digit^0 * (patterns.colon * spaces / "")
-local value = (whitespace / "" + (1 - key))^1
-local pattern = lpeg.Cf(lpeg.Ct("") * (lpeg.Cg((lpeg.Cs(key) / tonumber) * (lpeg.Cs(value) / lower)) + patterns.anything)^0,rawset)
-
-local reverse
-
-local function cleancode(code)
- if not code or code == "" then
- code = defaultcode
- end
- return lower(gsub(code," ",""))
-end
-
-local function numberofcode(code)
- if not reverse then
- local types = os.resultof(format("%s --types",zint)) or ""
- local formats = lpeg.match(pattern,types)
- if not formats or not next(formats) then
- return code
- end
- reverse = table.swapped(formats) or { }
- end
- code = cleancode(code)
- return reverse[code] or code
-end
-
-function moduledata.zint.generate(code,data,suffix,options)
- if not data or data == "" then
- data = "unset"
- end
- local code = cleancode(code)
- local base = format("zint-%s-%s",code,md5.hex(data))
- local name = file.addsuffix(base,suffix or "eps")
- if not lfs.isfile(name) then
- local temp = file.addsuffix(base,"tmp")
- local code = numberofcode(code)
- logs.simple("using 'zint' to generate '%s'",base)
- io.savedata(temp,data)
- os.execute(format('%s --barcode=%s --output="%s" --input="%s" %s',zint,code,name,temp,options or ""))
- os.remove(temp)
- end
- return name
-end
-
-\stopluacode
-
-\unprotect
-
-\unexpanded\def\barcode[#1]% [alternative=,text=]
- {\bgroup
- \getdummyparameters
- [\c!alternative=,\c!text=,#1]%
- \externalfigure
- [\cldcontext{moduledata.zint.generate("\dummyparameter\c!alternative",\!!bs\dummyparameter\c!text\!!es)}]%
- [#1,\c!alternative=,\c!text=]%
- \egroup}
-
-\protect
-
-\continueifinputfile{m-zint.mkiv}
-
-\starttext
-
- \externalfigure[\cldcontext{moduledata.zint.generate("PDF417",[[Hans Hagen]])}]
- \blank
- \externalfigure[\cldcontext{moduledata.zint.generate("PDF417","Ton Otten")}]
- \blank
- \externalfigure[\cldcontext{moduledata.zint.generate("ISBN","9789490688011")}]
- \blank
- \barcode[text=Does It Work?,width=\textwidth]
- \blank
- \barcode[alternative=isbn,text=9789490688011,width=3cm]
-
-\stoptext
-
-
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-abbreviations-mixed.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-abbreviations-mixed.mkiv
index f7b2121d042..d5294fd56e2 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-abbreviations-mixed.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-abbreviations-mixed.mkiv
@@ -1,5 +1,5 @@
%D \module
-%D [ file= s-abbreviations-mixed, % was: s-abr-04
+%D [ file=s-abbreviations-mixed, % was: s-abr-04
%D version=1996.01.01,
%D title=\CONTEXT\ Style File,
%D subtitle=General Abbreviations Mixed,
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-cgj.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-cgj.mkiv
index 2950a799d9b..3e7518777b9 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-cgj.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-cgj.mkiv
@@ -1,258 +1,231 @@
-%D \module
-%D [file=s-cgj.mkiv,
-%D version=2018.09.28,
-%D title=Context group style file,
-%D subtitle=CG-journal base style,
-%D author={Adrian Egger, W. Egger, Taco Hoekwater},
-%D date=\currentdate,
-%D copyright={Context Group}]
-
-%D \type {\enablemode[draft]} has to come before loading the style. Maybe some
-%D day I'll make something more official and then some \type {everydraft} or so.
+%\module [
+% file=s-cgj.mkiv,
+% version=2012.12.05,
+% title=Context group style file,
+% subtitle=CG-journal base style,
+% author={Adrian Egger, W. Egger, Taco Hoekwater},
+% date=\currentdate,
+% copyright={Context Group}%
+%]
+
+\enablemode[cgjpagecolumns]
% Fixme and todo ...
-\startmodule[cgj]
+\definecolor[NoteColor] [g=1,r=.25,b=.25]
+\definecolor[WarnColor] [r=1,g=.25,b=.25]
-\definecolor[NoteColor][g=1,r=.25,b=.25]
-\definecolor[WarnColor][r=1,g=.25,b=.25]
+\def\todo#1%
+ {\startframedtext
+ [background=color,backgroundcolor=NoteColor]
+ {\bf TODO:}~~#1\par
+ \stopframedtext }
-\unexpanded\def\todo#1%
- {\startframedtext[background=color,backgroundcolor=NoteColor]
- \dontleavehmode\start\bf TODO:\stop~~#1\par
- \stopframedtext}
+\def\fixme#1%
+ {\startframedtext
+ [background=color,backgroundcolor=WarnColor]
+ {\bf FIXME:}~~#1\par
+ \stopframedtext }
-\unexpanded\def\fixme#1%
- {\startframedtext[background=color,backgroundcolor=WarnColor]
- \dontleavehmode\start\bf FIXME:\stop~~#1\par
- \stopframedtext }
+% There is a draft mode, which enables all frames
+% \enablemode[draft]
-%D Base set of variables. The actual values are set in the file
-%D CG-journal.
+\doifmodeelse
+ {draft}
+ {\def\OnOff{on}\showframe}
+ {\def\OnOff{off}}
+
+% Base set of variables
+% The actual values are set in the file CG-journal
\setvariables
[CG-Journal]
[Title={Journal},
RunningTitle={Journal},
SubTitle={From the base set of variables},
Version=1.0,
- NOFColumns=2]
+ NOFColumns=2,
+ ]
+\setupinteraction[
+ state=start,
+ color=,
+ contrastcolor=,
+ style=,
+ title=Journal,
+ author=context group,
+]
+\placebookmarks[title,chapter,subject,section][chapter]
+\setupinteractionscreen[option={doublesided,bookmark}]
\startmode[onecolumn,fullwidth]
- \setvariables
- [CG-Journal]
- [NOFColumns=1]
+\setvariables
+ [CG-Journal]
+ [NOFColumns=1]
\stopmode
-% Fonts setup.
-
+% Fonts setup
\usetypescriptfile[plex]
+%\usetypescriptfile[type-inconsolata]
\starttypescript [cgj]
- \definetypeface [cgj] [rm] [serif][ibmplex-light] [default]
- \definetypeface [cgj] [ss] [sans] [ibmplex-light] [default]
- \definetypeface [cgj] [mm] [math] [palatino] [default]
- \definetypeface [cgj] [tt] [mono] [ibmplex] [default][rscale=0.9]
+ \definetypeface [cgj] [rm] [serif][ibmplex] [default]
+ \definetypeface [cgj] [ss] [sans] [ibmplex] [default]
+ \definetypeface [cgj] [mm] [math] [palatino] [default]
+ \definetypeface [cgj] [tt] [mono] [ibmplex] [default] [rscale=0.9]
\stoptypescript
\starttypescript [cgj-light]
- \definetypeface [cgj-light] [rm] [serif][ibmplex-extralight] [default]
- \definetypeface [cgj-light] [ss] [sans] [ibmplex-extralight] [default]
- \definetypeface [cgj-light] [mm] [math] [palatino] [default]
- \definetypeface [cgj-light] [tt] [mono] [ibmplex-extralight] [default][rscale=0.9]
+ \definetypeface [cgj-light] [rm] [serif][ibmplex] [default]
+ \definetypeface [cgj-light] [ss] [sans] [ibmplex-light] [default]
+ \definetypeface [cgj-light] [mm] [math] [palatino] [default]
+ \definetypeface [cgj-light] [tt] [mono] [ibmplex] [default] [rscale=0.9]
\stoptypescript
-\starttypescript [cgj-extralight]
- \definetypeface [cgj-extralight] [rm] [serif][ibmplex-thin] [default]
- \definetypeface [cgj-extralight] [ss] [sans] [ibmplex-thin] [default]
- \definetypeface [cgj-extralight] [mm] [math] [palatino] [default]
- \definetypeface [cgj-extralight] [tt] [mono] [ibmplex-thin] [default][rscale=0.9]
-\stoptypescript
-
-\usebodyfont
- [cgj-light,cgj-extralight]
-
-\setupbodyfont
- [cgj,ss,10pt]
+\usebodyfont[cgj-light,ss,10pt]
+\setupbodyfont[cgj,ss,10pt]
-\definebodyfontenvironment[10pt][interlinespace=13pt]
+\definebodyfontenvironment[10pt][interlinespace=12pt]
\definebodyfontenvironment[12pt][interlinespace=16pt]
\definebodyfontenvironment[16pt][interlinespace=20pt]
-
-\setupinterlinespace
- [line=13pt]
-
+\setupinterlinespace[line=12pt]
\let\sl\it
-%D Path to the logos
-
-\setupexternalfigures
- [directory=./Logos,
- location={global,local,default}]
-
-%D Logos: black logo only.
+% Path to the logos
+\setupexternalfigures[directory=./Logos]
+% Logos
+% Black logo only
\useexternalfigure
[Logo]
[cg_corp_logo_loop_black_cmyk]
- [width=30mm,
- height=19mm]
-
-%D Black logo with text
-
+ [width=30mm,height=19mm]
+%Black logo with text
\useexternalfigure
[LogoText]
[cg_corp_logo_text_black_cmyk]
- [width=50mm,
- height=35.2mm]
-
-%D Colors
+ [width=50mm,height=35.2mm]
+% Colors
\definecolor[CGlightblue][c=1,m=.15,y=0,k=0]
-\definecolor[CGdeepblue] [c=1,m=.8,y=0,k=.3]
-\definecolor[CGgray] [c=0,m=0,y=0,k=.1]
-
-%D Article styles
+\definecolor[CGdeepblue][c=1,m=.8,y=0,k=.3]
+\definecolor[CGgray][c=0,m=0,y=0,k=.1]
+% Article styles
\definealternativestyle
[Articleheading]
[{\switchtobodyfont[16pt,ss]\bf}]
-
\definealternativestyle
[Articlesubheading]
[{\switchtobodyfont[16pt,ss]\tf}]
-
\definealternativestyle
[Authorname]
[{\switchtobodyfont[12pt,ss]\it}]
-
\definealternativestyle
[Sectionheading]
[{\switchtobodyfont[12pt,ss]\bf\setupinterlinespace[line=12pt]}]
-
\definealternativestyle
[Subsectionheading]
[{\switchtobodyfont[cgj-light,10pt,ss]\bf\setupinterlinespace[line=10pt]}]
-
\definealternativestyle
[IntroCopy]
[{\switchtobodyfont[12pt,ss]\tf}]
-
\definealternativestyle
[PagenumberStyle]
[{\switchtobodyfont[cgj-light,10pt,ss]\bf}]
-%D Headerstyles:Breadcrumbs
-
+% Headerstyles - Breadcrumbs
\definealternativestyle
[BreadcrumbMd]
- [{\switchtobodyfont[cgj-light,10pt,ss]\bf}]
-
+ [{\switchtobodyfont[10pt,ss]\bf}]
\definealternativestyle
[BreadcrumbRg]
- [{\switchtobodyfont[cgj,10pt,ss]}]
-
+ [{\switchtobodyfont[cgj-light,10pt,ss]\bf}]
\definealternativestyle
[BreadcrumbLt]
[{\switchtobodyfont[10pt,ss]\tf}]
-
\definealternativestyle
[BreadcrumbTh]
[{\switchtobodyfont[cgj-light,10pt,ss]\tf}]
-%D Captionstyles
-
+% Captionstyles
\definealternativestyle
[Captionheading]
[{\switchtobodyfont[8pt,ss]\bf\setupinterlinespace[line=8pt]}]
-
\definealternativestyle
[Captiontext]
[{\switchtobodyfont[8pt,ss]\tf\setupinterlinespace[line=8pt]}]
-%D Article signature
-
+% Article signature
\definealternativestyle
[Signaturestyle]
[{\switchtobodyfont[10pt,ss]\it}]
-%D Article footnotes
-
+% Article footnotes
\definealternativestyle
[Articlefootnotes]
[{\switchtobodyfont[8pt,ss]\tf}]
-%D Index and TOC styles
-
+% Index /TOC styles
+% It looks like the inheritance is gone.
+%\definealternativestyle
+% [IndexContents][Articleheading]
\definealternativestyle
[IndexContents]
[{\switchtobodyfont[16pt,ss]\bf\setupinterlinespace[line=18pt]}]
-
\definealternativestyle
[IndexArticleTitle]
[{\switchtobodyfont[12pt,ss]\tf\setupinterlinespace[line=20pt]}]
-
\definealternativestyle
[IndexNumber]
[{\switchtobodyfont[12pt,ss]\bf\setupinterlinespace[line=20pt]}]
-
\definealternativestyle
[IndexAuthor]
[{\switchtobodyfont[12pt,ss]\it\setupinterlinespace[line=20pt]}]
-%D Math: still missing.
-
-%D Verbatim
+% Math
+% --> still missing
+% Verbatim
\definealternativestyle
[DisplayMonospaced]
- [\tt]
-
+ [{\switchtobodyfont[10pt,tt]\setupinterlinespace[line=12pt]}]
\definealternativestyle
[DisplayMonospacedX]
- [{\switchtobodyfont[8pt,tt]}]
-
+ [{\switchtobodyfont[8pt,tt]\setupinterlinespace[line=11pt]}]
\definealternativestyle
[DisplayMonospacedS]
- [{\switchtobodyfont[9pt,tt]\setupinterlinespace[line=10pt]}]
-
-%D Blank adjustment
+ [{\switchtobodyfont[9pt,tt]\setupinterlinespace[line=12pt]}]
-\defineblank[CGblank] [6pt]
-\defineblank[BigCGblank] [24pt]
+% \blank adjustment
+\defineblank[CGblank][6pt]
+\defineblank[BigCGblank][24pt]
\defineblank[MediumCGblank][12pt]
-%D Paper definition
+% Paper definition
+\definepapersize[Journal][width=210mm,height=266mm]
+\setuppapersize[Journal][Journal]
-\definepapersize
- [Journal]
- [width=210mm,
- height=266mm]
-
-\setuppapersize
- [Journal]
- [Journal]
-
-%D General layout
+% General layout
\definelayout
[General]
- [topspace=18mm,
+ [topspace=20mm,
backspace=28mm,
header=5mm,
- headerdistance=7mm,
- footer=5mm,
+ headerdistance=5mm,
+ footer=3mm,
footerdistance=5mm,
width=157mm,
height=224mm,
- marking=on]
+ marking=on,
+ ]
\definelayout
[Content]
- [topspace=18mm,
+ [topspace=20mm,
backspace=28mm,
header=5mm,
- headerdistance=7mm,
+ headerdistance=5mm,
footer=0mm,
footerdistance=0mm,
width=157mm,
@@ -260,52 +233,62 @@
margindistance=4mm,
rightmargin=21mm,
leftmargin=21mm,
- marking=on]
+ marking=on,
+ ]
\definelayout
[Imprint]
- [topspace=18mm,
+ [topspace=20mm,
backspace=28mm,
header=5mm,
- headerdistance=7mm,
- footer=5mm,
+ headerdistance=5mm,
+ footer=3mm,
footerdistance=5mm,
width=107mm,
height=224mm,
margindistance=4mm,
rightmargin=45.3mm,
leftmargin=21mm,
- marking=on]
+ marking=on,
+ ]
\definelayout
[SingleColumn]
- [topspace=18mm,
+ [topspace=20mm,
backspace=55mm,
header=5mm,
- headerdistance=7mm,
- footer=5mm,
+ headerdistance=5mm,
+ footer=3mm,
footerdistance=5mm,
width=130mm,
height=224mm,
margindistance=4mm,
leftmargin=48mm,
rightmargin=21mm,
- marking=on]
-
-%D Pagenumbering: Pagenumber is set in the footer
-
-\setuppagenumbering
- [location=,
- alternative=doublesided]
-
-%D Head-definitions
+ marking=on,
+ ]
+
+% Pagenumbering: Pagenumber is set in the footer
+\setuppagenumbering[location=,alternative=doublesided]
+
+% Head-definitions
+% The distances according to the style-guide
+% H1 = Article title
+% H2 = Section title (1. Bla bla)
+% H3 = Subsection title (1.1 Bla bla)
+% H4 = Subsubsection title (1.1.1 Bla bla)
+%
+% Between abstract and body: 2 lines 10/12pt --> 24 pt: BigCGblank
+% Between H2 and bodycopy/H3: 1 line 6/6pt --> 6 pt: CGblank
+% Between H3 and bodycopy/H4: 1 line 6/6pt --> 6 pt: CGblank
+% End H2 paragraph: 2 lines 10/12pt --> 24 pt: BigCGblank
+% End H3 paragraph: 1 line 6/6pt --> 6 pt: CGblank
\setuphead
[title]
[style=Articleheading,
after={\blank[BigCGblank]},
page=yes]
-
\setuphead
[part]
[placehead=no,
@@ -314,9 +297,8 @@
page=no,
numbercommand=,
expansion=yes]
-
\setuphead
- [section]
+ [section,subject]
[style=Sectionheading,
before={\blank[BigCGblank]},
after={\blank[CGblank]},
@@ -324,8 +306,8 @@
distance=4pt,
align={flushleft,nothyphenated},
resetnumber=yes,
- continue=yes]
-
+ continue=yes,
+ ]
\setuphead
[subsection]
[style=Subsectionheading,
@@ -335,49 +317,41 @@
distance=4pt,
align={flushleft,nothyphenated},
resetnumber=yes,
- continue=yes]
-
-\setuphead
- [subject]
- [style=Sectionheading,
- before={\blank[BigCGblank]},
- after=]
-
+ continue=yes,
+ ]
+%\setuphead
+% [subject]
+% [style=Sectionheading,before={\blank[BigCGblank]},after=]
\setuphead
[subsubject]
[style=Subsectionheading,
before={\blank[CGblank]},
after={\blank[CGblank]},
- sectionstopper=]
+ sectionstopper=,
+ ]
+% Columns
+% The setup of the columns is done at the moment columns are started (see end of file)
-%D A special head for the footnote section in multicolumn mode excuse the low-level
-%D rule, I wanted it to look like the start of footnotes in single column mode. (TH)
+% Index/TOC page setups
+\unprotect
-\definehead
- [footnotesubject]
- [subject]
+ \def\listboxproperties {\strc_lists_get_reference_attribute}
+ \def\listrenderingsetup {\the\t_lists_every_renderingtext}
+ \def\listrenderingsynchronize{\the\t_lists_every_renderingsynchronize}
-\setuphead
- [footnotesubject]
- [style=Sectionheading,
- before={\kern -13pt},
- after={\smash{\lower 13pt\hbox{\vrule width 2.5cm height 1pt depth 0pt}}}]
+\protect
-
-%D The setup of the columns is done at the moment columns are started (see end
-%D of file)
-
-%D Index/TOC page setups
+% now you can say:
\definelistalternative
- [CGJ:Index]
- [renderingsetup=CGJ:Indexheading]
-
+ [CGJ:Index]
+ [renderingsetup=CGJ:Indexheading]
\definelistalternative
- [CGJ:Index:Chapter]
- [renderingsetup=CGJ:Indexheading:Chapter]
+ [CGJ:Index:Chapter]
+ [renderingsetup=CGJ:Indexheading:Chapter]
-\startsetups[CGJ:Indexheading:Chapter]
+
+ \startsetups[CGJ:Indexheading:Chapter]
\listparameter{before}
\vbox \listboxproperties{all} {
\forgetall
@@ -388,14 +362,20 @@
\useliststyleandcolor{numberstyle}{numbercolor}
\currentlistentrypagenumber
\egroup}
+ % \bgroup
+ % \useliststyleandcolor{numberstyle}{numbercolor}
+ % \currentlistsymbol
+ % \egroup
+ % .\space
\bgroup
\useliststyleandcolor{textstyle}{textcolor}
\smash{\currentlistentrytitle}%
\egroup
+ % \par
}
\par
\listparameter{after}
-\stopsetups
+ \stopsetups
\startsetups[CGJ:Indexheading]
\listparameter{before}
@@ -405,9 +385,15 @@
\listrenderingsynchronize
\hbox to 15mm{
\bgroup
+ %\useliststyleandcolor{pagestyle}{pagecolor}
\useliststyleandcolor{numberstyle}{numbercolor}
\currentlistentrypagenumber
\egroup}
+ % \bgroup
+ % \useliststyleandcolor{numberstyle}{numbercolor}
+ % \currentlistsymbol
+ % \egroup
+ % .\space
\bgroup
\useliststyleandcolor{textstyle}{textcolor}
\currentlistentrytitle
@@ -419,45 +405,71 @@
\stopsetups
\setuplist
- [part]
- [before={\blank[CGblank]},
- after=,
- style=IndexContents,
- numberstyle=\IndexNumber,
- textstyle=\IndexArticleTitle,
- prefix=no,
- alternative=CGJ:Index:Chapter]
-
-%D Captions
-
+ [part]
+ [before={\blank[CGblank]},
+ after=,
+ style=IndexContents,
+ numberstyle=\IndexNumber,
+ textstyle=\IndexArticleTitle,
+ prefix=no,
+ alternative=CGJ:Index:Chapter]
+
+%\setuplist
+% [section]
+% [before={\blank[CGblank]},
+% after={},
+% style=IndexHeaderB,
+% % numberstyle=\bf,
+% % textstyle=\bfa,
+% prefix=no,
+% alternative=CGJ:Index]
+%
+%\setuplist
+% [subsection]
+% [before={},
+% after={},
+% style=IndexHeaderC,
+% % numberstyle=\bf,
+% % textstyle=\bfa,
+% prefix=no,
+% alternative=CGJ:Index]
+
+% Floats
+
+% \setupfloat
+% [figure]
+% []
+
+% Captions
\setupcaptions
[suffix={.},
+ width=max,
headstyle=\Captionheading,
style=\Captiontext,
- distance=6pt]
+ distance=2pt
+ ]
\setupcaption[figure][way=bypart]
\setupcaption[table] [way=bypart]
-%D Datacollection: article parameters (other fields and defaults)
-
-\unexpanded\def\CGJBibData[#1]%
+% Datacollection: article parameters (other fields and defaults)
+\def\CGJBibData[#1]%
{\getparameters
- [CGJ]
- [SubTitle=,
- RunningAuthor=,
- RunningTitle=Example,
- Email=,
- Address=,
- Page=1,
- Title={My Article},
- Author={Example Author},
- Period=,
- Number=,
- Year=,
- TocAuthor=,
- TocTitle=,
- #1]%
+ [CGJ]
+ [SubTitle=,
+ RunningAuthor=,
+ RunningTitle=Example,
+ Email=,
+ Address=,
+ Page=1,
+ Title={My Article},
+ Author={Example Author},
+ Period=,
+ Number=,
+ Year=,
+ TocAuthor=,
+ TocTitle=,
+ #1]%
\doifnothing
{\CGJRunningTitle}
{\let\CGJRunningTitle\CGJTitle}%
@@ -470,116 +482,130 @@
\doifnothing
{\CGJTocTitle}
{\let\CGJTocTitle\CGJTitle}%
- \setvariables
- [CGJToc]
- [Author=\CGJTocAuthor,
- Title=\CGJTocTitle]% for TOC
+ \setvariables[CGJToc][Author=\CGJTocAuthor,
+ Title=\CGJTocTitle]% for TOC
}
-\unexpanded\def\dostartArticle[#1]
- {\CGJBibData[#1]
- \doifelse
- {\getvariable{CG-Journal}{NOFColumns}}
- {1}
- {\doifmodeelse{fullwidth}
- {\setuplayout[General]}
- {\setuplayout[SingleColumn]}}
- {\setupnotes[location=none]
- \setuplayout[General]}%
- \bgroup
- {\switchtobodyfont[16pt]\Articleheading\CGJTitle\par}
- {\doifsomething{\CGJSubTitle}
- {\switchtobodyfont[16pt]\Articlesubheading\CGJSubTitle\par}}
- {\doifsomething{\CGJAuthor}
- {\switchtobodyfont[12pt]\Authorname \CGJAuthor}\par}
- \part
- {\getvariable{CGJToc}{Title}%
- \doifsomething{\getvariable{CGJToc}{Author}}{ \emdash\ }%
- \IndexAuthor\getvariable{CGJToc}{Author}}
- \godown[13pt]%
- \egroup
- \par
- \hyphenpenalty1000\relax}
-
-\unexpanded\def\startArticle
- {\dosingleempty\dostartArticle}
-
-\def\signArticle
- {}
-
-%D In multicolumn mode, footnotes come are at the end of the article:
-
-\startsetups article:after
- \startfootnotesubject[title=]
- \placefootnotes
- \stopfootnotesubject
-\stopsetups
-
-\unexpanded\def\stopArticle
- {\doifelse{\getvariable{CG-Journal}{NOFColumns}}{1}
- {\par
- \signArticle}
- {\setups{article:after}
- \par
- \signArticle
- \stoppagecolumns}
- \page}
-
-\unexpanded\def\startAbstract
- {\bgroup
- \switchtobodyfont[12pt]
- \IntroCopy}
-
-\unexpanded\def\stopAbstract
- {\par
- \egroup
- \finishAbstract}
-
-\unexpanded\def\finishAbstract
- {\doifelse {\getvariable{CG-Journal}{NOFColumns}} {1}
- {\blank[BigCGblank]}
- {\vbox{\blank[BigCGblank]}%
- \par
- \startpagecolumns[balance=yes,distance=12pt,page=no,n=\getvariable{CG-Journal}{NOFColumns}]
- \setupitemgroup[itemize][packed]
- \setuplayout[grid=yes]} % grid mode only in columns
+\def\dostartArticle[#1]{%
+ \CGJBibData[#1]
+ % \pageno=\CGJPage
+ % \setupuserpagenumber[start=\CGJPage]
+ \doifelse
+ {\getvariable{CG-Journal}{NOFColumns}}
+ {1}
+ {\doifmodeelse{fullwidth}
+ {\setuplayout[General]}
+ {\setuplayout[SingleColumn]}}
+ {\setuplayout
+ [General]}%
+ \doifmode{cgjpagecolumns}
+ {\definepagecolumns [cgjpagecolumns][n=\getvariable{CG-Journal}{NOFColumns},distance=12pt,page=no]}
+ \bgroup
+ {\switchtobodyfont[16pt]\Articleheading\CGJTitle\par}
+ {\doifsomething{\CGJSubTitle}
+ {\switchtobodyfont[16pt]\Articlesubheading\CGJSubTitle\par}}
+ {\doifsomething
+ {\CGJAuthor}
+ {\switchtobodyfont[12pt]\Authorname \CGJAuthor}\par}
+ \part{\getvariable{CGJToc}{Title}%
+ \doifsomething{\getvariable{CGJToc}{Author}}{ \emdash\ }%
+ \IndexAuthor\getvariable{CGJToc}{Author}}
+ \godown[16pt]
+ \egroup
+ \hyphenpenalty1000}
+
+\def\startArticle{\dosingleempty\dostartArticle}
+
+\def\signArticle{}
+
+\def\CGJRunningTitle {}
+\def\CGJRunningAuthor {}
+\unprotect
+\def\mystoppagecolumns%
+ {\page \endgroup \page_otr_command_set_vsize \page_otr_command_set_hsize \page \endgroup}
+\protect
+
+\def\stopArticle{%
+ \par\signArticle
+ \doifmodeelse{cgjcolumnsets}
+ {\stopcolumnset \page}
+ {\doifmodeelse{cgjpagecolumns}
+ {\mystoppagecolumns}
+ {\doifmodeelse{cgjmixedcolumns}
+ {\stopmixedcolumns \page}
+ {\stopcolumns \page}%
+ }%
+ }%
}
-
-\unexpanded\def\noAbstract
- {\kern -24pt
- \finishAbstract}
-
-%D Headertexts
-
+\def\startAbstract{%
+ \bgroup
+ \switchtobodyfont[12pt]
+ \IntroCopy}
+
+
+\def\finishAbstract{%
+ \blank[BigCGblank]%
+ \doif
+ {\getvariable{CG-Journal}{NOFColumns}}
+ {>1}
+ {\setupcolumns
+ [n=\getvariable{CG-Journal}{NOFColumns},
+ distance=4mm,
+ balance=yes,
+ ]
+ }
+ \doifmodeelse{cgjcolumnsets}
+ {\definecolumnset[cgjcolumnsets][n=\getvariable{CG-Journal}{NOFColumns},balance=yes]%
+ \startcolumnset[cgjcolumnsets]}
+ {\doifmodeelse{cgjpagecolumns}
+ {\par\ifnum \getvariable{CG-Journal}{NOFColumns}>1 \hbox{}\par\fi\startpagecolumns[cgjpagecolumns]}
+ {\doifmodeelse{cgjmixedcolumns}
+ {\definemixedcolumns[cgjmixedcolumns][n=\getvariable{CG-Journal}{NOFColumns},balance=yes,blank={line,fixed}]%
+ \startmixedcolumns[cgjmixedcolumns]}
+ {\startcolumns[n=\getvariable{CG-Journal}{NOFColumns}]}%
+ }%
+ }%
+}
+
+\def\stopAbstract{%
+ \par
+ \egroup
+ \finishAbstract}
+
+\def\noAbstract{\kern -24pt \finishAbstract}
+
+
+% Headertexts
\startsetups[Header:texts]
- \setupheadertexts
- [] [{{\BreadcrumbLt\CGJRunningTitle}{\BreadcrumbTh\doifsomething{\CGJRunningAuthor}{\ > }\CGJRunningAuthor}}] %odd
- [{\BreadcrumbMd contextgroup}{\BreadcrumbRg\ > \getvariable{CG-Journal}{RunningTitle}}] [] %even
+ \setupheadertexts
+ []
+ [{{\BreadcrumbLt\CGJRunningTitle}{\BreadcrumbTh\doifsomething{\CGJRunningAuthor}{\ > }\CGJRunningAuthor}}] %odd
+ [{\BreadcrumbMd contextgroup}{\BreadcrumbRg\ > \getvariable{CG-Journal}{RunningTitle}}] %even
+ []
\stopsetups
-%D Footertexts
+% Footertexts
\startsetups[Footer:texts]
\setupfootertexts
- [] [\PagenumberStyle\pagenumber]
- [\PagenumberStyle\pagenumber] []
+ []
+ [\PagenumberStyle\pagenumber]
+ [\PagenumberStyle\pagenumber]
+ []
\stopsetups
-%D Setup tolerance, stretch.
-
-\setuptolerance
- [tolerant,stretch]
+% Setup tolerance, stretch
+\setuptolerance[tolerant,stretch]
-%D Setting up footnotes.
+% Setting up footnotes
\setupnotation
[footnote]
[way=bypart,
- rule=on]
-
-%D Adjustments to the container containing the footnotes.
+ rule=on]
+% Adjustments to the container containing the footnotes
\setupnote
[footnote]
[frame=off,
@@ -588,62 +614,64 @@
background=,
rulecolor=black, %% the line above the inserts
rulethickness=1pt,
- next={ },
- split=verystrict,
- scope=page,
style=Articlefootnotes]
-\doifmodeelse {draft} {\setupnote[footnote][frame=on]}
-
-% Setup typing.
-\setupnarrower
- [middle=3mm,
- left=5mm]
+% Setup typing
+\setupnarrower[middle=3mm]
+\setupnarrower[left=5mm]
\definetextbackground
- [verbatim]
+ [typingbg]
[frame=off,
+ location=paragraph,
background=color,
backgroundcolor=CGgray,
- leftoffset=2mm,rightoffset=2mm,
- topoffset=2mm,bottomoffset=2mm,
- location=paragraph,
+ width=\hsize,
+ leftoffset=2mm, % doesnt work in the current beta
align=flushleft]
-
-\doifmodeelse {draft} {\definetextbackground[verbatim][frame=on]}
-
-\definetextbackground
- [verbatimitem]
- [verbatim]
-
-\setuptextbackground
- [verbatimitem]
- [before=,
- after=,
- width=\the\dimexpr\hsize-10.5mm\relax]
-
+
\startsetups typing:before
- \blank[MediumCGblank]
- \starttextbackground[verbatim]
+ \blank[MediumCGblank]
+ \starttextbackground[typingbg][style=DisplayMonospacedS]
+ \hfuzz=7.02pt % don't care if it bleeds in to the frame a little
+ \setupnarrower[left=2mm] % because leftoffset does not work in the current beta
+ \startnarrower[left]
\stopsetups
\startsetups typing:before:small
- \blank[MediumCGblank]
- \starttextbackground[verbatim]
+ \blank[MediumCGblank]
+ \starttextbackground[typingbg][style=DisplayMonospacedX]
+ \hfuzz=6.3pt % don't care if it bleeds in to the frame a little
+ \setupnarrower[left=2mm]
+ \startnarrower[left]
\stopsetups
\startsetups typing:after
- \stoptextbackground
- \blank[MediumCGblank]
+ \stopnarrower\par
+ \stoptextbackground
+ \blank[MediumCGblank]
\stopsetups
\startsetups typing:before:item
- \starttextbackground[verbatimitem]
+% \blank[3pt]
+ \startframedtext
+ [frame=off,
+ before=,
+ after=,
+ background=color,
+ backgroundcolor=CGgray,
+ width=\the\dimexpr\hsize-10.5mm\relax,
+ offset=3mm,
+ align=flushleft,
+ style=DisplayMonospacedS,
+ ]
+ \hfuzz=7.02pt % don't care if it bleeds in to the frame a little
\stopsetups
\startsetups typing:after:item
- \stoptextbackground
+ \stopframedtext
+% \blank[3pt]
\stopsetups
\setuptyping
@@ -652,24 +680,15 @@
before=\setups{typing:before},
after=\setups{typing:after}]
-\setuptype
- [style=DisplayMonospaced]
-
-%D When verbatim becomes too large:
-
-\definetyping
- [smalltyping]
-
+\definetyping[smalltyping]
\setuptyping
[smalltyping]
[style=DisplayMonospacedX,
before=\setups{typing:before:small},
after=\setups{typing:after}]
-\unexpanded\def\smalltypefile{\typefile[smalltyping][]}
-
-%D Bullet lists.
+% Bullet lists
\setupitemgroup
[itemize]
[each]
@@ -679,7 +698,15 @@
align=right,
before={\blank[MediumCGblank]\startnarrower[left]},
after={\stopnarrower\blank[MediumCGblank]},
- inbetween={\blank[CGblank]}]
+ inbetween={\blank[CGblank]},
+ ]
+
+\def\Href#1{\underbar{\hyphenatedurl{#1}}}
+
+\setupformulas[align=flushleft,margin=5mm]
+
+\setupquotation[before={\blank[CGblank]\switchtobodyfont[8pt]\setupinterlinespace[line=12pt]},
+ after={\par\blank[CGblank]}]
\definedescription
[description]
@@ -688,27 +715,8 @@
before={\blank},
after={\blank}]
-\setupformula
- [align=flushleft,
- margin=5mm]
-
-\setupquotation
- [before={\blank[CGblank]\switchtobodyfont[10pt]},
- after={\blank[CGblank]}]
-
-\setupwhitespace
- [medium]
-
-\usemodule[abr-02,abr-03,abr-04]
-
-\unexpanded\def\Href#1{\underbar{\hyphenatedurl{#1}}}
\unexpanded\def\CG {\ConTeXt\ group}
-\setnewconstant\kindofpagetextareas\plusone % partial page. HH: low level, no high level switch (yet)
-
-%D There is a draft mode, which enables all frames:
-
-\doifmode {draft} {\showframe}
-
-\stopmodule
+\usemodule[abr-02]
+\endinput
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-features.lua b/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-features.lua
index 6c676ce2d24..34268c1716a 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-features.lua
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-features.lua
@@ -11,6 +11,7 @@ moduledata.fonts.features = moduledata.fonts.features or { }
-- for the moment only otf
+local rawget = rawget
local insert, remove, sortedhash = table.insert, table.remove, table.sortedhash
local v_yes = interfaces.variables.yes
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-system.lua b/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-system.lua
index dc0f2e6a3f8..8e55184e04a 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-system.lua
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-system.lua
@@ -123,7 +123,7 @@ function moduledata.fonts.system.showinstalledglyphnames(specification)
local names = table.setmetatableindex("table")
local f_u = formatters["%04X"]
for i=1,#paths do
- local list = dir.glob(paths[i].."/fonts/o*/**.tmc")
+ local list = dir.glob(paths[i].."/fonts/o*/**." .. utilities.lua.suffixes.tmc)
for i=1,#list do
files[list[i]] = true
end
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-tables.lua b/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-tables.lua
index 33cbc924c36..d9d7205dec1 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-tables.lua
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-tables.lua
@@ -9,6 +9,8 @@ if not modules then modules = { } end modules ['s-fonts-tables'] = {
moduledata.fonts = moduledata.fonts or { }
moduledata.fonts.tables = moduledata.fonts.tables or { }
+local rawget, type = rawget, type
+
local setmetatableindex = table.setmetatableindex
local sortedhash = table.sortedhash
local sortedkeys = table.sortedkeys
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.mkiv
index 2cd612c7577..5336f602472 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-fonts-variable.mkiv
@@ -49,6 +49,8 @@
% \enabletrackers[modules.fonts.variables.glyphs]
% \enabletrackers[modules.fonts.variables.kerns]
+\nopdfcompression
+
\starttext
\startbuffer[zycon]
@@ -81,9 +83,9 @@
% \showfontvariations
% [font=file:DecoVar-VF.ttf]
- % \showfontvariations
- % [font=file:VotoSerifGX.ttf,
- % max=15]
+% \showfontvariations
+% [font=file:VotoSerifGX.ttf,
+% max=15]
% \showfontvariations
% [font=file:Selawik-Variable.ttf]
@@ -91,23 +93,23 @@
% \showfontvariations
% [font=file:LibreFranklinGX-Romans.ttf]
- % \showfontvariations
- % [font=file:Zycon.ttf,
- % sample={\getbuffer[zycon]}]
+% \showfontvariations
+% [font=file:Zycon.ttf,
+% sample={\getbuffer[zycon]}]
- % \showfontvariations
- % [font=file:kairossansvariable.ttf]
+% \showfontvariations
+% [font=file:kairossansvariable.ttf]
- % \showfontvariations
- % [font=file:sourcecode-regular.otf]
+% \showfontvariations
+% [font=file:sourcecode-regular.otf]
- % \showfontvariations
- % [font=file:AmstelvarAlpha-VF.ttf]
+% \showfontvariations
+% [font=file:AmstelvarAlpha-VF.ttf]
- % \showfontvariations
- % [font=file:bahnschrift.ttf]
+ \showfontvariations
+ [font=file:bahnschrift.ttf]
- % \showfontvariations
- % [font=file:sitka.ttc]
+% \showfontvariations
+% [font=file:sitka.ttc]
\stoptext
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-inf-01.mkvi b/Master/texmf-dist/tex/context/modules/mkiv/s-inf-01.mkvi
index 2fda9997a69..67fc45d46fc 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-inf-01.mkvi
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-inf-01.mkvi
@@ -26,8 +26,13 @@
\startluacode
local format, gsub, find, match = string.format, string.gsub, string.find, string.match
+ local setmetatableindex = table.setmetatableindex
- local list, size, comp, used, nope = { }, { }, { }, { mkii = { }, mkiv = { }, mkvi = { } }, { 0, 0, 0, 0, 0 }
+ local list = { }
+ local size = { }
+ local comp = { }
+ local used = setmetatableindex("table")
+ local nope = setmetatableindex("number")
local omit = {
"char%-def%.lua",
@@ -39,7 +44,7 @@
"colo%-pan.tex", ".*test.*"
}
local types = {
- "tex", "mkii", "mkiv", "mkvi", "lua", -- "mpiv"
+ "tex", "mkii", "mkiv", "mkvi", "mkxl", "mklx", "lua", -- "mpiv"
}
local patterns = {
"^([a-z][a-z][a-z][a-z])%-[a-z0-9%-]+%.[a-z]+",
@@ -64,10 +69,16 @@
end
end
if okay then
- local lm, sm, cm = list[category], size[category], comp[category]
+ local lm = list[category]
+ local sm = size[category]
+ local cm = comp[category]
if not lm then
- lm, sm, cm = { 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0 }
- list[category], size[category], comp[category] = lm, sm, cm
+ lm = setmetatableindex("number")
+ sm = setmetatableindex("number")
+ cm = setmetatableindex("number")
+ list[category] = lm
+ size[category] = sm
+ comp[category] = cm
end
lm[n] = lm[n] + 1
local done = true
@@ -90,7 +101,7 @@
logs.report("error","unknown file %a",name)
data = ""
end
- sm[n+5] = sm[n+5] + #data
+ sm[n+#types] = sm[n+#types] + #data
if done then
sm[n] = sm[n] + #data
else
@@ -121,7 +132,7 @@
end
local max, what = 0, (what == "size" and size) or list
for k, v in table.sortedpairs(what) do
- for i=1,5 do if v[i] > max then max = v[i] end end
+ for i=1,7 do if v[i] > max then max = v[i] end end
end
return max, what, function(n) return (max == 0 and 0) or (n == 0 and 0) or n/max end
end
@@ -130,14 +141,15 @@
function document.context_state_1(what)
local max, what, norm = prepare(what)
- context.starttabulate { "|Tl|T|T|T|T|T|" }
+ context.starttabulate { "|Tl|T|T|T|T|T|T|T|" }
context.NC()
context(category)
context.NC()
for i=1,#types do
local n, m = 0, 0
for k, v in next, list do
- local nn, mm = what[k][i], what[k][i+5]
+ local nn = what[k][i]
+ local mm = what[k][i+#types]
n = n + nn
m = m + (mm or nn)
end
@@ -150,18 +162,14 @@
for k, v in table.sortedpairs(what) do
local c = what == size and comp[k] or nope
context.NC()
- context("\\bf %s~%s~~%s~~%s",
+ context("\\bf %s~%s~~%s~~%s~~%s~~%s",
(used.mkii[k] and "ii") or "~~",
(used.mkiv[k] and "iv") or "~~",
(used.mkvi[k] and "vi") or "~~",
+ (used.mkiv[k] and "xl") or "~~",
+ (used.mkvi[k] and "lx") or "~~",
k
)
- -- context("%s\\enspace %s\\quad %s\\quad %s",
- -- (used.mkii[k] and "ii") or "\\quad",
- -- (used.mkiv[k] and "iv") or "\\quad",
- -- (used.mkvi[k] and "vi") or "\\quad",
- -- k
- -- )
context.NC()
for i=1,#types do
context.Bar(types[i],v[i],c[i],f_norm(norm(v[i])))
@@ -190,19 +198,21 @@
\definecolor[bar:mkii][middleblue]
\definecolor[bar:mkiv][middlered]
\definecolor[bar:mkvi][middleyellow]
+\definecolor[bar:mkxl][middlemagenta]
+\definecolor[bar:mklx][middlecyan]
\definecolor[bar:lua] [middlegray]
\newcount\UpCounter
\starttexdefinition Top #what#fraction#total#bigones
- \hbox to 5em{\hss#total}%
+ \hbox to 7em{\hss#total}%
\enspace
\hbox {{\bf#what}\ifnum#total=#bigones\else~#bigones\rlap{~+}\fi\hss}%
\stoptexdefinition
\starttexdefinition Bar #color#size#nobigones#fraction
\ifcase#size\else
- \hbox to 5em{\hss\ifcase#nobigones\else\llap{-~}\fi#size}%
+ \hbox to 7em{\hss\ifcase#nobigones\else\llap{-~}\fi#size}%
\enspace
\blackrule[color=bar:#color,width=#fraction\dimexpr 20em\relax,height=.8\strutht]%
\fi
@@ -214,7 +224,7 @@
\stoptexdefinition
\starttexdefinition StopUp
- \par\nointerlineskip\blackrule[height=1pt,width=5em,depth=0pt,color=darkgray]
+ \par\nointerlineskip\blackrule[height=1pt,width=7em,depth=0pt,color=darkgray]
\par\tttf\strut\UpName\par
\egroup
\ifnum\UpCounter=17
@@ -259,9 +269,9 @@
{The size of (core) files used in ConTeXt (- : large data files excluded; + : large data files included; comment and spaces removed)}
{1}{size}
\Show
- {The relative number of files used in ConTeXt (tex, mkii, mkiv, mkvi, lua).}
+ {The relative number of files used in ConTeXt (tex, mkii, mkiv, mkvi, mkxl, mklx, lua).}
{2}{number}
\Show
- {The relative size of files used in ConTeXt (tex, mkii, mkiv, mkvi, lua).}
+ {The relative size of files used in ConTeXt (tex, mkii, mkiv, mkvi, mkxl, mklx, lua).}
{2}{size}
\stoptext
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-inf-03.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-inf-03.mkiv
index d2acb734158..8bd7b36993c 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-inf-03.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-inf-03.mkiv
@@ -58,11 +58,18 @@
\quad\pagenumber\quad
\rlap{\goto{\hbox to 5cm{next\hss}}[nextpage]}]
+\ifcase\contextlmtxmode
+ \setupinteraction
+ [title={ConTeXt MkIV}]
+\else
+ \setupinteraction
+ [title={ConTeXt LMTX}]
+\fi
+
\setupinteraction
[state=start,
style=,
color=,
- title={ConTeXt MkIV},
subtitle={Lua modules and functions},
author={Hans Hagen - automatically generated},
contrastcolor=]
@@ -128,7 +135,7 @@ end
\stopnarrower
\vfill
\vfill
- \hskip10mm\scale[width=\dimexpr\paperwidth-20mm\relax]{\ttbf\white\ConTeXt\ MkIV}
+ \hskip10mm\scale[width=\dimexpr\paperwidth-20mm\relax]{\ttbf\white\ConTeXt\ \ifcase\contextlmtxmode MkIV\else LMTX\fi}
\par
% \hskip10mm\scale[width=\dimexpr\paperwidth-20mm\relax]{\white \strut Lua infrastructure \emdash\ \currentdate}
\vfill
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-magazine-basic.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-magazine-basic.mkiv
index 267bf50d898..d45fe6f601a 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-magazine-basic.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-magazine-basic.mkiv
@@ -24,6 +24,8 @@
%D will produce unwanted side effects. So, if some feature or settings is needed,
%D let me know.
+%D By now (2019) it's an old style that needs an overhaul ...
+
% These are reserved for PRAGMA-ADE, don't use them yourself!
% \setupdocument[main=Tricky]
@@ -67,21 +69,21 @@
\startreusableMPgraphic{middlepaper}
fill OverlayBox
withshademethod "circular"
- withshadecenter center (0.5,0.5)
+ withshadecenter center (0,0.5)
withshadecolors ("InnerColor","OuterColor") ;
\stopreusableMPgraphic
-\startreusableMPgraphic{rightpaper}
+\startreusableMPgraphic{leftpaper}
fill OverlayBox
withshademethod "circular"
- withshadecenter center (0,0.5)
+ withshadecenter center (-0.5,0.5)
withshadecolors ("InnerColor","OuterColor") ;
\stopreusableMPgraphic
-\startreusableMPgraphic{leftpaper}
+\startreusableMPgraphic{rightpaper}
fill OverlayBox
withshademethod "circular"
- withshadecenter center (1,0.5)
+ withshadecenter center (0.5,0.5)
withshadecolors ("InnerColor","OuterColor") ;
\stopreusableMPgraphic
@@ -472,7 +474,7 @@
before={\setups[titlepage,title]},
after={\setups[cleanup,listing,lastpage]}]
-\continueifinputfile {s-mag-01.mkiv}
+\continueifinputfile {s-magazine-basic.mkiv}
\startbuffer[abstract]
This is the zero issue of a semi periodical. The associated style can be used
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-maps.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-maps.mkiv
index 28e88af987f..af646b2e1ee 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-maps.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-maps.mkiv
@@ -7,30 +7,38 @@
%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.
+%D This module implements the MAPS style for use with the Context macro package. The
+%D original MAPS layout was designed and implemented in LaTeX by Taco Hoekwater and
+%D Siep Kroonenberg.
+%D
+%D \startitemize
+%D \startitem
+%D four layouts:
+%D \startitemize
+%D \startitem two columns \stopitem
+%D \startitem one column, with wide outer margins (option onecolumn) \stopitem
+%D \startitem one column, with wide left margin (option asym) \stopitem
+%D \startitem one column, with wide right margin (option single) \stopitem
+%D \stopitemize
+%D \stopitem
+%D \startitem
+%D font sizes deviate from TeX's usual geometric progression
+%D \stopitem
+%D \startitem
+%D use of sans-serif for headers and various details
+%D \stopitem
+%D \stopitemize
+%D
+%D A mode nosubsub defines only two levels of sectioning. If you don't need more and
+%D use the two-column layout, then this option will probably improve the looks of
+%D your paper.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newif\ifMapsInColumns
-\doifmode{asym}{\enablemode[onecolumn]} % implies onecolumn
+
+\doifmode {asym} {\enablemode[onecolumn]} % implies onecolumn
+\doifmode {single} {\enablemode[asym,onecolumn]} % implies onecolumn
\doifnotmode{onecolumn}{\MapsInColumnstrue}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -98,31 +106,31 @@
%%% 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]
+\definefontfeature[mapsdef][default][mode=node,onum=yes,lnum=no]
+
+\starttypescript [serif] [libertine] [name]
+ \setups[font:fallback:serif]
+ \definefontsynonym [Serif] [file:LinLibertine_R.otf] [features=mapsdef]
+ \definefontsynonym [SerifItalic] [file:LinLibertine_RI.otf] [features=mapsdef]
+ \definefontsynonym [SerifSlanted] [file:LinLibertine_RI.otf] [features=mapsdef]
+ \definefontsynonym [SerifBold] [file:LinLibertine_RB.otf] [features=mapsdef]
+ \definefontsynonym [SerifBoldItalic] [file:LinLibertine_RBI.otf] [features=mapsdef]
+ \definefontsynonym [SerifBoldSlanted] [file:LinLibertine_RBI.otf] [features=mapsdef]
+ \definefontsynonym [SerifCaps] [file:LinLibertine_R.otf] [features=smallcaps]
\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]
+ \definetypeface [maps] [rm] [serif] [libertine] [default]
+ \definetypeface [maps] [mm] [math] [euler] [default] [rscale=0.9]
+ \definetypeface [maps] [tt] [mono] [modern] [default]
+ \definetypeface [maps] [ss] [sans] [modern] [default] [rscale=0.95]
\stoptypescript
-\stopmode
\setupbodyfont[maps,10pt,rm]
-% activate protruding
\setupinterlinespace[line=11pt]
+% activate protruding
\setupfontsynonym[handling=pure]
\setupalign[hanging]
@@ -142,7 +150,7 @@
\setuppapersize
[maps][maps]
-\setuplayout[
+\setuplayout
[topspace=40pt,
height=688pt,
header=33pt,
@@ -166,154 +174,137 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% sectioning
-\setupheads[sectionnumber=no, align=right]
-
-\def\hfonti{\ssbfa}
-\def\hfontii{\ssbf}
-\def\hfontiii{\rm\it}
+\setupheads
+ [number=no,
+ align=flushleft]
+
+\unexpanded\def\hfonti {\ssbfa}
+\unexpanded\def\hfontii {\ssbf}
+\unexpanded\def\hfontiii {\rm\bi}
+\unexpanded\def\runin #1{#1.}
+
+\setuphead [section,subject]
+ [style=\hfonti,
+ before={\blank[line]},
+ after={\blank[halfline]}]
+\setuphead [subsection,subsubject]
+ [style=\hfontii,
+ before={\blank[halfline]},
+ after={}]
+\setuphead [subsubsection,subsubsubject]
+ [style=\hfontiii,
+ deeptextcommand=\runin,
+ distance=6pt,
+ alternative=text,
+ before={\blank[halfline]}]
+
+\startmode[nosubsub]
+\setuphead [section,subject]
+ [style=\hfontii,
+ before={\blank[line]},
+ after={}]
+\setuphead [subsection,subsubject]
+ [style=\hfontiii,
+ deeptextcommand=\runin,
+ alternative=text,
+ distance=6pt,
+ before={\blank[halfline]}]
+\stopmode
-\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,
+\setupfloats
+ [location=left,
+ before={\ss}]
+
+\setupcaptions
+ [align=flushleft,
+ headstyle={\ssbf},
+ style={\ssx},
+ suffix=.,
+ distance=6pt,
inbetween={\blank[halfline]}]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% various document elements
-\definesymbol [1][\getnamedglyphdirect{file:stmary10}{boxempty}]
+\setupitemize
+ [1]
+ [symbol=8]
-\setupitemize[1][packed]
-
-\setupitemize [each][%
- indentnext=no,
- align=right,
- width=1em,
- distance=0pt%
-]
+\setupitemize
+ [each]
+ [before={\blank[line]},
+ after={\blank[line]},
+ inbetween=,
+ indentnext=no,
+ width=12pt,
+ 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]
+\def\complexstartouteritemize[#1]%
+ {\begingroup
+ \setupitemize[width=0pt,inbetween={\blank},before={\blank},after={\blank}]
+ \startitemize[#1]
+ \let\doitem\item
+ \def\item{\doitem[]\hbox{}\kern12pt\rightskip=0pt}}
-\setupdescriptions [indentnext=no]
+\def\stopouteritemize
+ {\stopitemize\endgroup}
-\unexpanded\def\smalltyping{%
- \switchtobodyfont[tt]%
- \parindent=0pt
-}
+\definedescription
+ [description]
+ [alternative=hanging,width=fit]
% typing:
% - prettyverbatim is NOT the default
-% - smaller size
-\unexpanded\def
- \XeTeX{X\lower.5ex\hbox{\kern-.1em\mirror{E}}\kern-.1667em\TeX}
+\setuptyping
+ [style={\switchtobodyfont[small,tt]},
+ option=none,
+ indentnext=no]
-\setuptyping [%
- style={\smalltyping},
- option=none,
- indentnext=no%
-]
-
-\def\footnum#1{#1.}
+% normally we have endnotes, but in the title there
+% could be a \thanks command. Since the new column mode
+% does not deal with footnotes all that well, we more
+% or less have to roll our own.
\setupnotation
- [footnote]
- [alternative=serried,
- before=,
- after=,
- location=none,
- width=\textwidth,
- before={\blank},
- numbercommand=,
- command=\footnum,
- distance=0.5em]
+ [footnote]
+ [margin=0cm,
+ before={},
+ after={},
+ way=bypage,
+ number=no]
+
+\setupnote
+ [footnote]
+ [location=page,
+ spacebefore=,
+ before=,
+ after=]
+
+\unexpanded\def\thanks#1{\xdef\MapsThanks{#1}*}
\setuptabulate
- [before=\blank,
- inner=\ss,
- after=\blank]
+ [before=\blank,
+ inner=\ss,
+ after=\blank]
\def\startIntroEntry#1%
- {\startlinecorrection
- \bgroup
+ {\bgroup
\setupalign[right]
\setuptolerance[verytolerant]
\setupindenting[no]
\noindent
\switchtobodyfont[9pt]%
\setuplocalinterlinespace[line=10pt]%
- %\hyphenpenalty10000
\parfillskip 0pt plus 1fill
\rightskip6pt plus 1fill
\ss
@@ -321,15 +312,15 @@
\ignorespaces }
\def\stopIntroEntry
- {\par\egroup \stoplinecorrection
+ {\par\egroup
\blank[line] }
-\def\defineIntroEntry[#1][#2][#3]%
+\def\defineIntroEntry[#1][#2]
{\setvalue{start#1}{\startIntroEntry{#2}}%
- \setvalue {stop#1}{\stopIntroEntry#3}}
+ \setvalue {stop#1}{\stopIntroEntry}}
-\defineIntroEntry[Keywords][Keywords][]
-\defineIntroEntry[Abstract][Abstract][]
+\defineIntroEntry[Keywords][Keywords]
+\defineIntroEntry[Abstract][Abstract]
% article parameters (other fields and defaults)
\def\MapsBibData[#1]%
@@ -345,82 +336,141 @@
Period=,
Number=,
Year=,
+ SkipHeader=,
+ SkipFooter=,
+ Abstract=,
+ Keywords=,
+ Thanks=,
#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{\MapsPeriod}%
+ {\ifnum \normalmonth<6 \gdef\MapsPeriod{VOORJAAR}\else \gdef\MapsPeriod{NAJAAR}\fi}
+ \doifinstringelse{oorjaar}{\MapsPeriod}{\gdef\MapsPeriod{VOORJAAR}}{}%
+ \doifinstringelse{pring}{\MapsPeriod}{\gdef\MapsPeriod{VOORJAAR}}{}%
+ \doifinstringelse{ajaar}{\MapsPeriod}{\gdef\MapsPeriod{NAJAAR}}{}%
+ \doifinstringelse{utumn}{\MapsPeriod}{\gdef\MapsPeriod{NAJAAR}}{}%
\doifnothing{\MapsYear}{\gdef\MapsYear{\the\year}}%
- \doifnothing{\MapsNumber}{%
- \ifnum \normalmonth<6
+ \doifnothing{\MapsNumber}%
+ {\ifnum \normalmonth<6
\xdef\MapsNumber{\the\numexpr (\the\year-1990)*2\relax}%
- \else
+ \else
\xdef\MapsNumber{\the\numexpr (\the\year-1990)*2+1\relax}%
- \fi }%
+ \fi }%
\doifnothing\MapsRunningAuthor
- {\glet\MapsRunningAuthor\MapsAuthor}%
+ {\global\let\MapsRunningAuthor\MapsAuthor}%
\doifnothing\MapsRunningTitle
- {\glet\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
-}
+ {\global\let\MapsRunningTitle\MapsTitle}}%
+
+\def\doarticleheader
+ {\startbaselinecorrection
+ \bgroup
+ \hsize = 457pt
+ \let\\\crlf
+ \blank[35pt,force]
+ \switchtobodyfont[24pt]
+ \startalign[flushleft,verytolerant,extremestretch]
+ {\noindent\bf\language=-1\MapsTitle\par}
+ \ifx\MapsSubTitle\empty
+ \blank[line]
+ \else
+ \bgroup
+ \blank[12pt]
+ \switchtobodyfont[14pt]\noindent \it
+ \advance \rightskip 0pt plus 2em
+ \MapsSubTitle\par
+ \egroup
+ \blank[line]
+ \fi
+ \stopalign
+ \egroup
+ \setupalign[width]
+ \switchtobodyfont[rm,10pt]
+ \stopbaselinecorrection }
+
+\newif\ifintroentries
+
+\def\dostartArticle[#1]%
+ {\MapsBibData[#1]
+ \pageno=\MapsPage
+ \setnumber[realpage][\MapsPage]
+ \setnumber[userpage][\MapsPage]
+ \doifnothing{\MapsSkipHeader}{\doarticleheader}%
+ \ifMapsInColumns
+ \startcolumns\hyphenpenalty1000
+ \else
+ \clubpenalty10000
+ \widowpenalty10000
+ \fi
+ \introentriesfalse
+ \startbaselinecorrection
+ \doifsomething{\MapsAbstract}{\startAbstract \MapsAbstract \stopAbstract \introentriestrue }
+ \doifsomething{\MapsKeywords}{\startKeywords \MapsKeywords \stopKeywords \introentriestrue }
+ \stopbaselinecorrection
+ \ifintroentries
+ \blank[2*line]
+ \fi
+ \doifsomething\MapsThanks
+ {\expanded{\footnote[thanks]{*\quad\strut\MapsThanks}}%
+ \kern -22pt }% need to unskip because of the silent \footnote
+ \let\footnote\endnote }
+
+\def\startArticle
+ {\dosingleempty\dostartArticle}
+
+\def\signArticle
+ {\doifnothing
+ {\MapsSkipFooter}
+ {\blank[line]\let\\\crlf
+ \noindent\switchtobodyfont[ss,9pt]%
+ \MapsAuthor
+ \doifsomething{\MapsAddress}{\\\MapsAddress}%
+ \doifsomething{\MapsEmail}{\\\MapsEmail}}%
+ \switchtobodyfont[10pt]%
+ \def\signArticle{}}
+
+% endnotes aka footnotes
+
+\def\footnum#1{#1.}
+
+\setupnotation
+ [endnote]
+ [alternative=serried,
+ style={\switchtobodyfont[9pt]},
+ margin=0cm,
+ width=12pt,
+ before=,
+ after=,
+ margin=0cm,
+ numbercommand=\footnum]
+
+\setupnote
+ [endnote]
+ [location=none]
+
+\def\endnotessubjectname{Footnotes}
+\def\endnotesubjectname{Footnote}
+
+\def\stopArticle
+ {\ifcase\rawcountervalue[endnote]\relax
+ \or
+ \startsubject[title=\endnotesubjectname] % single
+ \placenotes[endnote]
+ \stopsubject
+ \else
+ \startsubject[title=\endnotessubjectname]
+ \placenotes[endnote]
+ \stopsubject
+ \fi
+ \par\signArticle
+ \ifMapsInColumns \stopcolumns \fi
+ \page }
\installpagebreakmethod{last}{}
%%% `logos' %%%%%%%%%%%%%%%%%%%%%%%%%%
+\unexpanded\def\XeTeX
+ {X\lower.5ex\hbox{\kern-.1em\mirror{E}}\kern-.1667em\TeX}
+
\unexpanded\def\LaTeX % requested by erik frambach
{{\setbox\scratchbox\hbox{L}%
\scratchdimen\ht\scratchbox
@@ -429,66 +479,304 @@
\raise\scratchdimen\hbox{\lower\ht\scratchbox\copy\scratchbox}%
\kern-.2\wd\scratchbox\TeX}}
+\unexpanded\def\CONTEXT {Con{\TeX}t}
+\unexpanded\def\ConTeXt {Con{\TeX}t}
+\unexpanded\def\METAFONT {Metafont}
+\unexpanded\def\METAPOST {MetaPost}
+\unexpanded\def\POSTSCRIPT{PostScript}
-\def\CONTEXT{Con{\TeX}t}
-\def\ConTeXt{Con{\TeX}t}
-\def\METAFONT{Metafont}
-\def\METAPOST{MetaPost}
-\def\POSTSCRIPT{PostScript}
+\unexpanded\def\acro#1{{\switchtobodyfont[9pt]#1}}
-\def\acro#1{{\switchtobodyfont[9pt]#1}}
+\definefontfeature[smallcapitals] [smcp=yes]
+\def\sc{\addff{smallcapitals}}
+\def\NTG{{\sc ntg}}
+\def\TUG{{\sc tug}}
%%%%%%%%%%%
+% headers and footers and other mode-related things
+\setuplayout
+ [width=457pt]
-\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
+\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 % empty
+
+\startmode[onecolumn]
+
+\setuplayout[width=340pt]
+
+\startmode[asym]% one col, asymmetric
+ \setuppagenumbering
+ [alternative={singlesided,doublesided}]
+ \doifmodeelse
+ {single}
+ {\setupheadertexts
[\TiHead]
[{\cap{\MapsPeriod\ \MapsYear}\quad\bf \pagenumber\hskip-147pt\hbox{}}]
+ [{\hbox{}\hskip-30pt{\bf \pagenumber}\quad \cap {maps\ \MapsNumber}}]
+ [\AuHead\hskip-110pt]}
+ {\setuptyping
+ [widetyping]
+ [oddmargin=-117pt]
+ \setuplayout[backspace=187.3pt]
+ \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
-}}{% 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
+ [\AuHead]}
+\stopmode
+
+\startnotmode[asym]
+ \setupheadertexts
[\TiHead]
- [{\cap{\MapsPeriod\ \MapsYear}\quad\bf \pagenumber\hskip-30pt\hbox{}}]
- [{\hbox{}\hskip-30pt{\bf \pagenumber}\quad \cap {maps\ \MapsNumber}}]
+ [{\cap{\MapsPeriod\ \MapsYear}\quad\bf \pagenumber\hskip-147pt\hbox{}}]
+ [{\hbox{}\hskip-147pt{\bf \pagenumber}\quad \cap {maps\ \MapsNumber}}]
[\AuHead]
- \setupfootertexts
-}
+\stopnotmode
+
+\stopmode % onecolumn
+
\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 }
+\def\startfullwidth
+ {\par\begingroup
+ \doifmode
+ {onecolumn}
+ {\hsize=\fulltextwidth
+ \doifmodeelse
+ {asym}
+ {\doifmodeelse{single}{\textwidth=\fulltextwidth }{\leftskip-117pt }}
+ {\ifodd\pageno \else \leftskip-117pt \hsize=340pt \fi }}}
+
+\def\stopfullwidth
+ {\par\endgroup}
+
+% Taco: \setupalign[tolerant,fixed} where fixed is french spacing
+
+\setupalign
+ [tolerant,fixed]
+
+\continueifinputfile{s-maps.mkiv}
+
+% \enablemode[nosubsub] % if you need at most two levels of sectioning
+% \enablemode[onecolumn] % for symmetric single-column layout
+% \enablemode[asym] % for asymmetric single-column layout, left aligned
+% \enablemode[single] % for asymmetric single-column layout, right aligned
+
+% \usemodule[map-20]
+
+\usebtxdataset[samplmaps.bib]
+\usebtxdefinitions[apa]
+
+\starttext
+\startArticle[% Use {} if argument contains comma's!
+% titel
+ Title={An example document for the Maps module, demonstrating its
+ various features\thanks{Thanks should be short}
+ },
+ RunningTitle=An example document,
+ SubTitle=with an optional subtitle,
+% auteur
+ Author=Anton Ulrich Thor,
+ Email=a.u.thor@uu.am.dw,
+ Address=Institute of Indefinite Studies\\
+ Unseen University\\
+ Ankh Morpork,
+% tijdstip
+ Period=voorjaar,
+ Number=36,
+ Year=2008,
+ Page=1,
+% Taal
+ Language=english,
+% Intro
+ Abstract={%
+This is a sample input file for the Maps module version 2.0,
+which mimics the associated \LaTeX\ class file.
+It demonstrates various standard and non-standard features.
+\crlf
+Use of the abstract- and keywords environments is highly appreciated.},
+ Keywords={Maps, \ConTeXt\ module, sample}]
+
+\startsection[title=Ordinary Text]
+
+The ends of words and sentences are marked
+ by spaces. It doesn't matter how many
+spaces you type; one is as good as 100. The
+end of a line counts as a space.
+
+One or more blank lines denote the end
+of a paragraph.
+
+Footnotes\footnote{This is an example of an endnote.} are converted to
+endnotes\endnote{This is another one, with more text to it, to see how
+it will wrap to the next line.}. These will automatically be typeset at
+the end of the article. The title of the notes section is defined by the
+command \type{\endnotessubjectname} (for multiple notes) or
+\type{\endnotesubjectname} (in case of a single note).
+
+\stopsection
+
+\startsection[title=Fonts]
+The Maps uses Linux Libertine for main text,
+with Latin Modern Sans and Mono, and Euler for math. The Linux Libertine
+OpenType fonts are part of \TeX\ Live. If they are not found,
+Latin Modern Serif fallbacks will be used.
+
+\stopsection
+
+\startsection[title=Sectioning]
+
+The maps module defaults to unnumbered sections. If you really must,
+you can restore section numbering with \emph{e.g.}
+\type{\setupheads[number=yes]}
+
+\startsubsection[title=Subsection]
+This is a second-level section header. You can go down one more
+level:
+
+% \penalty0
+
+\startsubsubsection[title=A subsubsection]
+This is supposed to be a run-in header, so make sure you start the
+text right after \type{\startsubsubsection}.
+
+\stopsubsubsection
+
+\startsubsubsection[title=Tip]
+If you only need one or two levels of header, then you can get a
+better layout with the \type{nosubsub} document option.
+The Maps editors may decide to turn on this option for you.
+\stopsubsubsection
+
+\stopsubsection
+
+\stopsection
+
+\startsection[title=Lists]
+
+Another frequently-displayed structure is a list.
+The following is an example of an \emph{itemized}
+list.
+\startitemize
+ \item This is the first item of an itemized list.
+ Each item in the list is marked with a \quote{tick}.
+ \item This is the second item of the list. It
+ contains another list nested inside it. The inner
+ list is an \emph{enumerated} list.
+
+ \startitemize[n]
+ \startitem This is the first item of an enumerated
+ list that is nested within the itemized list.
+ \stopitem
+ \item This is the second item of the inner list.
+ \ConTeXt\ allows you to nest lists deeper than
+ you really should.
+ \stopitem
+ \stopitemize
+
+ \noindent
+ This is the rest of the second item of the outer
+ list. It is no more interesting than any other
+ part of the item.
+ \startitem This is the third item of the list. \stopitem
+\stopitemize
+
+In a two-column layout, protracted indenting doesn't look very
+good. Therefore, the Maps module provides an \type{outeritemize}
+environment:
+
+\startouteritemize
+\item This is the first item of a non-indented itemized list,
+ produced with the \mono{outeritemize} environment.
+\item This is the second item.
+\stopouteritemize
+
+Now an enumerated version:
+
+\startouteritemize[n]
+\item This is the first item of a non-indented enumerated list,
+ produced with the \mono{outeritemize} environment.
+\item This is the second item.
+\stopouteritemize
+
+There is also a definition for description lists:
+
+\startdescription{cow}
+A milk-producing animal that grazes grass and has multiple stomachs
+\stopdescription
+\startdescription{kangoroo}
+An Australian hopping animal
+\stopdescription
+
+\stopsection
+
+\startsection[title=Wide typesetting in single-column layout]
+
+For both single-column layouts, there are environments \type{fullwidth} and
+\type{widetyping} which typeset their content across the full page,
+including most of the wide margin.
+
+\startfullwidth
+x x x x x x x x x x x x x x x x x x x x x
+x x x x x x x x x x x x x x x x x x x x x
+x x x x x x x x x x x x x x x x x x x x x
+x x x x x x x x x x x x x x x x x x x x x
+\stopfullwidth
-\frenchspacing
-\setuptolerance[tolerant]
+\startwidetyping
+{}\/$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+\stopwidetyping
+The implementation of \type{fullwidth} is rather simplistic and
+may easily break, in which case more sophisticated hackery will be
+needed.
+
+\stopsection
+
+\startsection[title=Assembling your submission]
+
+Please check whether all non-standard modules and all
+non-standard fonts are included. We do have a current \TeX{} Live but,
+although we do have access to CTAN, finding the right stuff by
+name can occasionally be a challenge.
+
+Avoid jpeg compression for screenshots. Conversion to pdf may
+sometimes result in jpeg compression as well. Use \emph{e.g.} png
+format instead.
+
+Finally, a pdf of your article is appreciated. This way, we can
+check more reliably whether your article compiles
+correctly on our own systems.
+
+\stopsection
+\startsection[title=References]
+
+If you have references, use whatever suits you. A few sample references:
+see \cite[knuth], or \cite[lamport].
+
+\stopsection
+
+\startsection[title=References]
+ \placelistofpublications
+\stopsection
+\stopArticle
+\stoptext
-\endinput
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-present-luatex.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-present-luatex.mkiv
new file mode 100644
index 00000000000..079860bf9e5
--- /dev/null
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-present-luatex.mkiv
@@ -0,0 +1,118 @@
+%D \module
+%D [ file=s-present-luatex,
+%D version=2016.04.30, % around
+%D title=\CONTEXT\ Style File,
+%D subtitle=Presentation Environment Banner,
+%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 As with older presentations we use the \LUA\ moon as page counter. The rest
+%D of the style is simple because I got bored of all this fancy stepping for
+%D simple presentations.
+
+%D Beware: this presentation is meant for my own use and not a general purpose
+%D presentation style. It is a rather dumb module but served its purpose well.
+
+\startmodule[present-luatex]
+
+\useMPlibrary[lua]
+
+\setupbodyfont
+ [dejavu,17.3pt]
+
+\startuseMPgraphic{page}
+ StartPage ;
+ luaorbitcolor := white ;
+ fill Page withcolor (.5white - luaplanetcolor) ;
+ draw anchored.urt(image(drawluapagenumbergoround) xsized 150pt,urcorner Page shifted (-15pt,-10pt)) ;
+ if RealPageNumber > 1 :
+ begingroup;
+ save p, q; picture p, q;
+ p := textext("\ssbf\setstrut\strut \documentvariable{mp:title}") xsized 150pt ;
+ q := textext("\ssbf\setstrut\strut \documentvariable{mp:subtitle}") xsized 150pt ;
+ setbounds q to boundingbox(p);
+ draw anchored.lrt(p,lrcorner Page shifted (-15pt, 90pt)) withcolor luaplanetcolor ;
+ draw anchored.lrt(q,lrcorner Page shifted (-15pt, 55pt)) withcolor luaholecolor ;
+ endgroup;
+ fi ;
+ fill Field[Text][Text] enlarged 10pt withcolor (.5white - luaplanetcolor)/1.5 ;
+ StopPage ;
+\stopuseMPgraphic
+
+\defineoverlay
+ [page]
+ [\useMPgraphic{page}]
+
+\setupbackgrounds
+ [page]
+ [background=page]
+
+\setuppapersize
+ [S6]
+
+\setuplayout
+ [backspace=50pt,
+ cutspace=200pt,
+ topspace=40pt,
+ bottomspace=40pt,
+ margin=0pt,
+ footer=0pt,
+ header=0pt,
+ width=middle,
+ height=middle]
+
+\setupmakeup
+ [standard]
+ [top=\vfil,
+ bottom=\vfilll,
+ setups=standardmakeup,
+ align=middle,
+ color=white]
+
+\setupcolors
+ [textcolor=white]
+
+\startsetups standardmakeup
+ \setupwhitespace
+ [big]
+\stopsetups
+
+\setupdocument
+ [title=Title,
+ subtitle=Subtitle,
+ location=\currentdate,
+ mp:title=title,
+ mp:subtitle=subtitle]
+
+\startsetups document:start
+
+ \startstandardmakeup[bottom=,top=]
+
+ \raggedcenter
+
+ \vfil\vfil
+ \dontleavehmode\scale[width=1.00\textwidth]{\ssbf\documentvariable{title}}
+ \vfil
+ \dontleavehmode\scale[width=0.75\textwidth]{\ssbf\documentvariable{subtitle}}
+ \vfil
+ \dontleavehmode\scale[width=0.65\textwidth]{\ssbf\documentvariable{location}}
+ \vfil
+ \dontleavehmode\scale[width=0.45\textwidth]{\ssbf\documentvariable{author}}
+ \vfil\vfil\vfil
+
+ \stopstandardmakeup
+
+\stopsetups
+
+\stopmodule
+
+\continueifinputfile{s-present-luatex.mkiv}
+
+\usemodule[present-common]
+
+\inputpresentationfile{context/2016/context-2016-luatex.tex}
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-tugboat.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-tugboat.mkiv
index d3d15c3e735..e243dc4879b 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-tugboat.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-tugboat.mkiv
@@ -1,32 +1,33 @@
%D \module
%D [ file=t-tugboat
-%D version=$Id: t-tugboat.tex 111 2013-02-25 17:56:22Z bnb $
+%D version=$Id: s-tugboat.mkiv 246 2019-09-09 18:22:19Z karl $
%D title=\CONTEXT\ Style File,
%D subtitle=\TUGBOAT\ base style,
-%D author=Aditya Mahajan,
+%D author=Aditya Mahajan and others,
%D date=\currentdate,
%D copyright=Public Domain]
-%D This file is derived from \filename{s-tug-02} written by Hans Hagen
-%D and Steve Grathwohl. Karl Berry asked me for some changes in the
-%D \TUGBOAT\ style files. The original file had an option of typesetting
-%D on a grid. That was too clever for me to understand, and hence to
-%D modify. Since \TUGBOAT\ usually does not typeset on a grid, I redid the
-%D style, borrowing parts from \filename{s-tug-02} and redoing some
-%D parts from scratch.
+%D \filename {s-tug-02} was originally written by Hans Hagen and Steve Grathwohl,
+%D and used grid typesetting. \filename {t-tugboat} was a major revision by Aditya
+%D Mahajan, no grid. \filename {s-tugboat.mkiv} was another major revision by Taco
+%D Hoekwater and Alan Braslau, now with pagecolumns. The latest version has been
+%D adapted by Karl Berry.
-%D \section Variables %<<<1
+%D HH: most articles are not that demanding, otherwise I'd probably redefine some
+%D of the code below. So, for now things gets adapted when needed.
+
+%D \section{Variables}
%D
%D We store the information about the article in variables.
\setvariables
[tugboat]
[type=article,
- columns=no,
- grid=yes]
+ columns=yes,
+ grid=no]
\setvariables
- [tugboat]
+ [tugboat] % overridden from ../tugboat.dates if present.
[year=1900,
volume=0,
number=0,
@@ -38,45 +39,44 @@
subtitle=,
keywords=,
author=T. Boat,
- address=Pragmatically Advanced tugboats \\
- 314 Pi Ave. \\
- 8061GH Hasselt NL,
- email={tugboat@tug.org}]
+ address=Pragmatically Advanced tugboats\\314 Pi Ave.\\8061GH Hasselt NL,
+ email={pragboat@tug.org}]
-%D \section Font Setup %<<<1
+%D \section{Font Setup}
%D
-%D \TUGBOAT\ uses slightly different interline space than the default.
-%D So we change the interline space.
+%D \TUGBOAT\ uses standard CM interline spacing.
-\definebodyfontenvironment [8pt] [interlinespace=9.5pt, big=9pt, small=7pt]
-\definebodyfontenvironment [9pt] [interlinespace=11pt, big=10pt, small=8pt]
-\definebodyfontenvironment [10pt] [interlinespace=12pt, big=12pt, small=9pt]
-\definebodyfontenvironment [12pt] [interlinespace=14pt,big=14.4pt,small=10pt]
-\definebodyfontenvironment [14.4pt] [interlinespace=18pt,big=14.4pt,small=12pt]
-\definebodyfontenvironment [9.8pt] % Because 9.8pt is used in typing environments
+\definebodyfontenvironment [8pt] [interlinespace=9.5pt, big=9pt, small=7pt]
+\definebodyfontenvironment [9pt] [interlinespace=11pt, big=10pt, small=8pt]
+\definebodyfontenvironment [10pt] [interlinespace=12pt, big=12pt, small=9pt]
+\definebodyfontenvironment [12pt] [interlinespace=14pt, big=14.4pt,small=10pt]
+\definebodyfontenvironment [14.4pt] [interlinespace=18pt, big=14.4pt,small=12pt]
-%D \TUGBOAT\ uses Computer Modern fonts, and \CONTEXT\ uses Latin Modern
-%D by default. So, we just specify the font size.
+%D \TUGBOAT\ uses Computer Modern fonts, and \CONTEXT\ uses Latin Modern by default,
+%D which is fine. So, we just specify the font size.
\setupbodyfont [10pt]
-% Italic rather than slanted for emphasis.
-\setupbodyfontenvironment[default][em=italic]
+%D \TUGBOAT\ uses italic rather than slanted for emphasis.
+
+\setupbodyfontenvironment
+ [default]
+ [em=italic]
+
+%D Break after these chars in urls, not before.
-% Break after these chars in urls, not before.
\sethyphenatedurlafter /
\sethyphenatedurlafter .
\sethyphenatedurlafter _
-%D \section Layout Setup %<<<1
+%D \section{Layout Setup}
%D
-%D The original layout used in the \LATEX\ style for \TUGBOAT\ is a bit
-%D ambiguous. It uses low|-|level \TEX\ syntax, rather than changing the
-%D layout in a human understandable way (for example, by using the
-%D \mono{geometry} package. I have tried to translate it to \CONTEXT\ as
-%D far as I understand.
+%D The original layout used in the \LATEX\ style for \TUGBOAT\ uses low|-|level
+%D \TEX\ syntax.
-\setuppapersize[letter][letter]
+\setuppapersize
+ [letter]
+ [letter]
\setuplayout
[topspace=3.8pc,% was 3.5pc
@@ -95,32 +95,43 @@
margindistance=1pc,
]
-\setupcolumns[distance=1.5pc]
+%D With pagecolumns, seemingly can't get single-column floats. (HH: not sure
+%D what is meant but probably that it can't be done in the running text.)
+
+\enablemode [pagecolumns]
+
+%D KB: With columnsets, get unwanted gridsetting and blank last pages. HH: can
+%D be solved but columnsets normally get set up beforehand (figures and such).
+
+% \enablemode [columnsets]
+% \startmode [columnsets]
+% \usemodule [newcolumnsets]
+% \stopmode
\setuppagenumbering
[location=,
alternative=doublesided]
-%D In \TUGBOAT\ different articles are glued together to form the final
-%D journal, so we do not want each article to occupy even number of
-%D pages.
+%D In \TUGBOAT\ different articles are glued together to form the final journal, so
+%D we do not want each article to occupy an even number of pages. (Except this seems
+%D to have no effect with pagecolumns.) HH: page columns are actually just single
+%D columns but combined, so it supports side floats and such.
\installpagebreakhandler {last} {}
-%D \section Indentation %<<<1
+%D \section{Indentation}
%D
-%D We use automatic indentation control, that is: no
-%D indentation after titles and skips.
+%D We use automatic indentation control, that is: no indentation after titles and
+%D skips.
\setupindenting[20pt,yes]
-%D We do not want indentation after lists.
+%D We do not usually want indentation after lists.
\setupenumerations [indentnext=no]
-
\setupdescriptions [indentnext=no]
-%D \section Itemize
+%D \section{Itemize}
%D
%D And these. We typeset itemizations ragged right.
@@ -144,70 +155,112 @@
[1]
[packed]
-%D \section Section Headings %<<<1
+%D \section{Section Headings}
%D
-%D We follow the \TUGBOAT\ style for sections. I do not know if
-%D \type{align=right} also disables hyphenation. Lets wait and see on
-%D this. Rest all is straight forward. It took me a while to realize
-%D that in \LATEX\ \type{\@startsection} the absolute value of before
-%D skip (fourth argument) is important and not the sign.
+%D We follow the \TUGBOAT\ style for sections. I do not know if \type {align=right}
+%D also disables hyphenation (HH: no that is independent). Let's wait and see on
+%D this. The rest is straightforward. It took me a while to realize that in \LATEX\
+%D \type {\@startsection} the absolute value of before skip (fourth argument) is
+%D important and not the sign.
\setuphead
- [section,subsection, subsubsection,
- subject, subsubject, subsubsubject]
+ [section,subsection,subsubsection,
+ subject,subsubject,subsubsubject]
[style=bold,
align=right,
before={\blank[8pt]},
after={\blank[4pt]}]
-%D \section Spacing <<<1
+%D \section{Spacing}
%D
-%D We define a logical skip. This is equal to the \tex{topsep} in latex,
-%D and most environments should have this skip.
+%D We define a logical skip. This is equal to the \type {\topsep} in \LATEX, and
+%D most environments should have this skip.
+
+\defineblank
+ [tugblank]
+ [3pt]
-\defineblank[tugblank][3pt]
-\setupblank[3pt]
+%D HH: In fact, \type \setupblank[tugblank] would deal with most of the blanks
+%D anyway, but let's not change this now.
+\setupblank
+ [3pt]
-\setupitemize[1][before={\blank[tugblank]},after={\blank[tugblank]},
- inbetween={\blank[tugblank]}]
+\setupitemize
+ [1]
+ [before={\blank[tugblank]},
+ after={\blank[tugblank]},
+ inbetween={\blank[tugblank]}]
-\setuplines[before={\blank[tugblank]},after={\blank[tugblank]},
- inbetween={\blank[tugblank]}]
+\setuplines
+ [before={\blank[tugblank]},
+ after={\blank[tugblank]},
+ inbetween={\blank[tugblank]}]
%D \section Typing %<<<1
%D
-%D \TUGBOAT\ uses a smaller font size for verbatim typesetting.
+%D \TUGBOAT\ uses a smaller font size for verbatim typesetting. Not sure why
+%D \type {nowhite} is used here.
\setuptyping
[option=none,
- % mkiv arbitrarily scales lm somehow randomly; 10pt gets 9pt back,
- % we make it a little smaller.
- bodyfont=9.8pt,
- before={\blank[nowhite]}, % AM: If this is too small, use \blank[nowhite,tugblank]}
+ bodyfont=9pt,
+ before={\blank[nowhite,tugblank]},
after={\blank[back,nowhite,tugblank]}]
-%D \section Footnotes %<<<1
+%D Do not colorize code.
+
+\setuptyping[LUA][option=]
+\setuptyping[TEX][option=]
+\setuptyping[MP] [option=]
+
+%D Tiny line numbers in numbered code (not text size)
+
+\setuplinenumbering[style=\tfxx] % \infofont would be really tiny
+
+%D \section{Figure captions}
+%D
+%D \TUGBOAT\ uses a smaller font size for captions, too; \type {\small} gives 8pt,
+%D and we want 9pt, so we have to manually fix the baselines.
+
+\setupcaptions
+ [headstyle=\AcroFontBold,
+ style={\AcroFont\advance\baselineskip by -1pt},
+ align=right]
+
+%D We like a colon after the caption label.
+
+\let\floatcaptionsuffix=:
+
+% Prefer floats in text.
+
+\setupfloat[figure][align=middle,default=here]
+\setupfloat[table] [align=middle,default=here]
+
+%D \section{Footnotes}
%D
%D Not entirely a la \TUGBOAT:
+% rule={\hrule width 5pc height .4pt depth 0pt\relax \kern \strutdepth},
+
\setupfootnotes
- [bodyfont=9pt,
- location=columns%,
-% rule={\hrule width 5pc height .4pt depth 0pt\relax \kern \strutdepth}
-]
+ [bodyfont=9pt]
+
+\doif {\getvariable{tugboat}{columns}} {yes} {
+ \setupfootnotes
+ [location=columns]
+}
-\setupnotation[footnote]
+\setupnotation
+ [footnote]
[location=joinedup,
width=fit,
headstyle=normal,
distance=.5em]
-%>>>
-%D \section List %<<<
+%D \section{List}
%D
-%D We define a standard description and enumeration
-%D environment.
+%D We define a standard description and enumeration environment.
\definedescription
[description]
@@ -223,31 +276,26 @@
before={\blank[tugblank]},
after={\blank[tugblank]}]
-
-% >>>
-%D \section References %<<<
+%D \section{References}
%D
-%D The bib does not handle urls nicely. So we provide a stop gap solution.
-
-\definereferenceformat[cite][left={[},right={]}]
-\defineitemgroup [bibliography] [levels=1]
-\setupitemgroup [bibliography]
- [symbol=n,
- left={[},
- right={]},
- width=1.5em,
- stopper=,
- itemalign=flushright,
- inbetween={\blank[small]}]
+%D More or less like plain BibTeX + ltugboat.
+
+\setupbtx
+ [default:list:numbering]
+ [left={[},
+ right={]}]
+
+\setupbtxlist
+ [default]
+ [width=2em,
+ style={\frenchspacing},
+ align={raggedright,verystrict}]
%D Instead of color, we use weighted gray scales:
+
\setupcolors
[conversion=always]
-%D English it is.
-\mainlanguage
- [en]
-
%D We define some logical skips
\defineblank [tugbefore] [big]
@@ -261,26 +309,28 @@
\startsetups tugboat:abstract:setup
- \setuptolerance
- [horizontal, tolerant]
+ % \setuptolerance
+ % [horizontal, tolerant]
+
+ \setupnarrower
+ [before={\blank[.5\baselineskip]},
+ % after={\blank[10pt plus4pt minus4pt]},
+ after={\blank[10pt]},
+ middle=4.875pc]
- \setupnarrower
- [before={\blank[.5\baselineskip]},
-% after={\blank[10pt plus4pt minus4pt]},
- after={\blank[10pt]},
- middle=4.875pc]
+ \setupindenting
+ [20pt,yes]
\stopsetups
-%D Headers and footers are different for normal issues
-%D and proceedings.
+%D Headers and footers.
\startsetups tugboat:banner:text:article
- {\sl TUGboat},\space
- Volume \getvariable{tugboat}{volume}\space
- (\getvariable{tugboat}{year}),\space
- No.\space\getvariable{tugboat}{number}
+ {\sl TUGboat},\space
+ Volume \getvariable{tugboat}{volume}\space
+ (\getvariable{tugboat}{year}),\space
+ No.\space\getvariable{tugboat}{number}
\stopsetups
@@ -288,9 +338,9 @@
\startsetups tugboat:banner:text:proceedings
- \setups{tugboat:banner:text:article}
- \thinspace---\thinspace
- \postissno
+ \setups{tugboat:banner:text:article}
+ \thinspace---\thinspace
+ \postissno
\stopsetups
@@ -300,26 +350,15 @@
[\setups{tugboat:banner:text:article}]
[\pagenumber]
-% no footer in regular articles
-% \setupfootertexts
-% [][\getvariable{tugboat}{author}]
-% [\getvariable{tugboat}{title}][]
-
-\stopsetups
-
-\startsetups tugboat:banner:setup:proceedings
-
- \setupheadertexts
- [][\getvariable{tugboat}{title}]
- [\getvariable{tugboat}{author}][]
+ % no footer in regular articles
\setupfootertexts
- [\setups{tugboat:banner:text:proceedings}]
- [\pagenumber]
+ [][\getvariable{tugboat}{author}]
+ [\getvariable{tugboat}{title}][]
\stopsetups
-%D article is default so,
+%D article is default.
\setups{tugboat:banner:setup:article}
@@ -330,333 +369,334 @@
\startsetups tugboat:grid:setup:settings:yes
- \setupblank
- [line]
+ \setupblank
+ [line]
- \defineblank [tugbefore] [halfline]
- \defineblank [tuginbetween] [halfline]
+ \defineblank [tugbefore] [halfline]
+ \defineblank [tuginbetween] [halfline]
\stopsetups
-\startsetups tugboat:grid:setup:no
-
+% \startsetups tugboat:grid:setup:no
+%
% \setupblank
% [halfline]
-
+%
% \defineblank [medium] [halfline]
% \defineblank [tugbefore] [halfline]
% \defineblank [tuginbetween] [halfline]
-
-\stopsetups
+%
+% \stopsetups
\startsetups tugboat:introduction:article
-% \blank[halfline]
-
- \start
- \def\\{\unskip\space\&\space\ignorespaces}
- \hbox{\indent\getvariable{tugboat}{author}}
- \par
- \stop
-
-
-\stopsetups
-
-\startsetups tugboat:introduction:proceedings
-
- \blank[20pt]
-
- \start
- \switchtobodyfont[12pt]
- \def\\{\unskip\space\&\space\ignorespaces}
- \getvariable{tugboat}{author}
- \par
- \stop
+ % \blank[halfline]
\start
- \switchtobodyfont[9pt]
- \def\\{\unskip,\space\ignorespaces}
- \getvariable{tugboat}{address}
- \par
- {\tt\getvariable{tugboat}{email}}
- \par
- \stop
-
+ \def\\{\unskip\space\&\space\ignorespaces}
+ \hbox{\indent\getvariable{tugboat}{author}}
+ \par
+ \stop
\stopsetups
\startsetups tugboat:article:start
- \starttext
-
- \setups{tugboat:columns:\getvariable{tugboat}{columns}}
- \setups{tugboat:banner:setup:\getvariable{tugboat}{type}}
-
- \doif{\getvariable{tugboat}{columns}}{yes}{\startcolumns}
+ \starttext
+
+ \setups{tugboat:columns:\getvariable{tugboat}{columns}}
+ \setups{tugboat:banner:setup:\getvariable{tugboat}{type}}
+
+ \doif {\getvariable{tugboat}{columns}} {yes} {
+ \doifmodeelse {columnset} {
+ \startcolumnset
+ } {
+ \doifmodeelse {pagecolumns} {
+ \startpagecolumns
+ } {
+ \startcolumns
+ }
+ }
+ }
+
+ \setcounter
+ [userpage]
+ [\getvariable{tugboat}{page}]
+
+ \setups{tugboat:grid:setup:\getvariable{tugboat}{grid}}
+
+ \snaptogrid \vbox \bgroup
+
+ \forgetall
+ \hrule height .6pt
+ \blank[halfline]
+ \start
+ \let\\=\par
+ {\bf\getvariable{tugboat}{title}}
+ \par
+ \blank[halfline]
+ \hskip20pt\getvariable{tugboat}{author}
+ \stop
+
+ \blank[line]
+
+ \doiftext {\getbuffer[abstract]} {
+ \let\\=\endgraf
+ \setups{tugboat:abstract:setup}
+ \subject{Abstract}
+ \getbuffer[abstract]
+ }
+
+ \egroup
+\stopsetups
- % AM: Why set these again?
- % \setupheadertexts
- % [\setups{tugboat:banner:text:article}]
- % [pagenumber]
-
- % \setuppagenumber
- % [number=\getvariable{tugboat}{page}]
- \setcounter[userpage][\getvariable{tugboat}{page}]
-
- % \setuplayout
- % [grid=\getvariable{tugboat}{grid}]
-
- % % instead of \startmode [*grid] ... \stopmode
- % % instead of \startnotmode[*grid] ... \stopnotmode
-
- \setups{tugboat:grid:setup:\getvariable{tugboat}{grid}}
-
- \snaptogrid \vbox \bgroup
-
- \forgetall
-\hrule height .6pt
-\blank[halfline]
- \start
- \let\\=\par
- {\bf\getvariable{tugboat}{title}}
- \par
- \blank[halfline]
- \hskip20pt\getvariable{tugboat}{author}
- \stop
-
-% \setups{tugboat:introduction:\getvariable{tugboat}{type}}
+\startsetups tugboat:affiliation:article
\blank[line]
+ \begingroup
+ \leftskip=5.7pc
+ \noindent
+ \llap{\sym{\diamond}\enspace}
+ \getvariable{tugboat}{author}
+ \\
+ \getvariable{tugboat}{address}
+ \\
+ {\tt\getvariable{tugboat}{email}}
+ \par
+ \endgroup
- \doiftext{\getbuffer[abstract]}
- {\let\\=\endgraf
- \setups{tugboat:abstract:setup}
- \subject{Abstract}
- \getbuffer[abstract]}
- \egroup
\stopsetups
-\startsetups tugboat:proceedings:start
-
- \starttext
-
- \setups{tugboat:columns:\getvariable{tugboat}{columns}}
- \setups{tugboat:banner:setup:\getvariable{tugboat}{type}}
-
- \setupheader
- [state=empty]
-
- \setuppagenumber
- [number=\getvariable{tugboat}{page}]
-
- \setuplayout
- [grid=\getvariable{tugboat}{grid}]
-
- % instead of \startmode [*grid] ... \stopmode
- % instead of \startnotmode[*grid] ... \stopnotmode
- \doifmodeelse{*grid}{\setups{tugboat:grid:setup:yes}}{\setups{tugboat:grid:setup:no}}
-% \setups{tugboat:grid:setup:\systemmodevalue{grid}{yes}{no}}
-
- \snaptogrid \vbox \bgroup
-
- \forgetall
-
- \start
- \switchtobodyfont[14.4pt]
- \let\\=\par
- \getvariable{tugboat}{title}
- \par
- \stop
-
- \setups{tugboat:introduction:\getvariable{tugboat}{type}}
-
- \blank[9pt]% plus3pt minus3pt]
-
- \let\\=\par
- \setups{tugboat:abstract:setup}
- \midaligned{\bf Abstract}
+\startsetups tugboat:article:stop
- \startnarrower[middle]
- \getbuffer[abstract]
- \stopnarrower
+ \setups{tugboat:affiliation:\getvariable{tugboat}{type}}
- % \blank[10pt plus4pt minus4pt]
+ % article joining in the issue.
- \egroup
+ \ifx\writelastpage\undefined \else
+ \begingroup
+ \count0=\count1 % because context uses \count0
+ \writelastpage{+1}%
+ \endgroup
+ \fi
- \doif{\getvariable{tugboat}{columns}}{yes}{\startcolumns}
+ \stoptext
\stopsetups
-\def\signaturewidth{13pc}
+%D Normal word spacing, please.
-\definefontsynonym[LMSY][lmsy10]
-\def\mydiamond{\getglyph{LMSY}{\char5}}
+\setuptolerance
+ [strict]
-\startsetups tugboat:affiliation:article
+%D Hz is fine but hanging can hang quotes out too far.
- \blank[line]
+\setupalign[hz]
- \snaptogrid \vbox \bgroup
+%D Let's see boxes overfull by >.5pt
- \forgetall
+\overfullrule = 2pt % yes, I want to see
+\hfuzz = .5pt
- \leftskip=\textwidth \advance\leftskip by -\signaturewidth
+%D One can use the following setups (in the article) to collect settings specific to
+%D normal and|/|or multi column typesetting.
- \let\\=\par
- \leavevmode\llap{\mydiamond\enspace}\getvariable{tugboat}{author}
- \par
- \getvariable{tugboat}{address}
- \par
- {\tt\getvariable{tugboat}{email}}
+\startsetups tugboat:columns:yes
- \egroup
+ \doifmodeelse {columnset} {
+ \setuplayout
+ [grid=no]
+ \setupcolumnset
+ [distance=1.5pc]
+ } {
+ \doifmodeelse {pagecolumns} {
+ \setuplayout
+ [grid=no]
+ \setuppagecolumns
+ [distance=1.5pc]
+ } {
+ \setupcolumns
+ [distance=1.5pc]
+ }
+ }
\stopsetups
-\startsetups tugboat:affiliation:proceedings
-
- % nothing fancy at the end
-
-\stopsetups
+% \startsetups tugboat:columns:no
+%
+% \stopsetups
-\startsetups tugboat:article:stop
+%D Logos, abbreviations: lots could be better here.
- \setups{tugboat:affiliation:\getvariable{tugboat}{type}}
+\font\mflogo=logo10 % hm, better use \definefont
- \doif{\getvariable{tugboat}{columns}}{yes}{\stopcolumns}
+%D HH: I'm pretty sure that this doesn't really work as it probably assumes some
+%D specific math family setup and that's not how \MKIV\ works. The TB definition
+%D doesn't scale with font changes and also doesn't adapt itself to style changes.
- \page
+\newcount\TestCount
+\newbox \TestBox
+
+\def\La
+ {\dontleavehmode
+ \begingroup
+ \TestCount=\the\fam % no meaningful fams in text mode in ConTeXt
+ \setbox\TestBox=\hbox{$\fam\TestCount\scriptstyle A$}%
+ L\kern-.5\wd\TestBox\raise.42ex\box\TestBox
+ \endgroup}
+
+%D Probably this will do a better job:
+
+% \def\La
+% {\dontleavehmode
+% \begingroup
+% \setbox\scratchbox\hbox{\tx A}% % or \txx
+% L\kern-.5\wd\scratchbox\raise.42ex\scratchbox
+% \endgroup}
+
+\def\ALEPH {Aleph}
+\def\API {\acro{API}}
+\def\CCODE {C}
+\def\CD {\acro{CD}}
+\def\CMYK {\acro{CMYK}}
+\def\CONTEXT {C\kern-.0333emon\-\kern-.0667em\TeX\kern-.0333emt}
+\def\Cplusplus {C\plusplus}
+\def\CPU {\acro{CPU}}
+\def\DVI {\acro{DVI}}
+\def\DVIPDFMX {dvipdfmx}
+\def\DVIPS {dvips}
+\def\ETEX {$\varepsilon$-\kern-.125em\TeX}
+\def\FTP {\acro{FTP}}
+\def\HTTP {\acro{HTTP}}
+\def\IO {\acro{I/O}}
+\def\ISO {\acro{ISO}}
+\def\KPSE {\acro{KPSE}}
+\def\KPSEWHICH {kpsewhich}
+\def\LATEX {\La\kern-.15em\TeX}
+\def\LATEXE {\LaTeX{}\kern.05em2$_{\textstyle\varepsilon}$}
+\def\LINUX {Linux}
+\def\LPEG {Lpeg}
+\def\LUA {Lua}
+\def\LUAJIT {Lua\acro{JIT}}
+\def\LUATEX {Lua\-\TeX}
+\def\LUATOOLS {lua\-tools}
+\def\MATHML {Math\acro{ML}}
+\def\METAFUN {Metafun}
+\def\METAPOST {MetaPost}
+\def\METATEX {Meta\TeX{}}
+\def\MF {{\mflogo META\-FONT}}
+\def\MKII {Mk\acro{II}}
+\def\MKIV {Mk\acro{IV}}
+\def\MPLIB {\acro{MP}lib}
+\def\MPTOPDF {mp\-to\-pdf}
+\def\MSWINDOWS {Windows}
+\def\MTXTOOLS {mtx\-tools}
+\def\NFSS {\acro{NFSS}}
+\def\OPENMATH {Open\-Math}
+\def\OPENTYPE {Open\-Type}
+\def\PASCAL {Pascal}
+\def\PDF {\acro{PDF}}
+\def\PDFTEX {pdf\/\-\TeX}
+\def\plusplus {\lower.45ex\hbox{$^{++}$}}
+\def\POSIX {\acro{POSIX}}
+\def\POSTSCRIPT{Post\-Script}
+\def\PRAGMA {Pragma \acro{ADE}}
+\def\RGB {\acro{RGB}}
+\def\RUBY {Ruby}
+\def\SCITE {Sci\acro{TE}}
+\def\TDS {\acro{TDS}}
+\def\TEX {\TeX}
+\def\TEXBOOK {{\sl The \TeX book}}
+\def\TEXEXEC {\TeX exec}
+\def\TFM {\acro{TFM}}
+\def\TRUETYPE {True\-Type}
+\def\TYPEONE {Type~1}
+\def\UTF {\acro{UTF}}
+\def\WEBC {Web2C}
+\def\XETEX {X\lower.5ex\hbox{\kern-.15em\mirror{E}}\kern-.1667em\TeX}
+\def\XML {\acro{XML}}
+\def\XPATH {\acro{XP}ath}
+\def\XSLT {\acro{XSLT}}
+\def\XSLTPROC {\acro{XSLTPROC}}
+\def\ZIP {zip}
+
+\def\Dash {\unskip\nobreak\thinspace---\thinspace\ignorespaces}
+\def\slash {/\penalty0 \hskip0pt \relax}
+
+% \acro for one point size smaller. Don't know how to do this for real.
+
+\definefont[AcroFont] [Serif*default sa .91]
+\definefont[AcroFontBold] [SerifBold*default sa .91]
+\definefont[AcroFontSmall][Serif*default sa .80]
+
+\unexpanded\def\acro #1{{\AcroFont #1}} % could be a style definition
+\unexpanded\def\acrobf #1{{\AcroFontBold #1}} % could be a style definition
+\unexpanded\def\acrosmall#1{{\AcroFontSmall #1}} % could be a style definition
+
+%D This is English; disallow x- or -xx breaks. (These are already the defaults
+%D but let's keep this anyway.)
+
+\setuplanguage
+ [en]
+ [lefthyphenmin=2,
+ righthyphenmin=3]
- \stoptext
+% \lefthyphenmin = 2
+% \righthyphenmin = 3
-\stopsetups
+\mainlanguage
+ [en]
-%D Normal word spacing, please.
+\hyphenation {
+ Post-Script
+ data-base
+ data-bases
+}
-\setuptolerance
- [strict]
+%D A hack to read \type {tugboat.dates} settings.
-%D One can use the following setups (in the article) to
-%D collect settings specific to normal and/or multi
-%D column typesetting.
+\doifelsefileexists {../tugboat.dates} {
-\startsetups tugboat:columns:yes
+ \newif \ifPrelimDraft
+ \newcount\issueseqno
-\stopsetups
+ \def\vol #1, #2.{\gdef\tubvol {#1}%
+ \gdef\tubnum {#2}}
+ \def\issyear #1.{\gdef\tubyear{#1}}
-\startsetups tugboat:columns:no
+ \input ../tugboat.dates
-\stopsetups
+ \setevariables
+ [tugboat]
+ [year=\tubyear,
+ volume=\tubvol,
+ number=\tubnum,
+ page=\the\count0]
-% >>> Logos, abbreviations: TODO: Clean up <<<
-\font\mflogo = logo10
-\def\MF{{\mflogo META\-FONT}}
-
-\def\ALEPH{Aleph}
-\def\API{\acro{API}}
-\def\CCODE{C}
-\def\CD{\acro{CD}}
-\def\CMYK{\acro{CMYK}}
-\def\CONTEXT{C\kern-.0333emon\-\kern-.0667em\TeX\kern-.0333emt}
-\def\CPU{\acro{CPU}}
-\def\DVI{\acro{DVI}}
-\def\DVIPDFMX{dvipdfmx}
-\def\DVIPS{dvips}
-\def\ETEX{$\varepsilon$-\kern-.125em\TeX}
-\def\FTP{\acro{FTP}}
-\def\HTTP{\acro{HTTP}}
-\def\IO{\acro{I/O}}
-\def\ISO{\acro{ISO}}
-\def\KPSEWHICH{kpsewhich}
-\def\KPSE{\acro{KPSE}}
-\newcount\TestCount
-\newbox\TestBox
-\def\La{\TestCount=\the\fam \leavevmode L%
- \setbox\TestBox=\hbox{$\fam\TestCount\scriptstyle A$}%
- \kern-.5\wd\TestBox\raise.42ex\box\TestBox}
-\def\LATEX{\La\kern-.15em\TeX}
-\def\LATEXE{\LaTeX{}\kern.05em2$_{\textstyle\varepsilon}$}
-\def\LINUX{Linux}
-\def\LPEG{Lpeg}
-\def\LUAJIT{Lua\acro{JIT}}
-\def\LUATEX{Lua\-\TeX}
-\def\LUATOOLS{lua\-tools}
-\def\LUA{Lua}
-\def\MATHML{Math\acro{ML}}
-\def\METAFUN{Metafun}
-\def\METAPOST{MetaPost}
-\def\METATEX{Meta\TeX{}}
-\def\MKII{Mk\acro{II}}
-\def\MKIV{Mk\acro{IV}}
-\def\MPLIB{\acro{MP}lib}
-\def\MPTOPDF{mp\-to\-pdf}
-\def\MSWINDOWS{Windows}
-\def\MTXTOOLS{mtx\-tools}
-\def\NFSS{\acro{NFSS}}
-\def\OPENMATH{Open\-Math}
-\def\OPENTYPE{Open\-Type}
-\def\PASCAL{Pascal}
-\def\PDFTEX{pdf\/\-\TeX}
-\def\PDF{\acro{PDF}}
-\def\POSIX{\acro{POSIX}}
-\def\PRAGMA{Pragma \acro{ADE}}
-\def\POSTSCRIPT{Post\-Script}
-\def\RGB{\acro{RGB}}
-\def\RUBY{Ruby}
-\def\SCITE{Sci\acro{TE}}
-\def\TDS{\acro{TDS}}
-\def\TEXBOOK{{\sl The \TeX book}}
-\def\TEXEXEC{\TeX exec}
-\def\TEX{\TeX}
-\def\TFM{\acro{TFM}}
-\def\TRUETYPE{True\-Type}
-\def\TYPEONE{Type~1}
-\def\UTF{\acro{UTF}}
-\def\WEBC{Web2C}
-\def\XETEX{X\lower.5ex\hbox{\kern-.15em\mirror{E}}\kern-.1667em\TeX}
-\def\XML{\acro{XML}}
-\def\XPATH{\acro{XP}ath}
-\def\XSLT{\acro{XSLT}}
-\def\XSLTPROC{\acro{XSLTPROC}}
-\def\ZIP{zip}
-
-\def\Dash{\unskip\thinspace---\thinspace\ignorespaces}
-\def\slash{/\penalty0 \hskip0pt \relax}
-
-\definefont[AcroFont][Serif sa .91]
-\def\acro#1{{\AcroFont #1}}
-
-\lefthyphenmin=2 \righthyphenmin=3 % disallow x- or -xx breaks
-
-\hyphenation{Post-Script data-base data-bases}
-
-% hack to read tugboat.dates settings.
-\def\vol#1, #2.{\def\tubvol{#1}\def\tubnum{#2}}
-\def\issyear#1.{\def\tubyear{#1}}
-\newcount\issueseqno
+} {
+ % nothing
+}
-% >>>
-%D Good bye. <<<
+%D Good bye.
-\doifnotmode{demo}{\endinput}
+\continueifinputfile{s-tugboat.mkiv}
-\showgrid
+% \showgrid
\starttext
\StartArticle
\StartAbstract
- \input bryson
+ \samplefile{bryson}
\StopAbstract
\dorecurse{30}{\input ward \endgraf} \page
\startitemize
-\item \input ward
-\item \input ward
+ \startitem \samplefile{ward} \stopitem
+ \startitem \samplefile{ward} \stopitem
\stopitemize
\StopArticle
@@ -666,15 +706,15 @@
\StartArticle
\StartAbstract
- \input bryson
+ \samplefile{bryson}
\StopAbstract
-\dorecurse{30}{\input ward \endgraf} \page
+\dorecurse {30} {
+ \samplefile{ward}\endgraf
+} \page
\StopArticle
\stoptext
% >>>
-
-% vim: foldmethod=marker foldmarker=<<<,>>>
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/x-asciimath.lua b/Master/texmf-dist/tex/context/modules/mkiv/x-asciimath.lua
index 677ab0ce562..edad3f575b1 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/x-asciimath.lua
+++ b/Master/texmf-dist/tex/context/modules/mkiv/x-asciimath.lua
@@ -20,7 +20,7 @@ ugly and unsatisfying code mess down here. Don't take this as an example.</p>
-- todo: filter from files listed in tuc file
local trace_mapping = false if trackers then trackers.register("modules.asciimath.mapping", function(v) trace_mapping = v end) end
-local trace_detail = false if trackers then trackers.register("modules.asciimath.detail", function(v) trace_detail = v end) end
+local trace_details = false if trackers then trackers.register("modules.asciimath.details", function(v) trace_details = v end) end
local trace_digits = false if trackers then trackers.register("modules.asciimath.digits", function(v) trace_digits = v end) end
local report_asciimath = logs.reporter("mathematics","asciimath")
@@ -35,7 +35,7 @@ if not characters then
require("char-ent")
end
-local rawget, next, type = rawget, next, type
+local next, type = next, type
local concat, insert, remove = table.concat, table.insert, table.remove
local rep, gmatch, gsub, find = string.rep, string.gmatch, string.gsub, string.find
local utfchar, utfbyte = utf.char, utf.byte
@@ -776,6 +776,7 @@ local isunary = { -- can be taken from reserved
["\\widehat"] = true, -- widehat
["\\bar"] = true, --
["\\overbar"] = true, --
+ ["\\overline"] = true, --
["\\underline"] = true, --
["\\vec"] = true, -- overrightarrow
["\\overrightarrow"] = true, -- overrightarrow
@@ -1775,7 +1776,7 @@ collapse = function(t,level)
return ""
end
-- tracing
- if trace_detail then
+ if trace_details then
if level then
level = level + 1
else
@@ -1784,19 +1785,19 @@ collapse = function(t,level)
show_state(t,level,"parsed")
end
-- steps
- t = collapse_matrices (t) if trace_detail then show_state(t,level,"matrices") end
- t = collapse_bars (t) if trace_detail then show_state(t,level,"bars") end
- t = collapse_stupids (t) if trace_detail then show_state(t,level,"stupids") end
- t = collapse_pairs (t) if trace_detail then show_state(t,level,"pairs") end
- t = collapse_parentheses(t) if trace_detail then show_state(t,level,"parentheses") end
- t = collapse_signs (t) if trace_detail then show_state(t,level,"signs") end
- t = collapse_binaries (t) if trace_detail then show_state(t,level,"binaries") end
- t = collapse_infixes_1 (t) if trace_detail then show_state(t,level,"infixes (1)") end
- t = collapse_limits (t) if trace_detail then show_state(t,level,"limits") end
- t = collapse_tables (t) if trace_detail then show_state(t,level,"tables") end
- t = collapse_infixes_2 (t) if trace_detail then show_state(t,level,"infixes (2)") end
- t = collapse_fractions_1(t) if trace_detail then show_state(t,level,"fractions (1)") end
- t = collapse_fractions_2(t) if trace_detail then show_state(t,level,"fractions (2)") end
+ t = collapse_matrices (t) if trace_details then show_state(t,level,"matrices") end
+ t = collapse_bars (t) if trace_details then show_state(t,level,"bars") end
+ t = collapse_stupids (t) if trace_details then show_state(t,level,"stupids") end
+ t = collapse_pairs (t) if trace_details then show_state(t,level,"pairs") end
+ t = collapse_parentheses(t) if trace_details then show_state(t,level,"parentheses") end
+ t = collapse_signs (t) if trace_details then show_state(t,level,"signs") end
+ t = collapse_binaries (t) if trace_details then show_state(t,level,"binaries") end
+ t = collapse_infixes_1 (t) if trace_details then show_state(t,level,"infixes (1)") end
+ t = collapse_limits (t) if trace_details then show_state(t,level,"limits") end
+ t = collapse_tables (t) if trace_details then show_state(t,level,"tables") end
+ t = collapse_infixes_2 (t) if trace_details then show_state(t,level,"infixes (2)") end
+ t = collapse_fractions_1(t) if trace_details then show_state(t,level,"fractions (1)") end
+ t = collapse_fractions_2(t) if trace_details then show_state(t,level,"fractions (2)") end
-- done
return collapse_result(t)
end
@@ -2009,7 +2010,7 @@ local context = context
if not context then
-- trace_mapping = true
--- trace_detail = true
+-- trace_details = true
-- report_asciimath(cleanedup([[ac+sinx+xsqrtx+sinsqrtx+sinsqrt(x)]]))
-- report_asciimath(cleanedup([[a "Îħsinsqrtx" b]]))
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/x-pandoc.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/x-pandoc.mkiv
new file mode 100644
index 00000000000..18bea9e7c94
--- /dev/null
+++ b/Master/texmf-dist/tex/context/modules/mkiv/x-pandoc.mkiv
@@ -0,0 +1,152 @@
+%D \module
+%D [ file=m-pandoc,
+%D version=2019.05.30,
+%D title=\CONTEXT\ Extra Modules,
+%D subtitle=Pandoc Docbook Rendering,
+%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.
+
+% just a test
+
+\startxmlsetups xml:docbook:article
+ \xmlflush{#1}
+\stopxmlsetups
+
+\startxmlsetups xml:docbook:section
+ \startsectionlevel[title={\xmltext{#1}{/title}},reference={\xmlatt{#1}{xml:id}}]
+ \xmlall{#1}{./!title}
+ \stopsectionlevel
+\stopxmlsetups
+
+\startxmlsetups xml:docbook:para
+ \dontleavehmode\ignorespaces
+ \xmlflush{#1}
+ \removeunwantedspaces\par
+\stopxmlsetups
+
+\startxmlsetups xml:docbook:emphasis
+ \dontleavehmode\begingroup
+ \em \xmlflush{#1}
+ \endgroup
+\stopxmlsetups
+
+\startxmlsetups xml:docbook:literal
+ \doifelse {\xmlatt{#1}{class}} {math} {
+ % what kind of math? inline or display?
+ \starttexcode
+ \startimath
+ \xmlflush{#1}
+ \stopimath
+ \stoptexcode
+ } {
+ \dontleavehmode\begingroup
+ \tttf \xmlflush{#1}
+ % \xmlinlineverbatim{#1}
+ \endgroup
+ }
+\stopxmlsetups
+
+\startxmlsetups xml:docbook:programlisting
+ \xmldisplayverbatim{#1}
+\stopxmlsetups
+
+\startxmlsetups xml:docbook:link
+ \doifsomethingelse {\xmlatt{#1}{xlink:href}} {
+ \goto{\xmlflush{#1}}[url(\xmllastatt)]
+ } {
+ \doifsomethingelse {\xmlatt{#1}{linkend}} {
+ \in{\xmlflush{#1}}[\xmllastatt]
+ } {
+ \xmlflush{#1}
+ }
+ }
+\stopxmlsetups
+
+\startxmlsetups xml:docbook:anchor
+ \pagereference[\xmlatt{id}]
+\stopxmlsetups
+
+\startxmlsetups xml:docbook:itemizedlist
+ \doifelse {\xmlatt{#1}{spacing}} {compact} {
+ \startitemize[packed]
+ \xmlflush{#1}
+ \stopitemize
+ } {
+ \startitemize
+ \xmlflush{#1}
+ \stopitemize
+ }
+\stopxmlsetups
+
+\startxmlsetups xml:docbook:orderedlist
+ \doifelse {\xmlatt{#1}{spacing}} {compact} {
+ \startitemize[n,packed]
+ \xmlflush{#1}
+ \stopitemize
+ } {
+ \startitemize[n]
+ \xmlflush{#1}
+ \stopitemize
+ }
+\stopxmlsetups
+
+\startxmlsetups xml:docbook:listitem
+ \startitem
+ \xmlflush{#1}
+ \stopitem
+\stopxmlsetups
+
+\startxmlsetups xml:docbook:variablelist
+ \startitemize
+ \xmlflush{#1}
+ \stopitemize
+\stopxmlsetups
+
+\startxmlsetups xml:docbook:varlistentry
+ \xmlflush{#1}
+\stopxmlsetups
+
+\startxmlsetups xml:docbook:term
+ \xmlflush{#1}
+\stopxmlsetups
+
+\usemodule[cals]
+
+\startxmlsetups cals:table:before
+ \startlinecorrection
+\stopxmlsetups
+
+\startxmlsetups cals:table:after
+ \stoplinecorrection
+\stopxmlsetups
+
+\startxmlsetups xml:docbook
+ \xmlsetsetup {#1} {*} {xml:docbook:*}
+ \xmlsetfunction {#1} {informaltable} {moduledata.cals.table}
+\stopxmlsetups
+
+\continueifinputfile{x-pandoc.mkiv}
+
+\usemodule[article-basic]
+
+\setupinteraction
+ [state=start]
+
+\setupalign
+ [flushleft,tolerant]
+
+\starttext
+
+ % running:
+ %
+ % pandoc -s -t docbook5 pandoc.txt
+
+ \xmlregisterdocumentsetup{main}{xml:docbook}
+ \xmlprocessfile{main}{d:/pandoc/pandoc.xml}{}
+
+\stoptext
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/x-setups-basics.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/x-setups-basics.mkiv
index 51c9253975b..4e960f4287c 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/x-setups-basics.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/x-setups-basics.mkiv
@@ -15,7 +15,6 @@
%D We can make this module a bit cleaner using more recent features or we go \LUA\
%D completely but as this style evolved over 15 years it's a waste of time.
%D
-%D
%D Thanks to Wolfgang these descriptions have become quite complete! In the process
%D of covering more commands and expecially different instances of the same command,
%D either or not generated, the supporting macros became more complex. I must admit
@@ -32,6 +31,9 @@
%D
%D Currently we load the \XML\ file and when not in the english interface we just
%D remap the relevant words to their translation.
+%D
+%D If you notice something that needs fixing, you can send a message to the mailing
+%D list.
%D \startbuffer
%D \usemodule[x-setups-basics]
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/x-setups-overview.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/x-setups-overview.mkiv
index 512db3bd14f..24ee63fe02b 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/x-setups-overview.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/x-setups-overview.mkiv
@@ -53,12 +53,12 @@
}
-\startinterface dutch \definecolor[LocalColor][r=.75,g=.25,b=.25] \stopinterface
\startinterface english \definecolor[LocalColor][r=.25,g=.75,b=.25] \stopinterface
+\startinterface dutch \definecolor[LocalColor][r=.75,g=.25,b=.25] \stopinterface
\startinterface german \definecolor[LocalColor][r=.25,g=.25,b=.75] \stopinterface
\startinterface french \definecolor[LocalColor][r=.75,g=.75,b=.25] \stopinterface
-\startinterface czech \definecolor[LocalColor][r=.75,g=.25,b=.75] \stopinterface
\startinterface italian \definecolor[LocalColor][r=.25,g=.75,b=.75] \stopinterface
+\startinterface czech \definecolor[LocalColor][r=.75,g=.25,b=.75] \stopinterface
\startinterface romanian \definecolor[LocalColor][r=.5,g=.4,b=.3] \stopinterface
% \definecolor[LocalColor][r=.5,g=.3,b=.4]
% \definecolor[LocalColor][r=.4,g=.3,b=.5]
@@ -99,7 +99,7 @@
[\hbox to \paperwidth{\reuseMPgraphic{cover+back}\hss}]
\startreusableMPgraphic{cover+back}
- numeric h, w; boolean mapping ; path p, q, r ; color f, d ; pair s ;
+ numeric h, w; boolean mapping ; path p, q, r ; color f, d , c ; pair s ;
h := OverlayHeight ; w := 2*OverlayWidth ;
r := unitsquare xyscaled (w,h) ;
fill r withcolor resolvedcolor("lightgray") ;
@@ -115,8 +115,9 @@
forever :
s := center r randomized (w,h) ;
if new_on_grid(xpart s, ypart s) :
- d := .5[resolvedcolor("LocalColor"),resolvedcolor("lightgray")] randomized (.5,.9) ;
- f := resolvedcolor("lightgray") randomized (.5,.9) ;
+ c := resolvedcolor("lightgray") ;
+ d := .5[resolvedcolor("LocalColor"),c] randomized (.5,.9) ;
+ f := c randomized (.5,.9) ;
s := (dx,dy) ;
if mapping :
p := (-w/4,0) -- (w/4,0) ;
@@ -139,6 +140,7 @@
fi ;
exitif grid_full ;
endfor ;
+
setbounds currentpicture to r ;
\stopreusableMPgraphic
@@ -248,16 +250,25 @@
\startmakeup[\v!standard]
\dontcomplain
\startcolor[TitleColor]
- \definedfont[RegularBold at 100pt]\setstrut
- \setupalign[\v!left]
- \strut Con\TeX t \par
- \definedfont[RegularBold at 50pt]\setstrut
- \setups[text:commands]
- \vfill
- \definedfont[RegularBold at 24pt]\setupinterlinespace
- \setups[text:lowercase]
- \par \strut \currentdate \par
+ \definedfont[RegularBold at 100pt]\setstrut
+ \setupalign[\v!flushright]
+ \strut Con\TeX t \par
+ \definedfont[RegularBold at 50pt]\setstrut
+ \setups[text:commands]
\stopcolor
+ \vfill
+ \start
+ \switchtobodyfont[15pt]
+ \setuptabulate[before=,after=]
+ \dontleavehmode \hfill \hbox \bgroup
+ \starttabulate[|l|l|]
+ \BC language \EQ \setups[text:lowercase] \NC \NR
+ \BC version \EQ \currentdate \NC \NR
+ \BC maintainer \EQ Wolfgang Schuster \NC\NR
+ \BC comments \EQ \tt ntg-context@ntg.nl \NC \NR
+ \stoptabulate
+ \egroup
+ \stop
\stopmakeup
\protect