Hi, this code \setupformulas[location=left] \placeformula \startformula K = V + W(V) × S (Gleichung 1) \stopformula gives, as expected: (1.1) K = V + W(V ) × S But I need the following label ("Gleichung" means "formula"): (Gleichung 1) K = V + W(V ) × S How can this be done (in Mk II) ? Thanks, Steffen.
Am 04.12.2008 um 12:46 schrieb Steffen Wolfrum:
Hi,
this code \setupformulas[location=left] \placeformula \startformula K = V + W(V) × S (Gleichung 1) \stopformula
gives, as expected: (1.1) K = V + W(V ) × S
But I need the following label ("Gleichung" means "formula"): (Gleichung 1) K = V + W(V ) × S
How can this be done (in Mk II) ?
In the same way as you do it in MkIV :) \setupformulas[way=bytext] \setuplabeltext[de][formula=Gleichung~] Wolfgang
Am 04.12.2008 um 14:28 schrieb Wolfgang Schuster:
Am 04.12.2008 um 12:46 schrieb Steffen Wolfrum:
Hi,
this code \setupformulas[location=left] \placeformula \startformula K = V + W(V) × S (Gleichung 1) \stopformula
gives, as expected: (1.1) K = V + W(V ) × S
But I need the following label ("Gleichung" means "formula"): (Gleichung 1) K = V + W(V ) × S
How can this be done (in Mk II) ?
In the same way as you do it in MkIV :)
\setupformulas[way=bytext] \setuplabeltext[de][formula=Gleichung~]
Two remarks: 1) In this case the equation is not centered to textwidth anymore. It is centered to the space that's left. 2) And what about if the author wants to add a footnote to this respective formula? An example could look like the following fake: \noindent(Gleichung 2)\note[339]\hfill{$1 = -W'(V^*) × S$}\hfill \hphantom{(Gleichung 2)\note[339]} Steffen
Am 04.12.2008 um 14:39 schrieb Steffen Wolfrum:
Am 04.12.2008 um 14:28 schrieb Wolfgang Schuster:
Am 04.12.2008 um 12:46 schrieb Steffen Wolfrum:
Hi,
this code \setupformulas[location=left] \placeformula \startformula K = V + W(V) × S (Gleichung 1) \stopformula
gives, as expected: (1.1) K = V + W(V ) × S
But I need the following label ("Gleichung" means "formula"): (Gleichung 1) K = V + W(V ) × S
How can this be done (in Mk II) ?
In the same way as you do it in MkIV :)
\setupformulas[way=bytext] \setuplabeltext[de][formula=Gleichung~]
Two remarks:
1) In this case the equation is not centered to textwidth anymore. It is centered to the space that's left.
\define[1]\FormulaNumber {\rlap{(Gleichung~#1)}} \setupformulas [left=, right=, numbercommand=\FormulaNumber, location=left]
2) And what about if the author wants to add a footnote to this respective formula?
An example could look like the following fake: \noindent(Gleichung 2)\note[339]\hfill{$1 = -W'(V^*) × S$}\hfill \hphantom{(Gleichung 2)\note[339]}
Duno, I'm unable to use footnotes in math mode. \starttext foo\footnote{foo} $bar\footnote{bar}$ \stoptext Wolfgang
Am 04.12.2008 um 15:09 schrieb Wolfgang Schuster:
Am 04.12.2008 um 14:39 schrieb Steffen Wolfrum:
Am 04.12.2008 um 14:28 schrieb Wolfgang Schuster:
Am 04.12.2008 um 12:46 schrieb Steffen Wolfrum:
Hi,
this code \setupformulas[location=left] \placeformula \startformula K = V + W(V) × S (Gleichung 1) \stopformula
gives, as expected: (1.1) K = V + W(V ) × S
But I need the following label ("Gleichung" means "formula"): (Gleichung 1) K = V + W(V ) × S
How can this be done (in Mk II) ?
In the same way as you do it in MkIV :)
\setupformulas[way=bytext] \setuplabeltext[de][formula=Gleichung~]
Two remarks:
1) In this case the equation is not centered to textwidth anymore. It is centered to the space that's left.
\define[1]\FormulaNumber {\rlap{(Gleichung~#1)}}
\setupformulas [left=, right=, numbercommand=\FormulaNumber, location=left]
2) And what about if the author wants to add a footnote to this respective formula?
An example could look like the following fake: \noindent(Gleichung 2)\note[339]\hfill{$1 = -W'(V^*) × S$}\hfill \hphantom{(Gleichung 2)\note[339]}
Duno, I'm unable to use footnotes in math mode.
\starttext
foo\footnote{foo}
$bar\footnote{bar}$
\stoptext
Wolfgang
Me too. That's the problem ;o) Steffen
Steffen Wolfrum wrote:
Am 04.12.2008 um 14:28 schrieb Wolfgang Schuster:
Am 04.12.2008 um 12:46 schrieb Steffen Wolfrum:
Hi,
this code \setupformulas[location=left] \placeformula \startformula K = V + W(V) × S (Gleichung 1) \stopformula
gives, as expected: (1.1) K = V + W(V ) × S
But I need the following label ("Gleichung" means "formula"): (Gleichung 1) K = V + W(V ) × S
How can this be done (in Mk II) ? In the same way as you do it in MkIV :)
\setupformulas[way=bytext] \setuplabeltext[de][formula=Gleichung~]
Two remarks:
1) In this case the equation is not centered to textwidth anymore. It is centered to the space that's left.
indeed, because otherwise the label can run into the formula ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Thu, 4 Dec 2008, Hans Hagen wrote:
Steffen Wolfrum wrote:
Am 04.12.2008 um 14:28 schrieb Wolfgang Schuster:
Am 04.12.2008 um 12:46 schrieb Steffen Wolfrum:
Hi,
this code \setupformulas[location=left] \placeformula \startformula K = V + W(V) × S (Gleichung 1) \stopformula
gives, as expected: (1.1) K = V + W(V ) × S
But I need the following label ("Gleichung" means "formula"): (Gleichung 1) K = V + W(V ) × S
How can this be done (in Mk II) ? In the same way as you do it in MkIV :)
\setupformulas[way=bytext] \setuplabeltext[de][formula=Gleichung~]
Two remarks:
1) In this case the equation is not centered to textwidth anymore. It is centered to the space that's left.
indeed, because otherwise the label can run into the formula
And I am not sure what is a good algorithm to place the label. One can measure the width of the formula content, the formula label, and compare them with hsize. Then if formula_width + 2*label_width < hsize place formula in center of hsize, place label on right else if formula_width + label_width < hsize DONT_KNOW else place formula in the center of hszie, place label one the next line endif I do not know what is the right thing to do in the second case. Should we place the label on the same line (with the formula content not centered) or should we place the label on the next line. The easiest thing may be to keep it configurable (labelalternative=tight|loose). At some stage we need to redo the display formula macros in MKIV. Aditya
Hello, Aditya Mahajan wrote:
if formula_width + 2*label_width < hsize place formula in center of hsize, place label on right else if formula_width + label_width < hsize DONT_KNOW else place formula in the center of hszie, place label one the next line endif
I do not know what is the right thing to do in the second case. Should we place the label on the same line (with the formula content not centered) or should we place the label on the next line. The easiest thing may be to keep it configurable (labelalternative=tight|loose). At some stage we need to redo the display formula macros in MKIV.
My immediate reaction is that there should be only two cases: the first one you identify (in which there is space for the label) and an "else" case in which the label gets pushed to the next line. I find variations in how formulae are centered to be distracting (but that is just my preference). Cheers, Rory
Aditya
------------------------------------------------------------------------
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Steffen Wolfrum wrote:
Am 04.12.2008 um 14:28 schrieb Wolfgang Schuster:
Am 04.12.2008 um 12:46 schrieb Steffen Wolfrum:
Hi,
this code \setupformulas[location=left] \placeformula \startformula K = V + W(V) × S (Gleichung 1) \stopformula
gives, as expected: (1.1) K = V + W(V ) × S
But I need the following label ("Gleichung" means "formula"): (Gleichung 1) K = V + W(V ) × S
How can this be done (in Mk II) ? In the same way as you do it in MkIV :)
\setupformulas[way=bytext] \setuplabeltext[de][formula=Gleichung~]
Two remarks:
1) In this case the equation is not centered to textwidth anymore. It is centered to the space that's left.
2) And what about if the author wants to add a footnote to this respective formula?
An example could look like the following fake: \noindent(Gleichung 2)\note[339]\hfill{$1 = -W'(V^*) × S$}\hfill \hphantom{(Gleichung 2)\note[339]}
maybe putting \postponefootnotes in front of the formula helps (future mkiv versions might solve this in a better way; it has to do with the fact that one cannot use inserts too deeply nested in tex constructs ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Am 04.12.2008 um 15:30 schrieb Hans Hagen:
Steffen Wolfrum wrote:
Am 04.12.2008 um 14:28 schrieb Wolfgang Schuster:
Am 04.12.2008 um 12:46 schrieb Steffen Wolfrum:
Hi,
this code \setupformulas[location=left] \placeformula \startformula K = V + W(V) × S (Gleichung 1) \stopformula
gives, as expected: (1.1) K = V + W(V ) × S
But I need the following label ("Gleichung" means "formula"): (Gleichung 1) K = V + W(V ) × S
How can this be done (in Mk II) ? In the same way as you do it in MkIV :)
\setupformulas[way=bytext] \setuplabeltext[de][formula=Gleichung~]
Two remarks:
1) In this case the equation is not centered to textwidth anymore. It is centered to the space that's left.
2) And what about if the author wants to add a footnote to this respective formula?
An example could look like the following fake: \noindent(Gleichung 2)\note[339]\hfill{$1 = -W'(V^*) × S$}\hfill \hphantom{(Gleichung 2)\note[339]}
maybe putting \postponefootnotes in front of the formula helps (future mkiv versions might solve this in a better way; it has to do with the fact that one cannot use inserts too deeply nested in tex constructs
This did solve it, here is new version for you, Steffen. \setupformulas[way=bytext] \let\theformulanote\relax \define[1]\formulanote {\def\theformulanote{#1}}% \def\placeformulanote {\doiftext\theformulanote{\postponefootnotes \footnote{\theformulanote}}} \define[1]\FormulaNumber {\rlap{(Gleichung~#1)\placeformulanote}} \setupformulas [left=, right=, numbercommand=\FormulaNumber, location=left] \starttext \chapter{dummy} \placeformula \startformula \formulanote{one} K = V + W(V) \times S \stopformula text\footnote{text} \placeformula \startformula \formulanote{two} K = V + W(V) \times S \stopformula \stoptext Wolfgang
v Am 04.12.2008 um 15:50 schrieb Wolfgang Schuster:
Am 04.12.2008 um 15:30 schrieb Hans Hagen:
Steffen Wolfrum wrote:
Am 04.12.2008 um 14:28 schrieb Wolfgang Schuster:
Am 04.12.2008 um 12:46 schrieb Steffen Wolfrum:
Hi,
this code \setupformulas[location=left] \placeformula \startformula K = V + W(V) × S (Gleichung 1) \stopformula
gives, as expected: (1.1) K = V + W(V ) × S
But I need the following label ("Gleichung" means "formula"): (Gleichung 1) K = V + W(V ) × S
How can this be done (in Mk II) ? In the same way as you do it in MkIV :)
\setupformulas[way=bytext] \setuplabeltext[de][formula=Gleichung~]
Two remarks:
1) In this case the equation is not centered to textwidth anymore. It is centered to the space that's left.
2) And what about if the author wants to add a footnote to this respective formula?
An example could look like the following fake: \noindent(Gleichung 2)\note[339]\hfill{$1 = -W'(V^*) × S$}\hfill \hphantom{(Gleichung 2)\note[339]}
maybe putting \postponefootnotes in front of the formula helps (future mkiv versions might solve this in a better way; it has to do with the fact that one cannot use inserts too deeply nested in tex constructs
This did solve it, here is new version for you, Steffen.
\setupformulas[way=bytext]
\let\theformulanote\relax
\define[1]\formulanote {\def\theformulanote{#1}}%
\def\placeformulanote {\doiftext\theformulanote{\postponefootnotes \footnote{\theformulanote}}}
\define[1]\FormulaNumber {\rlap{(Gleichung~#1)\placeformulanote}}
\setupformulas [left=, right=, numbercommand=\FormulaNumber, location=left]
\starttext
\chapter{dummy}
\placeformula \startformula \formulanote{one} K = V + W(V) \times S \stopformula
text\footnote{text}
\placeformula \startformula \formulanote{two} K = V + W(V) \times S \stopformula
\stoptext
Wolfgang
Excellent! Wolfgang / Hans thank you Steffen
participants (5)
-
Aditya Mahajan
-
Hans Hagen
-
Rory Molinari
-
Steffen Wolfrum
-
Wolfgang Schuster