[NTG-context] typo in startformulas in latest beta
Hi Hans, There is a missing carriage return in the definition of \startformulas in the latest beta. In \def\startformulas#1\stopformulas \long\def\startformula##1\stopformula {\advance\scratchcounter\plusone}% \scratchcounter\zerocount #1% preroll should be \long\def\startformula##1\stopformula {\advance\scratchcounter\plusone}% --- Missing \cr here \scratchcounter\zerocount #1% preroll This causes a number to missed in \starttext \placeformula \startformulas \startformula \startalign \NC a_1 x + b_1 y \NC = c_1 \NR[+] \NC a_2 x + b_2 y \NC = c_2 \NR \stopalign \stopformula \startformula \startalign \NC d_1 u + e_1 v \NC = f_1 \NR \NC d_2 u + e_2 v \NC = f_2 \NR[+] %-- does not show up % %in present beta \stopalign \stopformula \stopformulas \stoptext Aditya ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] formula, bookmarks and misc
On Sun, 29 Oct 2006, Sebastian Rooks wrote: Dear ConTeXters, 1/ I would like to use a named formula with a reference containing several subformulae each with a reference. The closer I can get to is to add an empty namedformula followed by subformulae (see test file below). How can I get rid of the empty line with a number in the pdf ? I took a different approach to this. I had written some macros that do automatic subformula numbering, and I added a macro there to do have a named subformulas. See the code at the end. 4/ How can I redefine the \vec command in my formulae without having a warning system : command \vec is already defined \def\vec#1{whatever} will not give you a warning. You get a warning only if you use \define. 5/ I do like a lot the minimum distribution so easy to install. It would be even better if bibtex can be added. It's only 82.8 KiB bibtex is part of the minimal distribution for windows. It is in texmf-mswin/bin/ Now, coming back to the code for subformulas. I defined a \startnamedsubformulas[tag]{name} to take care of named subformulas. This is build on top of an existing \startsubformulas ... \stopsubformulas that do automatic numbering of subformulas. See the examples in the end. \unprotect \definesystemvariable {fn} % subForMulas % Suggestion by Hans to use fn %D \macros{setupsubformulas} \def\setupsubformulas {\dodoubleargument\getparameters[\??fn]} \definenumber [parent\v!formula] \def\subformulaconversion#1% {\getnumber[parent\v!formula]% \@@fnseparator% \convertnumber{\@@fnconversion}{#1}} \defineconversion[sub\v!formula\c!conversion][\subformulaconversion] %D \macros{startsubformulas} \def\startsubformulas% {\dosingleempty\dostartsubformulas} \def\dostartsubformulas[#1]% {\incrementnumber[\v!formula] \makesectionnumber[\v!formula] \iffirstargument \rawreference{\s!for}{#1}{\composedsectionnumber} \fi \expanded{\setupnumber [parent\v!formula] [start={\rawnumber[\v!formula]}, \c!way=\@@fmway, conversion=\@@fmconversion]} \savenumber[\v!formula] \bgroup \setupformulas[\c!conversion=sub\v!formula\c!conversion,\c!way=\v!by\v!text] \resetnumber[\v!formula]} \def\stopsubformulas% {\restorenumber[\v!formula] \resetlastlinewidth \nonoindentation \dochecknextindentation{\??fn}% \egroup \dorechecknextindentation} % here ? % I have just copied the indentation checking from \stopformulas. I am not % sure on how this works. I did not change this to take care of side % floats %D Named subformulas \def\startnamedsubformulas% {\dosingleempty\dostartnamedsubformulas} \def\dostartnamedsubformulas[#1]#2% {\iffirstargument \def\next{\startsubformulas[#1]}% \else \let\next\startsubformulas \fi \setformulalistentry{#2}% \next} \def\stopnamedsubformulas{\stopsubformulas} \setupsubformulas [\c!conversion=\v!character, \c!separator=\@@fmseparator, \c!indentnext=\@@fmindentnext] \protect %D Possible features %D * One should be able to refer to the subformula number, without the formula %D number, e.g., see equations 3a--c. %D * Allow %Da = b1 %Dc = d2.a %De = f2.b %Dg = h3 %D Algorithm do do this automatically %D flag = previous_subnumbered ; %D \let\afterNR\relax %D previous_subnumbered = false ; %D for (each row) %D if (subnumber_present_row == true) %Dif (previous_subnumbered == true) %D \def\afterNR{\decrementnumber[formula]} %Dend %Dprevious_subnumbered = true ; %D else %Dprevious_subnumbered = false ; %D end % Examples \starttext \placelist[formula] \section{Math Formulas} \startnamedsubformulas[eq:well_known]{Well Known Equalities} \placeformula[eq:first] \startformula 1 + 0 = 1 \stopformula \placeformula[eq:second] \startformula 1 + 1 = 2 \stopformula \stopnamedsubformulas \page Other examples from an email discussion with Mojca. \startbuffer \placeformula \startformula a^2 + b^2 = c^2 \stopformula \stopbuffer \setupsubformulas [conversion=romannumerals] \startsubformulas[Maxwell] \placeformula \startformulas \startformula \startalign \NC \nabla\cdot\bf E \NC = \frac{\rho}{\varepsilon_0} \NR[Maxwell 1] \NC \nabla\times\bf E \NC = - \frac{\partial\bf B}{\partial t} \NR[Maxwell II] \stopalign \stopformula \startformula \startalign \NC \nabla\cdot \bf B \NC = 0 \NR[Maxwell III] \NC \nabla\times\bf B \NC = \mu_0{\bf j}+\varepsilon_0\mu_0\frac{\partial\bf E}{\partial t} \NR[Maxwell IV] \stopalign \stopformula \stopformulas \stopsubformulas Maxwell : \in [Maxwell] II : \in [Maxwell II] \section{conversion} \setupformulas [conversion=character] \setupsubformulas [conversion=n] \getbuffer \startsubformulas[subformula] \dorecurse{2}{\getbuffer} \placeformula[my x
Re: [NTG-context] TABLE in item
\let\beforeTABLEsplitbox\relax \let\afterTABLEsplitbox \relax \let\beforeTABLEbox \relax \let\afterTABLEbox \relax you can play with these macros since they are the formal hooks Hans, I played with \let\beforeTABLEsplitbox\dontleavehmode \def\afterTABLEsplitbox{\relax\dontleavehmode} \let\beforeTABLEbox\dontleavehmode \let\afterTABLEbox\relax which gives the right indents but stops the tables splitting. I think I will just have to live with non-splitting tables for now, unless you can suggest a better redefinition? Thanks very much for the help anyway. Duncan ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] formula, bookmarks and misc
Hi Aditya, Aditya Mahajan wrote: 1/ I would like to use a named formula with a reference containing several subformulae each with a reference. The closer I can get to is to add an empty namedformula followed by subformulae (see test file below). How can I get rid of the empty line with a number in the pdf ? I took a different approach to this. I had written some macros that do automatic subformula numbering, and I added a macro there to do have a named subformulas. See the code at the end. Works very well thank you. Can I add this to the wiki ? 5/ I do like a lot the minimum distribution so easy to install. It would be even better if bibtex can be added. It's only 82.8 KiB bibtex is part of the minimal distribution for windows. It is in texmf-mswin/bin/ It's not in texmf-linux for the stable release. Thank you for your help. Regards, Sebastian ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] formula, bookmarks and misc
On Sun, 29 Oct 2006, Sebastian Rooks wrote: Hi Aditya, Aditya Mahajan wrote: 1/ I would like to use a named formula with a reference containing several subformulae each with a reference. The closer I can get to is to add an empty namedformula followed by subformulae (see test file below). How can I get rid of the empty line with a number in the pdf ? I took a different approach to this. I had written some macros that do automatic subformula numbering, and I added a macro there to do have a named subformulas. See the code at the end. Works very well thank you. Can I add this to the wiki ? Sure, but with a note that this will end up in the core eventually. Aditya ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] How to get a PhD with ConTeXt (+ hard work ;) )
On Thu, Oct 26, 2006 at 11:50:08PM +0200, Renaud AUBIN wrote: Maybe some of yours (from the ConTeXt POV) can be interested by my PhD dissertation and my presentation (both in french)... Hi all, I'll also give a link to a PhD ``sample document'' ;). You can find my PhD thesis at http://sitola.fi.muni.cz/~antos/thesis.pdf Well, it isn't as complex as Renaud's work (talking about typography, it's a high-level science, of course ;))), someone may be interested in algorithm typesetting. I'd like to thank Hans for his kind support (to name an example, today, a mechanism for named numbered lemmas is part of ConTeXt). Yours, D.A. -- We can predict everything, except the future. ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] tables
helo: whe I can get help about \bTABLE . \eTABLE ? _ Don't just search. Find. Check out the new MSN Search! http://search.msn.com/ ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context