Pablo Rodriguez via ntg-context schrieb am 08.05.2024 um 18:05:
On 5/7/24 22:37, Wolfgang Schuster wrote:
[...]
\typebuffer disables automatic \endash and \emdash with the
\nohyphencollapsing command
but the command isn't used for \typeinlinebuffer.
Many thanks for your explanation, Wolfgang
On 5/7/24 22:37, Wolfgang Schuster wrote:
> [...]
> \typebuffer disables automatic \endash and \emdash with the
> \nohyphencollapsing command
> but the command isn't used for \typeinlinebuffer.
Many thanks for your explanation, Wolfgang.
Since \type doesn’t collapse hyphe
you set the monospace font, i.e.
\definefontfamily[...][tt][...][features=none]
Many thanks for your reply, Wolfgang.
This solves the issue, but I have two questions.
Why is this only required for \inlinetypebuffer and not for \typebuffer?
Which is the exact font feature that does the hyphen
re when you set the monospace font, i.e.
>
> \definefontfamily[...][tt][...][features=none]
Many thanks for your reply, Wolfgang.
This solves the issue, but I have two questions.
Why is this only required for \inlinetypebuffer and not for \typebuffer?
Which is the exact font feature that does the hyphen l
Dear list,
I have the following sample:
\definefontfamily[mainface][tt][TeX Gyre Termes]
\setupbodyfont[mainface]
\starttext
\startbuffer
context --purgeall
\stopbuffer
inline \typeinlinebuffer
block:
\typebuffer
\stoptext
As long as there is no defined font family for mono
Command/ startxtable
Command/ stoplinenote
Command/ style
Command/ synonym
Command/ textbackground
Command/ textnote
Command/ tooltip
Command/ type
Command/ typebuffer
Command/ unit
___
If your question is of interest to ot
When developing this Hans' Swedish improved a lot. {\language[sv] Den lilla del
av
befolkningen som handlar på IKEA och tittar på fåniga krimserier förstår kanske
detta:
\im {\sqrt {x + 1} = \sin(4 + y)}!}
\stopbuffer
\typebuffer[option=TEX]
Which gives us the beautifully typeset:
\startc
% \stopfoo
\startbuffer
yyy
\stopbuffer
\startfoo
xxx
\typebuffer
zzz
\stopfoo
\stoptext
end example
Wolfgang
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist
the rest of the lines.
With \typebuffer you can define a "range", see
https://wiki.contextgarden.net/Command/typebuffer
But I guess you should write a Lua function that suits your use case.
Hraban
___
If you
box, which is at least
something.. But how can we get the NBSP symbol that's alerady in the font?
it's gone by that time ... the line break mmechanism uses glue, not
characters
Ok
3. Ideally:
a. we want all Unicode control symbols to show up in verbatim or in \typebuffer
(as in a text editor);
o
xt
2. \enabletrackers[typesetters.nbsp] gives a colored box, which is at least
something.. But how can we get the NBSP symbol that's alerady in the font?
it's gone by that time ... the line break mmechanism uses glue, not
characters
3. Ideally:
a. we want all Unicode control symbols to show
in the font?
3. Ideally:
a. we want all Unicode control symbols to show up in verbatim or in \typebuffer
(as in a text editor);
b. we want all Unicode control symbols to be suppressed in final pdf output
(for, e.g., printing).
But some fonts meant for printing have symbols for Unicode control c
Am 31.07.23 um 17:25 schrieb Pablo Rodriguez:
On 7/30/23 21:50, Henning Hraban Ramm wrote:
Am 30.07.23 um 21:22 schrieb Wolfgang Schuster:
Henning Hraban Ramm schrieb am 30.07.2023 um 21:14:
Yet another issue:
\typebuffer always starts with a blank line.
Is this a bug, or how can I disable
On 7/30/23 21:50, Henning Hraban Ramm wrote:
> Am 30.07.23 um 21:22 schrieb Wolfgang Schuster:
>> Henning Hraban Ramm schrieb am 30.07.2023 um 21:14:
>>> Yet another issue:
>>>
>>> \typebuffer always starts with a blank line.
>>> Is this a bug, or ho
Am 30.07.23 um 21:22 schrieb Wolfgang Schuster:
Henning Hraban Ramm schrieb am 30.07.2023 um 21:14:
Yet another issue:
\typebuffer always starts with a blank line.
Is this a bug, or how can I disable it?
Hraban
MWE:
"""
\starttext
\startbuffer
\samplefile{tufte}
\stopbuff
It comes from framedtext:
\starttext
\startbuffer
\samplefile{tufte}
\stopbuffer
\framedtext[strut=no]{\typebuffer[option=tex]}
\stoptext
Best,
Jacob
> Am 30.07.2023 um 21:14 schrieb Henning Hraban Ramm :
>
> Yet another issue:
>
> \typebuffer always starts wi
Henning Hraban Ramm schrieb am 30.07.2023 um 21:14:
Yet another issue:
\typebuffer always starts with a blank line.
Is this a bug, or how can I disable it?
Hraban
MWE:
"""
\starttext
\startbuffer
\samplefile{tufte}
\stopbuffer
\framedtext{\typebuffer[option=t
Yet another issue:
\typebuffer always starts with a blank line.
Is this a bug, or how can I disable it?
Hraban
MWE:
"""
\starttext
\startbuffer
\samplefile{tufte}
\stopbuffer
\framedtext{\typebuffer[option=t
\def\mycommand#=#=#=#=#:[#5]%
> {\ifparameter#1\or(1:#1)\fi
> \ifparameter#2\or(2:#2)\fi
> \ifparameter#3\or(3:#3)\fi
> \ifparameter#4\or(4:#4)\fi
> \ifparameter#5\or[5:#5]\fi}
>
> \startbuffer
> \mycommand{aa}{bb}{cc}
> \mycommand{aa}{bb}{cc}{dd}
> \mycom
{aa}{bb}{cc}
\mycommand{aa}{bb}{cc}{dd}
\mycommand{aa}{bb}{cc}{dd}[ee]
\stopbuffer
\typebuffer
\startlines \getbuffer \stoplines
\stoptext
I'm not saying that it's the best solution, you can add \protected in
front of the \def if needed.
Hans
Hi Pablo,
> \showframe
> \setupinteraction[state=start]
> \starttext
> \startbuffer[abc]
> def foo(x):
> if x == 0:
> bar()
> else:
> baz(x)
> foo(x - 1)
> \stopbuffer
> \comment[location=leftmargin,
> space=yes,
> buffer=abc,
> title={P
g your point with the following sample:
\showframe
\setupinteraction[state=start]
\starttext
\startbuffer[abc]
def foo(x):
if x == 0:
bar()
else:
baz(x)
foo(x - 1)
\stopbuffer
\comment[location=leftmargin,
space=yes,
buffer=abc,
title={Python code}]
{}\ty
igits {12,345.67e89}$
51 \setdigitmode {5} \setdigitorder{1} $\digits {12,345.67e89}$
61 \setdigitmode {6} \setdigitorder{1} $\digits {12,345.67e89}$
\stopbuffer
\typebuffer
This is typeset as:
\startlines \getbuffer \stoplines
In text, the \type{\digits} command works fine:
\setdigitmo
➊ DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE
> 9 U+0FFFD � REPLACEMENT CHARACTER
> stop missing characters
> start missing characters: cambriai.ttf
> 266 U+0276C ❬ MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT
> 266 U+0276D ❭ MEDIUM RIGHT-POINTING ANGLE BRACKET ORN
IT ONE
9 U+0FFFD � REPLACEMENT CHARACTER
stop missing characters
start missing characters: cambriai.ttf
266 U+0276C ❬ MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT
266 U+0276D ❭ MEDIUM RIGHT-POINTING ANGLE BRACKET ORNAMENT
stop missing characters
\stopbuffer
\typebuffer[exampl
RIGHT-POINTING ANGLE BRACKET ORNAMENT
stop missing characters
\stopbuffer
\typebuffer[example]
\startlines
\getbuffer[example]
{\ss\getbuffer[example]}
\stoplines
\tex{abra}\arg{...}
\type{kadabra} \type{~~~}
\stoptext
""
}}} \quad + \quad
{\PettyMatha=b^2 + \sqrt[3]{\frac{1}{x}}} \quad + \quad
{\PatheticMath a=b^2 + \sqrt[3]{\frac{1}{x}}}
\stopformula
\stopbuffer
\input tufte
\getbuffer
\input tufte
\typebuffer
\stoptext
}{NO}
\doifnothingelse{\empty}{YES}{NO}
\stopbuffer
\typebuffer \getbuffer
\stoptext
Wolfgang
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http
value. When you use something like 2\measure{...}
>> ConTeXt uses the "2" followed by the value of the measure, the following
>> example demonstrates this in the second output.
>>
>> begin example
>> \definemeasure [point] [1pt]
>>
>>
nTeXt uses the "2" followed by the value of the measure, the following
> example demonstrates this in the second output.
>
> begin example
> \definemeasure [point] [1pt]
>
> \starttext
>
> \startbuffer
> \tex{measure}: \measure{point}
>
> \tex{measure
{...}
ConTeXt uses the "2" followed by the value of the measure, the following
example demonstrates this in the second output.
begin example
\definemeasure [point] [1pt]
\starttext
\startbuffer
\tex{measure}: \measure{point}
\tex{measured}: \the\measured{point}
\stopbuffer
\
unction xml.functions.parseScript(s)
local mimetype = s and s.at and s.at.type
if mimetype and mimetype == "text/vnd.context" then
lxml.context(s)
end
end
function xml.functions.flushBody(b)
local xmlsetups = b and b.at and b.at["data-xmlsetups"]
if xmlsetups then
lxml.t
}
>
> \let\stopMyCommand\relax
>
> \normalexpanded{\def\noexpand\dostartMyCommand[#1]#2\expandtoken\notcatcodes92
> stopMyCommand}%
> {\endgroup
> % whatever #1 does
> \setbuffer[foo]#2\endbuffer
> \typebuffer[foo]
> \getbuffer[foo]}
>
> or
>
[#1]%
{\begingroup
\setcatcodetable\notcatcodes
\dostartMyCommand[#1]}
\let\stopMyCommand\relax
\normalexpanded{\def\noexpand\dostartMyCommand[#1]#2\expandtoken\notcatcodes92
stopMyCommand}%
{\endgroup
% whatever #1 does
\setbuffer[foo]#2\endbuffer
\typebuffer[foo]
\getbuffer
{\typebuffer}:
\typebuffer[javacode]
\type{\typing}:
\starttyping
try {
final var num = stack.pop();
if( num != null ) {
stack.push( blah );
}
return true;
}
\stoptyping
\type{\typefile}:
\typefile{t.java}
\stoptext
There appear to be two issues.
First, \typefile produces what I'd
Dear list,
I have this minimal sample:
\ctxlua{require("util-sha")}
\def\sha#1{%
\ctxlua{context(utilities.sha2.hash512("#1"))}}
\startbuffer[text]
hola
\stopbuffer
\starttext
\sha{hola}
\sha{\typebuffer[text]}
\stoptext
How can I get that both c
Hi everybody
Are there any type of files that is required by io.loaddata or/and
buffers.assign ?
The following code works pretty well if there is no compilation problem by g++.
But it fails, i.e. \typebuffer[Mybuffer], does not produce anything if g++
fails (due to some errors in the cpp)
I
Thank you Hans.
For what I had in mind (compiling some c++ inside a tex file) it seems to work.
Anyway for this I am currently using the buffer and typebuffer solution you
provide.
T.
Le Saturday 04 Sep 2021 à 10:35:34 (+0200), Hans Hagen a écrit :
> there has always been
>
> \the\in
rttext
\startbuffer[MyBuffer]
#include
using namespace std;
int mysum(int,int);
int a; int b;
int main () {
a=2; b=9;
cout << mysum(a,b) << endl;
return 0;
}
int mysum(int a, int b) {
return a+b;
}
\stopbuffer
We compile and run:
\typebuffer[MyBuffer][option=C]
\startl
> int main () {
> a=2; b=9;
> cout << mysum(a,b) << endl;
> return 0;
> }
> int mysum(int a, int b) {
> return a+b;
> }
> \stopbuffer
>
> We compile and run:
>
> \typebuffer[MyBuffer][option=C]
>
> \startluacode
> i
t b;
int main () {
a=2; b=9;
cout << mysum(a,b) << endl;
return 0;
}
int mysum(int a, int b) {
return a+b;
}
\stopbuffer
We compile and run:
\typebuffer[MyBuffer][option=C]
\startluacode
io.savedata("test.cpp",buffers.getcontent("MyBuffer"))
--os.execute(&qu
simplic e regulari quam ti del coalescent lingues.
Li nov lingua franca va esser plu simplic
e regulari quam li existent Europan lingues.
\stopbuffer
\dorecurse{10}{
\samplefile{knuth}
\typebuffer
}
\stoptex
ri quam li existent Europan lingues.
\stopbuffer
\dorecurse{10}{
\samplefile{knuth}
\typebuffer
}
\stoptext
Hraban
___
If your question is of interest to others as well, please add an entry to the
Wiki!
mail
(10cm, 0);
>> draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi));
>> \stopMPcode
>> I’m quite sure there’s a possibility with buffers, but how?
>> \startbuffer
>> path p;
>> p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0);
>> draw brus
;
p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0);
draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi));
\stopbuffer
\typebuffer
... and then how do I get the MP graphic?
\processMPbuffer
(p)(2minStrokeWidth*sin(offsetPathLength*pi));
\stopbuffer
\typebuffer
... and then how do I get the MP graphic?
Hraban
*) https://github.com/jemmybutton/fiziko
___
If your question is of interest to others as well
of the buffer.
\starttext
\startnointerference
\samplefile{knuth}
\stopnointerference
\typebuffer[knuth]
\getbuffer[knuth]
\stoptext
\starttext
\ctxlua{buffers.assign(
"hvdm-is-not-afraid-of-some-lua",
io.loaddata(resolvers.findfile("tufte.tex"))
)}
}
\stopnointerference
\typebuffer[knuth]
\getbuffer[knuth]
\stoptext
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
tween that's even better).
>> As an alternative solution, is there a way to add content to buffers?
>> Unfortunately, I can't use \getbuffer[first,second], but
>> \startbuffer[first][add=yes] … \stopbuffer would be nice.
> just for fun I made this:
>
> \starttext
>
fun I made this:
\starttext
\startbuffer[test]
test
\stopbuffer
\startbuffer[oeps]
oeps
\stopbuffer
\typebuffer[test] \getbuffer[test]
\startbuffer[test = * + test]
prepend
\stopbuffer
\typebuffer[test] \getbuffer[test]
\startbuffer[test = test + *]
append
\stopbuffer
\typeb
twidth,strut=no,offset=1ex,framecolor=black,rulethickness=0.5pt]
\startxrow [corner=03,align=normal]
\startxcell
\typebuffer [userdata] [option=tex]
\stopxcell
\stopxrow
\startxrow [corner=01,align=normal]
\startxcell
\getuserdata
\stopxcell
]
[renderingsetup=userdata:example]
\startsetups [userdata:example]
\blank
\startembeddedxtable
[width=\textwidth,strut=no,offset=1ex,framecolor=black,rulethickness=0.5pt]
\startxrow [corner=03,align=normal]
\startxcell
\typebuffer [userdata] [option=tex]
\stopxcell
n\n ) line 8.2\n\n') context.blank()
context('line 9.1 (\n \n)line 9.2\n\n') context.blank()
context('line 0.1 (\n \n \n) line 0.2\n\n') context.blank()
\stopluacode
\stopbuffer
\typebuffer
\getbuffer
\stoptext
now, the question is, does this cover all cases and is
it but that is gained back because we load less fonts and have less
glyph runs.
It even works in math, although there some different trickery is needed.
\typebuffer
\stoptext
-
Hans
measures)
before they are needed.
- When needed, use the reference to the buffer.
Tests looked promising. After \starttext buffers and measures are known
(both TeX & Lua). Also tested in functions, etc.
But inside the first \xmlsetup, they are not expanded anymore, they are
typeset (lik
as a trigger. Here are a few examples of usage:
162
163 \startbuffer
164 discrete---discrete
165 \stopbuffer
166 >> \typebuffer \startnarrower \dontcomplain \hsize 1pt \getbuffer \par
\stopnarrower
167 \startbuffer
168 discrete\discretionary{}{}{---}discrete
169 \stop
from it.
\starttext
\startbuffer
\vrule width 4cm height 4cm depth 0pt\relax
\stopbuffer
\typebuffer \getbuffer
\startbuffer
\hrule width 4cm height 4cm depth 0pt\relax
\stopbuffer
\typebuffer \getbuffer
\startbuffer
\frule width 4cm height 4cm type fill\relax
\stopbuffer
\typebuffer
On 7/1/2020 12:25 PM, Mikael Sundqvist wrote:
Does the indentnext do something else for this setup?
I'll look at it
Hans
-
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH
On Wed, Jul 1, 2020 at 8:53 AM Hans Hagen wrote:
> On 6/30/2020 9:50 PM, Mikael Sundqvist wrote:
> > Hi,
> >
> > I want to avoid indentation after \typebuffer (or set indentnext to auto
> > perhaps). I am probably missing something simple, but I thought that the
&g
On 6/30/2020 9:50 PM, Mikael Sundqvist wrote:
Hi,
I want to avoid indentation after \typebuffer (or set indentnext to auto
perhaps). I am probably missing something simple, but I thought that the
example file below should have worked:
\setupindenting[yes,medium]
\setuptyping[buffer
Hi,
I want to avoid indentation after \typebuffer (or set indentnext to auto
perhaps). I am probably missing something simple, but I thought that the
example file below should have worked:
\setupindenting[yes,medium]
\setuptyping[buffer][
indentnext=no,
]
\starttext
\startbuffer
\startformula
1-104, 276, 345, 401–403.
\stopbuffer
\typebuffer \getbuffer
\startbuffer
\startalignment[end]
This is the text of an index term, that is normally justified,
but I'd like the page numbers to be flushed to the right from
their second line 34, 57, 101-104, 276, 345, 401–403.
\stopalignment
\
ter=\blank]
\starttext
Normal comment:
\startbuffer
% comment
\stopbuffer
\typebuffer \getbuffer
Comment in \type{asciimode} environment:
\startbuffer
\startasciimode
% comment
\stopasciimode
\stopbuffer
\typebuffer \getbuffer
Comment in the argument of a command:
\s
} + e$\blank
$a + \overbrace [lt=1em,rb=1em] {b+c+d} + e$\blank
$a + \underbrace [lt=1em,rb=1em] {b+c+d} + e$\blank
$a + \doublebrace[lt=-4em,rb=-4em]{b+c+d} + e$\blank
\stopbuffer
\typebuffer[option=TEX]
\getbuffer
\stoptext
so, lt for lefttop etc
Hans
> ymin=-5,
> ymax=5,
> xstep=0.01,
> ystep=0.01,
> range={0},
> levels=1,
> function="-15*x+2*x*y+5*x^4*y-10*x^2*y^3+y^5",
> linecolor="orange",
> linewidth=1,
> legend=false,
> cache=true,
> ] xsized 10cm ;
> \stopMPpage
>
> \st
h=1,
legend=false,
cache=true,
] xsized 10cm ;
\stopMPpage
\startbuffer[mmainput]
ContourPlot[
{-4+x^2+x^5+15y-y^2-10x^3y^2+5x*y^4 == 0,
-15x+2x*y+5*x^4*y-10x^2*y^3+y^5 == 0},
{x, -5, 5}, {y, -5, 5}, Frame -> False]
\stopbuffer
\startTEXpage[offset=2bp]
\typebuffer[mmainput]
\externalfigure[ma
; )
>> end
>> \stopluacode
>> \def\startappendbuffer[#1]%
>> {\def\stopappendbuffer%
>> {\ctxlua{userdata.addTempToBuffer('#1', [==[\getnumber[problem]]==])}}
>>\dostartbuffer[APPENDTEMP][startappendbuffer][stopappendbuffer]}
>> \
[APPENDTEMP][startappendbuffer][stopappendbuffer]}
\starttext
\chapter{One}
\startproblem{Test}
Test problem
\startappendbuffer[soln]
Solution
\stopappendbuffer
\stopproblem
\startproblem{Test}
Test problem
\startappendbuffer[soln]
Solution
\stopappendbuffer
\stopproblem
[APPENDTEMP][startappendbuffer][stopappendbuffer]}
\starttext
\chapter{One}
\startproblem{Test}
Test problem
\startappendbuffer[soln]
Solution
\stopappendbuffer
\stopproblem
\startproblem{Test}
Test problem
\startappendbuffer[soln]
Solution
\stopappendbuffer
\stopproblem
]
\startxrow [corner=round,align=normal]
\startxcell
\typebuffer [userdata] [option=tex]
\stopxcell
\stopxrow
\stopembeddedxtable
\blank
\stopsetups
\startsetups [userdata:purecode]
\blank
\startframedtext
[width=max,offset=1ex,corner=round,framecolor=black
module?
Thanks in advance
Tommy
\usemodule [setups]
\starttext
%\startbuffer
%\framed [width=3cm,height=1cm] {testo}
%\stopbuffer
%
%\typebuffer
%\getbuffer
\cmdfullsetup [setuppapersize]
\stoptext
Sorry, the correct code is the following:
\usemodule [setups]
\starttext
\startbuffer
\framed [width=3cm,height=1cm] {testo}
\stopbuffer
\typebuffer
\getbuffer
\cmdfullsetup [setuppapersize]
\startbuffer[foo]
\framed [width=3cm,height=1cm] {testo}
\stopbuffer
\typebuffer[foo
%
%\typebuffer
%\getbuffer
\cmdfullsetup [setuppapersize]
\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
ist.
> Thanks in advance,
>
>
\starttext
\startbuffer
\placeformula \startformula \startcases
\NC 2 \NC $ y > 0 $ \NR
\NC 7 \NC $ x = 7 $ \NR[+]
\NC 4 \NC otherwise \NR
\stopcases \stopformula
\stopbuffer
\typebuffer \getbuffer
\startbuffer
\placeformula \startformula x \startc
other commands of this kind?
\usemodule[setups]
\starttext
When you describe a command, e.g.
\type{\startdescription{\cmdbasicsetup[...]} ... \stopdescription}:
\startbuffer [basicsetup]
\cmdbasicsetup [startxtable]
\stopbuffer
\typebuffer [basicsetup]
\ge
to be used
> > according to needs?
> >
> > Are there other commands of this kind?
>
> \usemodule[setups]
>
> \starttext
>
> When you describe a command, e.g.
> \type{\startdescription{\cmdbasicsetup[...]} ... \stopdescription}:
>
> \startbuffer [basi
{\startdescription{\cmdbasicsetup[...]} ... \stopdescription}:
\startbuffer [basicsetup]
\cmdbasicsetup [startxtable]
\stopbuffer
\typebuffer [basicsetup]
\getbuffer [basicsetup]
When you show the syntax of a command without the options:
\startbuffer [shortsetup]
\cmdshortsetup [startxtable]
\stopbuffer
examples in the document.
\starttext
\startbuffer
\startframedtext
\samplefile{klein}
\stopframedtext
\stopbuffer
\typebuffer[option=tex]
\getbuffer
\stoptext
You can use this to write your own environment for the examples (or use
the userdata
environment when you’re lazy :)
\defineuserdata
nition for the first command}
> % cmd:one:end
>
> % cmd:two:begin
> \define\SecondCommand
>{\dosingleempty\doSecondCommand}
>
> \def\doSecondCommand[#1]%
>{This is the definition for the second command}
> % cmd:two:end
> \stopbuffer
>
> \starttext
> \typebu
\doFirstCommand[#1]%
{This is the definition for the first command}
% cmd:one:end
% cmd:two:begin
\define\SecondCommand
{\dosingleempty\doSecondCommand}
\def\doSecondCommand[#1]%
{This is the definition for the second command}
% cmd:two:end
\stopbuffer
\starttext
\typebuffer[range={cmd:two:begin
:-).
\samplefile{ward}
\startnarrower
\samplefile{ward}
\startbuffer[test]
Leading spaces
And some more
\stopbuffer
\typebuffer[test]
\stopnarrower
\samplefile{ward}
\startbuffer[test]
Leading spaces
And some more
\stopbuffer
\typebuffer[test]
it is actually
\samplefile{ward}
\startbuffer[test]
Leading spaces
And some more
\stopbuffer
\typebuffer[test]
\stopnarrower
\samplefile{ward}
\startbuffer[test]
Leading spaces
And some more
\stopbuffer
\typebuffer[test]
it is actually a feature to align the left edge relative
]
Leading spaces
And some more
\stopbuffer
\typebuffer[test]
\stopnarrower
\samplefile{ward}
\startbuffer[test]
Leading spaces
And some more
\stopbuffer
\typebuffer[test]
it is actually a feature to align the left edge relative to the least
indented so that we can use
in a more modern way.
%D
%D \startbuffer
%D \basegrid
%D [nx=8,ny=5,
%Ddx=.5,dy=.25,
%Dunit=cm,scale=2,factor=1,
%Doffset=1ex,xstep=2,ystep=1,
%Dalign=middle,style=\tt\tx]
%D \stopbuffer
%D
%D \typebuffer
%D
%D \placefigure
%D {An example of a grid.}
%D {\getbuffer}
\startuseM
\xmltempbuffername{xml-temp}
\unexpanded\def\prettyprintbuffer#1#2% only used here
{\ifdefined\scitebuffer
\scitebuffer[#2][#1]%
\else
\typebuffer[#1][\c!option=#2]%
\fi}
%~ \unexpanded\def\xmlprettyprint#1#2%
%~ {\xmltobufferverbose{#1}{.}{\xmltempbuffername
w:
\def\xmltempbuffername{xml-temp}
\unexpanded\def\prettyprintbuffer#1#2% only used here
{\ifdefined\scitebuffer
\scitebuffer[#2][#1]%
\else
\typebuffer[#1][\c!option=#2]%
\fi}
%~ \unexpanded\def\xmlprettyprint#1#2%
%~ {\xmlto
[typebuffer]
| \ConTeXt\ \ConteXt \par
\stopbuffer
\starttext
\scitebuffer[typebuffer]
\scitebuffer[none][typebuffer]
\letterbar a \sciteinlinebuffer[typebuffer]. b
\stoptext
And I’m experiencing the following issues:
1. "|" breaks compilation when met
Hans,
after updating to latest beta (from 2017.09.05 15:10) to enjoy the new
none method in the scite buffers, I have the following sample:
\setupindenting[yes, always, big]
\usemodule[scite]
\setuptyping[margin=2cm]
\startbuffer[typebuffer]
| \ConTeXt\ \ConteXt \par
width=0.5\textwidth,
>>> align=normal,
>>> ]
>>>
>>> \definebuffer
>>> [CodeExample]
>>>
>>> \define\stopCodeExample
>>> {\placesidebyside
>>> {\CodeExampleFramed{\typeCodeExample}}
>>> {\CodeExam
inline code in XML.
\startbuffer[foo]
foo \bar{crap}
\stopbuffer
\starttext
\typebuffer[foo]
\stoptext
Many thanks for your reply, Hans.
I’m afraid this isn’t what I was looking for.
i'll make \xmlinlineprettyprinttext but there is where this madness stops
As shown in the following
nline and
>> \xmlprettyprintinlinetext in order to handle inline code in XML.
>
> \startbuffer[foo]
> foo \bar{crap}
> \stopbuffer
>
> \starttext
> \typebuffer[foo]
> \stoptext
Many thanks for your reply, Hans.
I’m afraid this isn’t what I was looking for.
As
-ver.mkiv, but I’m afraid I cannot contribute
such a patch.
This is essential to have \xmlprettyprintinline and
\xmlprettyprintinlinetext in order to handle inline code in XML.
\startbuffer[foo]
foo \bar{crap}
\stopbuffer
\starttext
\typebuffer[foo]
\stoptext
e wiki as
...
i.e. sourcecode beside the result.
Often the shown source is exactly what I want to show, in other cases I need
some additional setup that I don’t want to show.
Which approach would you suggest? Combinations?
\startbuffer[example-1]
\stopbuffer
\placesidebyside
{\type
On 07/30/2017 07:13 PM, Henning Hraban Ramm wrote:
> [...]
> But I’d like to show a lot of similar examples to explain several options.
> Therefore, if I’d like to simplify my code, but this doesn’t work:
>
> \def\CodeExample#1{%
> \startbuffer[zB]
> #1
> \sto
you suggest? Combinations?
>
> \startbuffer[example-1]
>
> \stopbuffer
>
>
> \placesidebyside
>{\typebuffer[example-1]}
>{\getbuffer[setups, example-1]}
Thank you again, that should be enough for most of my small examples.
I guess I never heard of or forgot abou
lookups = { 1 },
},
},
},
}
\stopluacode
\definefontfeature[test-a][test-a=yes]
\startbuffer
xxx abcd abxcd xxx
\stopbuffer
\starttext
\typebuffer
\definedfont[file:dejavu-serif.ttf*default] \getbuffer \blank
\definedfont[file:dejavu-serif.ttf
ot; }, { "d" } },
after = { { 0xFFFC, " " } },
lookups = { 1 },
},
},
},
}
\stopluacode
\definefontfeature[test-a][test-a=yes]
\startbuffer
xxx abcd abxcd xxx
\stopbuffer
\starttext
\typebuffer
\de
On 07/29/2017 10:58 AM, Pablo Rodriguez wrote:
> On 07/29/2017 12:57 AM, Aditya Mahajan wrote:
>> [...]
>> \placesidebyside
>> {\typebuffer[example-1]}
>> {\getbuffer[setups, example-1]}
> [...]
> Is there now hay to avoid the forced horizontal mode o
On 07/29/2017 12:57 AM, Aditya Mahajan wrote:
> [...]
> \startbuffer[example-1]
>
> \stopbuffer
>
>
> \placesidebyside
> {\typebuffer[example-1]}
> {\getbuffer[setups, example-1]}
Many thanks for your suggestion, Aditya.
I’m afraid everything is forc
some additional setup that I don’t want to show.
Which approach would you suggest? Combinations?
\startbuffer[example-1]
\stopbuffer
\placesidebyside
{\typebuffer[example-1]}
{\getbuffer[setups, example-1
1 - 100 of 282 matches
Mail list logo