From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: tex placeholder for use in metapost/metafun
Date: Sat, 11 Sep 2010 06:18:39 +0200 [thread overview]
Message-ID: <B34FDC24-A31E-49F4-B8B2-6B25D9004627@gmail.com> (raw)
In-Reply-To: <i6e5cr$9n5$1@dough.gmane.org>
Am 10.09.2010 um 22:45 schrieb Martin 'golodhrim' Scholz:
> Hi everybody,
>
> as I like to desing a CI for an publishing Cover for an Organisation, I
> have a question about usage:
>
> What I wanna do is, having placeholders in the metapost coverpage, it
> should work like
>
> \author{}
> \title{}
> \swlogo{}
>
> in the preamble
>
> and should be automatically placed in the metapost graphic at runtime....
>
> what would be the best way to do that?
>
> I thought about
>
> \def\author{content}
>
>
> and then in metapost \btex\author\etex
>
> but not sure if it will work, or is there a more ConTeXtian way to do
> so...
You can set the values with
\setvariables
[document]
[author=...,
title=...,
logo=...]
and access them with
\getvariable{document}{author}
You can also test for a content of the variable:
\doifvariable{document}{logo}{\externalfigure[\getvariable{document}{logo}]}
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
___________________________________________________________________________________
prev parent reply other threads:[~2010-09-11 4:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-10 20:45 Martin 'golodhrim' Scholz
2010-09-11 4:18 ` Wolfgang Schuster [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=B34FDC24-A31E-49F4-B8B2-6B25D9004627@gmail.com \
--to=schuster.wolfgang@googlemail.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).