ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Vertically Aligning inmargin Text to Figure
Date: Fri, 24 May 2013 15:53:40 +0200	[thread overview]
Message-ID: <CEDEB666-D00B-4992-9EEA-EE6796D4AA64@gmail.com> (raw)
In-Reply-To: <2B2B5551-19A0-4264-B605-2AB6C3BBE1A3@stien.de>


Am 24.05.2013 um 08:46 schrieb Malte Stien <malte@stien.de>:

> Wolfgang,
> 
> Thank you for this. I can see what you are trying to do here, but this does not actually compile for me. Unfortunately, I don't know enough about the implementation of ConTeXt to track the problem down. I am getting:
> 
> ! Undefined control sequence.
> 
> system          > tex > error on line 14 in file test.tex: Undefined control sequence ...
> 
> 4     	\copy\nextbox\rlap{\hskip\rightmargindistance\framed[frame=off,width=\rightmarginwidth,height=\nextboxht]{\floatuserdataparameter{text}}}
> 5     	\stoplinealignment}
> 6     \hbox}
> 7     
> 8     \setupfloat[figure][command=\FigureText]
> 9     
> 10     \starttext
> 11     
> 12     \startplacefigure[title=Dummy figure][text=Margin dummy]
> 13     \externalfigure[dummy][width=.8\textwidth]
> 14 >>  \stopplacefigure
> 15     
> 16     \stoptext
> 17     
> 
> 
> \syst_boxes_with_next_box ->\startlinealignment 
>                                                [middle] \copy \nextbox \rla...
> \strc_floats_place_packaged_boxes_indeed ...tbox }
>                                                  }\strc_floats_set_natural_...
> \strc_floats_finish_placement ...e_packaged_boxes 
>                                                  \dostoptagged \global \d_p...
> l.14 \stopplacefigure
> 
> Admittedly, I am on version 2012.10.20, which is about six months old now, but I am hesitant to update as I have a lot of co-workers using the same version and our configuration management processes dictate that we always update together.
> 
> Could you please help me out.


You can replace \startlinealignment … \stoplinealignment with \midaligned:

\define\FigureText
 {\dowithnextbox
    {\scratchdimen\nextboxht
     \midaligned\bgroup
       \flushnextbox\rlap{\hskip\rightmargindistance\framed[frame=off,width=\rightmarginwidth,height=\scratchdimen]{\floatuserdataparameter{text}}}
     \egroup}
    \hbox}

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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  parent reply	other threads:[~2013-05-24 13:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-29  7:33 Malte Stien
2013-04-29 11:04 ` Wolfgang Schuster
2013-05-24  6:46   ` Malte Stien
2013-05-24  7:30     ` Hans Hagen
2013-05-24 13:53     ` Wolfgang Schuster [this message]
2013-06-18  4:11   ` Malte Stien
2013-06-18  8:02     ` Hans Hagen
2013-06-18  8:05     ` Wolfgang Schuster

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=CEDEB666-D00B-4992-9EEA-EE6796D4AA64@gmail.com \
    --to=schuster.wolfgang@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).