* Labelling figures
@ 2008-06-06 7:51 Wolfgang Schuster
2008-09-16 9:21 ` Wolfgang Schuster
0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2008-06-06 7:51 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi,
what is the best method to add labels to a figure; I want them not only on
the figure but their position should be relative to the figure size.
I tried start/stopfigure (mentioned as outdated in the source) but the label
is not shown.
\setupexternalfigures[location={local,global,default}]
\starttext
\startfigure[kuh][cow]
\referring(1,1)(1,1)[r:horn]
\stopfigure
\externalfigure[kuh]
\stoptext
After this I tried collector and got with a little extra and a box and to dimens
what I wanted but it's not very elegant.
\setupexternalfigures[location={local,global,default}]
\starttext
\newbox\labelbox \setbox\labelbox\hbox{\externalfigure[cow]}
\newdimen\labelwidth \labelwidth \wd\labelbox
\newdimen\labelheight \labelheight\ht\labelbox
\definecollector[label][state=repeat]
\setcollector[label]{\box\labelbox}
\setcollector[label][x=.65\labelwidth,y=.75\labelheight]{udder}
\placefigure
{A labelled cow}
{\flushcollector[label]}
\stoptext
Figurelabel as described in the label manual [1] seem to be the perfect
solution but the module was finished :-(
Is there not better way to achieve what I want and do I have to live with
my second method or could I hope for the future.
[1] http://pragma-ade.nl/general/manuals/mlabels.pdf
Greetings
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Labelling figures
2008-06-06 7:51 Labelling figures Wolfgang Schuster
@ 2008-09-16 9:21 ` Wolfgang Schuster
2008-09-16 14:28 ` Hans Hagen
0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2008-09-16 9:21 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi all,
any new news about my question below.
Wolfgang
On Fri, Jun 6, 2008 at 9:51 AM, Wolfgang Schuster
<schuster.wolfgang@googlemail.com> wrote:
> Hi,
>
> what is the best method to add labels to a figure; I want them not only on
> the figure but their position should be relative to the figure size.
>
>
> I tried start/stopfigure (mentioned as outdated in the source) but the label
> is not shown.
>
> \setupexternalfigures[location={local,global,default}]
>
> \starttext
>
> \startfigure[kuh][cow]
> \referring(1,1)(1,1)[r:horn]
> \stopfigure
>
> \externalfigure[kuh]
>
> \stoptext
>
>
> After this I tried collector and got with a little extra and a box and to dimens
> what I wanted but it's not very elegant.
>
> \setupexternalfigures[location={local,global,default}]
>
> \starttext
>
> \newbox\labelbox \setbox\labelbox\hbox{\externalfigure[cow]}
>
> \newdimen\labelwidth \labelwidth \wd\labelbox
> \newdimen\labelheight \labelheight\ht\labelbox
>
> \definecollector[label][state=repeat]
>
> \setcollector[label]{\box\labelbox}
>
> \setcollector[label][x=.65\labelwidth,y=.75\labelheight]{udder}
>
> \placefigure
> {A labelled cow}
> {\flushcollector[label]}
>
>
> \stoptext
>
>
> Figurelabel as described in the label manual [1] seem to be the perfect
> solution but the module isn't finished :-(
>
>
> Is there not better way to achieve what I want and do I have to live with
> my second method or could I hope for the future.
>
>
> [1] http://pragma-ade.nl/general/manuals/mlabels.pdf
>
>
> Greetings
> 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Labelling figures
2008-09-16 9:21 ` Wolfgang Schuster
@ 2008-09-16 14:28 ` Hans Hagen
2008-09-16 15:44 ` Alan BRASLAU
2008-09-17 6:17 ` Wolfgang Schuster
0 siblings, 2 replies; 10+ messages in thread
From: Hans Hagen @ 2008-09-16 14:28 UTC (permalink / raw)
To: mailing list for ConTeXt users
Wolfgang Schuster wrote:
> Hi all,
>
> any new news about my question below.
>
> Wolfgang
>
> On Fri, Jun 6, 2008 at 9:51 AM, Wolfgang Schuster
> <schuster.wolfgang@googlemail.com> wrote:
>> Hi,
>>
>> what is the best method to add labels to a figure; I want them not only on
>> the figure but their position should be relative to the figure size.
how about just using a layer ...
>>
>> I tried start/stopfigure (mentioned as outdated in the source) but the label
>> is not shown.
>>
>> \setupexternalfigures[location={local,global,default}]
>>
>> \starttext
>>
>> \startfigure[kuh][cow]
>> \referring(1,1)(1,1)[r:horn]
>> \stopfigure
>>
>> \externalfigure[kuh]
>>
>> \stoptext
>>
>>
>> After this I tried collector and got with a little extra and a box and to dimens
>> what I wanted but it's not very elegant.
>>
>> \setupexternalfigures[location={local,global,default}]
>>
>> \starttext
>>
>> \newbox\labelbox \setbox\labelbox\hbox{\externalfigure[cow]}
>>
>> \newdimen\labelwidth \labelwidth \wd\labelbox
>> \newdimen\labelheight \labelheight\ht\labelbox
>>
>> \definecollector[label][state=repeat]
>>
>> \setcollector[label]{\box\labelbox}
>>
>> \setcollector[label][x=.65\labelwidth,y=.75\labelheight]{udder}
>>
>> \placefigure
>> {A labelled cow}
>> {\flushcollector[label]}
>>
>>
>> \stoptext
>>
>>
>> Figurelabel as described in the label manual [1] seem to be the perfect
>> solution but the module isn't finished :-(
>>
>>
>> Is there not better way to achieve what I want and do I have to live with
>> my second method or could I hope for the future.
>>
>>
>> [1] http://pragma-ade.nl/general/manuals/mlabels.pdf
>>
>>
>> Greetings
>> 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
> ___________________________________________________________________________________
--
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Labelling figures
2008-09-16 14:28 ` Hans Hagen
@ 2008-09-16 15:44 ` Alan BRASLAU
2008-09-17 6:19 ` Wolfgang Schuster
2008-09-17 6:17 ` Wolfgang Schuster
1 sibling, 1 reply; 10+ messages in thread
From: Alan BRASLAU @ 2008-09-16 15:44 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Tuesday 16 September 2008 16:28:45 Hans Hagen wrote:
> >> what is the best method to add labels to a figure; I want them not only
> >> on the figure but their position should be relative to the figure size.
>
> how about just using a layer ...
You might also try pgf/tikz, according to your taste:
\usemodule[tikz]
\starttikzpicture[scale=xxxx]
\pgftext{\externalfigure[kuh][width=1cm]};
\draw (x,y) node {label};
\stoptikzpicture
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Labelling figures
2008-09-16 14:28 ` Hans Hagen
2008-09-16 15:44 ` Alan BRASLAU
@ 2008-09-17 6:17 ` Wolfgang Schuster
2008-09-17 7:56 ` Hans Hagen
2008-10-18 9:48 ` Labelling figures olivier Turlier
1 sibling, 2 replies; 10+ messages in thread
From: Wolfgang Schuster @ 2008-09-17 6:17 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Tue, Sep 16, 2008 at 4:28 PM, Hans Hagen <pragma@wxs.nl> wrote:
> Wolfgang Schuster wrote:
>> Hi all,
>>
>> any new news about my question below.
>>
>> Wolfgang
>>
>> On Fri, Jun 6, 2008 at 9:51 AM, Wolfgang Schuster
>> <schuster.wolfgang@googlemail.com> wrote:
>>> Hi,
>>>
>>> what is the best method to add labels to a figure; I want them not only on
>>> the figure but their position should be relative to the figure size.
>
> how about just using a layer ...
And how could they help me, I want to pisition the label relative to
the figure size with fraction of the figure width and heigth.
I could write my own macros to do this but I hoped you have already
something available to do this.
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Labelling figures
2008-09-16 15:44 ` Alan BRASLAU
@ 2008-09-17 6:19 ` Wolfgang Schuster
0 siblings, 0 replies; 10+ messages in thread
From: Wolfgang Schuster @ 2008-09-17 6:19 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Tue, Sep 16, 2008 at 5:44 PM, Alan BRASLAU <alan.braslau@cea.fr> wrote:
> On Tuesday 16 September 2008 16:28:45 Hans Hagen wrote:
>> >> what is the best method to add labels to a figure; I want them not only
>> >> on the figure but their position should be relative to the figure size.
>>
>> how about just using a layer ...
>
> You might also try pgf/tikz, according to your taste:
>
> \usemodule[tikz]
> \starttikzpicture[scale=xxxx]
> \pgftext{\externalfigure[kuh][width=1cm]};
> \draw (x,y) node {label};
> \stoptikzpicture
Thanks for the tip but I won't rely on external packages, before this
will happen I write my own macros.
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Labelling figures
2008-09-17 6:17 ` Wolfgang Schuster
@ 2008-09-17 7:56 ` Hans Hagen
2008-09-18 11:28 ` lang-ita.tex (see=) Alan BRASLAU
2008-10-13 8:01 ` mtxrun TEXINPUTS bug Alan BRASLAU
2008-10-18 9:48 ` Labelling figures olivier Turlier
1 sibling, 2 replies; 10+ messages in thread
From: Hans Hagen @ 2008-09-17 7:56 UTC (permalink / raw)
To: mailing list for ConTeXt users
Wolfgang Schuster wrote:
> On Tue, Sep 16, 2008 at 4:28 PM, Hans Hagen <pragma@wxs.nl> wrote:
>> Wolfgang Schuster wrote:
>>> Hi all,
>>>
>>> any new news about my question below.
>>>
>>> Wolfgang
>>>
>>> On Fri, Jun 6, 2008 at 9:51 AM, Wolfgang Schuster
>>> <schuster.wolfgang@googlemail.com> wrote:
>>>> Hi,
>>>>
>>>> what is the best method to add labels to a figure; I want them not only on
>>>> the figure but their position should be relative to the figure size.
>> how about just using a layer ...
>
> And how could they help me, I want to pisition the label relative to
> the figure size with fraction of the figure width and heigth.
>
> I could write my own macros to do this but I hoped you have already
> something available to do this.
hm, i thought that you knew all those things -)
wikifyable ...
\definelayer[figure][width=\overlaywidth,height=\overlayheight]
\defineoverlay[figure][{\directsetup{figure}\tightlayer[figure]}]
\setupcolors[state=start]
\starttext
\startsetups figure
\setlayerframed[figure][preset=rightbottom,x=.25\layerwidth,y=.25\layerheight]{HERE}
\setlayerframed[figure][preset=leftbottom,
x=.15\layerwidth,y=.35\layerheight]{THERE}
\stopsetups
\externalfigure[cow][background={foreground,figure},width=4cm,height=8cm]
\startsetups figure
\setlayerframed[figure][preset=righttop,x=.25\layerwidth,y=.25\layerheight]{MORE}
\setlayerframed[figure][preset=middle,foregroundcolor=green]{EVEN MORE}
\stopsetups
\externalfigure[cow][background={foreground,figure},width=14cm,height=2cm]
\defineexternalfigure[whatever][background={foreground,figure}]
\startsetups figure
\setlayerframed[figure][preset=righttop,x=.25\layerwidth,y=.25\layerheight]{\red
MORE}
\setlayerframed[figure][preset=middle,foregroundcolor=green]{EVEN MORE}
\stopsetups
\externalfigure[cow][whatever][width=14cm,height=4cm]
\stoptext
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* lang-ita.tex (see=)
2008-09-17 7:56 ` Hans Hagen
@ 2008-09-18 11:28 ` Alan BRASLAU
2008-10-13 8:01 ` mtxrun TEXINPUTS bug Alan BRASLAU
1 sibling, 0 replies; 10+ messages in thread
From: Alan BRASLAU @ 2008-09-18 11:28 UTC (permalink / raw)
To: ntg-context
Missing from lang-ita.tex:
\setuplabeltext[\s!fr][\v!see=voir ]
(indeed, this label needs to be set for
all of the variants fr es ca it la pt ro)
Thanks, Alan
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* mtxrun TEXINPUTS bug
2008-09-17 7:56 ` Hans Hagen
2008-09-18 11:28 ` lang-ita.tex (see=) Alan BRASLAU
@ 2008-10-13 8:01 ` Alan BRASLAU
1 sibling, 0 replies; 10+ messages in thread
From: Alan BRASLAU @ 2008-10-13 8:01 UTC (permalink / raw)
To: ntg-context
With
$ export TEXINPUTS=".:/home/local/tex//:"
mtxrun fails
$ mtxrun --script fonts --list
cannot open : No such file or directory
as it looks to open /home/local/tex/font-syn.lua
rather than /usr/share/texmf/tex/context/base/font-syn.lua
(after succeeding to find /usr/share/texmf/scripts/context/lua/mtx-fonts.lua).
Must be a simple script error, but I have not found the bug....
- using Debian/unstable :
MtxRun | current version : 2008.05.21 15:21
LuaTools | version 1.2.0 - 2006+ - PRAGMA ADE / CONTEXT
This is LuaTeX, Version snapshot-0.28.0-2008070709
--
Alan Braslau
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Labelling figures
2008-09-17 6:17 ` Wolfgang Schuster
2008-09-17 7:56 ` Hans Hagen
@ 2008-10-18 9:48 ` olivier Turlier
1 sibling, 0 replies; 10+ messages in thread
From: olivier Turlier @ 2008-10-18 9:48 UTC (permalink / raw)
To: ntg-context
Wolfgang Schuster wrote:
> I could write my own macros to do this but I hoped you have already
> something available to do this.
Hi Wolfgang,
I don't remember where I get this, I'm only sure it's coming from a Hans's
example somewhere...
\definefont[AuteurFont][Sans sa .40]
\defineornament
[Auteur]
[rotation=90,corner={right,bottom},location={right,top},
hoffset=.9ex,voffset=.9ex,alternative=b]
[style=AuteurFont,offset=0pt]
% This affiliation is used as:
% \placefigure
% {Affiliations normally are typeset pretty small.}
% {\Auteur {\copyright myself} {\externalfigure[hacker]}}
HTH
--
olivier Turlier
Marseille
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-10-18 9:48 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-06 7:51 Labelling figures Wolfgang Schuster
2008-09-16 9:21 ` Wolfgang Schuster
2008-09-16 14:28 ` Hans Hagen
2008-09-16 15:44 ` Alan BRASLAU
2008-09-17 6:19 ` Wolfgang Schuster
2008-09-17 6:17 ` Wolfgang Schuster
2008-09-17 7:56 ` Hans Hagen
2008-09-18 11:28 ` lang-ita.tex (see=) Alan BRASLAU
2008-10-13 8:01 ` mtxrun TEXINPUTS bug Alan BRASLAU
2008-10-18 9:48 ` Labelling figures olivier Turlier
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).