,
['2'] = { "c", "d" },
},
},
},
data = {
rules = {
{
before = { { " " } },
current = { { "a" }, { "b" } },
look
marking in code blocks and in inline code?
I have tried to find out a solution, but \typebuffer requires a separate
paragraph (or I didn’t know how to disable it).
Many thanks for your help,
Pablo
--
http://www.ousia.tk
else
> buffers.erase(name)
> end
> end
>
> \stopluacode
>
> \unprotect
>
> \unexpanded\def\xmlprettyprinttext#1#2%
>{\ctxlua{lxml.tobufferX("#1",".","xml-temp")}%
> \ifdefined\sci
\stopluacode
\unprotect
\unexpanded\def\xmlprettyprinttext#1#2%
{\ctxlua{lxml.tobufferX("#1",".","xml-temp")}%
\ifdefined\scitebuffer
\scitebuffer[#2][xml-temp]%
\else
\typebuffer[xml-temp][\c!option=#2]%
\fi}
\pro
\startbuffer
\startbuffer[demo]
\start
\getbuffer[setup]
\subject{[ {\myslanted myslanted} ] [ {\it it} ] [ {\slanted
slanted} ] [ $x=1$ ]}
[ {\myslanted myslanted} ] [ {\it it} ] [ {\slanted slanted} ]
[ $x=1$ ]
\typebuffer[setup]
\blackrule[width
t; \startbuffer[references]
>>>> @misc{kraft,
>>>> author = "Kraft, Nathan",
>>>> title = "Mr Kraft's Virtual Filing Cabinet",
>>>> year = "2015",
>>>> url = "http://mrkraft.wikispaces.com/Mr+Kraf
sebtxdefinitions[apa]
>>>
>>> \starttext
>>>
>>> \nocite[kraft]
>>> \placelistofpublications
>>>
>>> \stoptext
>> The bibtex entry in this example is provided in a buffer. The buffer
>> mechanism does not handle characters
On 2017-05-08 21:40, Henri Menke wrote:
That is simply not true! Content inside ConTeXt buffers is as verbatim
as reading an external file. Try \typebuffer instead of \getbuffer
your example below and observe that the comment sign is perfectly
preserved.
I am sorry. You are, of course
\usebtxdefinitions[apa]
> >
> > \starttext
> >
> > \nocite[kraft]
> > \placelistofpublications
> >
> > \stoptext
> The bibtex entry in this example is provided in a buffer. The buffer
> mechanism does not handle characters any differently than othe
an option (the last examples need an upcoming beta as i added better
> space support for verbatim comments)
>
> \setupinteraction[state=start]
>
> \starttext
>
> \startbuffer[a]
> for i=1,10 do
>print(i)
> end
> \stopbuffer
>
> \typebuffer[a]
>
> c
better space support for verbatim comments)
\setupinteraction[state=start]
\starttext
\startbuffer[a]
for i=1,10 do
print(i)
end
\stopbuffer
\typebuffer[a]
currently: \comment{\cldcontext{buffers.getcontent("a")}}
\blank
hacked: \comment{\cldcontext{string.gsub(buffers.
The point is not that I am without options for a practical solution here.
My point is that the difference between \typebuffer and \typefile breaks the
strict and so much appreciated congruence between like macro calls.
Therefore my post must rather be seen as a plea to the maintainer(s
ame, because their
> usage parallels each other?
Hi Hans,
I wonder whether any of these two options may help you:
\setuptyping[buffer][style=\ttx]
\startbuffer[test]
content of buffer
\stopbuffer
\starttext
\typebuffer[test][style=\ss\red]
\typefile[style=\ttx
:
\startbuffer[test]
content of buffer
\stopbuffer
\starttext
\typebuffer[test]
\typefile[style=\ttx]{test.txt}
\stoptext
Hans van der Meer
___
If your question is of interest to others as well, please add an entry
That's it, thank you! Lukas
On Wed, 17 Feb 2016 13:39:47 +0100, Marco Patzer <li...@homerow.info> wrote:
On Wed, 17 Feb 2016 13:16:03 +0100
Procházka Lukáš Ing. <l...@pontex.cz> wrote:
is it possible to \typebuffer with a syntax highlighting?
\typebuffer
[demo]
[option=co
On Wed, 17 Feb 2016 13:16:03 +0100
Procházka Lukáš Ing. <l...@pontex.cz> wrote:
> is it possible to \typebuffer with a syntax highlighting?
\typebuffer
[demo]
[option=context]
Also have a look at Aditya's vim syntax highlighter module which is
grea
On 2/17/2016 1:16 PM, Procházka Lukáš Ing. wrote:
Hello,
is it possible to \typebuffer with a syntax highlighting?
\typefile allows to specific syntax highlighter, e.g.
\typefile[TEX]{file.tex};
\typebuffer does not (AFAIK).
It would be useful to have:
\startbuffer[demo]
\startitemize
Hello,
is it possible to \typebuffer with a syntax highlighting?
\typefile allows to specific syntax highlighter, e.g. \typefile[TEX]{file.tex};
\typebuffer does not (AFAIK).
It would be useful to have:
\startbuffer[demo]
\startitemize
\item Hello!
\stopitemize
\stopbuffer
which
% withshadecolors (black,lightgray)
% withtransparency (1,1)
withshadecolors (black,\MPcoloronly{mp:fg})
withtransparency \MPtransparencyonly{mp:fg}
;
\stopMPcode
\stoptext
\stopbuffer
\starttext
\typebuff
or (-1,0)
> % withshadecolors (black,lightgray)
> % withtransparency (1,1)
> withshadecolors (black,\MPcoloronly{mp:fg})
> withtransparency \MPtransparencyonly{mp:fg}
^ Typo or new feature?
{buffers.assign(foo,xml.content(lxml.id('#1')))}
\stoptexdefinition
\starttexdefinition xmlprettyprint #1#2
\xmlsaveinbuffer{#1}
\typebuffer[foo][option=#2]
\stoptexdefinition
\starttexdefinition xmlprettyprint #1#2
\start
\tt
\xmlsaveinbuffer{#1}
\setcatcodetable
there).
Many thanks for your help,
\usemodule[scite]
\starttexdefinition xmlsaveinbuffer #1
\ctxlua{buffers.assign(foo,xml.content(lxml.id('#1')))}
\stoptexdefinition
\starttexdefinition xmlprettyprint #1#2
\xmlsaveinbuffer{#1}
\typebuffer[foo][option=#2]
\stoptexdefinition
\stoptyping
\starttyping
{ printf(%d, data); }
\stoptyping
This is ignored !
\stoptext
How can I use correctly gobbleinput to make it works ?
Replace the typing environment with normal buffers and use the \typebuffer
command to print the content of the buffer.
\starttext
\startbuffer
environment with normal buffers and use the \typebuffer
command to print the content of the buffer.
\starttext
\startbuffer
{ printf(%d, data); }
\stopbuffer
%\typebuffer
This is ignored !
\stoptext
Wolfgang
The short example below typeset with
\usemodule[mathml]
\starttext
\typebuffer
\blank
\processxmlbuffer
\stoptext
and ConTeXt ver: 2014.04.04 00:08 MKIV beta shows that the mtext element
does not honour the tags within. This severely restricts the presentation.
Can this be remedied
Sorry if this question reaches you twice, but the first time I used an email address not registered with this newsgroup.The short example below typeset with\usemodule[mathml]\starttext\typebuffer\blank\processxmlbuffer\stoptextand "ConTeXt ver: 2014.04.04 00:08 MKIV beta" shows that
On 5/18/2014 10:05 AM, H. van der Meer wrote:
Sorry if this question reaches you twice, but the first time I used an
email address not registered with this newsgroup.
The short example below typeset with
\usemodule[mathml]
\starttext
\typebuffer
\blank
\processxmlbuffer
\stoptext
and ConTeXt
[mathml]
\starttext
\typebuffer
\blank
\processxmlbuffer
\stoptext
and ConTeXt ver: 2014.04.04 00:08 MKIV beta shows that the mtext
element does not honour the tags within. This severely restricts the
presentation.
So what makes you think these tags should be recognized and interpreted as
being
.
The short example below typeset with
\usemodule[mathml]
\starttext
\typebuffer
\blank
\processxmlbuffer
\stoptext
and ConTeXt ver: 2014.04.04 00:08 MKIV beta shows that the mtext
element does not honour the tags within. This severely restricts the
presentation.
So what makes you think
On 01/15/2014 01:12 AM, Marco Patzer wrote:
On 2014–01–14 Pablo Rodriguez wrote:
I have a presentation that defines a typing environment and I would like
to know who to apply it to \typebuffer.
Use:
\setuptyping
[buffer]
[option=TEX]
Many thanks for your reply, Marco
On Wed, Jan 15 2014, Pablo Rodriguez wrote:
\definetyping[buffer][option=TEX,before=\startframedtext,after=\stopframedtext]
\setuptyping[buffer][style=\tt\setupinterlinespace,align={right,broad}]
Why \definetyping[buffer] ? \typebuffer is already defined.
Shouldn't it be:
\setuptyping
On 01/15/2014 08:50 PM, Peter Münster wrote:
On Wed, Jan 15 2014, Pablo Rodriguez wrote:
\definetyping[buffer][option=TEX,before=\startframedtext,after=\stopframedtext]
\setuptyping[buffer][style=\tt\setupinterlinespace,align={right,broad}]
Why \definetyping[buffer] ? \typebuffer
Am 15.01.2014 um 20:42 schrieb Pablo Rodriguez oi...@gmx.es:
On 01/15/2014 01:12 AM, Marco Patzer wrote:
On 2014–01–14 Pablo Rodriguez wrote:
I have a presentation that defines a typing environment and I would like
to know who to apply it to \typebuffer.
Use:
\setuptyping
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 2014–01–14 Pablo Rodriguez wrote:
I have a presentation that defines a typing environment and I would like
to know who to apply it to \typebuffer.
Here is a sample:
\definetyping[TeXcode][option=TEX]
Use:
\setuptyping
[buffer]
[option=TEX]
This applies globally, though
\input{knuth}
\framed[align=yes]{%
\type{\framed $$}\\
\framed[align=yes,width=5cm]{%
$$
x+y
$$
\input{knuth}
}}
\startbuffer
\hbox{\vrule\startformula \int_a^b x+y \stopformula}
\stopbuffer
\framed[align=yes]{%
This line generates an error\\
\typebuffer}
\framed[align=yes]{%
When one
\endAddress
\useblocks[Address]
Some more text.
\stoptext
And if you really need a typing environment, you can use buffers:
\startbuffer[address]
#whatver
\stopbuffer
\getbuffer[address]
or
\typebuffer[address]
Aditya
--
\typebuffer[x]
\stoptext
___
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
friend, you would not tell with such high zest
To children ardent for some desparate glory,
The old Lie: Dulce et decorum est
Pro patria mori.
\thisistheend
\typebuffer[mybuffer]
%% end example
What am I doing wrong? And is the description I put on the wiki correct?
Cheers,
Sietse
%% begin example
\grabbufferdata[mybuffer][thisisthestart][thisistheend]
\thisisthestart
My friend, you would not tell with such high zest
To children ardent for some desparate glory,
The old Lie: Dulce et decorum est
Pro patria mori.
\thisistheend
\typebuffer[mybuffer]
%% end example
glory,
The old Lie: Dulce et decorum est
Pro patria mori.
\thisistheend
\typebuffer[mybuffer]
%% end example
What am I doing wrong?
You have to wrap it in a macro:
\starttext
\define\thisisthestart
{\grabbufferdata[mybuffer][thisisthestart][thisistheend]}
\let\thisistheend\relax
\grabbufferdata[mybuffer][thisisthestart][thisistheend]
\thisisthestart
My friend, you would not tell with such high zest
To children ardent for some desparate glory,
The old Lie: Dulce et decorum est
Pro patria mori.
\thisistheend
\typebuffer[mybuffer]
%% end example
What am I doing
Lie: Dulce et decorum est
Pro patria mori.
\thisistheend
\typebuffer[mybuffer]
%% end example
What am I doing wrong? And is the description I put on the wiki correct?
The \grabbufferdata command reads only all text until the end command (e.g.
\thisistheend)
but the beginning command
is
like the effect of an old-age patient who smokes many packs
of cigarettes per day – and we humans are the cigarettes.
\stopbuffer
\starttext
\typebuffer[ward]
\getbuffer[ward]
\stoptext
Wolfgang
___
If your question
,
unicoding=yes]
\definefontsynonym
[ZapfDingbats]
[file:uzdr.afm]
[features=dingbats]
\stopbuffer
\typebuffer \getbuffer
I tend to qualify the Dingbat font in \TEX\ distributions as rather unstable
because of name changes and them either or not being included. Therefore
it's best to
use the hard
=dingbats]
\stopbuffer
\typebuffer \getbuffer
I tend to qualify the Dingbat font in \TEX\ distributions as rather unstable
because of name changes and them either or not being included. Therefore it's
best to
use the hard coded name because that triggers the most visible error message
duotone}
{\externalfigure[demo-b][color=blue-100]} {spot color}
{\externalfigure[demo-b][color=yellow-100]} {spot color}
\stopcombination
\stopbaselinecorrection
\stopbuffer
\starttext
\getbuffer \typebuffer
\stoptext
%%% Local Variables:
%%% mode: context
%%% TeX-master:
%%% End
}
12: \unit{125 g / l}
13: \unit{125 km/s}
14: \unit{125 m/s}
15: \unit{125 mA/s}
16: 1\unit{bit / second}
\stopbuffer
\typebuffer
Result: \startlines \getbuffer \stoplines
\stoptext
All the best.
--
Romain Diss
romain.d...@yahoo.fr
GW}
107: \unit{345 mW}
108: \unit{152.20 mHz}
109: \unit{55.5 mmol}
110: \unit{6.7 mol/l}
111: \unit{125 g/l}
112: \unit{125 g / l}
113: \unit{125 km/s}
114: \unit{125 m/s}
115: \unit{125 mA/s}
\stopbuffer
\typebuffer
Result: \startlines \getbuffer \stoplines
\stoptext
Thank you for your help
?}
\stopbuffer
\getbuffer \typebuffer
\referencetable[ref:test]
\stoptext
With the third argument you can control which prefixes (section numbers
which are shown in front of a floats own counter value) are shown and
how they should be formatted.
Wolfgang
with such line?
The second example compiles well but the long is splitted. How to avoid
this? (Adding ',space=fixed' to '\definetyping' doesn't help.)
Use \typebuffer[ex1].
Wolfgang
___
If your question is of interest to others
' to '\definetyping' doesn't help.)
Use \typebuffer[ex1].
Thank you, this rises another question...
---
WBR, Vladimir Lomov
--
More are taken in by hope than by cunning.
-- Vauvenargues
___
If your
\typebuffer[x][strip=yes]
test
\typebuffer[x][strip=8]
test
\stoptext
--
-
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53
\biggl( \frac {3}{4} \biggr)
%D \stopformula
%D \stopbuffer
%D \typebuffer
%D
%D which gives (notice the spacing before the parenthesis)
%D
%D \getbuffer
%D
%D I will assume that if \type{text} is something, then
%D the default behaviour is desirable, if \type{text} is empty, then I add
%D
} \biggr)
%D \stopformula
%D
%D and
%D
%D \startformula
%D \Pr\left(\frac {3}{4} \right) \qquad \hbox{ vs } \qquad
%D \Pr\biggl( \frac {3}{4} \biggr)
%D \stopformula
%D \stopbuffer
%D \typebuffer
%D
%D which gives (notice the spacing before the parenthesis)
%D
%D \getbuffer
%D
%D I will assume
\startbuffer
%D \setuptextrules
%D [width=90pt,distance=12pt,rulecolor=blue,
%Dbodyfont=small,style=\sc,color=red]
%D
%D \starttextrule{Ship Building Tools}
%D \nl \setuptolerance[tolerant] \input materie
%D \stoptextrule
%D \stopbuffer
%D
%D \bgroup \typebuffer \getbuffer \egroup
%D
%D
\stoptextrule
%D \stopbuffer
%D
%D \bgroup \typebuffer \getbuffer \egroup
%D
%D \startbuffer
%D \setuptextrules
%D [location=inmargin,
%Dbodyfont=small,style=slantedbold]
%D
%D \starttextrule{wonderful}
%D \input tufte
%D \stoptextrule
%D \stopbuffer
%D
%D \bgroup \typebuffer \getbuffer
]
\definereferenceformat [PageThree] [label=*]
\definereferenceformat [PageFour] [label=both]
\setuplabeltext[en][page=page~]
\setuplabeltext[en][chapter=chapter~]
\setuplabeltext[en][both={chapter~,~retpahc}]
\stopbuffer
\getbuffer[definitions]
\starttext
\chapter[one]{One}
\typebuffer[definitions
[PageThree] [label=*]
\definereferenceformat [PageFour] [label=both]
\setuplabeltext[en][page=page~]
\setuplabeltext[en][chapter=chapter~]
\setuplabeltext[en][both={chapter~,~retpahc}]
\stopbuffer
\getbuffer[definitions]
\starttext
\chapter[one]{One}
\typebuffer[definitions]
\startbuffer
\PageOne
[definitions]
\starttext
\chapter[one]{One}
\typebuffer[definitions]
\startbuffer
\PageOne[two]
\PageTwo[two]
\PageThree[two]
\PageFour[two]
\at{(}{)}[two]
\at{!}[two]
\at{page}[two]
\at[two]
\stopbuffer
\typebuffer \startlines \getbuffer \stoplines
\chapter[two]{Two}
\typebuffer[definitions
: in function 'flush'
...text/tex/texmf-context/tex/context/base/buff-
ini.lua:216: in function 'typebuffer'
main ctx instance:1: in main chunk.
\dodotypeblockverbatim ...ter \c!escape \!!es
hs the
number of spans, so we can have: \DL[2,red,10].
(2) Buffers and typing
This whole bunch has been cleaned up and pretty printing has been
redone. The \type command accepts an optional argument with settings. as
does \starttyping, \typebuffer and \typefile (and the defined variants
printing has been redone. The
\type command accepts an optional argument with settings. as does
\starttyping, \typebuffer and \typefile (and the defined variants).
The interface for defining visualizers might change a bit but I'm getting
there. There is a chapter on it in the cld manual
bla
}
\startbuffer
bla%bla
\stopbuffer
bla\footnote{
bla
\typebuffer
bla
}
\startbuffer
\type{bla%bla}
\stopbuffer
bla\footnote{bla\getbuffer bla}
\stoptext
Cheers, Peter
--
Contact information: http://pmrb.free.fr/contact
[strut=no,align=normal,frame=off]{\typebuffer}
\stoplinenumbering
\stopsetups
\placealgorithm
[here][alg:myalgorithm]
{Very neat algorithm.}
{\directsetup{algorithm}}
-
Hans Hagen
\startRLtyping
At the right!
أهلا
\stopRLtyping
\startalignment[l2r]
\starttyping
At the left!
أهلا
\stoptyping
\stopalignment
\startalignment[r2l]
\starttyping
At the right!
أهلا
\stoptyping
\stopalignment
\stopbuffer
\typebuffer[sample] \page
\startbuffer[settings]
\setuplinenumbering[typing][location
\startRLtyping
At the right!
أهلا
\stopRLtyping
\startalignment[l2r]
\starttyping
At the left!
أهلا
\stoptyping
\stopalignment
\startalignment[r2l]
\starttyping
At the right!
أهلا
\stoptyping
\stopalignment
\stopbuffer
\typebuffer[sample] \page
\startbuffer[settings
\thinrules [alternativevariant=c,inbetween=\vskip2ex] test test
\par
\stopbuffer
\typebuffer {\getbuffer}
There are a couple of alternative ways to visualize rules
using backgrounds. At first sight these may look strange,
but they make sense in educational settings. The
alternatives are more or less
âââ$
%D \stopbuffer
%D
%D \typebuffer \blank \getbuffer \blank
\unprotect
\unexpanded\def\mathunicodesupercrap#1{\mathortext{{^{#1}}}{\high{#1}}}
\unexpanded\def\mathunicodesubcrap #1{\mathortext{{_{#1}}}{\low {#1}}}
\ifdefined\installanddefineactivecharacter\else
\def
{smallcaps}capped 123 \addff{oldstyle}123!}\blank
% Hello there {\addff{smallcaps}capped \subff{smallcaps}normal} \blank
% \stopbuffer
%
% \typebuffer \getbuffer
Naturally, I don't know what any of this code means (which is why I seek
a human language explanation), but I'm guessing
123 \addff{oldstyle}123!}\blank
% Hello there {\addff{smallcaps}capped \subff{smallcaps}normal} \blank
% \stopbuffer
%
% \typebuffer \getbuffer
4. For example, I gathered that I needed a [default] [default]
[...onum=yes...] to get oldstyle numerals by default, but what if I
want to use
-- \VL\LR
\HL
\stoptable}{\tt bodyfont=6pt,distance=small}
\stopcombination}
\stopbuffer
\typebuffer
\getbuffer
\stoptext
Further, I do not see the effect of \setupcaption[style=boldslanted] in
example 11.10 (pp 34-35)
Typo in the manual. It should be
\setupcaptions[style
the %D lines and post-process
them by any tool that you like. The biggest advantage of using a pdf output
is that we can show the output of code snippets. For example,
\startbuffer
some tex code
\stopbuffer
\typebuffer
gives
\getbuffer
thereby ensuring that the documentation is showing
\stopbuffer
\typebuffer
gives
\getbuffer
thereby ensuring that the documentation is showing the correct behavior. To
do this in html requires additional context run, converting the output to
png, and displaying the png (this is how the wiki treats context ...
/context tags).
That is also
of using a pdf
output
is that we can show the output of code snippets. For example,
\startbuffer
some tex code
\stopbuffer
\typebuffer
gives
\getbuffer
thereby ensuring that the documentation is showing the correct behavior.
To
do this in html requires additional context run, converting
the output of code snippets. For example,
\startbuffer
some tex code
\stopbuffer
\typebuffer
gives
\getbuffer
thereby ensuring that the documentation is showing the correct behavior.
To do this in html requires additional context run, converting the output
to png, and displaying the png
]
\stopbuffer
\typebuffer \getbuffer
The following example code looks messy but this has to do with
the fact that we want properly spaced sample injection.
\startbuffer
from here
\startcolor[white]%
\startbar[backbar]%
\input zapf
\removeunwantedspaces
\stopbar
\startformula[7pt] x = 1 \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
So, setting a smaller formula can also be done by \startformula[9pt] ?!
Yes, but then you will have to do this for every \startformula
individually.
Aditya
\stopbuffer
%D
%D \typebuffer \getbuffer
So, setting a smaller formula can also be done by \startformula[9pt] ?!
Steffen
___
If your question is of interest to others as well, please add an entry to the
Wiki
\definevimtyping [RUBY] [syntax=ruby]
%D
%D \startRUBY
%D #! /usr/bin/ruby
%D # This is my first ruby program
%D puts Hello World
%D \stopRUBY
%D \stopbuffer
%D {\getbuffer}
%D This was typed as \typebuffer
%D
%D The typing can be setup using \type{\setupvimtyping}.
%D
%D \showsetup{setupvimtyping}
%D
%D
[demo-b][color=blue-100]} {spot color}
{\externalfigure[demo-b][color=yellow-100]} {spot color}
\stopcombination
\stopbaselinecorrection
\stopbuffer
\getbuffer \typebuffer
\stoptext
The images in the column indexed duotone do not show up.
Piotr
2009/7/7 Hans Hagen pra...@wxs.nl:
Piotr
],# line: number,# line:
.. l.line + 2)
end
end
end
\stopluacode
\ctxlua{document.set_number(oeps)}
\startbuffer[oeps]
# line: number
test
test
\stopbuffer
\ctxlua{document.add_number(oeps)}
\typebuffer[oeps]
\stoptext
when i have time (or reason) i'll think about a more
)
+-- Types a single line of text (used by \type)
+function buffers.typesingle(text)
+hooks.begin_of_buffer('single')
+hooks.flush_line(text)
+hooks.end_of_buffer('single')
+end
+
+-- Types text from the named buffer (used by \typebuffer and \starttyping)
+function buffers.typebuffer(name
know what the first and last lines are.
The attached patch adds two new hooks, begin_of_buffer and end_of_buffer,
which will be called when typing a buffer or a file (e.g. \typebuffer or
\typefile). They are not called for typing a phrase (e.g. \type).
Is this patch acceptable for inclusion
lines are.
The attached patch adds two new hooks, begin_of_buffer and end_of_buffer,
which will be called when typing a buffer or a file (e.g. \typebuffer or
\typefile). They are not called for typing a phrase (e.g. \type).
Is this patch acceptable for inclusion?
Gr.
Matthijs
signature.asc
Hi Peter,
\setuptyping[option=TEX]
This is what I am using now, but this changes the global settings and requires
resetting them afterwards. Not so pretty. I was hoping for a better method to
achieve this, but I'm starting to doubt there is one currently.
I've been trying to give \typebuffer
.
2 ideas:
- With \setuptyping[file][option=TEX] the global setting is only for
\typefile or \typebuffer.
- Use grouping, for example:
\def\myTypeBuffer#1{\bgroup \setuptyping[...] \typebuffer[#1] \egroup}
Cheers, Peter
--
Contact information: http://pmrb.free.fr/contact
Hi all,
Snip question about styled \typebuffer
Shortly after sending my email, I realized the actual problem I was trying to
solve was not the one I posted, so perhaps I can clarify that a bit.
What I'm trying to do, is pass some text to a custom command, which should
then be displayed
On Mon, 8 Jun 2009, Matthijs Kooijman wrote:
\definetyping[FOO][option=FOO]
\startbuffer[bar]
baz
\stopbuffer
\typebuffer[FOO][bar]
Perhaps you are looking for this:
\setuptyping[option=TEX]
\starttext
\startbuffer[bar]
This is \ConTeXt.
\stopbuffer
\typebuffer[bar]
\stoptext
\typebuffer, but that only seems to work with the default typing style. I'd
like to do the following:
\definetyping[FOO][option=FOO]
\startbuffer[bar]
baz
\stopbuffer
\typebuffer[FOO][bar]
From looking at buff-ini.mkiv it seems typebuffer has some code to handle a
second argument, but it seems
Hi all,
since \startFOO \getbuffer[bar] \stopFOO gives me compile errors.
Actually, that turned out to be my own typo. However, this doesn't give me
what I want, but just a verbatim \getbuffer[bar]...
Gr.
Matthijs
signature.asc
Description: Digital signature
\dimen2=20pt
\dimen4=15pt
\dimen6=30pt
\stopbuffer
\typebuffer \getbuffer
Because we can use \ETEX\ functions with \CONTEXT\ let's try to use
them,
the following example should work:
\startbuffer
\ifdim\dimexpr\dimen0/\dimen2\relax\dimexpr\dimen4/\dimen6\relax
Second number is bigger.
\else
{\appendtoks
\doTABLEsection[#1]{#2}\to\TBLfoot}
%D \startbuffer
%D \startTABLE
%D \NC Text 1 \NC Text 2 \NC\NR
%D \NC Text 3 \NC Text 4 \NC\NR
%D \stopTABLE
%D \stopbuffer
%D
%D My example from the begin of this module
%D
%D \typebuffer
%D
%D looks like this:
%D
%D \startlinecorrection
%D
\stopTABLEfoot{\appendtoks\doTABLEsection[#1]{#2}\to\TBLfoot}
%D \startbuffer
%D \startTABLE
%D \NC Text 1 \NC Text 2 \NC\NR
%D \NC Text 3 \NC Text 4 \NC\NR
%D \stopTABLE
%D \stopbuffer
%D
%D My example from the begin of this module
%D
%D \typebuffer
%D
%D looks like this:
%D
%D \startlinecorrection
%D
$ is even}
\STATE $X \Leftarrow X \times X$
\STATE $N \Leftarrow N / 2$
\ELSE[$N$ is odd]
\STATE $y \Leftarrow y \times X$
\STATE $N \Leftarrow N - 1$
\ENDIF
\ENDWHILE
\stopalgorithm
\stopbuffer
\typebuffer \getbuffer
%\placealgorithm
% {Calculate $y = x^n$}
% {\framed[frame=off,align=right,width
\stopbuffer
%D
%D \typebuffer
which makes me wonder if I need to put the
\startbuffer,\stopbuffer,\typebuffer commands in my tex code. But I
think maybe it's markup for generating documentation.
If so, I wonder why I can't find such generated documentation on
\hyphenatedurl.
Lars
Exercising \typebuffer gives an extra blank line afterwards. See the
following minimal example. How can I prevent this extra line?
Using: ConTeXt ver: 2008.05.21 15:21 MKII fmt: 2008.5.24 int:
english/english
Example:
\startbuffer[A]
Contents of buffer A.
\stopbuffer
\startbuffer[B
Hans van der Meer wrote:
Exercising \typebuffer gives an extra blank line afterwards. See the
following minimal example. How can I prevent this extra line?
\setuptyping[file][before=,after=]
Best wishes,
Taco
2008/6/3 Hans van der Meer [EMAIL PROTECTED]:
Exercising \typebuffer gives an extra blank line afterwards. See the
following minimal example. How can I prevent this extra line?
Using: ConTeXt ver: 2008.05.21 15:21 MKII fmt: 2008.5.24 int:
english/english
Example:
\startbuffer
}
\tab{text} text
# \tbox
\tex{text}
\textreference[reference]{text}
\textrule[top|bottom]{text}
\textvariable[name]
\thinrule
\thinrules[settings]
# \tightlayer
\title[references]{text}
# \to
\tooltip[left|right|middle]{text}{text}
\translate[name=text]
\typ{text}
\type{text}
\typebuffer[name
101 - 200 of 282 matches
Mail list logo