summaryrefslogtreecommitdiff
path: root/tex/context/base/strc-not.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/strc-not.mkiv')
-rw-r--r--tex/context/base/strc-not.mkiv70
1 files changed, 47 insertions, 23 deletions
diff --git a/tex/context/base/strc-not.mkiv b/tex/context/base/strc-not.mkiv
index 6be959fa3..4bc08f7cc 100644
--- a/tex/context/base/strc-not.mkiv
+++ b/tex/context/base/strc-not.mkiv
@@ -17,6 +17,12 @@
\unprotect
+% this needs a further cleanup ...
+%
+% -- set breakpoin in descriptions
+% -- reset after trialtypesetting
+% -- that way we can trick the symbol space
+
% obsolete
\let\autopostponenotes\relax
@@ -539,35 +545,43 @@
\def\@@notemakedescription[#1]#2#3% todo ... proper [key=value] etc
{\ifnotesenabled
- \begingroup
- \doenumerationcheckconditions
- \let\currentnote\currentdescriptionmain
- \dodescriptioncomponent[\c!reference=#1,\c!label={\descriptionparameter\c!text},\c!title={#3},\c!list=,\c!bookmark=,][]%
- \xdef\currentnotenumber{\ctxlua{structure.notes.store("\currentnote",\currentdescriptionnumberentry)}}%
- \settrue\processingnote
- \ifconditional\skipnoteplacement
- \globallet\lastnotesymbol\dolastnotesymbol
+ \iftrialtypesetting
+ % some day a roll back
\else
- \iftypesettinglines % otherwise problems with \type <crlf> {xxx}
- \ignorelines % makes footnotes work in \startlines ... \stoplines
+ \begingroup
+ \doenumerationcheckconditions
+ \let\currentnote\currentdescriptionmain
+ \dodescriptioncomponent[\c!reference=#1,\c!label={\descriptionparameter\c!text},\c!title={#3},\c!list=,\c!bookmark=,][]%
+ \xdef\currentnotenumber{\ctxlua{structure.notes.store("\currentnote",\currentdescriptionnumberentry)}}%
+ \settrue\processingnote
+ \ifconditional\skipnoteplacement
+ \globallet\lastnotesymbol\dolastnotesymbol
+ \else
+ \iftypesettinglines % otherwise problems with \type <crlf> {xxx}
+ \ignorelines % makes footnotes work in \startlines ... \stoplines
+ \fi
+ \ifnotesymbol
+ \dolastnotesymbol
+ \else
+ \unskip\unskip
+ \globallet\lastnotesymbol\dolastnotesymbol
+ \fi
\fi
- \ifnotesymbol
- \dolastnotesymbol
+ \ifconditional\postponingnotes
+ \global\settrue\postponednote
\else
- \unskip\unskip
- \globallet\lastnotesymbol\dolastnotesymbol
+ \handlenoteinsert\currentnote\currentnotenumber
\fi
+ \endgroup
\fi
- \ifconditional\postponingnotes
- \global\settrue\postponednote
+ \fi
+ \ifconditional\skipnoteplacement \else
+ \kern\notesignal\relax % \relax is needed to honor spaces
+ \iftrialtypesetting
+ % todo: reserve some space for symbol, in that case we need to be able to roll back notes
\else
- \handlenoteinsert\currentnote\currentnotenumber
- \fi
- \ifconditional\skipnoteplacement \else
- \kern\notesignal\relax % \relax is needed to honor spaces
- \iftrialtypesetting \else \global\setfalse\skipnoteplacement \fi
+ \global\setfalse\skipnoteplacement
\fi
- \endgroup
\fi}
\def\dolastnotesymbol
@@ -770,7 +784,7 @@
{% this should be checked, smells like a mix-up
% does not split: \ifcase\noteparameter\c!n\unvbox\else\box\fi\currentnoteins
\ifcase\noteparameter\c!n\relax
- \iftrialtypesetting\unvcopied\else\unvboxed\fi\currentnoteins
+ \iftrialtypesetting\unvcopied\else\unvboxed\fi\currentnoteins % is this needed?
\or
\iftrialtypesetting\copy\else\box\fi\currentnoteins
\obeydepth % (a) added , since split footnotes will not align properly
@@ -1160,6 +1174,16 @@
\def\donote[#1][#2]{\ifsecondargument\donotesymbol[#1][#2]\else\secondargumenttrue\donotesymbol[\v!footnote][#1]\fi}
+%D Goodies:
+%D
+%D \starttyping
+%D \dorecurse {100} {
+%D test \footnote{\doifnoteonsamepageelse[footnote]{ibidem}{aaa}}
+%D }
+%D \stoptyping
+
+\def\doifnoteonsamepageelse[#1]{\ctxlua{structure.notes.doifonsamepageasprevious("#1")}}
+
%D New trickery:
\def\ownnotesymbol#1% #1 gets number passed