From: Damien Thiriet <damien@thiriet.web4me.fr>
To: ntg-context@ntg.nl
Subject: insert natural table at the top left of some png
Date: Mon, 15 Oct 2018 20:11:25 +0200 [thread overview]
Message-ID: <20181015181124.GA31174@maroilles.home> (raw)
Hello,
I am still working on maps and facing some new issue.
The program I used to design one map is not convenient for writing key
to symbols, and what I have is a map.png file with big spare space on
its upper left corner.
So I have either to write on the png with ImageMagick or GIMP,
or have a nicer output with ConTeXt.
I wrote this legend file.
\definecolor[canaux][h=81b3e0]
\startreusableMPgraphic{voies}
path p; p:= (0,0) -- (20,0) ;
drawarrow p withcolor black ;
\stopreusableMPgraphic
\startreusableMPgraphic{canaux}
path p; p:= (0,0) -- (20,0) ;
drawarrow p withcolor \MPcolor{canaux} withpen pencircle scaled 2pt;
\stopreusableMPgraphic
\startbuffer
\bTABLE[frame=off]
\setupTABLE[column][1,3][align={middle,lohi}]
\bTR
\bTH 1) \eTH \bTH Le milieu \eTH \bTH 2) \eTH \bTH Les activités \eTH
\eTR
\bTR
\bTD \externalfigure[illustrations/zone_urbaine][height=12bp] \eTD \bTD zones urbaines \eTD
\eTR
\bTR
\bTD \leavevmode \reuseMPgraphic{voies} \eTD \bTD infrastructures~: voies ferrées \eTD
\eTR
\bTR
\bTD \leavevmode \reuseMPgraphic{canaux} \eTD \bTD infrastructures~: canaux \eTD
\eTR
eTR
\eTABLE
\stopbuffer
The idea was to make some
\hbox{
\externalfigure[map][width=0.9 \textwidth]
\vbox{\hfill -0.9 \textwidth
\getbuffer
}
}
to put the boxed legend at this upper left corner.
Of course I couldn't succeed, since I do not understand so much
boxes. ConTeXt complains with a missing number.
How could I achieve such boxing ?
Thanks,
Damien Thiriet
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next reply other threads:[~2018-10-15 18:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-15 18:11 Damien Thiriet [this message]
2018-10-15 21:15 ` Hans Hagen
2018-10-16 5:46 ` Damien Thiriet
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=20181015181124.GA31174@maroilles.home \
--to=damien@thiriet.web4me.fr \
--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).