diff options
author | Marius <mariausol@gmail.com> | 2013-03-25 20:20:14 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-03-25 20:20:14 +0200 |
commit | a0dd6ec7504ab0e5e2e4130b43de0cd63e646fa8 (patch) | |
tree | c2024fa6f07dcd8337b5c30cbea6d7d2a11b218d /tex | |
parent | 36942ae762a063f59ab1d15539465aab0f262d72 (diff) | |
download | context-a0dd6ec7504ab0e5e2e4130b43de0cd63e646fa8.tar.gz |
beta 2013.03.25 19:07
Diffstat (limited to 'tex')
22 files changed, 118 insertions, 26 deletions
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 1763a50ae..736a547c6 100644 --- a/tex/context/base/cont-new.mkii +++ b/tex/context/base/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2013.03.24 15:11} +\newcontextversion{2013.03.25 19:07} %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/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 29e251c13..d26e2f240 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2013.03.24 15:11} +\newcontextversion{2013.03.25 19:07} %D This file is loaded at runtime, thereby providing an excellent place for %D hacks, patches, extensions and new features. diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf Binary files differindex bbdd8306b..c718216c5 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png Binary files differindex 76e54ddeb..371a30b54 100644 --- a/tex/context/base/context-version.png +++ b/tex/context/base/context-version.png diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii index 54f3720da..a4a3f3f6b 100644 --- a/tex/context/base/context.mkii +++ b/tex/context/base/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2013.03.24 15:11} +\edef\contextversion{2013.03.25 19:07} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index b07d561c1..d31bfa8c0 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -25,7 +25,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2013.03.24 15:11} +\edef\contextversion{2013.03.25 19:07} %D For those who want to use this: diff --git a/tex/context/base/font-ini.mkvi b/tex/context/base/font-ini.mkvi index 897c56ed3..63b7863c8 100644 --- a/tex/context/base/font-ini.mkvi +++ b/tex/context/base/font-ini.mkvi @@ -2265,4 +2265,36 @@ % in case of troubles: \let\restorebodyfont\fullrestoreglobalbodyfont +%D Here are some fast variants that can be used in cases where no font +%D system is needed and where fonts are frozen: +%D +%D \starttyping +%D \definefont [TestA][Serif at 10pt] +%D \predefinefont[TestB][Serif at 20pt] +%D +%D \testfeatureonce{1000}{{\TestA}} % .312 +%D \testfeatureonce{1000}{{\TestB}} % < .016 +%D \testfeatureonce{1000}{{\definedfont[Serif at 30pt]}} % .312 +%D \testfeatureonce{1000}{{\predefinedfont[Serif at 40pt]}} % < .016 +%D \stoptyping + +\installcorenamespace{predefinedfont} + +\unexpanded\def\predefinefont[#1]#2[#3]% global ! + {\setugvalue{#1}{\font_basics_predefine{#1}{#3}}} + +\unexpanded\def\predefinedfont[#1]% global ! + {\ifcsname\??predefinedfont#1\endcsname + \csname\??predefinedfont#1\endcsname + \else + \font_basics_predefined{#1}% + \fi} + +\unexpanded\def\font_basics_predefine#1#2% + {\font_basics_defined_font_yes[#2]% + \global\expandafter\let\csname#1\expandafter\endcsname\csname\v_font_identifier_basic\endcsname} + +\unexpanded\def\font_basics_predefined#1% + {\font_basics_predefine{\??predefinedfont#1}{#1}} + \protect \endinput diff --git a/tex/context/base/grph-fig.mkiv b/tex/context/base/grph-fig.mkiv index 864bd29fb..80b8e35d9 100644 --- a/tex/context/base/grph-fig.mkiv +++ b/tex/context/base/grph-fig.mkiv @@ -311,7 +311,7 @@ \endgraf} \def\grph_steps_this_is(#1,#2)#3[#4]% - {\grph_steps_area(#1,#2){#3}{\pagereference[#4]}} + {\grph_steps_area(#1,#2){#3}{\dosetdirectpagereference{#4}}} \def\grph_steps_area(#1,#2)#3#4% (h,b){kader}{tekst} {\bgroup diff --git a/tex/context/base/math-ali.mkiv b/tex/context/base/math-ali.mkiv index 9e6fda074..0e08c70bb 100644 --- a/tex/context/base/math-ali.mkiv +++ b/tex/context/base/math-ali.mkiv @@ -221,6 +221,26 @@ \definemathalignment[align] % default case (this is what amstex users expect) \definemathalignment[\v!mathalignment] % prefered case (this is cleaner, less clashing) +% special case.. in case one mistypes .. + +\ifdefined \startalignment + + \let\align_math_normal_start\startalign + \let\align_math_normal_stop \stopalign + + \let\align_text_normal_start\startalignment + \let\align_text_normal_stop \stopalignment + + \unexpanded\def\startalign{\ifmmode\expandafter\align_math_normal_start\else\expandafter\align_text_normal_start\fi} + \unexpanded\def\stopalign {\ifmmode\expandafter\align_math_normal_stop \else\expandafter\align_text_normal_stop \fi} + + \let\startalignment\startalign + \let\stopalignment \stopalign + +\fi + +% + \def\numberedeqalign {\doifelse{\formulaparameter\c!location}\v!left \math_handle_eqalign_no_l_aligned diff --git a/tex/context/base/mult-low.lua b/tex/context/base/mult-low.lua index 3af1f1a44..d3c5add10 100644 --- a/tex/context/base/mult-low.lua +++ b/tex/context/base/mult-low.lua @@ -95,7 +95,7 @@ return { "startcomponent", "stopcomponent", "component", "startproduct", "stopproduct", "product", "startproject", "stopproject", "project", - "starttext", "stoptext", "startnotext", "stopnotext","startdocument", "stopdocument", "documentvariable", + "starttext", "stoptext", "startnotext", "stopnotext","startdocument", "stopdocument", "documentvariable", "setupdocument", "startmodule", "stopmodule", "usemodule", "usetexmodule", "useluamodule", -- "startTEXpage", "stopTEXpage", diff --git a/tex/context/base/page-app.mkiv b/tex/context/base/page-app.mkiv index 0cf83592d..5f1c2f297 100644 --- a/tex/context/base/page-app.mkiv +++ b/tex/context/base/page-app.mkiv @@ -186,17 +186,28 @@ \unexpanded\def\startpagefigure {\dodoubleempty\page_figures_start} +% this one: +% +% \def\page_figures_start[#1][#2]% +% {\bgroup +% \def\currentexternalfigure{\v!page:\v!figure}% +% \setupcurrentexternalfigure[\c!offset=\v!overlay,#2]% +% \startTEXpage[\c!offset=\externalfigureparameter\c!offset]% +% \externalfigure[#1]\ignorespaces} % so we can put some text below the graphic +% +% or this one: + \def\page_figures_start[#1][#2]% {\bgroup \setupexternalfigure[\v!page:\v!figure][\c!offset=\v!overlay,#2]% - \startTEXpage[\c!offset=\externalfigureparameter\c!offset]% - \externalfigure[#1][\v!page:\v!figure]\ignorespaces} % so we can put some text below the graphic + \startTEXpage[\c!offset=\namedexternalfigureparameter{\v!page:\v!figure}\c!offset]% + \externalfigure[#1]\ignorespaces} % so we can put some text below the graphic \unexpanded\def\stoppagefigure {\stopTEXpage \egroup} -\def\pagefigure +\unexpanded\def\pagefigure {\dodoubleempty\page_figure} \def\page_figure[#1][#2]% diff --git a/tex/context/base/page-mak.mkvi b/tex/context/base/page-mak.mkvi index 4e5e5dcbe..71af520a1 100644 --- a/tex/context/base/page-mak.mkvi +++ b/tex/context/base/page-mak.mkvi @@ -107,7 +107,7 @@ \global\setbox\b_page_makeup\vbox to \makeupparameter\c!height \bgroup \usemakeupstyleandcolor\c!style\c!color \hsize\makeupparameter\c!width - \setupalign[\makeupparameter\c!align]% + \usealignparameter\makeupparameter \usesetupsparameter\makeupparameter % lua(..),xml(...,..),tex(..) \makeupparameter\c!top \let\stopmakeup\page_makeup_stop_yes} @@ -124,7 +124,10 @@ \fi \setuppagenumber[\c!state=\makeupparameter\c!pagestate]% \doif{\makeupparameter\c!location}\v!top{\topskip\zeropoint}% - \box\b_page_makeup + \edef\p_reference{\makeupparameter\c!reference}% + \dontleavehmode + \usereferenceparameter\makeupparameter + \box\b_page_makeup % could be whole box being destination \the\t_page_makeup_every_setup \page \endgroup diff --git a/tex/context/base/spac-ali.mkiv b/tex/context/base/spac-ali.mkiv index 376916fa5..0f9b21186 100644 --- a/tex/context/base/spac-ali.mkiv +++ b/tex/context/base/spac-ali.mkiv @@ -416,6 +416,8 @@ \or % 7 centered last line \spac_align_set_horizontal_centered_last_line + \or + \parfillskip\zeropoint \fi} % Page spacing: @@ -591,6 +593,7 @@ \c_spac_align_state_broad \plustwo } \setvalue{\??aligncommand\v!disable }{\c_spac_align_state_horizontal\plussix } \setvalue{\??aligncommand\v!last }{\c_spac_align_state_horizontal\plusseven} +\setvalue{\??aligncommand\v!paragraph }{\c_spac_align_state_horizontal\pluseight} \setvalue{\??aligncommand\v!lefttoright }{\c_spac_align_state_direction \plusone } diff --git a/tex/context/base/spac-ver.mkiv b/tex/context/base/spac-ver.mkiv index 7c3604dd4..d4a388cdc 100644 --- a/tex/context/base/spac-ver.mkiv +++ b/tex/context/base/spac-ver.mkiv @@ -720,6 +720,11 @@ \lineskip \normallineskip \lineskiplimit\normallineskiplimit} +\unexpanded\def\flexiblebaselines + {\baselineskip \normalbaselineskip + \lineskip 1\normallineskip \s!plus 1\s!fill + \lineskiplimit\normallineskiplimit} + \unexpanded\def\setnormalbaselines {\ifdim\normallineheight>\zeropoint \lineheight\normallineheight @@ -1128,7 +1133,7 @@ \unexpanded\def\offinterlineskip {\baselineskip-\thousandpoint - \lineskip\zeropoint + \lineskip \zeropoint \lineskiplimit\maxdimen % We also need this here now; thanks to taco for figuring that out! \def\minimumlinedistance{\zeropoint}} @@ -1142,8 +1147,8 @@ \unexpanded\def\spac_helpers_push_interlineskip_yes {\edef\oninterlineskip - {\baselineskip\the\baselineskip - \lineskip\the\lineskip + {\baselineskip \the\baselineskip + \lineskip \the\lineskip \lineskiplimit\the\lineskiplimit \noexpand\edef\noexpand\minimumlinedistance{\the\dimexpr\minimumlinedistance}% \let\noexpand\offinterlineskip\noexpand\normaloffinterlineskip}} % \noexpand not needed diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 782fd5aa7..3076cbaee 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf Binary files differindex 135c4ba01..74f9b00a3 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/context/base/strc-lst.lua b/tex/context/base/strc-lst.lua index e3c0d60a9..95f5e675e 100644 --- a/tex/context/base/strc-lst.lua +++ b/tex/context/base/strc-lst.lua @@ -617,7 +617,6 @@ function lists.prefixednumber(name,n,prefixspec,numberspec) helpers.prefix(data,prefixspec) local numberdata = data.numberdata if numberdata then ---~ print(table.serialize(numberspec)) sections.typesetnumber(numberdata,"number",numberspec or false,numberdata or false) end end diff --git a/tex/context/base/strc-lst.mkvi b/tex/context/base/strc-lst.mkvi index 2aee09fbe..15a499c8b 100644 --- a/tex/context/base/strc-lst.mkvi +++ b/tex/context/base/strc-lst.mkvi @@ -1272,6 +1272,17 @@ \listparameter\c!textcommand{\limitatetext{#text}\p_maxwidth{\splitsymbol{\listparameter\c!limittext}}}% \fi} +% public helpers + +\unexpanded\def\startcurrentlistentrywrapper + {\hbox \strc_lists_get_reference_attribute\v!all \strc_lists_get_destination_attribute\bgroup} + +\let\stopcurrentlistentrywrapper\egroup + +\let\currentlistentryreferenceattribute \strc_lists_get_reference_attribute +\let\currentlistentrydestinationattribute\strc_lists_get_destination_attribute +\let\currentlistentrylimitedtext \strc_lists_limitated_text + % todo: \def\utilitylistlength{\listlength} % old name ... uses in styles diff --git a/tex/context/base/strc-ref.mkvi b/tex/context/base/strc-ref.mkvi index 26f389294..54f180d8e 100644 --- a/tex/context/base/strc-ref.mkvi +++ b/tex/context/base/strc-ref.mkvi @@ -111,10 +111,10 @@ %D \reference[here]{some text} %D \stoptyping -\unexpanded\def\textreference {\dosingleargument\strc_references_text_reference} -\unexpanded\def\pagereference {\dosingleargument\strc_references_page_reference} -\unexpanded\def\reference {\dosingleargument\strc_references_full_reference} -\unexpanded\def\setreference {\dodoubleargument\strc_references_set_reference } +\unexpanded\def\textreference {\dosingleargument\strc_references_text_reference} % no need for \dosingle +\unexpanded\def\pagereference {\dosingleargument\strc_references_page_reference} % as they're mandate and +\unexpanded\def\reference {\dosingleargument\strc_references_full_reference} % never forgotten +\unexpanded\def\setreference {\dodoubleargument\strc_references_set_reference } % %D These are implemented in a low level form as: @@ -123,6 +123,14 @@ \unexpanded\def\strc_references_full_reference [#labels]{\strc_references_set_named_reference\s!full{#labels}{}} \unexpanded\def\strc_references_set_reference[#labels][#settings]{\strc_references_set_named_reference\s!user{#labels}{#settings}{}} +\unexpanded\def\dosetdirectpagereference#1{\strc_references_set_named_reference\s!page{#1}{}{}} % low level, maybe use _ + +\unexpanded\def\usereferenceparameter#1% faster local variant + {\edef\m_strc_references_asked{#1\c!reference}% + \ifx\m_strc_references_asked\empty\else + \dosetdirectpagereference\m_strc_references_asked + \fi} + %D Actually there is not much difference between a text and a %D full reference, but it's the concept that counts. The low %D level implementation is: diff --git a/tex/context/base/strc-reg.mkiv b/tex/context/base/strc-reg.mkiv index 3940594c3..de9ebf6b4 100644 --- a/tex/context/base/strc-reg.mkiv +++ b/tex/context/base/strc-reg.mkiv @@ -620,7 +620,7 @@ \dontleavehmode \strut \iflocation - \pagereference[\currentregister:\v!section:#1]% + \dosetdirectpagereference{\currentregister:\v!section:#1}% \fi \registerparameter\c!command{#1}% \endgroup @@ -638,7 +638,7 @@ \dontleavehmode \strut \iflocation - \pagereference[\currentregister:\v!section:#1]% + \dosetdirectpagereference{\currentregister:\v!section:#1}% \fi \registerparameter\c!command{#1}% \endgroup @@ -761,7 +761,7 @@ {\dostarttagged\t!registerentry\empty \ifx\currentregisterseeindex\empty \else \dontleavehmode - \pagereference[seeindex:\currentregisterseeindex]% maybe some day we will support an area + \dosetdirectpagereference{seeindex:\currentregisterseeindex}% maybe some day we will support an area \fi \applyprocessor{#1}{\registerparameter\c!textcommand{\limitedregisterentry{\registerparameter\c!deeptextcommand{#2}}}}% \dostoptagged} diff --git a/tex/context/base/strc-ren.mkiv b/tex/context/base/strc-ren.mkiv index d0a3e2e23..33fccfb5c 100644 --- a/tex/context/base/strc-ren.mkiv +++ b/tex/context/base/strc-ren.mkiv @@ -461,11 +461,11 @@ % \newconditional\headisdisplay % defined already \unexpanded\def\strc_rendering_initialize_alternatives - {\edef\currentheadalternative {\headparameter \c!alternative}% - \ifcsname\??headplacementalternative\currentheadalternative\endcsname \else + {\edef\currentheadalternative{\headparameter\c!alternative}% + \ifcsname\currentheadalternativehash\s!parent\endcsname \else \let\currentheadalternative\v!normal % cf. mkii \fi - \edef\currentheadrenderingsetup {\headalternativeparameter\c!renderingsetup}% + \edef\currentheadrenderingsetup{\headalternativeparameter\c!renderingsetup}% \edef\currentheadrenderingalternative{\headalternativeparameter\c!alternative}% \ifx\currentheadrenderingalternative\empty \let\currentheadrenderingalternative\v!vertical diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 87857f01f..eccb4cc6c 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 03/24/13 15:11:25 +-- merge date : 03/25/13 19:07:29 do -- begin closure to overcome local limits and interference |