From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: formula label
Date: Thu, 4 Dec 2008 15:50:32 +0100 [thread overview]
Message-ID: <5BAD28E6-4524-4AD3-8F17-6648E7DE63F4@gmail.com> (raw)
In-Reply-To: <4937E9A1.8080007@wxs.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
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2008-12-04 14:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-04 11:46 Steffen Wolfrum
2008-12-04 13:28 ` Wolfgang Schuster
2008-12-04 13:39 ` Steffen Wolfrum
2008-12-04 14:09 ` Wolfgang Schuster
2008-12-04 14:14 ` Steffen Wolfrum
2008-12-04 14:28 ` Hans Hagen
2008-12-04 15:28 ` Aditya Mahajan
2008-12-04 19:52 ` Rory Molinari
2008-12-04 14:30 ` Hans Hagen
2008-12-04 14:50 ` Wolfgang Schuster [this message]
2008-12-04 15:07 ` Steffen Wolfrum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5BAD28E6-4524-4AD3-8F17-6648E7DE63F4@gmail.com \
--to=schuster.wolfgang@googlemail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).