ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: afsmith <adventurecomplete@gmail.com>
To: ntg-context <ntg-context@ntg.nl>
Subject: Re: formula-style alignment
Date: Mon, 18 May 2009 03:53:15 -0700	[thread overview]
Message-ID: <5df5befa0905180353t7e3036b6s7092d1c6d5d6ef19@mail.gmail.com> (raw)
In-Reply-To: <5df5befa0905171223y36548073i3f0ffdb9df9b3f99@mail.gmail.com>

Thanks Wolfgang. That works...

Now how about inside a definition or subject header?

Here is an example. \localhsize in this case seems to resolve to a
width of 0, making the contained text break as often as it can...

\defineframed[lrframe][
width=\localhsize,
align=normal,
rulethickness=1pt]

\setuplayout[header=0pt,footer=0pt]
\definedescription[topdesc][
inbetween={\blank[none]},
headstyle={\bf},
style={\tf\rm},
location=top,
width=broad]

\define[3]\CHRONDESC
{\starttopdesc
{\dontleavehmode\lrframe{#1\hfill#2}}
\startnarrower[left]{#3}\stopnarrower
\stoptopdesc}

\definehead[mysubject][subject]
\setuphead[mysubject][style={\bf}]
\define[3]\CHRONSUB
{\mysubject{\dontleavehmode\lrframe{#1\hfill#2}}
\startnarrower[left]{#3}\stopnarrower}

\showframe[text]

\starttext

\startnarrower[left]
\dontleavehmode\lrframe[width=broad]
{leftleftleft \hfill right rightrightright}
\stopnarrower \crlf

\startnarrower[left]
\dontleavehmode\lrframe[width=\localhsize]
{leftleftleftleft\hfill right rightrightright}
\stopnarrower \crlf

\CHRONDESC
  {This happened from June 08 to June 09}
  {06/08--06/09}
  {\CHRONDESC
    {This happened from June 08 to December 08}
    {06/08--12/08}
    {\input tufte }
  \CHRONDESC
    {This happened from January 09 to June 09}
    {01/09--06/09}
    {\input zapf }}
\CHRONDESC
  {This happened from June 09 to July 09}
  {06/09-07/09}
  {\input knuth }
\crlf

\CHRONSUB
  {This happened from June 08 to June 09}
  {06/08--06/09}
  {\CHRONSUB
    {This happened from June 08 to December 08}
    {06/08--12/08}
    {\input tufte }
  \CHRONSUB
    {This happened from January 09 to June 09}
    {01/09--06/09}
    {\input zapf }}
\crlf

\stoptext



> Am 17.05.2009 um 21:23 schrieb afsmith:
>
> > Hey again, ntg-context.
> >
> > I would like to align one piece of a line to the left, and another
> > piece of the same line to the right, sort of like numbered math
> > equations, except not math.
> > Additionally I would like to do this inside a narrowed block
>
> \starttext
>
> \input knuth
>
> \startnarrower
>
> \input knuth
>
> \dontleavehmode\framed[width=\localhsize,align=normal]{left\hfill right}
>
> \stopnarrower
>
> \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
___________________________________________________________________________________


      parent reply	other threads:[~2009-05-18 10:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-17 19:23 afsmith
2009-05-18  6:58 ` Wolfgang Schuster
2009-05-18 10:53 ` afsmith [this message]

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=5df5befa0905180353t7e3036b6s7092d1c6d5d6ef19@mail.gmail.com \
    --to=adventurecomplete@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).