Re: [NTG-context] apply typing environment to \typebuffer

2014-01-15 Thread Pablo Rodriguez
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
___


Re: [NTG-context] apply typing environment to \typebuffer

2014-01-15 Thread Peter Münster
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
___


Re: [NTG-context] apply typing environment to \typebuffer

2014-01-15 Thread Pablo Rodriguez
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
___


Re: [NTG-context] apply typing environment to \typebuffer

2014-01-15 Thread Wolfgang Schuster

Am 15.01.2014 um 20:42 schrieb Pablo Rodriguez oi...@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
___


[NTG-context] apply typing environment to \typebuffer

2014-01-14 Thread Pablo Rodriguez
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
___


Re: [NTG-context] apply typing environment to \typebuffer

2014-01-14 Thread Marco Patzer
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


signature.asc
Description: Digital signature
___
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
___