Re: [NTG-context] can typesetbuffer use the same engine?

2021-11-05 Thread Rik Kabel via ntg-context


On 11/5/2021 11:18, Hans Hagen via ntg-context wrote:

On 11/5/2021 3:19 PM, Rik Kabel via ntg-context wrote:

Hello brain trust,

How can \typesetbuffer be instructed to use the same engine as the 
document which contains it?


With the following example:


\startbuffer[Buffer]
   \startTEXpage \contextmark \stopTEXpage
\stopbuffer
\starttext
   \contextmark\
   \typesetbuffer[Buffer]
\stoptext

I get "MKIV LMTX" when it is processed with context --luatex. I want 
the buffer to be processed as MkIV.

Does patching line 691 in buff-ini.lua

    template = (jit and "--jit --engine=luajittex" or 
"--engine=luatex") .. " --purgeall %?path: --path=%path% ?% %filename%",


work okay? Run "context --make" after patching.

Hans

Yes, that seems to do it. context --make and context --make --luatex 
were needed, I think.


--
Rik

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] can typesetbuffer use the same engine?

2021-11-05 Thread Hans Hagen via ntg-context

On 11/5/2021 3:19 PM, Rik Kabel via ntg-context wrote:

Hello brain trust,

How can \typesetbuffer be instructed to use the same engine as the 
document which contains it?


With the following example:


\startbuffer[Buffer]
   \startTEXpage \contextmark \stopTEXpage
\stopbuffer
\starttext
   \contextmark\
   \typesetbuffer[Buffer]
\stoptext

I get "MKIV LMTX" when it is processed with context --luatex. I want the 
buffer to be processed as MkIV.

Does patching line 691 in buff-ini.lua

template = (jit and "--jit --engine=luajittex" or 
"--engine=luatex") .. " --purgeall %?path: --path=%path% ?% %filename%",


work okay? Run "context --make" after patching.

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] can typesetbuffer use the same engine?

2021-11-05 Thread Rik Kabel via ntg-context

Hello brain trust,

How can \typesetbuffer be instructed to use the same engine as the 
document which contains it?


With the following example:


\startbuffer[Buffer]
  \startTEXpage \contextmark \stopTEXpage
\stopbuffer
\starttext
  \contextmark\
  \typesetbuffer[Buffer]
\stoptext

I get "MKIV LMTX" when it is processed with context --luatex. I want the 
buffer to be processed as MkIV.


--
Rik

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] How to define where \typesetbuffer store its pdf output ?

2021-06-13 Thread Garulfo

Hi all,

is there a mean to define where \typesetbuffer store its pdf output ?
(to avoid messing up the main directory).

Garuflo




___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] issues with \typesetbuffer

2018-04-18 Thread Pablo Rodriguez
On 04/18/2018 08:22 PM, Hans Hagen wrote:
> On 4/18/2018 6:38 PM, Pablo Rodriguez wrote:
>> Hans,
>>
>> I have the following sample:
>>
>>  \setuppapersize[A5][A4, landscape]
>>
>>  \setuparranging[2SIDE]
> works ok here but arranging might interfere (do that on the commandline)

Many thanks for your reply, Hans.

I was wrong, I only wanted to report the issue with fonts embedded
multiple times.

This sample shows the issue:

\startbuffer[a]\starttext\startTEXpage A\stopTEXpage\stoptext\stopbuffer
\startbuffer[b]\starttext\startTEXpage B\stopTEXpage\stoptext\stopbuffer
\startbuffer[c]\starttext\startTEXpage C\stopTEXpage\stoptext\stopbuffer
\starttext
    Just an empty page.
    \typesetbuffer[a]
\typesetbuffer[b]
\typesetbuffer[c]
\stoptext

The same font is embedded four times in the sample above.

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] issues with \typesetbuffer

2018-04-18 Thread Hans Hagen

On 4/18/2018 6:38 PM, Pablo Rodriguez wrote:

Hans,

I have the following sample:

 \setuppapersize[A5][A4, landscape]

 \setuparranging[2SIDE]

works ok here but arranging might interfere (do that on the commandline)


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] issues with \typesetbuffer

2018-04-18 Thread Pablo Rodriguez
Hans,

I have the following sample:

\setuppapersize[A5][A4, landscape]

\setuparranging[2SIDE]

\setuplayout

  [backspace=0pt,

topspace=0pt,

   width=middle,

  height=middle,

location=middle,

  header=0pt,

  footer=0pt]

\setupinteractionscreen[option=paper, copies=5]

\startbuffer[a]

\showframe

\setuppapersize[A5]

\setuppagenumbering[location=]

\setuplayout[width=middle]

\starttext

\mbox{}\vfill

\startalign[middle]

\dontleavehmode

\framedtext[width=10cm,

align={lohi, center},

foregroundstyle=\ssbfb]

{Just \tex{typesetbuffer}}

\stopalign\vfill

\stoptext

\stopbuffer

\startbuffer[b]

\showframe

\setuppapersize[A5]

\setuppagenumbering[location=]

\setuplayout[width=middle]

\starttext

\mbox{}\vfill

\startalign[middle]

\dontleavehmode

\framedtext[width=10cm,

align={lohi, center},

foregroundstyle=\ssbfb]

{Just another \tex{typesetbuffer}}

\stopalign\vfill

\stoptext

\stopbuffer

\startbuffer[c]

\showframe

\setuppapersize[A5]

\setuppagenumbering[location=]

\setuplayout[width=middle]

\starttext

\mbox{}\vfill

\startalign[middle]

\dontleavehmode

\framedtext[width=10cm,

align={lohi, center},

foregroundstyle=\ssbfb]

{And even another \tex{typesetbuffer}}

\stopalign\vfill

\stoptext

\stopbuffer

\starttext

\startmakeup[standard][style=\ssbfb, align=middle]

Just an empty page.

\stopmakeup

\typesetbuffer[a]

\typesetbuffer[b]

\typesetbuffer[c]

\stoptext


It contains three buffers. In 2013
(https://mailman.ntg.nl/pipermail/ntg-context/2013/075894.html), you
implemented a method to avoid renewed \typesetbuffer compilation, if
buffer and PDF document hadn’t been changed (by ckeching their MD5
checksums) and PDF document has been generated.

Now \typesetbuffer compiles the document every time the main document is
compiled (no matter whether the buffer or the PDF document haven’t been
modified).

Also the same fonts were embedded only once (as far as I can remember)
and now they are embedded multiple times.

Could you check the issues?

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] \definebodyfont not working for \typesetbuffer

2016-10-16 Thread Pablo Rodriguez
On 10/16/2016 08:16 PM, Wolfgang Schuster wrote:
>> Pablo Rodriguez 16. Oktober 2016 um 20:07
>> [...]
>> Neither does it work now.
> 
> Use \definebodyfontenvironment[17pt].

Many thanks for your fast reply, Wolfgang.

It works as expected.


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://context.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] \definebodyfont not working for \typesetbuffer

2016-10-16 Thread Wolfgang Schuster

Pablo Rodriguez <mailto:oi...@gmx.es>
16. Oktober 2016 um 20:07

Wolfgang,

I did it before sending the message and it didn’t work.

\startbuffer[buffer:inside]
\definebodyfont[17pt]
\definefontfamily[mainface][rm][TeX Gyre Pagella]
\setupbodyfont[mainface, 17pt]
\starttext
\input zapf
\stoptext
\stopbuffer
\starttext
\typesetbuffer[buffer:inside]
\stoptext

Neither does it work now.

Use \definebodyfontenvironment[17pt].

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://context.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] \definebodyfont not working for \typesetbuffer

2016-10-16 Thread Pablo Rodriguez
On 10/16/2016 07:59 PM, Wolfgang Schuster wrote:
>> Pablo Rodriguez 16. Oktober 2016 um 19:56
>> [...]
>> As suggested by Wolfgang, \definebodyfont should work. It worked then
>> (https://mailman.ntg.nl/pipermail/ntg-context/2016/085260.html), but it
>> doesn’t work with latest beta from 2016.10.14 17:19.
>>
>> Could you confirm whether it is a bug or I am missing something?
> 
> You have to put the command in the buffer because \typesetbuffer saves
> the content in a external file and which is then processed as separate
> document which doesn’t use settings from the main document.

Wolfgang,

I did it before sending the message and it didn’t work.

\startbuffer[buffer:inside]
\definebodyfont[17pt]
\definefontfamily[mainface][rm][TeX Gyre Pagella]
\setupbodyfont[mainface, 17pt]
\starttext
\input zapf
\stoptext
\stopbuffer
\starttext
\typesetbuffer[buffer:inside]
\stoptext

Neither does it work now.

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://context.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] \definebodyfont not working for \typesetbuffer

2016-10-16 Thread Wolfgang Schuster

Pablo Rodriguez <mailto:oi...@gmx.es>
16. Oktober 2016 um 19:56
Dear list,

I have the following sample:

\definebodyfont[17pt]
\startbuffer[buffer:inside]
\definefontfamily[mainface][rm][TeX Gyre Pagella]
\setupbodyfont[mainface, 17pt]
\starttext
\input zapf
\stoptext
\stopbuffer
\starttext
\typesetbuffer[buffer:inside]
\stoptext

As suggested by Wolfgang, \definebodyfont should work. It worked then
(https://mailman.ntg.nl/pipermail/ntg-context/2016/085260.html), but it
doesn’t work with latest beta from 2016.10.14 17:19.

Could you confirm whether it is a bug or I am missing something?

You have to put the command in the buffer because \typesetbuffer saves
the content in a external file and which is then processed as separate
document which doesn’t use settings from the main document.

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://context.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] \definebodyfont not working for \typesetbuffer

2016-10-16 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\definebodyfont[17pt]
\startbuffer[buffer:inside]
\definefontfamily[mainface][rm][TeX Gyre Pagella]
\setupbodyfont[mainface, 17pt]
\starttext
\input zapf
\stoptext
\stopbuffer
\starttext
\typesetbuffer[buffer:inside]
\stoptext

As suggested by Wolfgang, \definebodyfont should work. It worked then
(https://mailman.ntg.nl/pipermail/ntg-context/2016/085260.html), but it
doesn’t work with latest beta from 2016.10.14 17:19.

Could you confirm whether it is a bug or I am missing something?

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://context.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] typesetbuffer in \insertpages

2016-05-01 Thread Pablo Rodriguez
Dear list,

I have the following sample,

\setuppapersize[A5][A4, landscape]
\setuparranging[2UP]
\setuplayout
  [backspace=0pt,
topspace=0pt,
   width=middle,
  height=middle,
location=middle,
  header=0pt,
  footer=0pt]
\startbuffer[hola]
\mainlanguage[es]
\starttext
\dorecurse{32}{\input cervantes-es\par}
\stoptext
\stopbuffer
\starttext
\typesetbuffer[hola]
%~ \insertpages[{\typesetbuffer[hola]}][width=Opt]
\stoptext

Is there any way to make the commented \insertpages command work?

Or is there any way to force the PDF file name in \typesetbuffer?

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] font size inside a \typesetbuffer

2016-04-25 Thread Pablo Rodriguez
On 04/25/2016 10:21 AM, Wolfgang Schuster wrote:
>> Pablo Rodriguez 24. April 2016 um 12:23
>> [...]
>> The issue I’m experiencing is that no mainface is selected if the font
>> size is specified in \setupbodyfont.
>>
>> Am I missing something or have I hit a bug?
> [...]
> 2. Add \definebodyfont[17pt] at the begin of your document (should
>normally done by context itself when you use a undefined font size).

Many thanks for your reply, Wolfgang.

\definebodyfont works, but isn’t it a bug?

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] font size inside a \typesetbuffer

2016-04-25 Thread Wolfgang Schuster

Pablo Rodriguez <mailto:oi...@gmx.es>
24. April 2016 um 12:23
Dear list,

I have the following sample:

\startbuffer[buffer:inside]
\definefontfamily[mainface][rm][TeX Gyre Pagella]
\setupbodyfont[mainface, 17pt]
\starttext
\input zapf
\stoptext
\stopbuffer
\starttext
\typesetbuffer[buffer:inside]
\stoptext

The issue I’m experiencing is that no mainface is selected if the font
size is specified in \setupbodyfont.

Am I missing something or have I hit a bug?
Your problem is unrelated to \typesetbuffer and can be reproduced with 
the following example:


\definefontfamily[mainface][rm][TeX Gyre Pagella]

\starttext

\setupbodyfont[mainface, 17pt]

\input zapf

\stoptext


There are two solutions for this:

1. Use 17.3pt as fontsize because this is one of the predefined sizes.

2. Add \definebodyfont[17pt] at the begin of your document (should
   normally done by context itself when you use a undefined font size).


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] font size inside a \typesetbuffer

2016-04-24 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\startbuffer[buffer:inside]
\definefontfamily[mainface][rm][TeX Gyre Pagella]
\setupbodyfont[mainface, 17pt]
\starttext
\input zapf
\stoptext
\stopbuffer
\starttext
\typesetbuffer[buffer:inside]
\stoptext

The issue I’m experiencing is that no mainface is selected if the font
size is specified in \setupbodyfont.

Am I missing something or have I hit a bug?

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] two suggestions to \typesetbuffer

2013-11-10 Thread Hans Hagen

On 11/9/2013 12:49 PM, Pablo Rodriguez wrote:


Of course, fonts are embedded fine in documents, but \typesetbuffer is a
special case. Having the fonts embedded only once in the final document
would be better.


You can try the beta ... i'm not sure about it yes but this one is 
faster, we might end up with several methods to choose from depending on 
usage.


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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] two suggestions to \typesetbuffer

2013-11-10 Thread Pablo Rodriguez
On 11/10/2013 12:30 PM, Hans Hagen wrote:
 
 You can try the beta ... i'm not sure about it yes but this one is 
 faster, we might end up with several methods to choose from depending on 
 usage.

Many thanks for the improvement, Hans.

Compilation for the first time decreased from 210 seconds to 181
seconds. And subsequent compilations decreased from 70 seconds to 7 seconds.

The sample shows the issue with embedded fonts:

\starttext
These are bufers:

\startbuffer[text:1]
\setuppapersize[A7]
\starttext\input tufte\stoptext
\stopbuffer
\typesetbuffer[text:1][frame=on]

\startbuffer[text:2]
\setuppapersize[A7]
\starttext\input knuth\stoptext
\stopbuffer
\typesetbuffer[text:2][frame=on]
\stoptext

The same font is embedded three times in the final PDF. I wonder whether
it would be possible that the font would be only embedded once in the
final PDF.

Many thanks for your excellent work,


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] two suggestions to \typesetbuffer

2013-11-10 Thread Hans Hagen

On 11/10/2013 1:32 PM, Pablo Rodriguez wrote:

On 11/10/2013 12:30 PM, Hans Hagen wrote:


You can try the beta ... i'm not sure about it yes but this one is
faster, we might end up with several methods to choose from depending on
usage.



The same font is embedded three times in the final PDF. I wonder whether
it would be possible that the font would be only embedded once in the
final PDF.


unless something is wrong in the engine, the actual shapes of fonts 
should be shared but it looks like the subsets are embedded anyway ... 
something to look into (not a context issue afaiks)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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] two suggestions to \typesetbuffer

2013-11-09 Thread Pablo Rodriguez
On 11/08/2013 11:39 PM, Hans Hagen wrote:
 On 11/8/2013 7:11 PM, Pablo Rodriguez wrote:
 Dear Hans,

 I have presentations that include buffers typeset with \typesetbuffer.

 One of the presentation includes 33 buffers, which are small ConTeXt
 samples.

 Any time I change anything on the presentation (not on the buffers
 themselves), every buffer is typeset again. And the compilation time is
 longer than probably desired.

 My first suggestion would be to skip compiling buffers again, if the
 following three requirements are met:

 1. Buffer content (.tmp file, I guess) is identical (checked with a
 hash) with the previous one from last compilation.
 
 no temp file is used but a although a hash is possible it also means a 
 lot of extra housekeeping due to the fact that buffers are reused (in 
 which case no run happens)

Compiling the presentation I‘m talking about for the first time on my
laptop takes about 210 seconds. Every subsequent compilation takes about
70 seconds.

I know my laptop is old and slow.

But if I make a copy of the presentation source and remove the
\typesetbuffer commands, first compilation takes about 22 seconds and
subsequent compilations take about 7 seconds.

I have no idea on how ConTeXt works internally, but what I’m trying to
say is that if \typesetbuffer has been already compiled, compiling again
is no gain.

 3. Buffer content was correctly compiled in previous compilation.
 
 define correctly

I meant completely compiled: PDF has been generated.

 My second suggestion may be a bit complex to implement, but I think it
 would be useful. Wouldn’t it be possible that the fonts are only
 embedded one in the presentation?
 
 how often does it happen ... if we're talking about one page files 
 processing should normally fast e.g.
 
 \setupbodyfont[pagella] \starttext \input tufte \stoptext
 
 takes .3 seconds on my laptop.
 
 normally fonts are embedded efficiently (subsets) and shared

Sorry, there was a typo in my message: “that fonts are only embedded
once in the presentation”.

My second suggestion isn’t about compilation time, but about duplicated
fonts.

I tried to provide a sample, but I don’t know why it doesn’t work:

\starttext
These are bufers:

\dorecurse{10}{\startbuffer[text:\recurselevel]\setuppapersize[A7]\starttext\input
tufte\stoptext\stopbuffer\typesetbuffer[text:\recurselevel][frame=on]}
\stoptext

Of course, fonts are embedded fine in documents, but \typesetbuffer is a
special case. Having the fonts embedded only once in the final document
would be better.

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] two suggestions to \typesetbuffer

2013-11-09 Thread Wolfgang Schuster

Am 09.11.2013 um 12:49 schrieb Pablo Rodriguez oi...@gmx.es:

 On 11/08/2013 11:39 PM, Hans Hagen wrote:
 On 11/8/2013 7:11 PM, Pablo Rodriguez wrote:
 Dear Hans,
 
 I have presentations that include buffers typeset with \typesetbuffer.
 
 One of the presentation includes 33 buffers, which are small ConTeXt
 samples.
 
 Any time I change anything on the presentation (not on the buffers
 themselves), every buffer is typeset again. And the compilation time is
 longer than probably desired.
 
 My first suggestion would be to skip compiling buffers again, if the
 following three requirements are met:
 
 1. Buffer content (.tmp file, I guess) is identical (checked with a
 hash) with the previous one from last compilation.
 
 no temp file is used but a although a hash is possible it also means a 
 lot of extra housekeeping due to the fact that buffers are reused (in 
 which case no run happens)
 
 Compiling the presentation I‘m talking about for the first time on my
 laptop takes about 210 seconds. Every subsequent compilation takes about
 70 seconds.
 
 I know my laptop is old and slow.
 
 But if I make a copy of the presentation source and remove the
 \typesetbuffer commands, first compilation takes about 22 seconds and
 subsequent compilations take about 7 seconds.
 
 I have no idea on how ConTeXt works internally, but what I’m trying to
 say is that if \typesetbuffer has been already compiled, compiling again
 is no gain.

Try the filter module: https://github.com/adityam/filter

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] two suggestions to \typesetbuffer

2013-11-08 Thread Pablo Rodriguez
Dear Hans,

I have presentations that include buffers typeset with \typesetbuffer.

One of the presentation includes 33 buffers, which are small ConTeXt
samples.

Any time I change anything on the presentation (not on the buffers
themselves), every buffer is typeset again. And the compilation time is
longer than probably desired.

My first suggestion would be to skip compiling buffers again, if the
following three requirements are met:

1. Buffer content (.tmp file, I guess) is identical (checked with a
hash) with the previous one from last compilation.

2. PDF file hasn’t been changed since previous complete compilation (md5
sum again).

3. Buffer content was correctly compiled in previous compilation.

My second suggestion may be a bit complex to implement, but I think it
would be useful. Wouldn’t it be possible that the fonts are only
embedded one in the presentation?

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] two suggestions to \typesetbuffer

2013-11-08 Thread Hans Hagen

On 11/8/2013 7:11 PM, Pablo Rodriguez wrote:

Dear Hans,

I have presentations that include buffers typeset with \typesetbuffer.

One of the presentation includes 33 buffers, which are small ConTeXt
samples.

Any time I change anything on the presentation (not on the buffers
themselves), every buffer is typeset again. And the compilation time is
longer than probably desired.

My first suggestion would be to skip compiling buffers again, if the
following three requirements are met:

1. Buffer content (.tmp file, I guess) is identical (checked with a
hash) with the previous one from last compilation.


no temp file is used but a although a hash is possible it also means a 
lot of extra housekeeping due to the fact that buffers are reused (in 
which case no run happens)



2. PDF file hasn’t been changed since previous complete compilation (md5
sum again).


takes time so less to gain there


3. Buffer content was correctly compiled in previous compilation.


define correctly


My second suggestion may be a bit complex to implement, but I think it
would be useful. Wouldn’t it be possible that the fonts are only
embedded one in the presentation?


how often does it happen ... if we're talking about one page files 
processing should normally fast e.g.


\setupbodyfont[pagella] \starttext \input tufte \stoptext

takes .3 seconds on my laptop.

normally fonts are embedded efficiently (subsets) and shared

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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] include two pages from typesetbuffer

2013-08-10 Thread Pablo Rodríguez
On 08/09/2013 11:42 PM, Hans Hagen wrote:
 [...]
 actually there was already a test for that but i made a better one, so 
 now we have:
 
 \starttext
 
  \enabletrackers[buffers.run]
 
  \startbuffer [sample]
  \starttext
  \startTEXpage[offset=10pt] one   \stopTEXpage
  \startTEXpage[offset=10pt] two   \stopTEXpage
  \startTEXpage[offset=10pt] three \stopTEXpage
  \stoptext
  \stopbuffer
 
  \typesetbuffer[sample][frame=on,page=1]
  \typesetbuffer[sample][frame=on,page=2]
  \typesetbuffer[sample][frame=on,page=3]
 
  \externalfigure[\lasttypesetbuffer][frame=on,page=2]
 
  \typesetbuffer[*][frame=on,page=3]
 
 \stoptext

Many thanks for the improvement, Hans.

Wikified at http://wiki.contextgarden.net/Command/typesetbuffer.


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
___


[NTG-context] \typesetbuffer at wiki

2013-08-10 Thread Pablo Rodríguez
Dear list,

I have just created http://wiki.contextgarden.net/Command/typesetbuffer.

In the typeset sample, it seems that \typesetbuffer doesn’t work at the
wiki (it doesn’t include the image).

Am I missing something here?

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] \typesetbuffer at wiki

2013-08-10 Thread Sietse Brouwer
Hi Pablo,

This is probably a backend problem. I know that examples where
multiple pages are imposed onto one sheet also don’t work; this is
probably similar. I might look into it at some point, try to improve
the php, but it’s not a priority. (Unless you think it should be.)

Cheers,
Sietse

On 10 August 2013 12:06, Pablo Rodríguez oi...@web.de wrote:
 Dear list,

 I have just created http://wiki.contextgarden.net/Command/typesetbuffer.

 In the typeset sample, it seems that \typesetbuffer doesn’t work at the
 wiki (it doesn’t include the image).

 Am I missing something here?

 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
 ___
___
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] \typesetbuffer at wiki

2013-08-10 Thread Pablo Rodríguez
On 08/10/2013 01:51 PM, Sietse Brouwer wrote:
 Hi Pablo,
 
 This is probably a backend problem. I know that examples where
 multiple pages are imposed onto one sheet also don’t work; this is
 probably similar. I might look into it at some point, try to improve
 the php, but it’s not a priority. (Unless you think it should be.)

Hi Sietse,

this is fine for me. I guess the sample is understandable even with the
pages.

Best,


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] include two pages from typesetbuffer

2013-08-09 Thread Pablo Rodríguez
On 08/08/2013 10:40 PM, Hans Hagen wrote:
 On 8/8/2013 10:15 PM, Hans Hagen wrote:
 On 8/8/2013 9:01 PM, Pablo Rodríguez wrote:
 Dear list,

 I would like to be able to include the first two pages of a typeset
 buffer (included with \typesetbuffer[sample][frame=on]).

 Is there any way to do this? I’d like to avoid to save the buffer to a
 file.

 \typesetbuffer[sample][frame=on,page=1]
 \typesetbuffer[sample][frame=on,page=2]
 
 as that runs the buffer twice the next beta will provide  this:

Many thanks, Hans, for the new feature.

I can wikify it, if you want me to do it. But I have a question before.

Wouldn’t it be easier that ConTeXt detects when a buffer has already
been typeset and automatically does all the work internally?

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] include two pages from typesetbuffer

2013-08-09 Thread Hans Hagen

On 8/9/2013 9:39 PM, Pablo Rodríguez wrote:

On 08/08/2013 10:40 PM, Hans Hagen wrote:

On 8/8/2013 10:15 PM, Hans Hagen wrote:

On 8/8/2013 9:01 PM, Pablo Rodríguez wrote:

Dear list,

I would like to be able to include the first two pages of a typeset
buffer (included with \typesetbuffer[sample][frame=on]).

Is there any way to do this? I’d like to avoid to save the buffer to a
file.


\typesetbuffer[sample][frame=on,page=1]
\typesetbuffer[sample][frame=on,page=2]


as that runs the buffer twice the next beta will provide  this:


Many thanks, Hans, for the new feature.

I can wikify it, if you want me to do it. But I have a question before.

Wouldn’t it be easier that ConTeXt detects when a buffer has already
been typeset and automatically does all the work internally?


actually there was already a test for that but i made a better one, so 
now we have:


\starttext

\enabletrackers[buffers.run]

\startbuffer [sample]
\starttext
\startTEXpage[offset=10pt] one   \stopTEXpage
\startTEXpage[offset=10pt] two   \stopTEXpage
\startTEXpage[offset=10pt] three \stopTEXpage
\stoptext
\stopbuffer

\typesetbuffer[sample][frame=on,page=1]
\typesetbuffer[sample][frame=on,page=2]
\typesetbuffer[sample][frame=on,page=3]

\externalfigure[\lasttypesetbuffer][frame=on,page=2]

\typesetbuffer[*][frame=on,page=3]

\stoptext


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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] include two pages from typesetbuffer

2013-08-08 Thread Pablo Rodríguez
Dear list,

I would like to be able to include the first two pages of a typeset
buffer (included with \typesetbuffer[sample][frame=on]).

Is there any way to do this? I’d like to avoid to save the buffer to a file.

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] include two pages from typesetbuffer

2013-08-08 Thread Hans Hagen

On 8/8/2013 9:01 PM, Pablo Rodríguez wrote:

Dear list,

I would like to be able to include the first two pages of a typeset
buffer (included with \typesetbuffer[sample][frame=on]).

Is there any way to do this? I’d like to avoid to save the buffer to a file.


\typesetbuffer[sample][frame=on,page=1]
\typesetbuffer[sample][frame=on,page=2]

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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] include two pages from typesetbuffer

2013-08-08 Thread Hans Hagen

On 8/8/2013 10:15 PM, Hans Hagen wrote:

On 8/8/2013 9:01 PM, Pablo Rodríguez wrote:

Dear list,

I would like to be able to include the first two pages of a typeset
buffer (included with \typesetbuffer[sample][frame=on]).

Is there any way to do this? I’d like to avoid to save the buffer to a
file.


\typesetbuffer[sample][frame=on,page=1]
\typesetbuffer[sample][frame=on,page=2]


as that runs the buffer twice the next beta will provide  this:

\starttext

\startbuffer [sample]
\starttext
\startTEXpage[offset=10pt] one   \stopTEXpage
\startTEXpage[offset=10pt] two   \stopTEXpage
\startTEXpage[offset=10pt] three \stopTEXpage
\stoptext
\stopbuffer

\typesetbuffer[sample][frame=on,page=1]

\externalfigure[\lasttypesetbuffer][frame=on,page=2]

\typesetbuffer[*][frame=on,page=3]

\stoptext

please wikify this after testing

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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] \typesetbuffer adds \starttext ... \stoptext

2011-01-30 Thread Peter Münster
Hello,

It would be nice, if \typesetbuffer wouldn't add anything to the buffer.

Here an example, where the outer \starttext ... \stoptext environment
deranges:

\starttext
\startbuffer[pdf-pages]
  \setuppapersize[A7, landscape]
  \showframe
  \starttext
  page 1 \page page 2
  \stoptext
\stopbuffer
\typesetbuffer[pdf-pages][page=2, frame=on, width=10cm]
\stoptext

-- 
   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] \typesetbuffer adds \starttext ... \stoptext

2011-01-30 Thread Wolfgang Schuster

Am 30.01.2011 um 19:52 schrieb Peter Münster:

 Hello,
 
 It would be nice, if \typesetbuffer wouldn't add anything to the buffer.
 
 Here an example, where the outer \starttext ... \stoptext environment
 deranges:

Why, context ignores the inner starttext/stoptext pair.

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
___


Re: [NTG-context] \typesetbuffer adds \starttext ... \stoptext

2011-01-30 Thread Peter Münster
Wolfgang Schuster schuster.wolfg...@googlemail.com writes:

 It would be nice, if \typesetbuffer wouldn't add anything to the buffer.
 
 Here an example, where the outer \starttext ... \stoptext environment
 deranges:

 Why, context ignores the inner starttext/stoptext pair.

Wrong interpretation of the problem: it's the
\setuppapersize[][samesized] that is broken...

Nevertheless: are there situations, where the outer starttext/stoptext
could cause some trouble?

-- 
   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] \typesetbuffer adds \starttext ... \stoptext

2011-01-30 Thread Vnpenguin
On Sun, Jan 30, 2011 at 19:52, Peter Münster pmli...@free.fr wrote:
 Hello,

 It would be nice, if \typesetbuffer wouldn't add anything to the buffer.

Yep, I agree that. Don't know why need add something to buffer ?
___
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] \typesetbuffer adds \starttext ... \stoptext

2011-01-30 Thread Wolfgang Schuster

Am 30.01.2011 um 20:23 schrieb Vnpenguin:

 On Sun, Jan 30, 2011 at 19:52, Peter Münster pmli...@free.fr wrote:
 Hello,
 
 It would be nice, if \typesetbuffer wouldn't add anything to the buffer.
 
 Yep, I agree that. Don't know why need add something to buffer ?

\typesetbuffer add \starttext before and \stoptext after the buffer
because it write the buffer content to a external file and process
this file as a separate document which can be included as figure.

This is a useful feature for documentation.

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
___


Re: [NTG-context] \typesetbuffer adds \starttext ... \stoptext

2011-01-30 Thread Wolfgang Schuster

Am 30.01.2011 um 20:20 schrieb Peter Münster:

 Nevertheless: are there situations, where the outer starttext/stoptext
 could cause some trouble?

Don’t think so because when you use the project structure you have

\startproduct

\startcomponent
…
\stopcomponent

\startcomponent
…
\stopcomponent

\stopproduct

where both \startproduct and \startcomponent act as \starttext
and only the first is is used as real \starttext while the others
are ignored.

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
___