ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Matthijs Kooijman <matthijs@stdin.nl>
To: ntg-context@ntg.nl
Subject: Re: \typebuffer with typing style
Date: Tue, 9 Jun 2009 18:28:24 +0200	[thread overview]
Message-ID: <20090609162824.GK12271@katherina.student.utwente.nl> (raw)
In-Reply-To: <20090608162017.GC12271@katherina.student.utwente.nl>


[-- Attachment #1.1: Type: text/plain, Size: 1426 bytes --]

Hi all,

> <Snip question about styled \typebuffer>

Shortly after sending my email, I realized the actual problem I was trying to
solve was not the one I posted, so perhaps I can clarify that a bit.

What I'm trying to do, is pass some text to a custom command, which should
then be displayed in a custom typing style. It seems I can pass some text to a
command fine, even multiple lines:

  \define[1]\test{Lines: #1}

  \test{
    One line
    Two lines
    Three lines
  }

However, this will obviously not give me any typing style at all, just a
single line with all the words after eachother. I can't just use \starttyping
(or \startFOO, which was the actual goal of all this) inside a \define, since
that gives me:

  File ended while scanning use of \dododowithbuffer.

So, this made me look at using buffers, since I can pass in an entire buffer
and use \typebuffer to get it in a typing style. However, as mentioned before
I can't seem to be able to pass an actual style to \typebuffer (one defined
with \definetyping).

The only way I've found just now, is to use \setuptyping. However, that takes
effect for the rest of the document, so I have to reset the settings to their
defaults afterwards, destroying any custom settings that could have been set.
I can't seem to find a way to "push" the typing settings or save them somehow,
so this is not quite a perfect solution...

Any other suggestions?

Gr.

Matthijs

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

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

  parent reply	other threads:[~2009-06-09 16:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-08 16:20 Matthijs Kooijman
2009-06-08 17:20 ` Matthijs Kooijman
2009-06-09 16:28 ` Matthijs Kooijman [this message]
2009-06-09 17:11 ` Peter Münster
2009-06-10 13:52   ` Matthijs Kooijman
2009-06-10 15:53     ` Peter Münster

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=20090609162824.GK12271@katherina.student.utwente.nl \
    --to=matthijs@stdin.nl \
    --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).