ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Mojca Miklavec" <mojca.miklavec.lists@gmail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: Some Metapost Problems
Date: Tue, 7 Oct 2008 23:38:43 +0200	[thread overview]
Message-ID: <6faad9f00810071438x1c8001d5j9be911bac9b665fa@mail.gmail.com> (raw)
In-Reply-To: <48EBDA9E.23505.27A9140@wwl.musensturm.de>

On Tue, Oct 7, 2008 at 9:54 PM, Wolfgang Werners-Lucchini wrote:
> Hallo Mojca,
>
>> > 1. The labels of the first graphic are xscaled (randomly)
>>
>> They are not scaled randomly :P
>> They inherit the sizes from the second graphic.
>>
>> See
>>
>> http://archive.contextgarden.net/message/20061204.102337.280a6589.en
>> .html
>
> strange
>
>> You need
>>     \runMPgraphicstrue
>
> Yes, this helps!
>
> But what are the sideeffects? When is the opposite needed?

I don't know. Ask Hans or Taco. It might have to do with write18
(perhaps when it's desabled, one of them doesn't work, but I don't
really know).

>> These settings are used exclusevely for btex ... etex and textext.
>> \sometxt uses the surounding font.
>>
>> There could be some settings for fonts in metapost graphics, but
>> I'm not aware of any.
>> However, it's rather easy to either:
>>
>> a) write your own metapost macro for placing labels that scales
>> down
>> everything by 20%
>>     label.top(myscaled(\sometxt{Samstag}), z0) ;
>> where
>>     vardef myscaled(expr t) = (t scaled 0.8) enddef;
>
> This works.
>
>> b) write your own handle
>>     \definetextext[scaled]{\switchtobodyfont[8pt]\strut}
>> and then
>>     label.top(\sometxt[scaled]{Samstag}, z0) ;
>
> This works, too. Where is this documented?

The \sometxt myway (http://wiki.contextgarden.net/My_Way).

>> c) write your own macro or put some font size switch in front of
>> the graphic (I did not try it out)
>> \long\def\startuseMPgraphicwithscaledtext#1\stopuseMPgraphicwithscal
>> edtext
>> {\bgroup\switchtobodyfont[8pt]\startuseMPgraphic#1\stopuseMPgraphic\
>> egroup}
>
> This is not working.
> Even an explizit
>
> {\switchtobodyfont[8pt]
> \startuseMPgraphic
>
> <mp-code>
>
> \stopuseMPgraphic
> }
>
> didn't work.

Try:

\switchtobodyfont[50pt]
\startMPcode
draw \sometxt{abc};
\stopMPcode

Maybe the labels are typeset when you \useMPgraphic, not when you
define it (but better have the sizes kept in sync).

Mojca
___________________________________________________________________________________
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
___________________________________________________________________________________


  reply	other threads:[~2008-10-07 21:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.5393.1223355310.4320.ntg-context@ntg.nl>
2008-10-07 19:54 ` Wolfgang Werners-Lucchini
2008-10-07 21:38   ` Mojca Miklavec [this message]
2008-10-08  7:35     ` Taco Hoekwater
     [not found] <mailman.5483.1223452260.4320.ntg-context@ntg.nl>
2008-10-08 13:02 ` Wolfgang Werners-Lucchini
2008-10-08 13:34   ` Taco Hoekwater
2008-10-06 21:10 Wolfgang Werners-Lucchini
  -- strict thread matches above, loose matches on Subject: below --
2008-10-05 18:03 Wolfgang Werners-Lucchini
2008-10-06 22:13 ` Mojca Miklavec

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=6faad9f00810071438x1c8001d5j9be911bac9b665fa@mail.gmail.com \
    --to=mojca.miklavec.lists@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).