ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* apply typing environment to \typebuffer
@ 2014-01-14 21:53 Pablo Rodriguez
  2014-01-15  0:12 ` Marco Patzer
  0 siblings, 1 reply; 6+ messages in thread
From: Pablo Rodriguez @ 2014-01-14 21:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear list,

I have a presentation that defines a typing environment and I would like
to know who to apply it to \typebuffer.

Here is a sample:

\definetyping[TeXcode][option=TEX]
\starttext
\startbuffer[a]
\starttext
\input knuth
\stoptext
\stopbuffer

\typesetbuffer[a]

\typebuffer[a]
\stoptext

Of course, the defined typing environment is richer in the presentation.

How could I get \typebuffer to use TeXcode?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: apply typing environment to \typebuffer
  2014-01-14 21:53 apply typing environment to \typebuffer Pablo Rodriguez
@ 2014-01-15  0:12 ` Marco Patzer
  2014-01-15 19:42   ` Pablo Rodriguez
  0 siblings, 1 reply; 6+ messages in thread
From: Marco Patzer @ 2014-01-15  0:12 UTC (permalink / raw)
  To: ntg-context


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

On 2014–01–14 Pablo Rodriguez wrote:

> I have a presentation that defines a typing environment and I would like
> to know who to apply it to \typebuffer.
> 
> Here is a sample:
> 
> \definetyping[TeXcode][option=TEX]

Use:

  \setuptyping
    [buffer]
    [option=TEX]

This applies globally, though. If that's not desired you can pass
options to the \typebuffer command:

  \typebuffer
    [a]
    [option=TEX]

Passing a previously defined environment is not supported:

  %% doesn't work
  \typebuffer
    [a]
    [TeXcode]

Marco

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

[-- Attachment #2: Type: text/plain, Size: 485 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: apply typing environment to \typebuffer
  2014-01-15  0:12 ` Marco Patzer
@ 2014-01-15 19:42   ` Pablo Rodriguez
  2014-01-15 19:50     ` Peter Münster
  2014-01-15 23:43     ` Wolfgang Schuster
  0 siblings, 2 replies; 6+ messages in thread
From: Pablo Rodriguez @ 2014-01-15 19:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 01/15/2014 01:12 AM, Marco Patzer wrote:
> On 2014–01–14 Pablo Rodriguez wrote:
> 
>> I have a presentation that defines a typing environment and I would like
>> to know who to apply it to \typebuffer.
> 
> Use:
> 
>   \setuptyping
>     [buffer]
>     [option=TEX]

Many thanks for your reply, Marco.

This is exactly what I wanted. Although I’m afraid that this breaks the
\typesetbuffer (since it typesets an empty buffer).

Here is a more detailed sample:

\definetyping[buffer][option=TEX,before=\startframedtext,after=\stopframedtext]
\setuptyping[buffer][style=\tt\setupinterlinespace,align={right,broad}]

\starttext
\startbuffer[basic-document]
\mainlanguage[es]
\setuppapersize[A5,landscape]
\setuppagenumbering[location=bottom]

\starttext

\chapter{Introducción}

\ConTeXt\ is {\en\em a document generation system}.

\stoptext
\stopbuffer

\typebuffer[basic-document]

\typesetbuffer[basic-document][frame=on,scale=750]

\stoptext

I guess this might be a bug.

Could anyone confirm this?


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: apply typing environment to \typebuffer
  2014-01-15 19:42   ` Pablo Rodriguez
@ 2014-01-15 19:50     ` Peter Münster
  2014-01-15 20:11       ` Pablo Rodriguez
  2014-01-15 23:43     ` Wolfgang Schuster
  1 sibling, 1 reply; 6+ messages in thread
From: Peter Münster @ 2014-01-15 19:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, Jan 15 2014, Pablo Rodriguez wrote:

> \definetyping[buffer][option=TEX,before=\startframedtext,after=\stopframedtext]
> \setuptyping[buffer][style=\tt\setupinterlinespace,align={right,broad}]

Why "\definetyping[buffer]" ?  \typebuffer is already defined.

Shouldn't it be:

\setuptyping[buffer][style=\tt\setupinterlinespace,align={right,broad},
        option=TEX,before=\startframedtext,after=\stopframedtext]

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: apply typing environment to \typebuffer
  2014-01-15 19:50     ` Peter Münster
@ 2014-01-15 20:11       ` Pablo Rodriguez
  0 siblings, 0 replies; 6+ messages in thread
From: Pablo Rodriguez @ 2014-01-15 20:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 01/15/2014 08:50 PM, Peter Münster wrote:
> On Wed, Jan 15 2014, Pablo Rodriguez wrote:
> 
>> \definetyping[buffer][option=TEX,before=\startframedtext,after=\stopframedtext]
>> \setuptyping[buffer][style=\tt\setupinterlinespace,align={right,broad}]
> 
> Why "\definetyping[buffer]" ?  \typebuffer is already defined.
> 
> Shouldn't it be:
> 
> \setuptyping[buffer][style=\tt\setupinterlinespace,align={right,broad},
>         option=TEX,before=\startframedtext,after=\stopframedtext]
> 

Of course, Peter, you’re right.

Many thanks for pointing this out.

I simply copied and pasted a code for an already-defined typing
environment and replaced the name in both \definetyping and \setuptyping
without realizing that buffer was already defined.

Many thanks again for your help,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: apply typing environment to \typebuffer
  2014-01-15 19:42   ` Pablo Rodriguez
  2014-01-15 19:50     ` Peter Münster
@ 2014-01-15 23:43     ` Wolfgang Schuster
  1 sibling, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2014-01-15 23:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 15.01.2014 um 20:42 schrieb Pablo Rodriguez <oinos@gmx.es>:

> On 01/15/2014 01:12 AM, Marco Patzer wrote:
>> On 2014–01–14 Pablo Rodriguez wrote:
>> 
>>> I have a presentation that defines a typing environment and I would like
>>> to know who to apply it to \typebuffer.
>> 
>> Use:
>> 
>>  \setuptyping
>>    [buffer]
>>    [option=TEX]
> 
> Many thanks for your reply, Marco.
> 
> This is exactly what I wanted. Although I’m afraid that this breaks the
> \typesetbuffer (since it typesets an empty buffer).
> 
> Here is a more detailed sample:
> 
> \definetyping[buffer][option=TEX,before=\startframedtext,after=\stopframedtext]

This is the worst thing you can do because \definetyping[buffer] creates the new environment

   \startbuffer … \stopbuffer

which overwrites the existing buffer environment.

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-01-15 23:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-14 21:53 apply typing environment to \typebuffer Pablo Rodriguez
2014-01-15  0:12 ` Marco Patzer
2014-01-15 19:42   ` Pablo Rodriguez
2014-01-15 19:50     ` Peter Münster
2014-01-15 20:11       ` Pablo Rodriguez
2014-01-15 23:43     ` Wolfgang Schuster

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).