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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / 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
___________________________________________________________________________________