From 1ba28aeb4ea244e4b82a024c107472b216293689 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Thu, 13 Aug 2009 13:13:00 +0200 Subject: stable 2009.08.13 13:13 --- tex/context/base/buff-ini.lua | 62 +++++++++++++++++++++-------- tex/context/base/buff-ver.mkiv | 44 +++++++++++++++----- tex/context/base/cont-new.tex | 2 +- tex/context/base/context.tex | 2 +- tex/context/bib/bibl-ams.tex | 17 ++++---- tex/context/bib/t-bib.tex | 12 ++++-- tex/generic/context/luatex-fonts-merged.lua | 2 +- 7 files changed, 99 insertions(+), 42 deletions(-) (limited to 'tex') diff --git a/tex/context/base/buff-ini.lua b/tex/context/base/buff-ini.lua index 53598f03a..f02963d6a 100644 --- a/tex/context/base/buff-ini.lua +++ b/tex/context/base/buff-ini.lua @@ -89,13 +89,16 @@ end flags.optimize_verbatim = true flags.count_empty_lines = false -local no_break_command = "\\doverbatimnobreak" -local do_break_command = "\\doverbatimgoodbreak" -local begin_of_line_command = "\\doverbatimbeginofline" -local end_of_line_command = "\\doverbatimendofline" -local empty_line_command = "\\doverbatimemptyline" -local begin_of_buffer_command = "\\doverbatimbeginofbuffer" -local end_of_buffer_command = "\\doverbatimendofbuffer" +local no_break_command = "\\doverbatimnobreak" +local do_break_command = "\\doverbatimgoodbreak" +local begin_of_line_command = "\\doverbatimbeginofline" +local end_of_line_command = "\\doverbatimendofline" +local empty_line_command = "\\doverbatimemptyline" + +local begin_of_display_command = "\\doverbatimbeginofdisplay" +local end_of_display_command = "\\doverbatimendofdisplay" +local begin_of_inline_command = "\\doverbatimbeginofinline" +local end_of_inline_command = "\\doverbatimendofinline" function buffers.verbatimbreak(n,m) if flags.optimize_verbatim then @@ -135,9 +138,11 @@ function buffers.type(name) end local line, n = 0, 0 local first, last, m = buffers.strip(lines) + hooks.begin_of_display() for i=first,last do n, line = action(lines[i], n, m, line) end + hooks.end_of_display() end end @@ -157,9 +162,11 @@ function buffers.typefile(name) -- still somewhat messy, since name can be be su local lines = str:splitlines() local line, n, action = 0, 0, buffers.typeline local first, last, m = buffers.strip(lines) + hooks.begin_of_display() for i=first,last do n, line = action(lines[i], n, m, line) end + hooks.end_of_display() end end @@ -328,19 +335,34 @@ end -- calling routines, don't change -function hooks.begin_of_buffer() - (currenthandler.begin_of_buffer or default.begin_of_buffer)(currentvisualizer) +function hooks.begin_of_display() + (currenthandler.begin_of_display or default.begin_of_display)(currentvisualizer) +end + +function hooks.end_of_display() + (currenthandler.end_of_display or default.end_of_display)() end -function hooks.end_of_buffer() - (currenthandler.end_of_buffer or default.end_of_buffer)() +function hooks.begin_of_inline() + (currenthandler.begin_of_inline or default.begin_of_inline)(currentvisualizer) end +function hooks.end_of_inline() + (currenthandler.end_of_inline or default.end_of_inline)() +end + + function hooks.flush_line(str,nesting) str = gsub(str," *[\n\r]+ *"," ") ; -- semi colon needed (currenthandler.flush_line or default.flush_line)(str,nesting) end +function hooks.flush_inline(str,nesting) + hooks.begin_of_inline() + hooks.flush_line(str,nesting) + hooks.end_of_inline() +end + function hooks.begin_of_line(n) (currenthandler.begin_of_line or default.begin_of_line)(n) end @@ -364,12 +386,20 @@ end -- defaults -function default.begin_of_buffer(currentvisualizer) - texsprint(ctxcatcodes,begin_of_buffer_command,"{",currentvisualizer,"}") +function default.begin_of_display(currentvisualizer) + texsprint(ctxcatcodes,begin_of_display_command,"{",currentvisualizer,"}") +end + +function default.end_of_display() + texsprint(ctxcatcodes,end_of_display_command) +end + +function default.begin_of_inline(currentvisualizer) + texsprint(ctxcatcodes,begin_of_inline_command,"{",currentvisualizer,"}") end -function default.end_of_buffer() - texsprint(ctxcatcodes,end_of_buffer_command) +function default.end_of_inline() + texsprint(ctxcatcodes,end_of_inline_command) end function default.begin_of_line(n) @@ -459,7 +489,7 @@ function visualizers.flush_nested(str, enable) -- no utf, kind of obsolete mess i = i + 1 end end - result = result .. "\\char" .. byte(sub(str,i,i)) .. " " .. string.rep("}",nested) + result = result .. "\\char" .. byte(sub(str,i,i)) .. " " .. rep("}",nested) texsprint(ctxcatcodes,result) end diff --git a/tex/context/base/buff-ver.mkiv b/tex/context/base/buff-ver.mkiv index 6275b13d3..28e3e60d5 100644 --- a/tex/context/base/buff-ver.mkiv +++ b/tex/context/base/buff-ver.mkiv @@ -305,7 +305,7 @@ \def\dodotypeAA#1% {\doinitializeverbatim \def\obs{\obeyedspace}% - \ctxlua{buffers.hooks.flush_line(\!!bs\detokenize{#1}\!!es)}% + \ctxlua{buffers.hooks.flush_inline(\!!bs\detokenize{#1}\!!es)}% \egroup} \def\dodotypeB#1% @@ -331,7 +331,7 @@ \def\dodotypeCC#1% {\doinitializeverbatim \ifx\obeycharacters\setupprettytype % temp hack, we need a proper signal - \ctxlua{buffers.hooks.flush_line([\!!bs\detokenize{#1}\!!es,true)}% + \ctxlua{buffers.hooks.flush_inline([\!!bs\detokenize{#1}\!!es,true)}% \else \def\obs{\obeyedspace}% \ctxlua{buffers.visualizers.flush_nested(\!!bs\detokenize{#1}\!!es,true)}% @@ -349,7 +349,7 @@ \def\dodotypeDD#1% {\doinitializeverbatim - \ctxlua{buffers.hooks.flush_line(\!!bs\detokenize{#1}\!!es,true)}% + \ctxlua{buffers.hooks.flush_inline(\!!bs\detokenize{#1}\!!es,true)}% \egroup \gobbleoneargument} % grab last > @@ -541,9 +541,6 @@ \let \beginofverbatimlines \relax \let \endofverbatimlines \relax -\let \doverbatimbeginofbuffer\gobbleoneargument -\let \doverbatimbeginofbuffer\relax - \def\doverbatimnobreak {\ifoptimizeverbatim\penalty500 \fi} @@ -1070,10 +1067,37 @@ % patched from verb-ini (todo) -\let\beginverbatimline \relax -\let\endverbatimline \relax +% \let\beginverbatimline\relax +% \let\endverbatimline \relax + +% \appendtoks whatever\par\to\everyverbatimbeginofdisplay +% \appendtoks whatever\to\everyverbatimendofdisplay +% \appendtoks [\to\everyverbatimbeginofinline +% \appendtoks ]\to\everyverbatimendofinline + \let\doopenupverbatimline\empty +\newtoks\everyverbatimbeginofdisplay +\newtoks\everyverbatimendofdisplay +\newtoks\everyverbatimbeginofinline +\newtoks\everyverbatimendofinline + +\let\currentverbatimpretty\empty + +\def\doverbatimbeginofdisplay#1% + {\edef\currentverbatimpretty{#1}% + \the\everyverbatimbeginofdisplay} + +\def\doverbatimendofdisplay + {\the\everyverbatimendofdisplay} + +\def\doverbatimbeginofinline#1% + {\edef\currentverbatimpretty{#1}% + \the\everyverbatimbeginofinline} + +\def\doverbatimendofinline + {\the\everyverbatimendofinline} + \def\doverbatimbeginofline#1% linenumber {\bgroup % due to pretty status \iflinepar\else\EveryPar{}\fi @@ -1088,10 +1112,10 @@ \dokeepverbatimlinedata \doopenupverbatimline \the\everyline\strut - \beginverbatimline} + }%\beginverbatimline} \def\doverbatimendofline - {\endverbatimline + {%\endverbatimline \global\lineparfalse \obeyedline\par} diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex index 097827145..1b9d7d62e 100644 --- a/tex/context/base/cont-new.tex +++ b/tex/context/base/cont-new.tex @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2009.08.13 11:45} +\newcontextversion{2009.08.13 13:13} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex index 33a26b752..c7bf9cdd7 100644 --- a/tex/context/base/context.tex +++ b/tex/context/base/context.tex @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2009.08.13 11:45} +\edef\contextversion{2009.08.13 13:13} %D For those who want to use this: diff --git a/tex/context/bib/bibl-ams.tex b/tex/context/bib/bibl-ams.tex index 77008a66b..37bcf253f 100644 --- a/tex/context/bib/bibl-ams.tex +++ b/tex/context/bib/bibl-ams.tex @@ -1,6 +1,6 @@ %D \module %D [ file=bibl-ams, -%D version=2005.11.18 +%D version=2009.07.22 %D title=AMS bibliography style, %D subtitle=Publications, %D author={Taco Hoekwater, Giuseppe Bilotta}, @@ -427,12 +427,11 @@ } \setuppublicationlayout[unpublished]{% - \insertauthors{}{}{}% - \inserttitle{\bgroup \it }{\egroup \insertseries{ (}{)}{}}{}% - \insertbibtype{ (}{)}{}% - \insertpubyear{ (unpublished,}{)}{ (unpublished)}% - \insertpages{\unskip, }{ }{}% - \insertNote{\unskip. }{.}{\unskip.}% -} - + \insertauthors{}{, }{}% + \inserttitle{\bgroup \it }{\egroup \insertseries{ (}{)}{}}{}% + \insertbibtype{ (}{)}{}% + \insertpubyear{ (unpublished, }{)}{ (unpublished)}% + \insertpages{\unskip, }{ }{}% + \insertNote{\unskip. }{.}{\unskip.}% +} \protect diff --git a/tex/context/bib/t-bib.tex b/tex/context/bib/t-bib.tex index e290b8b69..11ed1309c 100644 --- a/tex/context/bib/t-bib.tex +++ b/tex/context/bib/t-bib.tex @@ -1,6 +1,6 @@ %D \module %D [ file=t-bib, -%D version=2009.06.08, +%D version=2009.08.13, %D title=\CONTEXT\ Publication Module, %D subtitle=Publications, %D author=Taco Hoekwater, @@ -135,6 +135,9 @@ %D bibliographies work (27/04/2009) %D \item Remove a superfluous \type{\unprotect} in t-bib.mkiv (11/05/2009). %D \item Patch of incollection in bibl-ams.tex from Xan (08/06/2009). +%D \item Patch of unpublished in bibl-ams.tex from Xan (22/07/2009). +%D \item Modified \type{\bibdogetupsometextprefix} so it works for undefined +%D language labels, from Hans (13/08/2009). %D \stopitemize %D %D \subject{WISHLIST} @@ -1080,7 +1083,8 @@ \csname#2\s!en#3\endcsname \fi\fi \else - \expandafter\bibdogetupsometextprefix\csname\??la#1\c!default\endcsname{#2}{#3}% + \expandafter\bibdogetupsometextprefix + \csname\??la#1\c!default\endcsname{#2}{#3}% \fi \else \ifcsname#2#3\endcsname @@ -1088,7 +1092,7 @@ \else\ifcsname#2\s!en#3\endcsname \csname#2\s!en#3\endcsname \fi\fi - \fi\fi} + \fi\fi} \def\docompletepublications[#1]% {\begingroup @@ -1431,7 +1435,7 @@ \edef\currentbibauthor{\currentbibauthor ##1\bibalternative{andtext}}% \else \edef\currentbibauthor{\currentbibauthor ##1\bibalternative{namesep}}% - \fi + \fi \fi }% \processcommalist[#2]\bibprocessauthoritem } diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index ff2e24f95..a17ea5411 100644 --- a/tex/generic/context/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts.lua --- merge date : 08/13/09 11:47:04 +-- merge date : 08/13/09 13:15:16 do -- begin closure to overcome local limits and interference -- cgit v1.2.3