From: Malte Stien <malte@stien.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Vertically Aligning inmargin Text to Figure
Date: Fri, 24 May 2013 16:46:56 +1000 [thread overview]
Message-ID: <2B2B5551-19A0-4264-B605-2AB6C3BBE1A3@stien.de> (raw)
In-Reply-To: <FDF2F788-7AC2-4776-BD23-C20FDCC192B4@gmail.com>
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.
Thank you,
Malte.
--
“The Electric Monk was a labour-saving device, like a dishwasher or a video recorder... Electric Monks believed things for you, thus saving you what was becoming an increasingly onerous task, that of believing all the things the world expected you to believe.”
― Douglas Adams, Dirk Gently's Holistic Detective Agency
On 29/04/2013, at 9:04 PM, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:
>
> Am 29.04.2013 um 09:33 schrieb Malte Stien <malte@stien.de>:
>
>> Hi,
>>
>> I need to associate a bit of text with a figure in a book. The text is not---and cannot be---the figure caption (it's providing some explanation with respect to some labels in the figure). I have tried the following based on some other post on the mailing list:
>>
>> \definepapersize[eightsquare][width=8in, height=8in]
>> \setuppapersize[eightsquare]
>>
>> \setuplayout[
>> location=doublesided, marking=on, backspace=43mm, leftmargin=18mm,
>> leftmargindistance=4mm, rightmargin=35mm, rightmargindistance=4mm, rightedgewidth=6mm,
>> topspace=12mm, header=15mm, footer=15mm, height=179mm, width=115mm
>> ]
>>
>> \starttext
>>
>> \startplacefigure[location=force, title={First dummy caption}]
>> \inmargin{First margin dummy}
>> \externalfigure[dummy][width=115mm]
>> \stopplacefigure
>>
>> \stoptext
>>
>> However, that results in the text being down the bottom of the figure. I need the text to be vertically aligned with the top of the figure. I have attached the resulting PDF for illustration purposes (is that okay on this mailing list? It's very small).
>>
>> Any hints would be much appreciated.
>
>
> You can set the text in the margin with the second argument of \startplacefigure.
>
> \define\FigureText
> {\dowithnextbox
> {\startlinealignment[middle]
> \copy\nextbox\rlap{\hskip\rightmargindistance\framed[frame=off,width=\rightmarginwidth,height=\nextboxht]{\floatuserdataparameter{text}}}
> \stoplinealignment}
> \hbox}
>
> \setupfloat[figure][command=\FigureText]
>
> \starttext
>
> \startplacefigure[title=Dummy figure][text=Margin dummy]
> \externalfigure[dummy][width=.8\textwidth]
> \stopplacefigure
>
> \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 : 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:[~2013-05-24 6:46 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 [this message]
2013-05-24 7:30 ` Hans Hagen
2013-05-24 13:53 ` Wolfgang Schuster
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=2B2B5551-19A0-4264-B605-2AB6C3BBE1A3@stien.de \
--to=malte@stien.de \
--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).