://wiki.contextgarden.net/Command/typesetbuffer
My biggest book is about 200 pages. It takes 4 minutes to fully typeset on an
M1 Mac. (I saw this time after downloading a new ConTeXt version.) This is
mostly due to the 100+ complex TikZ diagrams. However, all of those diagrams
are buffered, and when
\typesetbuffer[demo]
2. How do I organize this according to TDS for sharing? I know what TDS is and
why it’s important, but that’s about it!
Hraban will guide you here.
3. Should I be creating a namespace for this module, or launching a separate
MetaFun instance? I have a general sense of what
}
\dorecurse{4}{\samplefile{tufte}\par}
}
\stoptext
\stopbuffer
\startplacefigure[location=here,reference=fig:vz-1,title={Cheating with
vertical expansion: \type {[vz=no]}.}]
\startcombination[4*1]
{\typesetbuffer[vz-1][width=\combinationwidth,page=1,frame=on]} {}
{\typesetbuffer[vz-1
\dorecurse {10} {
\startcombination[2*2]
{\hbox to .45\textwidth{\typesetbuffer[threshold-none]
[frame=on,width=.45\textwidth,page=#1]\hss}} {\type {threshold=none}}
{\hbox to .45\textwidth{\typesetbuffer[threshold-small]
[frame=on,width=.45\textwidth,page=#1]\
get the error message.
What you can try is to replace \getrandomnumber and "page=\n" with
"page=\randomnumber{...}{...}".
\startbuffer[dummyfile]
\dorecurse{10}{\centerbox{\definedfont[Sans sa 10]Page \recurselevel}}
\stopbuffer
\setuplayout[page]
\starttext
%\getrandomnumber\n
][align=center]
\dontleavehmode
\typesetbuffer[flag]
\stopmakeup
\stoptext
The image can be found at https://pdf.ousia.tk/uk-flag.pdf.
Compiling it with latest from 2021.11.11 19:24, the final PDF contains
the flag.
I’m not sure whether there was another version (before the current
latest
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
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
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 "
et the buffers to make the figures:
\startbuffer[MyTikZFigure]
% TikZ code here
\stopbuffer
\startplacefigure[reference=MyFig, title={This is the figure’s caption}]
\typesetbuffer[starttikz, MyTikZFigure,stoptikz]
\stopplacefigure
Following a suggestion from Hans, I made
]% Lots of setup can go here!
\startTEXpage
\starttikzpicture
\stopbuffer
\startbuffer[stoptikz]
\stoptikzpicture
\stopTEXpage
\stopbuffer
\define[2]\marginTikZ{
\startplacefigure[location=margin, reference=fig:#1, title={#2}]
\typesetbuffer[starttikz,#1,stoptikz
On 7/8/2021 7:55 PM, Gavin wrote:
Hello,
I have a book containing many margin figures drawn with TikZ, which is very
slow. By putting the TikZ code in a buffer and using \typesetbuffer only
altered TikZ code is executed on each run, saving tremendous time. This means
the code containsmany
Hello,
I have a book containing many margin figures drawn with TikZ, which is very
slow. By putting the TikZ code in a buffer and using \typesetbuffer only
altered TikZ code is executed on each run, saving tremendous time. This means
the code containsmany constructions like this, which I would
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
you could use \typesetbuffer and \startMPpage ... \stopMPpage instead. Two
> auxiliary PDF files with funny names are generated.
This indeed works as advertised. I will play with it.
Thanks!
Gavin
___
If your qu
It seems \startstarticMPfigure ... \stopstaticMPfigure is now a wrapper for
reusable MP graphics, so auxiliary files are no longer generated. I don't
think this counts as an answer but you could use \typesetbuffer and
\startMPpage ... \stopMPpage instead. Two auxiliary PDF files with funny
case the buffer only gets typeset when it changes:
>
> Thank you (and Henri)! But we’d need to include the same setup header every
> time, so the filter module is probably really the best way.
It is not only the tikz setup; you also need to copy the font setup etc.
\typesetbuffer[setu
buffer[foo]
% maybe include a style / enviroment
\usemodule[tikz] \usetikzlibrary[patterns]
\startTEXpage
\starttikzpicture
\draw[pattern color=red,pattern=bricks] (0,0) circle (1cm);
\stoptikzpicture
\stopTEXpage
\stopbuffer
\framed[offset=overlay]{\typ
needs
concurrent compiling and execution),
you only need to process those snippets when something has changed and
there are ways in context to deal with that (like \typesetbuffer and
such which only processes when something changed between runs)
- containing multiple MetaFun graphics,
those don
ed 10 withcolor red ;
\stopMPpage
\stopbuffer
\typesetbufferonly[square]
\startbuffer[circle]
\startMPpage
draw fullcircle scaled 10 withcolor green ;
\stopMPpage
\stopbuffer
\typesetbuffer[circle]
\startbuffer[triangle]
\startMPpage
draw fulltriangle scal
of the first page to your document afterwards.
I’m not sure I’m getting this: do you mean something similar to
\typesetbuffer?
Many thanks for your help,
Pablo
--
http://www.ousia.tk
___
If your question is of interest
ia t-filter?
>> If you need a MWE for this, I’ll assemble one. My actual setup is quite
>> complicated, maybe that’s the problem...
> \starttext
>
>\startbuffer[old-feature]
>% load the relevant environment if needed
>It works!
>\stopbuffer
&g
he problem...
\starttext
\startbuffer[old-feature]
% load the relevant environment if needed
It works!
\stopbuffer
\typesetbuffer[old-feature][frame=on,width=4cm]
\stoptext
Only when buffers change they will be retype
ult of a
>> startdarmakeup, as in the following pdf.
>>
>> http://www.pragma-ade.com/show-art.pdf#[0,{%22name%22:%22Fit%22}]
>
> \setuppapersize[A4,landscape]
>
> \starttext
>
> \startbuffer[standardmakeup]
> \startstandardmakeup
> Hello
> \stopstandardm
how the result of a
>> startdarmakeup, as in the following pdf.
>>
>> http://www.pragma-ade.com/show-art.pdf#[0,{%22name%22:%22Fit%22}]
>
> \setuppapersize[A4,landscape]
>
> \starttext
>
> \startbuffer[standardmakeup]
> \startstandardmakeup
> Hello
> \s
:%22Fit%22}]
\setuppapersize[A4,landscape]
\starttext
\startbuffer[standardmakeup]
\startstandardmakeup
Hello
\stopstandardmakeup
\stopbuffer
\typesetbuffer[standardmakeup][frame=on,height=\textheight]
\stoptext
Wolfgang
y, -2, 1/2}]
> >>>>>
> >>>>> Brut force:
> >>>>> [...]
> >>>>>
> >>>> as this takes some time here's a cheat:
> >>>>
> >>>> \starttext
> >>>>
> >>>> \startbu
qvist" wrote:
ContourPlot[2 x^5 + x y + y^5 == 0, {x, 0, 2}, {y, -2, 1/2}]
Brut force:
[...]
as this takes some time here's a cheat:
\starttext
\startbuffer[demo]
[...]
\stopbuffer
\startTEXpage
\typesetbuffer[demo]
\stopTEXpage
\stoptext
a next run the already prepared buffer will
= 0, {x, 0, 2}, {y, -2, 1/2}]
Brut force:
[...]
as this takes some time here's a cheat:
\starttext
\startbuffer[demo]
[...]
\stopbuffer
\startTEXpage
\typesetbuffer[demo]
\stopTEXpage
\stoptext
a next run the already prepared buffer will be taken unles it has been
changed.
I th
gt;> ContourPlot[2 x^5 + x y + y^5 == 0, {x, 0, 2}, {y, -2, 1/2}]
> >>
> >> Brut force:
> >> [...]
> >>
> > as this takes some time here's a cheat:
> >
> > \starttext
> >
> > \startbuffer[demo]
> > [...]
> > \
t
\startbuffer[demo]
[...]
\stopbuffer
\startTEXpage
\typesetbuffer[demo]
\stopTEXpage
\stoptext
a next run the already prepared buffer will be taken unles it has been
changed.
I thought that this will also be a good usecase of showing Lua+MP
interaction. I wrote the code below follow
c,lrcorner pic]) ;
endfor ;
for y=0 step .5 until 2.5 :
label.lft(decimal (y-2),(y/2.5)[llcorner pic,ulcorner pic]) ;
endfor ;
\stopMPcode
\stopbuffer
\startTEXpage
\typesetbuffer[demo]
\stopTEXpage
\stoptext
a next run the already pre
his file be loaded?
\stopbuffer
\typesetbuffer[scale=500]
\stoptext
end example
or when I try to insert cow.pdf
begin example
\setupexternalfigure[location=default]
\starttext
\externalfigure[cow]
\stoptext
end example
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 than
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)
-
,
align={lohi, center},
foregroundstyle=\ssbfb]
{Just \tex{typesetbuffer}}
\stopalign\vfill
\stoptext
\stopbuffer
\startbuffer[b]
\showframe
\setuppapersize[A5]
\setuppagenumbering[location=]
\setuplayout[width=middle]
\starttext
\mbox
tion[state=start]
\setupinteractionscreen[option={landscape}]
\starttext
\startbuffer[real-document]
\setuppapersize[A5]%% this might be removed
\starttext
a\index{b}
b\index{c}
c\index{d}
\placeindex
\stoptext
\stopbuffer
{whereever}
\xmldoifelseempty{#1}{../pre[contains(@class,'fullwidth')]}
{\startalign[center]\dontleavehmode\typesetbuffer[whereever][width=.5\textwidth]\stopalign}
{\startalign[center]\dontleavehmode\typesetbuffer[whereever][width=\textwidth]\stopalign}
\stopxmlsetups
\starttext
\x
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
_
optext
\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
n’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
rttext
\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 som
\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
format | |
| | | |
| | | |
| | | |
| | | |
| +-+ |
| |
| |
| |
| |
| |
| |
| |
+--+
\starttext
\startbuffer[ward]
\setuppapersize[A5]
\showframe
\starttext
\subject{Ward}
\input ward
\stoptext
\stopbuffer
\startplacefigure[title={Creating a example with \tex{typesetbuffer}}]
\typesetbuffer[ward][width=.5\tex
]
\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
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[1
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:
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
>>
>> 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).
>
> Her
ion=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[b
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
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
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 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
Am 09.11.2013 um 12:49 schrieb 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.
>>>
>>&
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
&g
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
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
file produced!
\starttext
\startbuffer [foo]
foo
\stopbuffer
\typesetbuffer [foo]
\startbuffer [foo]
foo
\stopbuffer
\typesetbuffer [foo]
\stoptext
i uploaded a fix (some additional checking on redefining such buffers)
.. the backend keeps the file open (which is where the messa
\stopbuffer
\typesetbuffer [foo]
\startbuffer [foo]
foo
\stopbuffer
\typesetbuffer [foo]
\stoptext
Marco
signature.asc
Description: Digital signature
___
If your question is of interest to others as wel
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 priorit
10 August 2013 12:06, Pablo Rodríguez 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 somethi
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
\startTEXpage[offset=10pt] one \stopTEXpage
> \startTEXpage[offset=10pt] two \stopTEXpage
> \startTEXpage[offset=10pt] three \stopTEXpage
> \stoptext
> \stopbuffer
>
> \typesetbuffer[sample][frame=on,page=1]
> \typesetbuffer
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
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
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
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
ext
>This isn’t \TeX\ Gyre Pagella.
>\stoptext
>\stopbuffer
>
>\typesetbuffer[testbuffer]
>\stoptext
>
> Only with decimal font sizes, simplefonts (and probably the standard
> font mechanism [which I don’t know how to use it]) isn’t able to select
> the
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
Dear list,
I have the following sample:
\starttext
\startbuffer[testbuffer]
\setuppapersize[A7]
\usemodule[simplefonts][size=10.5pt]
\setmainfont[TeX Gyre Pagella]
\starttext
This isn’t \TeX\ Gyre Pagella.
\stoptext
\stopbuffer
\typesetbuffer[testbuffer
> \stopbuffer
>
> \setuplayout[page]
> \starttext
> % Here, you must know the number of pages of the toc.
> % Certaninly, this can be done much better!
> \dorecurse{3}{\typesetbuffer[mydocument][page=\recurs
s can be done much better!
\dorecurse{3}{\typesetbuffer[mydocument][page=\recurselevel]}
\stoptext
--
Peter
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist :
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
Am 30.01.2011 um 20:23 schrieb Vnpenguin:
> On Sun, Jan 30, 2011 at 19:52, Peter Münster 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 ?
On Sun, Jan 30, 2011 at 19:52, Peter Münster 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 ?
Wolfgang Schuster 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
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/s
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
\sto
citly:
\stopbuffer
\savebuffer[mytable][mytable.tmp]
\externalfigure[mytable.tmp][width=0.8\textwidth]
There is also \typesetbuffer:
\starttext
\startbuffer[mytable]
\startTEXpage
bla bla bla
\stopTEXpage
\stopbuffer
\typesetbuffer[mytable][width=0.8\textwidth]
\stoptext
I'll update
\stoptext
\stopbuffer
\typesetbuffer[pdf-pages][page=2,frame=on]
\stoptext
this has the advantage that when the buffer does not change, you get no
new run either
Hans
-
Hans Hagen
81 matches
Mail list logo