Re: [NTG-context] Bug with jobs.file.run?

2019-08-25 Thread Aditya Mahajan
] \starttext \startbuffer[test] print("Output from lua") \stopbuffer \savebuffer[list={test}, file={test.lua}, prefix=no] \ctxlua{job.files.run("test.lua", "lua test.lua > test-output.tex")} \ReadFile{test-output.tex} \savebuffer[list={test

Re: [NTG-context] Parallel output of source data

2018-07-03 Thread Procházka Lukáš Ing .
export{% \doifsomething{\contentexportfile}{\savebuffer[list=contentexport,prefix=no,file=\contentexportfile]}% \getbufferdata[contentexport] } \let\bX=\startcontentexport % < Use of these two "shortcuts" is not possible, \let\eX=\stopcontentexport % < I'm getting : ! TeX ca

Re: [NTG-context] Parallel output of source data

2018-07-03 Thread Hans Hagen
\dostartcontentexport[#1]% {\iffirstargument   \edef\contentexportfile{#1}%   \else   \let\contentexportfile\empty   \fi   \grabbufferdata[contentexport][startcontentexport][stopcontentexport] } \def\stopcontentexport{% \doifsomething{\contentexportfile}{\savebuffer[list=contentexport,prefix

Re: [NTG-context] Parallel output of source data

2018-07-03 Thread Wolfgang Schuster
\let\contentexportfile\empty \fi \grabbufferdata[contentexport][startcontentexport][stopcontentexport] } \def\stopcontentexport{% \doifsomething{\contentexportfile}{\savebuffer[list=contentexport,prefix=no,file=\contentexportfile]}% \getbufferdata[contentexport] } \let\bX=\startcontentexport % <

Re: [NTG-context] Parallel output of source data

2018-07-03 Thread Procházka Lukáš Ing .
\contentexportfile{#1}% \else \let\contentexportfile\empty \fi \grabbufferdata[contentexport][startcontentexport][stopcontentexport] } \def\stopcontentexport{% \doifsomething{\contentexportfile}{\savebuffer[list=contentexport,prefix=no,file=\contentexportfile]}% \getbufferdata[contentexport

Re: [NTG-context] Problem with Filter Module in latent context beta

2018-04-17 Thread Aditya Mahajan
\startbuffer[test]     Leading spaces \stopbuffer \savebuffer[file=test-temp.tmp, prefix=no, list=test] \stoptext The leading spaces are stripped before the buffer is saved to the file temp.tmp. Is it possible for the leading space NOT to be stripped? (If not, I'll just document this as a feature

Re: [NTG-context] Problem with Filter Module in latent context beta

2018-04-17 Thread Aditya Mahajan
\savebuffer[file=test-temp.tmp, prefix=no, list=test] \stoptext The leading spaces are stripped before the buffer is saved to the file temp.tmp. Is it possible for the leading space NOT to be stripped? (If not, I'll just document this as a feature :-). \samplefile{ward} \startnarrower

Re: [NTG-context] Problem with Filter Module in latent context beta

2018-04-17 Thread Hans Hagen
On 4/17/2018 12:01 AM, Aditya Mahajan wrote: All features of the filter and vim modules work with the latest beta, except for one final bug: leading spaces are stripped from the buffer. \starttext \startbuffer[test]     Leading spaces \stopbuffer \savebuffer[file=test-temp.tmp, prefix

Re: [NTG-context] Problem with Filter Module in latent context beta

2018-04-16 Thread Aditya Mahajan
All features of the filter and vim modules work with the latest beta, except for one final bug: leading spaces are stripped from the buffer. \starttext \startbuffer[test] Leading spaces \stopbuffer \savebuffer[file=test-temp.tmp, prefix=no, list=test] \stoptext The leading spaces

[NTG-context] \savebuffer to merge of save contents

2017-03-21 Thread Jaroslav Hajtmar
Hello ConTeXist. Is there any possibility or modifications that will allow to savebuffer to work, so that will add (merge) the buffer contents into a file (Which content of the previous buffer)? For inspiration, it is possible use a solution that wrote before year ago Wolfgang for Lukas

Re: [NTG-context] Parallel output of source data

2016-12-04 Thread Procházka Lukáš Ing .
ontentexport][stopcontentexport]} \def\stopcontentexport {\doifsomething{\contentexportfile}{\savebuffer[list=contentexport,prefix=no,file=\contentexportfile]}% \getbufferdata[contentexport]} \starttext A \startcontentexport[Test.mkiv] Hello! \startitemize \item Item

Re: [NTG-context] Parallel output of source data

2016-12-02 Thread Wolfgang Schuster
ort[#1]% {\iffirstargument \edef\contentexportfile{#1}% \else \let\contentexportfile\empty \fi \grabbufferdata[contentexport][startcontentexport][stopcontentexport]} \def\stopcontentexport {\doifsomething{\contentexportfile}{\savebuffer[list=contentexport,prefix=no,file=\contentexpo

Re: [NTG-context] Extract only certain part of document (via modes)?

2016-11-10 Thread Wolfgang Schuster
lution for this is a commands (\saveblocks) which saves the content of a block in a external file (like \savebuffer does). Wolfgang ___ If your question is of interest to others as well, please add an entry to the

Re: [NTG-context] Extract only certain part of document (via modes)?

2016-11-06 Thread Mikael P. Sundqvist
ock and ask Hans to add a \saveblocks > commands > which writes the content of all exercise blocks to a external file (like > \savebuffer lets > you save the content of a buffer in a external file). > > > \defineblock[exercise] > \keepblocks [exercise] > > \defineenu

Re: [NTG-context] Extract only certain part of document (via modes)?

2016-11-06 Thread Wolfgang Schuster
rcises file.tex should give only all the exercises (or just everything "in one mode")? You can put each exercise in a block and ask Hans to add a \saveblocks commands which writes the content of all exercise blocks to a external file (like \savebuffer lets you save the content of a buff

[NTG-context] two questions on imposition

2016-10-04 Thread Pablo Rodriguez
the whole process in a single file using buffers. \savebuffer might be the way to save the buffer, but how can I typeset it to load the pages later with \filterpages? Many thanks for your help, Pablo -- http://www.ousia.tk

Re: [NTG-context] Perhaps missing braces in buff-ini.mkiv?

2016-09-06 Thread Hans Hagen
]% {... {\setupcurrentsavebuffer[\c!list={#1},\c!file=#2]}% ...} I think they are missing, because it makes the following work, even though arguments and key-value arguments shouldn't be mixed up. \startbuffer[hash] foo \stopbuffer \savebuffer[hash][hello.txt,prefix=no] \starttext \stoptext

Re: [NTG-context] Perhaps missing braces in buff-ini.mkiv?

2016-09-06 Thread Henri Menke
ve >>> around #2. >>> >>> \def\buff_save[#1][#2]% >>> {... >>> {\setupcurrentsavebuffer[\c!list={#1},\c!file=#2]}% >>> ...} >>> >>> I think they are missing, because it makes the following work, even though >>> arguments

Re: [NTG-context] Perhaps missing braces in buff-ini.mkiv?

2016-09-06 Thread Hans Hagen
they are missing, because it makes the following work, even though arguments and key-value arguments shouldn't be mixed up. \startbuffer[hash] foo \stopbuffer \savebuffer[hash][hello.txt,prefix=no] \starttext \stoptext I think you should either make a third argument for a key-value list or just make

Re: [NTG-context] Perhaps missing braces in buff-ini.mkiv?

2016-09-06 Thread Henri Menke
I think they are missing, because it makes the following work, even though > arguments and key-value arguments shouldn't be mixed up. > > \startbuffer[hash] > foo > \stopbuffer > \savebuffer[hash][hello.txt,prefix=no] > \starttext > \stoptext > > I think you should ei

[NTG-context] Perhaps missing braces in buff-ini.mkiv?

2016-08-09 Thread Henri Menke
arguments shouldn't be mixed up. \startbuffer[hash] foo \stopbuffer \savebuffer[hash][hello.txt,prefix=no] \starttext \stoptext I think you should either make a third argument for a key-value list or just make the second argument the key-value list. Then users could input \savebuffer[hash][file

[NTG-context] buffers writing CR only instead of proper newlines (LF)

2015-05-02 Thread Mojca Miklavec
Hi, The gnuplot module recently stopped working because the buffers now seem to write out the CR (0x0d) instead of the LF character for newlines. Here's a minimal example as shamelessly stolen from the module: \long\def\startXheader {\def\stopXheader{\ifx\savebuffer\undefined \else

Re: [NTG-context] \completepublications in component creates wrong hyperlinks

2013-08-06 Thread Hans Hagen
, title = {\TeX\ by Topic. A \TeX nician's Reference}, publisher = {Addison-Wesley}, year = {1991}, author= {Victor Eijkhout}, address = {London}, keywords = {general}, } \stopbuffer \savebuffer [list=sample, file=bibliography.bib, prefix=no] \startbuffer

[NTG-context] \completepublications in component creates wrong hyperlinks

2013-08-05 Thread Marco Patzer
Reference}, publisher = {Addison-Wesley}, year = {1991}, author= {Victor Eijkhout}, address = {London}, keywords = {general}, } \stopbuffer \savebuffer [list=sample, file=bibliography.bib, prefix=no] \startbuffer [component] \startcomponent

Re: [NTG-context] documents inside documents

2013-06-25 Thread Wolfgang Schuster
{\savebuffer[list={extract:before,extract:content,extract:after},file=\extractfilename.tex,prefix=no]% \typesetfile[\extractfilename][]}} \starttext \startextract[dummy] \startlinenumbering οὐκ οἶσθ᾽\contxt{οἶσθ᾽: οἶσθα, 2nd sg., οἶσδα} ὅτι πολλῶν ἐτῶν\contxt{πολλῶν ἐτῶν: for…; gen

Re: [NTG-context] documents inside documents

2013-06-25 Thread Peter Münster
.} \stoplinenumbering \stoptext \stopbuffer \savebuffer[list=sample-document, file=sample-document.tex, prefix=no] \starttext bla bla bla \typesetfile[sample-document.tex][width=10cm, frame=on] bla bla bla \stoptext --8---cut here---end---8--- -- Peter

Re: [NTG-context] TEXpage filename

2013-05-04 Thread Alan Bowen
[extract:content][startextract][stopextract]} \def\stopextract {\doifsomething\extractfilename {\savebuffer[list={extract:before,extract:content,extract:after},file=\extractfilename.tex,prefix=no]% \typesetfile[\extractfilename][]}} \starttext \startplacefigure[title={External file

Re: [NTG-context] TEXpage filename

2013-05-02 Thread Wolfgang Schuster
[extract:content][startextract][stopextract]} \def\stopextract {\doifsomething\extractfilename {\savebuffer[list={extract:before,extract:content,extract:after},file=\extractfilename.tex,prefix=no]% \typesetfile[\extractfilename][]}} \starttext \startplacefigure[title={External file

Re: [NTG-context] TEXpage filename

2013-05-01 Thread Wolfgang Schuster
environment which does all of this itself isn’t hard because most of the stuff which is needed can be seen in the example below. % the external file \startbuffer[figure-1] \startTEXpage \blackrule[width=4cm,height=4cm,color=blue] \stopTEXpage \stopbuffer \savebuffer[list=figure-1,file=figure-1.tex

Re: [NTG-context] Search path for external figures changed

2013-02-15 Thread Marco Patzer
On 2013–02–15 Hans Hagen wrote: location={global,local} It still doesn't work for me. Here is a complete example: \startbuffer [foo] beginfig(1); fill unitsquare scaled 2cm withcolor red; endfig; \stopbuffer \luacode{lfs.mkdirgraphics} \savebuffer [list=foo, file=graphics/foo.mp

Re: [NTG-context] t-vim failed

2013-01-06 Thread 土卜皿
-test-temp-C-0.vimout) can anyone help me? thanks The message comes from a bug in the recent change of the \savebuffer command. It’s easy to fix and I sent one to the dev list, it should be fixed with the next beta from Hans. What should I do to find whether Hans release the next beta

Re: [NTG-context] t-vim failed

2013-01-06 Thread 土卜皿
in the recent change of the \savebuffer command. It’s easy to fix and I sent one to the dev list, it should be fixed with the next beta from Hans. What should I do to find whether Hans release the next beta before installing? Thanks! BEST REGARDS PengCZ

Re: [NTG-context] t-vim failed

2013-01-05 Thread Wolfgang Schuster
in the recent change of the \savebuffer command. It’s easy to fix and I sent one to the dev list, it should be fixed with the next beta from Hans. Wolfgang ___ If your question is of interest to others as well, please

Re: [NTG-context] \savebuffer

2013-01-02 Thread Wolfgang Schuster
Am 31.12.2012 um 19:02 schrieb Hans Hagen pra...@wxs.nl: On 12/29/2012 6:29 PM, Wolfgang Schuster wrote: Hi Hans, can you add a \savebuffer variant which works like the first version of the command where \savebuffer[buffername][filename] saved the buffer as filename

Re: [NTG-context] \savebuffer

2013-01-02 Thread Hans Hagen
On 1/2/2013 9:15 AM, Wolfgang Schuster wrote: Which file extension would this use, “tmp” as the current \savebuffer command or a requested with is applied with the filename (e.g. “file=myfile.tex”) or a extension key (e.g. “extension=tex”). with prefix=no it uses the given filename (so

Re: [NTG-context] \savebuffer

2013-01-02 Thread Sietse Brouwer
Which file extension would this use, “tmp” as the current \savebuffer command or a requested with is applied with the filename (e.g. “file=myfile.tex”) or a extension key (e.g. “extension=tex”). with prefix=no it uses the given filename (so no suffix if not given) `prefix=no` doesn't really

Re: [NTG-context] \savebuffer

2012-12-31 Thread Hans Hagen
On 12/29/2012 6:29 PM, Wolfgang Schuster wrote: Hi Hans, can you add a \savebuffer variant which works like the first version of the command where \savebuffer[buffername][filename] saved the buffer as filename and not as \jobname-filename.tmp like it currently does. Instead of a new

[NTG-context] \savebuffer

2012-12-29 Thread Wolfgang Schuster
Hi Hans, can you add a \savebuffer variant which works like the first version of the command where \savebuffer[buffername][filename] saved the buffer as filename and not as \jobname-filename.tmp like it currently does. Instead of a new command a key-val-version of \savebuffer would do

[NTG-context] Centring rotated float

2012-01-23 Thread Marco
works. Example: \starttext \startbuffer [fig] \useMPlibrary [dum] \starttext \startTEXpage \externalfigure [placeholder] [width=10cm, height=4cm] \stopTEXpage \stoptext \stopbuffer \savebuffer [fig] [fig

Re: [NTG-context] gnuplot module does not work

2012-01-13 Thread Mojca Miklavec
13 e 14\stopGNUPLOTscript 15 16 \useGNUPLOTgraphic[aaa] 17 18 \stoptext 19 \stopGNUPLOTscript -\egroup \ifx \savebuffer \undefined \else \savebuffer [... \buff_finish ...oup \buff_stop {stopGNUPLOTscript

[NTG-context] Export (table cell alignment)

2011-12-09 Thread Andreas Harder
\savebuffer[css] \setupbackend[export=yes,xhtml=yes,css={\jobname-css.tmp}] \starttext \startbuffer \bTR\bTD flush right \eTD\bTD ~ \eTD\bTD ~~ \eTD\eTR \bTR\bTD ~ ~ \eTD\bTD flush left \eTD\bTD ~~ \eTD\eTR \bTR\bTD ~ ~ \eTD\bTD ~ \eTD\bTD middle \eTD\eTR

Re: [NTG-context] Export (table cell alignment)

2011-12-09 Thread Hans Hagen
-cell ; text-align: center } \stopbuffer \savebuffer[css] \setupbackend[export=yes,xhtml=yes,css={\jobname-css.tmp}] \starttext \startbuffer \bTR\bTD flush right \eTD\bTD ~ \eTD\bTD ~~ \eTD\eTR \bTR\bTD ~ ~ \eTD\bTD flush left \eTD\bTD ~~ \eTD\eTR \bTR\bTD ~ ~ \eTD

Re: [NTG-context] Export (table cell alignment)

2011-12-09 Thread Andreas Harder
: left } tablecell[align=middle] { display: table-cell ; text-align: center } \stopbuffer \savebuffer[css] \setupbackend[export=yes,xhtml=yes,css={\jobname-css.tmp}] \starttext \startbuffer \bTR\bTD flush right \eTD\bTD ~ \eTD\bTD ~~ \eTD\eTR \bTR\bTD ~ ~ \eTD

[NTG-context] Italic correction spoils XHTML-output

2011-10-31 Thread Andreas Harder
Hi all, I spotted an curious side effect while using italic correction together with the export feature. The XHTML-export has unwanted spaces while the PDF is fine. \startbuffer[css] highlight[detail=emph] { font-style: italic } \stopbuffer \savebuffer[css][test.css] % - do not work

Re: [NTG-context] Italic correction spoils XHTML-output

2011-10-31 Thread Aditya Mahajan
PS. By composing this example I noticed that \savebuffer do nothing. Unless something has changed recently, \savebuffer[buffer-list][filename] concatenates all the buffers in `buffer-list` and saves them to the file `\jobname-filename.tmp`. In the filter module, I work around

Re: [NTG-context] t-vim: additional space in \inlineX{}

2011-09-20 Thread Aditya Mahajan
example (compare the output of \ReadFile and \input): \startbuffer[test] {\bf bold} \stopbuffer \savebuffer[test][test] \starttext »{\bf bold}« \endlinechar\minusone %to prevent line break after reading file »\ReadFile{\jobname-test.tmp}« »\input\jobname-test.tmp\relax« \stoptext t-vim uses

Re: [NTG-context] Definition of lualetterbackslash

2011-08-22 Thread Aditya Mahajan
\startbuffer[content] content of lilypond file \stopbuffer \savebuffer[preamble,content][temp-file] \bye I'll probably just use \appendtoks \def\/{\letterbackslash} \to\everyluacode and then \/include. Other than using the magic single letter commands, I don't see an easy way of getting

Re: [NTG-context] Lilypond

2011-08-21 Thread Aditya Mahajan
On Sun, 21 Aug 2011, Henning Hraban Ramm wrote: Current version doesn’t work at all: - it writes the buffer with doubled filename and extension parts, i.e. from foo.tex foo-foo-temp-lilypond.tmp.tmp, but looks for foo-temp-lilypond.tmp. The \savebuffer command has changed!!! \starttext

Re: [NTG-context] Lilypond

2011-08-21 Thread Hans Hagen
. The \savebuffer command has changed!!! well, you wanted a jobname as prefix -) (in mkii that only happens with the \protectbuffers flag is set, in mkiv always) Just tell me what you expect Hans

Re: [NTG-context] Lilypond

2011-08-21 Thread Aditya Mahajan
for foo-temp-lilypond.tmp. The \savebuffer command has changed!!! well, you wanted a jobname as prefix -) In MkII, not MkIV :) (in mkii that only happens with the \protectbuffers flag is set, in mkiv always) Just tell me what you expect My preference is for \savebuffer[...][filename

Re: [NTG-context] How well do ConTeXt (lua)module for other users?

2011-07-19 Thread Wolfgang Schuster
separate files. Use \usemodule: example \startbuffer[test] function test(argument) context.quotation(argument) end interfaces.definecommand { name = test, arguments = { { content, string }, }, macro = test, } \stopbuffer \savebuffer[test][p-test.lua] \usemodule[test

Re: [NTG-context] How well do ConTeXt (lua)module for other users?

2011-07-19 Thread Jaroslav Hajtmar
: example \startbuffer[test] function test(argument) context.quotation(argument) end interfaces.definecommand { name = test, arguments = { { content, string }, }, macro = test, } \stopbuffer \savebuffer[test][p-test.lua] \usemodule[test] \starttext \test{Hello

[NTG-context] Typo in buff-ini.lua

2011-04-16 Thread Aditya Mahajan
Hi Hans, In buff-ini.lua, line 73 should be return concat(t,separator or \n) -- AM: was \r Otherwise, the following gives a wrong output: \startbuffer[one] This is one \stopbuffer \startbuffer[two] This is two \stopbuffer \ctxcommand{savebuffer({one, two}, test.tmp)} \end Aditya

Re: [NTG-context] TeX-figures

2011-01-30 Thread Peter Münster
this explicitly: \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 section 16.5

[NTG-context] problem with digit in buffer name

2011-01-30 Thread Peter Münster
Hello, I get ! I can't find file `virtual://viafile.1'. with the following example: \starttext \startbuffer[mytable1] bla \stopbuffer \savebuffer[mytable1][mytable.tmp] \externalfigure[mytable.tmp][width=0.8\textwidth] \stoptext -- Peter

Re: [NTG-context] TeX-figures

2011-01-30 Thread Vnpenguin
] In mkiv, the buffer is not saved in a file. You need to do this explicitly: \stopbuffer \savebuffer[mytable][mytable.tmp] \externalfigure[mytable.tmp][width=0.8\textwidth] Thank you, this method works ok for me. Cheers

Re: [NTG-context] problem with digit in buffer name

2011-01-30 Thread Vnpenguin
On Sun, Jan 30, 2011 at 11:46, Peter Münster pmli...@free.fr wrote: Hello, I get ! I can't find file `virtual://viafile.1'. with the following example: \starttext \startbuffer[mytable1] bla \stopbuffer \savebuffer[mytable1][mytable.tmp] \externalfigure[mytable.tmp][width=0.8\textwidth

Re: [NTG-context] TeX-figures

2011-01-30 Thread Wolfgang Schuster
Am 30.01.2011 um 11:43 schrieb Peter Münster: In mkiv, the buffer is not saved in a file. You need to do this explicitly: \stopbuffer \savebuffer[mytable][mytable.tmp] \externalfigure[mytable.tmp][width=0.8\textwidth] In MkIV this should be possible \externalfigure[mytable.buffer

Re: [NTG-context] TeX-figures

2011-01-30 Thread Peter Münster
\savebuffer[testbuf][testbuf.tmp] \externalfigure[testbuf.tmp][width=5cm] \stoptext Cheers, -- Peter ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context

Re: [NTG-context] TeX-figures

2011-01-30 Thread Vnpenguin
On Sun, Jan 30, 2011 at 12:27, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: Am 30.01.2011 um 11:43 schrieb Peter Münster: In mkiv, the buffer is not saved in a file. You need to do this explicitly: \stopbuffer \savebuffer[mytable][mytable.tmp] \externalfigure[mytable.tmp

Re: [NTG-context] TeX-figures

2011-01-30 Thread Hans Hagen
[testbuf] \input tufte \stopbuffer \savebuffer[testbuf][testbuf.tmp] \externalfigure[testbuf.tmp][width=5cm] \stoptext \starttext \startbuffer[testbuf] \input tufte \stopbuffer \externalfigure[testbuf][type=buffer,width=5cm] \externalfigure[testbuf.buffer][width=5cm] \stoptext in mkiv .tmp makes

Re: [NTG-context] \bufferprefix in MKIV

2011-01-26 Thread Wolfgang Schuster
the buffer content in memory and therefore no external file was generated which needed a protected name with \bufferprefix. When you save a buffer with \savebuffer[…] context adds \jobname as prefix to the file, therefore you can use \jobname in \GNUPLOTfile. You should also take a look

Re: [NTG-context] Bad interaction between new interpretation of underscore and modules

2011-01-14 Thread Wolfgang Schuster
can abuse \nonknuthmode to make your module to work \startbuffer[definitions] \pushcatcodes\nonknuthmode % \startnonknuthmode \def\lambdax{\lambda_x} \popcatcodes % \stopnonknuthmode \stopbuffer \savebuffer[definitions][p-definitions.tex] \startbuffer[more] \def\morex{\more_x

Re: [NTG-context] Bad interaction between new interpretation of underscore and modules

2011-01-14 Thread Mathieu Boespflug
% \startnonknuthmode \def\lambdax{\lambda_x} \popcatcodes               % \stopnonknuthmode \stopbuffer \savebuffer[definitions][p-definitions.tex] \startbuffer[more] \def\morex{\more_x} \stopbuffer \savebuffer[more][p-more.tex] \usemodule[definitions,more] \starttext blah $\lambdax$ blah

Re: [NTG-context] Replacing a piece of a paper

2011-01-12 Thread Procházka Lukáš Ing . - Pontex s . r . o .
\savebuffer[a2][a2-page.tex] \executesystemcommand{context a2-page} % Produce A4-example: \startbuffer[a4] \setuppapersize[A4] \setuplayout[page] \starttext \input tufte \stoptext \stopbuffer \savebuffer[a4][a4-page.tex] \executesystemcommand{context a4-page} % Do the job: \setuppapersize[A2] \setuplayout

[NTG-context] undesired offset with \position (was: Re: Replacing a piece of a paper)

2011-01-11 Thread Peter Münster
tufte \stoptext \stopbuffer \savebuffer[a2][a2-page.tex] \executesystemcommand{context a2-page} % Produce A4-example: \startbuffer[a4] \setuppapersize[A4] \setuplayout[page] \starttext \input tufte \stoptext \stopbuffer \savebuffer[a4][a4-page.tex] \executesystemcommand{context a4-page} % Do

Re: [NTG-context] Handling EMBED tag in Tex

2011-01-06 Thread Wolfgang Schuster
}\endbuffer \savebuffer[embed][embed.svg] \externalfigure[embed.svg] \stopxmlsetups Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl

Re: [NTG-context] Handling EMBED tag in Tex

2011-01-06 Thread Hans Hagen
\setbuffer[embed]\xmlflush{#1}\endbuffer \savebuffer[embed][embed.svg] \externalfigure[embed.svg] \stopxmlsetups remind me to make a \xmltofile some time - Hans Hagen | PRAGMA ADE

Re: [NTG-context] Handling EMBED tag in Tex

2011-01-06 Thread Anand Raj
],[1,4]);text([1,2],?,right);' / Write the whole block to a external file and read import it them with \externalfigure. \startxmlsetups xml:embed \setbuffer[embed]\xmlflush{#1}\endbuffer \savebuffer[embed][embed.svg] \externalfigure[embed.svg] \stopxmlsetups remind me to make

Re: [NTG-context] FiXme-module

2010-11-08 Thread Wolfgang Schuster
in before/after keys but i can add a „location=comment“ to the module. 3. Is it possible to save the FiXme-list in a external text file? Something like \savebuffer[expanded list of fixmes][list.txt] Do you want a separate file for each entry or one file with all entries? Wolfgang

Re: [NTG-context] FiXme-module

2010-11-08 Thread Andreas Harder
are defined as buffers and buffers can’t be used in before/after keys but i can add a „location=comment“ to the module. That would be nice, but would't alternative=comment“ more appropriate? 3. Is it possible to save the FiXme-list in a external text file? Something like \savebuffer[expanded list

[NTG-context] FiXme-module

2010-11-05 Thread Andreas Harder
to use PDF annotations, so I tried: \setupfixme [before={\startcomment[FiXme]}, after=\stopcomment] This gives an error. 3. Is it possible to save the FiXme-list in a external text file? Something like \savebuffer[expanded list of fixmes][list.txt] \usemodule[fixme] % \setupfixme % - error

[NTG-context] Questions regarding the bibliography

2010-09-22 Thread Marco
\stopbuffer \savebuffer[mukk][\jobname.bbl] \setuppublications [alternative=ams] % \setuppublications [alternative=num] % Look for edition \starttext As you can see in \cite[fundamentals] or in \cite[garden]. \placepublications \stoptext

Re: [NTG-context] pdf file not found (final question)

2010-09-12 Thread Peter Münster
On Fri, Sep 10 2010, Peter Münster wrote: Can anybody reproduce the following problem (Taco can't ...): \startbuffer[pdf-pages] \starttext page 1 \page page 2 \stoptext \stopbuffer \savebuffer[pdf-pages][pdf-pages.tex] \executesystemcommand{context pdf-pages; mkdir testdir

[NTG-context] pdf file not found

2010-09-10 Thread Peter Münster
Hello, Can anybody reproduce the following problem (Taco can't ...): \startbuffer[pdf-pages] \starttext page 1 \page page 2 \stoptext \stopbuffer \savebuffer[pdf-pages][pdf-pages.tex] \executesystemcommand{context pdf-pages; mkdir testdir; mv pdf-pages.pdf testdir/2*8.pdf} \starttext

Re: [NTG-context] pdf file not found

2010-09-10 Thread Hongwen Qiu
于 2010年09月10日 20:25, Peter Münster 写道: Hello, Can anybody reproduce the following problem (Taco can't ...): No problem here. \startbuffer[pdf-pages] \starttext page 1 \page page 2 \stoptext \stopbuffer \savebuffer[pdf-pages][pdf-pages.tex] \executesystemcommand{context pdf-pages

Re: [NTG-context] pdf file not found

2010-09-10 Thread Hans Hagen
On 10-9-2010 2:25, Peter Münster wrote: \startbuffer[pdf-pages] \starttext page 1 \page page 2 \stoptext \stopbuffer \savebuffer[pdf-pages][pdf-pages.tex] \executesystemcommand{context pdf-pages; mkdir testdir; mv pdf-pages.pdf testdir/2*8.pdf} \starttext \setupexternalfigures

Re: [NTG-context] problem with \setuptyping[option=LUA, escape=//]

2010-08-26 Thread Peter Münster
: \startbuffer[typefile-test] btex-etex: // /btex \em sometex /etex xxx-yyy:// XXX \em sometex YYY zzz:// ZZZ \em sometex \stopbuffer \savebuffer[typefile-test][typefile-test] \definetyping[LUA] \starttext \section{file=zzz} \start \setuptyping[file][option=LUA, escape=ZZZ] \typefile

Re: [NTG-context] require(module.so) on cygwin

2010-07-15 Thread Peter Münster
; } \stopbuffer \startbuffer[Makefile] testmod.so: testmod.c gcc -shared -o $@ $ /usr/lib/liblua.dll.a \stopbuffer \savebuffer[testmod.c][testmod.c] \savebuffer[Makefile][Makefile] \executesystemcommand{make testmod.so} \startluacode package.cpath = ?.so require(testmod

Re: [NTG-context] problem with package.path

2010-05-08 Thread Taco Hoekwater
Hans Hagen wrote: On 7-5-2010 10:52, Taco Hoekwater wrote: Peter Münster wrote: On Thu, May 06 2010, Hans Hagen wrote: \startbuffer[test] bla = nil \stopbuffer \savebuffer[test][../mytest.lua] \starttext \startluacode package.path = ../?.lua;; require(mytest) \stopluacode \stoptext dofile

Re: [NTG-context] problem with package.path

2010-05-07 Thread Peter Münster
On Thu, May 06 2010, Hans Hagen wrote: \startbuffer[test] bla = nil \stopbuffer \savebuffer[test][../mytest.lua] \starttext \startluacode package.path = ../?.lua;; require(mytest) \stopluacode \stoptext dofile ../mytest.lua Bad example... mytest.lua is a module, so it must be loaded

Re: [NTG-context] problem with package.path

2010-05-07 Thread Hans Hagen
On 7-5-2010 9:15, Peter Münster wrote: On Thu, May 06 2010, Hans Hagen wrote: \startbuffer[test] bla = nil \stopbuffer \savebuffer[test][../mytest.lua] \starttext \startluacode package.path = ../?.lua;; require(mytest) \stopluacode \stoptext dofile ../mytest.lua Bad example... mytest.lua

Re: [NTG-context] problem with package.path

2010-05-07 Thread Taco Hoekwater
Peter Münster wrote: On Thu, May 06 2010, Hans Hagen wrote: \startbuffer[test] bla = nil \stopbuffer \savebuffer[test][../mytest.lua] \starttext \startluacode package.path = ../?.lua;; require(mytest) \stopluacode \stoptext dofile ../mytest.lua Bad example... mytest.lua is a module, so

Re: [NTG-context] problem with package.path

2010-05-07 Thread Hans Hagen
On 7-5-2010 10:52, Taco Hoekwater wrote: Peter Münster wrote: On Thu, May 06 2010, Hans Hagen wrote: \startbuffer[test] bla = nil \stopbuffer \savebuffer[test][../mytest.lua] \starttext \startluacode package.path = ../?.lua;; require(mytest) \stopluacode \stoptext dofile ../mytest.lua Bad

Re: [NTG-context] problem with package.path

2010-05-06 Thread Hans Hagen
On 4-5-2010 10:28, Peter Münster wrote: Hello, I need to include lua-modules from different directories, but package.path does not seem to work: \startbuffer[test] bla = nil \stopbuffer \savebuffer[test][../mytest.lua] \starttext \startluacode package.path = ../?.lua;; require(mytest

[NTG-context] problem with package.path

2010-05-04 Thread Peter Münster
Hello, I need to include lua-modules from different directories, but package.path does not seem to work: \startbuffer[test] bla = nil \stopbuffer \savebuffer[test][../mytest.lua] \starttext \startluacode package.path = ../?.lua;; require(mytest) \stopluacode \stoptext Error message: ! LuaTeX

Re: [NTG-context] xml TeX expansion?

2010-03-17 Thread Wolfgang Schuster
version=1.0 encoding=UTF-8? test ![CDATA[ This must be {\bf bold text}. ]] This is bfbold text/bf. texThis is bfbold text/bf./tex /test \stopbuffer \savebuffer[test][test.xml] \startxmlsetups xml:testsetups \xmlsetsetup{test}{test|bf|tex}{xml:*} \stopxmlsetups \xmlregistersetup

Re: [NTG-context] xml TeX expansion?

2010-03-17 Thread Hans van der Meer
I do not understand the following. Running the Schuster code exactly as it is, the tex/tex enclosure works. If however I incorporate the data from file instead of through \savebuffer, then it doesn't work. What crucial detail am I missing here? Hans van der Meer On 17 mrt 2010, at 12:14

Re: [NTG-context] xml TeX expansion?

2010-03-17 Thread Wolfgang Schuster
Am 17.03.10 14:20, schrieb Hans van der Meer: I do not understand the following. Running the Schuster code exactly as it is, the tex/tex enclosure works. If however I incorporate the data from file instead of through \savebuffer, then it doesn't work. \savebuffer writes the content

Re: [NTG-context] file-contents module

2010-02-22 Thread Hans Hagen
\savebuffer[x] \savebuffer[x][temp.log] - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com

Re: [NTG-context] file-contents module

2010-02-22 Thread Wolfgang Schuster
Am 22.02.10 23:17, schrieb Hans Hagen: old request ... \startbuffer[x] x \stopbuffer \savebuffer[x] \savebuffer[x][temp.log] Thanks :) Wolfgang ___ If your question is of interest to others as well, please add

Re: [NTG-context] \starbuffer in own macros

2009-10-18 Thread Wolfgang Schuster
]\stoplines \savebuffer[#1]}% \dostartbuffer[#1][startMyCite][stopMyCite]} \def\getMyCite[#1]% {\doifreferencefoundelse{lr:b:#1} {\startlinenumbering[\currentreferencedefault]} \startlinenumbering \startlines\readfile{\jobname-#1.tmp}{}{}\stoplines \stoplinenumbering

Re: [NTG-context] t-vim: inline typing?

2009-07-20 Thread Aditya Mahajan
} {\dodotypevimfile[#1]{#2}} {\reporttypingerror{#2}}} \def\saveandtypevimfile[#1]% {\savevimbuffer \dotypevimfile[#1]{\TEXbufferfile{vimsyntax}}} \let\savevimbuffer\donothing \beginLUATEX \def\savevimbuffer{\savebuffer[vimsyntax]} \endLUATEX \def\dodotypevimfile[#1]#2% {\@@vsbefore \bgroup

Re: [NTG-context] Multiple letters

2009-05-10 Thread Wolfgang Schuster
][stopfilecontents]} \def\stopfilecontents {\doifmode{mkiv}{\savebuffer[\filename]\ctxlua{file.copy(\jobname- \filename.tmp,\filename.\f!temporaryextension)}}% \endgroup} \ifx\savebuffer\undefined \def\savebuffer[#1] {\ctxlua{buffers.save(#1)}} \fi \protect \startfilecontents[data.dat] Madam

Re: [NTG-context] Multiple letters

2009-05-10 Thread Otared Kavian
\extension \dostartbuffer[\filename][startfilecontents][stopfilecontents]} \def\stopfilecontents {\doifmode{mkiv}{\savebuffer[\filename]\ctxlua{file.copy(\jobname- \filename.tmp,\filename.\f!temporaryextension)}}% \endgroup} \ifx\savebuffer\undefined \def\savebuffer[#1] {\ctxlua{buffers.save(#1

[NTG-context] \savebuffer disappeared

2009-05-09 Thread Mojca Miklavec
Hello Hans, The macro \savebuffer seems to have disappeared from mkiv. What's now the official way to write out chunks of code into a file? \startbuffer[abc] Module stopped working !?#...@! \stopbuffer \savebuffer[abc] Thanks, Mojca

Re: [NTG-context] \savebuffer disappeared

2009-05-09 Thread Arthur Reutenauer
Hello, The macro \savebuffer seems to have disappeared from mkiv. What's now the official way to write out chunks of code into a file? I guess there's not going to be an official way anymore, according to yourself (http://www.ntg.nl/pipermail/ntg-context/2007/026680.html), but you

Re: [NTG-context] Bib module in mkiv

2009-04-17 Thread Wolfgang Schuster
\at.\to\filename \aftersplitstring #1\at.\to\extension \let\f!temporaryextension\extension \dostartbuffer[\filename][startfilecontents][stopfilecontents]} \def\stopfilecontents {\doifmode{mkiv}{\savebuffer[\filename]\ctxlua{file.copy(\jobname- \filename.tmp,\filename.\f

Re: [NTG-context] latest beta - Math error

2009-03-03 Thread Wolfgang Schuster
{\doifdefined{savebuffer}{\savebuffer[\filename]}\egroup} \protect \startfilecontents[a1.txt] 1 5 2 4 3 8 4 9 8 8 \stopfilecontents \starttext \readfile{a1.txt}{}{} \stoptext Wolfgang ___ If your question is of interest

[NTG-context] modernized and augmented m-r.tex

2008-12-08 Thread Johan Sandblom
The ConTeXt module for interaction with the statistical programming language R currently does not work with MKIV since buffers are not saved to file. The included file fixes this by calling \savebuffer on the buffer in case \ctxlua is defined (a trick gleaned from a discussion on the LilyPond

  1   2   >