From: Otared Kavian <otared@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: align text and formula
Date: Wed, 24 Aug 2016 16:53:41 +0200 [thread overview]
Message-ID: <DE8E73EE-FFEF-409F-B422-E6B7A4F834B1@gmail.com> (raw)
In-Reply-To: <CF7FDAB3-D358-4085-BCB9-2837D77E3308@icloud.com>
Hi Jan,
I don’t know exactly what you want to achieve, but a possible solution is to put a column between the first and the last columns which contains only the spacement between the first column and the third one.
Here is an example:
%%% begin example-1.tex
\starttext
\setupformulas[align=flushleft]
\startformula
\startalign[n=3,align={left,middle}]
\NC \text{Text1}\NC \qquad \NC E = mc^2 \NR
\NC \text{This is an explanation}\NC\qquad \NC E = mc^2 \NR
\NC \text{This is a longer explanation}\NC\qquad \NC E = mc^2 \NR
\stopalign
\stopformula
\stoptext
%%% end example-1.tex
Best regards: OK
> On 24 Aug 2016, at 10:21, Jan Willem Flamma <jwfregister@icloud.com> wrote:
>
> Hi Otared,
>
> Thanks for the (very quick) reply.
>
> I’ve experiemented with that solution as well. However, the text can vary in length and this would required a lot of tweaking to try and get the formulas mid-aligned.
> I’m trying to find a fool proof solution that will get the formula mid-aligned in all cases (and hope it exists).
>
> In any case, thanks for your suggestion!
>
> Jan Willem
>
>> On 24 aug. 2016, at 10:10, Otared Kavian <otared@gmail.com> wrote:
>>
>> Hi Jan,
>>
>> You can specify a certain horizontal distance in the second column, as in the following:
>>
>> %%% begin example.tex
>> \starttext
>>
>> \setupformulas[align=flushleft]
>> \startformula
>> \startalign[n=2,align={left,middle}]
>> \NC \text{Text1} \NC\qquad E = mc^2 \NR
>> \NC \text{Text2} \NC\qquad E = mc^2 \NR
>> \NC \text{Text2} \NC\hskip 3cm E = mc^2 \NR
>> \stopalign
>> \stopformula
>>
>> \stoptext
>> %%% end example.tex
>>
>>> On 24 Aug 2016, at 10:02, Jan Willem Flamma <jwfregister@icloud.com> wrote:
>>>
>>> Dear list,
>>>
>>> I would like to include text on the same line as a formula.
>>> The text needs to be left-aligned and the formula needs to be mid-aligned (as per normal).
>>>
>>> I’ve tried various solutions from the mathalign MyWay but have not succeeded to get the desired result sofar.
>>> Below a M-Not-WE. Clearly, the formula is not positioned correctly yet.
>>>
>>> Who can help me out?
>>>
>>> Regards,
>>> Jan Willem
>>>
>>>
>>> \starttext
>>>
>>> \setupformulas[align=flushleft]
>>> \startformula
>>> \startalign[n=2,align={left,middle}]
>>> \NC \text{Text1} \NC E = mc^2 \NR
>>> \NC \text{Text2} \NC E = mc^2 \NR
>>> \stopalign
>>> \stopformula
>>>
>>> \stoptext
>>>
>>> ___________________________________________________________________________________
>>> 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 : http://foundry.supelec.fr/projects/contextrev/
>>> wiki : http://contextgarden.net
>>> ___________________________________________________________________________________
>>
>> ___________________________________________________________________________________
>> 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 : http://foundry.supelec.fr/projects/contextrev/
>> wiki : http://contextgarden.net
>> ___________________________________________________________________________________
>
> ___________________________________________________________________________________
> 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 : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2016-08-24 14:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-24 8:02 Jan Willem Flamma
2016-08-24 8:10 ` Otared Kavian
2016-08-24 8:19 ` Jan Willem Flamma
2016-08-24 8:21 ` Jan Willem Flamma
2016-08-24 14:53 ` Otared Kavian [this message]
2016-08-24 15:38 ` Jan Willem Flamma
2016-08-25 11:52 ` Henri Menke
2016-08-25 13:12 ` Jan Willem Flamma
2016-08-25 13:31 ` Henri Menke
2016-08-25 14:07 ` Wolfgang Schuster
2016-08-27 12:51 ` Hans Hagen
2017-02-09 13:05 ` Jan Willem Flamma
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=DE8E73EE-FFEF-409F-B422-E6B7A4F834B1@gmail.com \
--to=otared@gmail.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).