is created.
\definetyping[MyTyping][style=\tt]
\typefile[MyTyping][numbering=line]{three_lines.txt}
Still works if used in a column
\startcolumns
\typefile[MyTyping][numbering=line]{three_lines.txt}
\column
:-)
\stopcolumns
\blank
But doesn't work if used in tabulate
\starttabulate[|p|p|]
\NC
\typefil
=mpos:par:myexample,
location=paragraph,
topoffset=0.4em,
leftoffset=0em,
rulethickness=0.7pt]
\definetyping[Listing]
[option=commands]
\setuptyping
[Listing]
[bodyfont=10pt,
margin=1em,
before=%
{\blank[3*medium]
\setupinterlinespace[line=2.4ex]
\starttextbackground
;
draw p withcolor black
withpen pencircle scaled \MPvar{linewidth};
endfor;
\stopuseMPgraphic
\definetextbackground
[listingbackground]
[state=start,
mp=mpos:par:myexample,
location=paragraph,
topoffset=0.4em,
leftoffset=0em,
rulethickness=0.7pt]
\definetyping[Listing]
[option=commands
scaled \MPvar{linewidth};
endfor;
\stopuseMPgraphic
\definetextbackground
[listingbackground]
[state=start,
mp=mpos:par:myexample,
location=paragraph,
topoffset=0.4em,
leftoffset=0em,
rulethickness=0.7pt]
\definetyping[Listing]
[option=commands]
\setuptyping
[Listing
Hello,
is there a way to preserve empty lines in typing env?
By default it is removing them.
Thanks
* * *
\definetyping[custom]
\setuptyping[custom][
space=normal,
lines=yes,
tab=4,
]
\starttext
\startcustom
Foo
Bar
Baz
\stopcustom
\stoptext
age, portrait]
\definehead[poem][section]
\setuphead[poem][]
\definetyping[CUSTOM]
\setuptyping[CUSTOM][escape={[[,]]}]
\starttext
\showgrid
\startpoem[title={My title}][]
\startCUSTOM[]
\stopCUSTOM
\stoppoem
\stoptext
```
Tha
Am 29.07.23 um 23:16 schrieb Hans Hagen:
On 7/29/2023 10:35 PM, Henning Hraban Ramm wrote:
The setup for MyCode is not applied to \typeMyBuffer, and I don’t know
how it could; something like \typeMyBuffer[MyCode] doesn’t work.
These commands inherit from buffer, so \setupbuffer will work.
[#3]%
\orelse\ifempty{#3}\else
\cdef\currenttyping{#3}
\fi
\buff_verbatim_type_buffer_indeed{\currenttyping}{#2}%
\useindentnextparameter\typingparameter
\endgroup
\dorechecknextindentation}
\popoverloadmode \protect
\usemodule[visual]
\definetyping[MyCode]
\setuptyping
Am 29.07.23 um 22:49 schrieb Max Chernoff:
I'm on mobile now so I can't type out a complete solution, but I think that
what you're looking for is in this file:
https://github.com/gucci-on-fleek/unnamed-emoji/blob/master/documentation/unemoji-manual.mkxl
It doesn't exactly do what you
I'm on mobile now so I can't type out a complete solution, but I think that
what you're looking for is in this file:
https://github.com/gucci-on-fleek/unnamed-emoji/blob/master/documentation/unemoji-manual.mkxl
It doesn't exactly do what you specifically asked for, but I think that it's
Am 29.07.23 um 22:06 schrieb Bruce Horrocks:
Your example seems to work: I see the \getbuffer[MyBuffer] command typed (not
executed) with colour coding on the keyword and line numbered; then the block
text fakewords from the visual module; then the \fakewords macro shown (again
not executed)
Am 29.07.23 um 22:06 schrieb Bruce Horrocks:
Your example seems to work: I see the \getbuffer[MyBuffer] command typed (not
executed) with colour coding on the keyword and line numbered; then the block
text fakewords from the visual module; then the \fakewords macro shown (again
not executed)
exepcting if not this?
(onTeXt ver: 2023.07.18 22:07 LMTX)
> On 29 Jul 2023, at 20:09, Henning Hraban Ramm wrote:
>
> Hi,
> I’d like to use a custom buffer ("MyBuffer") to use a custom typing style
> ("MyCode"). How does that work?
>
>
> "
Hi,
I’d like to use a custom buffer ("MyBuffer") to use a custom typing
style ("MyCode"). How does that work?
"""
\usemodule[visual]
\definetyping[MyCode]
\setuptyping[MyCode][
option=tex,
numbering=file,
]
\definebuffer[MyBuffer]
\startMyBuff
this module: https://github.com/adityam/filter
> >
> > How do I add this module to my current installation? Thanks for your
> consideration.
>
> I'm not quite sure what you mean by 'render' Python code. If you just mean
> to typeset it using a monospaced font so th
nt so that the indentation is preserved then a
simple \definetyping is probably all that you need.
e.g.
\definetyping[PythonSource][style=\mono]
\starttext
This is taken from Rosetta Code:\par
\startPythonSource
def eratosthenes2(n):
multiples = set()
for i in range(2, n+1):
if
> \starttyping[abc]
> example
> example
> \stoptyping
>
> \starttyping[def]
> example
> example
> \stoptyping
>
> \stoptext
>
Use \definetyping (and \start..\stop) instead so:
\definetyping[abc][style=\ttx]
\definetyping[def][style=\ttxx]
\starttext
\sta
]
text
text
\stoptyping
\stoptext
in lmtx we can do this
\definetyping[abc] \setuptyping[abc][style=\ttx]
\definetyping[def] \setuptyping[def][style=\ttxx]
\unprotect
\tolerant\def\buff_verbatim_typing_start_yes[#1]#*[#2]%
{\let\m_typing\currenttyping
\ifhastok={#1}%
\setupcurrenttyping
On Fri, Mar 19, 2021 at 9:49 AM Hans Hagen wrote:
> On 3/19/2021 4:58 AM, Christoph Reller wrote:
> > Hi,
> >
> > Consider the following MWE:
> >
> > \definetyping[T]
> > \definemode[mode][yes]
> > \starttext
> > \doifmode{mode}{%
>
On 3/19/2021 4:58 AM, Christoph Reller wrote:
Hi,
Consider the following MWE:
\definetyping[T]
\definemode[mode][yes]
\starttext
\doifmode{mode}{%
\startT
Bla
\stopT}
\stoptext
Compilation with the currently latest ConTeXt LMTX (ver: 2021.03.17
17:46 LMTX fmt: 2021.3.18) fails
On Fri, Mar 19, 2021 at 5:38 AM Aditya Mahajan wrote:
> On Fri, 19 Mar 2021, Christoph Reller wrote:
>
> > Consider the following MWE:
> >
> > \definetyping[T]
> > \definemode[mode][yes]
> > \starttext
> > \doifmode{mode}{%
> >
On Fri, 19 Mar 2021, Christoph Reller wrote:
> Hi,
>
> Consider the following MWE:
>
> \definetyping[T]
> \definemode[mode][yes]
> \starttext
> \doifmode{mode}{%
> \startT
> Bla
> \stopT}
> \stoptext
>
> Compilation with the currently latest
Hi,
Consider the following MWE:
\definetyping[T]
\definemode[mode][yes]
\starttext
\doifmode{mode}{%
\startT
Bla
\stopT}
\stoptext
Compilation with the currently latest ConTeXt LMTX (ver: 2021.03.17 17:46
LMTX fmt: 2021.3.18) fails with:
tex error > runaway error: end of f
> dist/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2020.03.10 14:44
> mtx-context | main context file: /usr/share/texmf-
> dist/tex/context/base/mkiv/context.mkxl
> mtx-context | current version: 2020.03.10 14:44
>
> So probably I should upgr
Johann Birnick schrieb am 26.11.2020 um 21:40:
I have updated and now it works. Thank you very much for all your
efforts.
The problem was fixed at the end of march.
Now let's come to my second problem: the sidebar. Proudly, I present to you my
first MWE:
\definetyping[CPP]
[before
, after={\stopbackground}]
> > >
> > > \starttext[option=XML]
> > > \starttyping
> > > This is some code
> > > a second line
> > > \stoptyping
> > > \stoptext
> > >
> > > When I use \definetyping[Mytyping][optio
ome code
> > a second line
> > \stoptyping
> > \stoptext
> >
> > When I use \definetyping[Mytyping][option=XML] and then use \startMytyping
> > ...
> > \stopMytyping nothing changes.
> ???
>
> \definetextbackground
> [Code]
> [
=paragraph]
\setuptyping[before={\startbackground[code]}, after={\stopbackground}]
\starttext[option=XML]
\starttyping
This is some code
a second line
\stoptyping
\stoptext
When I use \definetyping[Mytyping][option=XML] and then use \startMytyping ...
\stopMytyping nothing changes
> This is some code
> > > > a second line
> > > > \stoptyping
> > > >
> > > > \stoptext
> > > >
> > > > Wolfgang
> > > Okay so first sorry that the example missed the \starttext ... \stoptext.
> > > Won't
&
; > > This is some code
> > > a second line
> > > \stoptyping
> > >
> > > \stoptext
> > >
> > > Wolfgang
> > Okay so first sorry that the example missed the \starttext ... \stoptext.
> > Won't
> >
I didn't
Hi there,
in my document(s) I have enumerations (created with \defineenumeration) and
"typing"s (created with \definetyping) and I need to give a specific layout to
them. In particular, I want to add textbackground (created with
\definetextbackground) and sometimes a sideba
Hello,
is there a way to draw custom background (via MP) to a text typed by
\typefile, which is so long so it spreads over more pages?
- I'm asking because I know how to typeset some text via \typefile with:
1. this:
\definetyping[Test]
[before={\startbackground[background=color
Hi all,
in a typing environment, I have the problem that not every line is
numbered:
\definetyping
[code]
[numbering=line,
escape={@[,@]}]
\setupcolors[state=start]
\definecolor[nonsigpart][r=.7,g=.7,b=.7]
\defineframed[nonsig]
[location=low
iple output for
> publishing
> ane educational purposes. And it looks pretty good too.
>
Thank you very much i will do. You are refering to Thomas Schmitz?
\setupbackend[
export=yes,
xhtml=yes
]
\setupexport[
title={linenumber placement missmatch example in export},
subtitle={},
au
Yves Cloutier schrieb am 15.03.2020 um 16:09:
Hello Wolfgang, after a few attempts that didn't work I copy-pasted the
example from the wiki:
\definetyping[C][option=commands] \startC #include int main(){
return 0; /BTEX{\em unreachedCode;}/ETEX } \stopC
This did not work.
However
Hello Wolfgang, after a few attempts that didn't work I copy-pasted the
example from the wiki:
\definetyping[C][option=commands]\startC
#include
int main(){
return 0;
/BTEX{\em unreachedCode;}/ETEX}\stopC
This did not work.
However following the example you provided this works
On 8/28/2019 8:14 PM, Fabrice L wrote:
Dear list,
I’m using colored verbatim code (for course notes). In the past, I
modified verb-mp.mkii for the langage I need (SAS). This code works fine
with MKII:
%——
\setupcolors[state=start]
\definetyping [MP] [option=MP]
\starttext
A example
Dear list,
I’m using colored verbatim code (for course notes). In the past, I modified
verb-mp.mkii for the langage I need (SAS). This code works fine with MKII:
%——
\setupcolors[state=start]
\definetyping [MP] [option=MP]
\starttext
A example:
\startMP
draw (0,0) withpen pencircle 1in
-lua.mkiv
buff-imp-lua.lua
written by Hans, by naming them (temporarily)
buff-imp-scilab.mkiv
buff-imp-scilab.lua
and then by saying
\usemodule[buff-imp-scilab]
\definetyping[scilab][option=SCILAB]
I could obtain an approximate good result… But since
Hi Tommaso,
\startttyping is a generated command (\definetyping[typing]) and to show
the command with \showdefinition you have to use
\showdefinition [starttyping:instance:typing]
or
\showdefinition [starttyping:instance:argument:typing]
A complete list with all arguments can be found
ace your two setuptyping lines with:
\setuptyping[style=\ttxx]
\definetyping[XML]
\setuptyping[XML][option=XML,style=italic]
nothing else needs to change
Best wishes,
Taco
On 10 Sep 2018, at 11:22, Hans van der Meer wrote:
setuptyping lines with:
\setuptyping[style=\ttxx]
\definetyping[XML]
\setuptyping[XML][option=XML,style=italic]
nothing else needs to change
Best wishes,
Taco
On 10 Sep 2018, at 11:22, Hans van der Meer wrote:
Taco Hoekwater
Elvenkind BV
Hi Hans,
Replace your two setuptyping lines with:
\setuptyping[style=\ttxx]
\definetyping[XML]
\setuptyping[XML][option=XML,style=italic]
nothing else needs to change
Best wishes,
Taco
> On 10 Sep 2018, at 11:22, Hans van der Meer wrote:
>
>
Taco Hoekwater
Elv
Dear list,
I have the following sample:
\setuptyping[TEX][lines=no]
\definetyping[TEXlines][lines=yes, option=TEX]
\starttext
\startxtable[frame=off,option=stretch]\startxrow
\startxcell\startTEX
\starttext
Esto
es un
único párrafo.
Y aquí está el
=python,
style={\switchtobodyfont[8pt,tt]},]
\starttext
\startpython
for line in foo:
print(line)
\stoppython
This is keyword \inlinepython{in} Python.
\stoptext
```
The simplest solution is:
\definetyping[python][syntax=python]
\definetyping
, grammar = grammar2 } )
Then in .mkiv:
\definetyping
[CUSTOM]
[\c!option=custom]
\definetyping
[CUSTOMB]
[\c!option=customb]
I'll just need to work out how to define only the changes I want to make
to handler2, grammar2 without copy/paste from handler, grammar.
the same
buff-imp-custom.lua and .mkiv pairs of files instead of creating
multiple files.
The .mkiv file defines e.g.:
\definetyping
[CUSTOM1]
[\c!option=custom]
I'd like to add say CUSTOM2 but pass an option that would be visible to
the same buff-imp-custom.lua file. Perhaps
Nicola <mailto:nvitacolo...@gmail.com>
13. April 2016 um 19:25
Thanks for your answers. I'd like to go with \definetyping then, because
I need /BTEX../ETEX. I have found an old document of mine, which uses a
(slightly customized) pret-c.lua, located inside the project's folder.
It co
) ... the pret files are more or less
working in the same way (they date from before scite got that kind of
lexers)
Thanks for your answers. I'd like to go with \definetyping then, because
I need /BTEX../ETEX. I have found an old document of mine, which uses a
(slightly customized) pret-c.lua, located
Context version.
Example :
\installprettytype[C][C]
\definetyping[C][option=C]
\startC
int func(int a){
if(a 4)
return 0; // comment
else/* comment */
return 10;
}
\stopC
Thank you
, but this one doesn't work (error :
undefined control sequence).
I'm using the 2015.08.13 19:33 Context version.
Example :
\installprettytype[C][C]
\definetyping[C][option=C]
\startC
int func(int a){
if(a 4)
return 0; // comment
else/* comment */
return 10;
}
\stopC
]
\definetyping[C][option=C]
\startC
int func(int a){
if(a 4)
return 0; // comment
else/* comment */
return 10;
}
\stopC
Thank you.
___
If your question is of interest
version.
Example :
\installprettytype[C][C]
\definetyping[C][option=C]
\startC
int func(int a){
if(a 4)
return 0; // comment
else/* comment */
return 10;
}
\stopC
Thank you
control sequence).
I'm using the 2015.08.13 19:33 Context version.
Example :
\installprettytype[C][C]
\definetyping[C][option=C]
\startC
int func(int a){
if(a 4)
return 0; // comment
else /* comment */
return 10;
}
\stopC
Thank you
-xxx (for mkIV) in the
base folder.
Is it possible to get syntax highlight in mkIV ?
You can enable syntax highlighting for TeX, Lua, XML and MetaPost
with MkIV. To enable the option pass option=...” to the
\starttyping command or create your own environment with the
\definetyping command.
OK
the \definesomething commands as for example
http://wiki.contextgarden.net/Command/definetyping
Context has also
http://wiki.contextgarden.net/Command/startenvironment
but I suppose it's not what you mean.
--
luigi
the \definesomething commands as for example
http://wiki.contextgarden.net/Command/definetyping
I think this corresponds (in pseudocode) to my
\new{Environment}{typing}%
{}{before code}%
{after code}{}
In LaTeX, if I remember correctly, it would expand to \begingroupbefore code
… after code
Hello,
I've tracked down the problem :
\def\numeroLigneCode#1{\inframed[width=fit,strut=yes,frame=off,rightframe=on]{\switchtobodyfont[9pt]#1}}
\definetyping[code][numbering=line,page=yes,bodyfont=9pt,before={%
\begingroup%
\setuplinenumbering[location
Am 29.04.2015 um 17:00 schrieb Pierre-François Bonnefoi bonne...@unilim.fr:
Thank you very much for your solution.
When using it into a paragraph, the line number disappears :
\defineframed[numeroLigneCode][location=low,width=fit,strut=yes,frame=off,rightframe=on]
\definetyping[code
Am 29.04.2015 um 15:05 schrieb Pierre-François Bonnefoi bonne...@unilim.fr:
Hello,
I've tracked down the problem :
\def\numeroLigneCode#1{\inframed[width=fit,strut=yes,frame=off,rightframe=on]{\switchtobodyfont[9pt]#1}}
\definetyping[code][numbering=line,page=yes,bodyfont=9pt,before
Thank you very much for your solution.
When using it into a paragraph, the line number disappears :
\defineframed[numeroLigneCode][location=low,width=fit,strut=yes,frame=off,rightframe=on]
\definetyping[code][numbering=line,page=yes,bodyfont=9pt,tab=2
On 4/15/2015 7:50 PM, Pablo Rodriguez wrote:
Dear list,
the following sample:
\definetyping
[tycode]
[option=TEX,
style={\tt\setupinterlinespace[line=5em]}]
\starttext
\section{\input zapf}
\starttycode
legibilidad,
{\en legibility
Dear list,
the following sample:
\definetyping
[tycode]
[option=TEX,
style={\tt\setupinterlinespace[line=5em]}]
\starttext
\section{\input zapf}
\starttycode
legibilidad,
{\en legibility},
{\de Lesbarkeit}
\stoptycode
,option=BREAK,lines=hyphenated]
79 % lines=hyphenated?
80
81
%\defineframedtext[framedcode][strut=yes,offset=2mm,width=fit,align=right,framecorner=round]
82 %\definetyping[code][numbering=line,bodyfont=small]
83 %before={\startframedcode},after={\stopframedcode}]
84 %\setuptyping
,bodyfont=small,option=BREAK,lines=hyphenated]
79 % lines=hyphenated?
80
81
%\defineframedtext[framedcode][strut=yes,offset=2mm,width=fit,align=right,framecorner=round]
82 %\definetyping[code][numbering=line,bodyfont=small]
83 %before={\startframedcode},after={\stopframedcode}]
84
]
\definetyping
[R]
[options=R,
style={\ss},
before={\startframedtext
[width=.975\makeupwidth,
frame=off,
bottomframe=on,
topframe=on,
background=screen,
backgroundscreen=.95]},
after={\stopframedtext},
bodyfont=9pt,
margin=1.3em
“indentnext=auto” to your \definetyping setups.
Wolfgang
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg
\defineframedtext[framedcode][strut=yes,offset=2mm,width=7cm,align=right]
\definetyping[code][numbering=line,bodyfont=small,before={\startframedcode},after={\stopframedcode}]
\setuplinenumbering[location=intext]
\setuptyping[option=color]
startxmlsetups xml:demo:codi
\blank
\startcode\xmlverbatim
.
But why can't I use
\defineframedtext[framedcode][strut=yes,offset=2mm,width=7cm,align=right]
\definetyping[code][numbering=line,bodyfont=small,before={\startframedcode},after={\stopframedcode}]
\setuplinenumbering[location=intext]
\setuptyping[option=color]
startxmlsetups xml:demo:codi
\blank
\xmlverbatim{#1}
\stop
\blank
\stopxmlsetups
First of all, thank you very much, Hans.
But why can't I use
\defineframedtext[framedcode][strut=yes,offset=2mm,width=7cm,align=right]
\definetyping[code][numbering=line,bodyfont=small,before={\startframedcode},after={\stopframedcode
][mono][ryt1xtt][bf=ryt1xbtt]
\setupbodyfont[mainface]
\definetyping[TeXcode][option=TEX]
\starttext
\starttyping
\ConTeXt\ is
\stoptyping
\startTeXcode
\ConTeXt\ is
\stopTeXcode
\stoptext
If option=TEX is enabled, there is no space after the backslash.
I have checked the font and it seems to work
in the following sample (beta from 2014.02.01 14:22):
\definefontfamily[mainface][mono][ryt1xtt][bf=ryt1xbtt]
\setupbodyfont[mainface]
\definetyping[TeXcode][option=TEX]
\starttext
\starttyping
\ConTeXt\ is
\stoptyping
\startTeXcode
\ConTeXt\ is
\stopTeXcode
\stoptext
If option=TEX is enabled
.
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[buffer][style=\tt\setupinterlinespace,align={right
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
[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).
Here is a more detailed sample:
\definetyping[buffer][option=TEX,before=\startframedtext,after
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
a \hbox would put everything in a single line.
The important question is why do you want to store the text in a box.
When you plan to frame the text something like this can be used:
\definetyping
[framedfile]
[file]
[before={\startframedtext[width=max]},
after=\stopframedtext]
\starttext
]
| \setupfloat [listing] [topframe=on, bottomframe=on]
| \setupheadtext [listings=Quellcodelistings]
|
| \defineblank [aroundcode] [medium]
| \definetyping [code]
| \setuptyping [code]
| [option=color, bodyfont=8.0pt, margin=yes,
| before={\blank[aroundcode]\startlinenumbering},
| after
or \definevimtyping. (I haven't tested
it too much, hence no new release at the moment).
Note that this works differently from \definetyping. The typing
environment honors the leftskip set by its parent environment (for
example, if typing is inside startbackground); vimtyping environment
resets all
.
Note that this works differently from \definetyping. The typing
environment honors the leftskip set by its parent environment (for
example, if typing is inside startbackground); vimtyping
environment resets all the settings of its parent environment.
That's why the hacks that I tried before all
,
margin=106pt,
leftmargindistance=11pt,
rightmargindistance=11pt%
]
\setupblank[5.5pt]
\setuppagenumbering [location=]
\definetyping [widetyping]
\setupheader [style=\ss]
\setupfooter [style=\ss]
\def\AuHead{%
%\ifnum\pageno=\MapsPage \hbox{}\else
\MapsRunningAuthor%\fi
}
\def\TiHead
Hey list,
The following minimal seems to identify a problem with making the frame
border's of text backgrounds vanish.
\definetextbackground[ExampleFrame]
[frame=on]
\definetyping
[Example]
[before=\startExampleFrame,
after=\stopExampleFrame]
% To move footnotes inside
]
\definetyping[C][option=C]
\starttext
\startC
#includestdio.h
int main()
{
printf(Hello World\n);
return 0;
}
\stopC
\blank[2*line]
\starttyping[option=C]
#includestdio.h
int main()
{
printf(Hello World\n);
return 0;
}
\stoptyping
\stoptext
Wolfgang
On Thu, 2011-11-03 at 05:26 +0100, Wolfgang Schuster wrote:
???
What's wrong?
\defineframedtext
[CodeExampleFrame]
[before=\blank,
after=\blank,
corner=round,
offset=0.5cm]
\definetyping
[CodeExample]
[before=\startCodeExampleFrame,
after=\stopCodeExampleFrame
]
???
\defineframedtext
[CodeExampleFrame]
[before=\blank,
after=\blank,
corner=round,
offset=0.5cm]
\definetyping
[CodeExample]
[before=\startCodeExampleFrame,
after=\stopCodeExampleFrame]
\starttext
Hello World
\startCodeExample
Hello World Again
\stopCodeExample
\stoptext
I want to define an environment for computer code including non-ASCII
characters, using Xits or STIXGeneral except in the ASCII range, where some
monospace font like Courier should be used.
If I do:
\setupbodyfont[xits,10pt]
\definetyping[code]
\setuptyping[code][margin=yes]
\starttext
,10pt]
\definetyping[code]
\setuptyping[code][margin=yes]
\starttext
\startcode
for ∀i, j ∈ I
do a(i, j) ≔ b(i, j)
\stopcode
\stoptext
Then the math characters won't show. They will show using
\setuptyping[code][style=normal,margin=yes]
but then the ASCII range isn't monospace.
It's
Am 29.09.2011 um 21:58 schrieb Hans Aberg:
I want to define an environment for computer code including non-ASCII
characters, using Xits or STIXGeneral except in the ASCII range, where some
monospace font like Courier should be used.
If I do:
\setupbodyfont[xits,10pt]
\definetyping[code
]
\definetyping[code]
\setuptyping[code][margin=yes]
\starttext
\startcode
for ∀i, j ∈ I
do a(i, j) ≔ b(i, j)
\stopcode
\stoptext
Then the math characters won't show. They will show using
\setuptyping[code][style=normal,margin=yes]
but then the ASCII range isn't monospace
lines is
replaced by a single blank line (for obvious reasons). I tried to
experiment with the settings \setuptyping, but without success.
Thanx Jaroslav Hajtmar
Here is my minimal example :
\definetyping[mytyping][color=blue, style=type, option=, blank=line,
space=fixed]%
\starttext
Hi,
I am having problems typing when typesetting code within a
\definetyping environment.
I hope someone might be able to give me a hint. My code looks as
follows:
\definetyping
[Haskell]
[ option=commands,
before={\startframedtext[width=\makeupwidth,
frame=off,bottomframe
On Wed, 7 Sep 2011, Thomas Friedrich wrote:
Hi,
I am having problems typing when typesetting code within a
\definetyping environment.
I hope someone might be able to give me a hint. My code looks as
follows:
\definetyping
[Haskell]
[ option=commands,
before={\startframedtext[width
Am 08.09.2011 um 09:55 schrieb Aditya Mahajan:
On Wed, 7 Sep 2011, Thomas Friedrich wrote:
Hi,
I am having problems typing when typesetting code within a
\definetyping environment.
I hope someone might be able to give me a hint. My code looks as
follows:
\definetyping
[Haskell
Am Donnerstag, den 08.09.2011, 09:59 +0200 schrieb Wolfgang Schuster:
Am 08.09.2011 um 09:55 schrieb Aditya Mahajan:
On Wed, 7 Sep 2011, Thomas Friedrich wrote:
Hi,
I am having problems typing when typesetting code within a
\definetyping environment.
I hope someone might
Hi.
Please consider the following two examples:
file name=exa-feat1.tex
\setupbackend[export=yes]
\definetyping[EXAMPLE][escape=yes]
\starttext
This is an example with \quotation{long} verbatim text.
Why context fails to compile the file? Is there a method to process this file?
\startEXAMPLE
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
Hi.
Consider the following two example files:
- 8
file name=exa-feat1.tex
\setupbackend[export=yes]
\definetyping[EXAMPLE][escape=yes]
\starttext
This is an example with \quotation{long} verbatim text.
Why context complians
1 - 100 of 221 matches
Mail list logo