[NTG-context] Problems with line numbered program listings

2023-10-04 Thread Bruce Horrocks
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

[NTG-context] Verbatim Textbox with Reference NUmbering

2023-09-09 Thread Jeroen
=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

[NTG-context] Re: Text runs out of Verbatim Frame

2023-09-08 Thread Wolfgang Schuster
; 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

[NTG-context] Text runs out of Verbatim Frame

2023-09-08 Thread Jeroen
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

[NTG-context] Vebatim text: Preserve empty lines

2023-08-16 Thread Alex Leray
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

[NTG-context] Typing with text wrapping

2023-08-05 Thread Alex Leray
age, portrait] \definehead[poem][section] \setuphead[poem][] \definetyping[CUSTOM] \setuptyping[CUSTOM][escape={[[,]]}] \starttext \showgrid \startpoem[title={My title}][] \startCUSTOM[] \stopCUSTOM \stoppoem \stoptext ``` Tha

[NTG-context] Re: combining \definetyping and \definebuffer

2023-07-30 Thread Henning Hraban Ramm
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.

[NTG-context] Re: combining \definetyping and \definebuffer

2023-07-29 Thread Hans Hagen
[#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

[NTG-context] Re: combining \definetyping and \definebuffer

2023-07-29 Thread Henning Hraban Ramm
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

[NTG-context] Re: combining \definetyping and \definebuffer

2023-07-29 Thread 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 specifically asked for, but I think that it's

[NTG-context] Re: combining \definetyping and \definebuffer

2023-07-29 Thread Henning Hraban Ramm
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)

[NTG-context] Re: combining \definetyping and \definebuffer

2023-07-29 Thread Henning Hraban Ramm
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)

[NTG-context] Re: combining \definetyping and \definebuffer

2023-07-29 Thread Bruce Horrocks
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? > > > "

[NTG-context] combining \definetyping and \definebuffer

2023-07-29 Thread Henning Hraban Ramm
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

Re: [NTG-context] adding module to ConTeXt basic installation

2021-11-11 Thread Denis Maier via ntg-context
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

Re: [NTG-context] adding module to ConTeXt basic installation

2021-11-06 Thread Bruce Horrocks via ntg-context
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

Re: [NTG-context] Different Typing Styles

2021-07-28 Thread Bruce Horrocks via ntg-context
> \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

Re: [NTG-context] Different Styles of Typing

2021-07-28 Thread Hans Hagen via ntg-context
] 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

Re: [NTG-context] Typing within doifmode leads to error

2021-03-19 Thread Christoph Reller
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}{% >

Re: [NTG-context] Typing within doifmode leads to error

2021-03-19 Thread Hans Hagen
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

Re: [NTG-context] Typing within doifmode leads to error

2021-03-19 Thread Christoph Reller
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}{% > >

Re: [NTG-context] Typing within doifmode leads to error

2021-03-18 Thread Aditya Mahajan
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

[NTG-context] Typing within doifmode leads to error

2021-03-18 Thread Christoph Reller
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

Re: [NTG-context] Vertical space when surrounding with textbackground

2020-11-26 Thread Johann Birnick
> 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

Re: [NTG-context] Vertical space when surrounding with textbackground

2020-11-26 Thread Wolfgang Schuster
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

Re: [NTG-context] Vertical space when surrounding with textbackground

2020-11-26 Thread Johann Birnick
, after={\stopbackground}] > > > > > > \starttext[option=XML] > > > \starttyping > > > This is some code > > > a second line > > > \stoptyping > > > \stoptext > > > > > > When I use \definetyping[Mytyping][optio

Re: [NTG-context] Vertical space when surrounding with textbackground

2020-11-26 Thread Johann Birnick
ome code > > a second line > > \stoptyping > > \stoptext > > > > When I use \definetyping[Mytyping][option=XML] and then use \startMytyping > > ... > > \stopMytyping nothing changes. > ??? > > \definetextbackground >    [Code] >    [ 

Re: [NTG-context] Vertical space when surrounding with textbackground

2020-11-26 Thread Wolfgang Schuster
=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

Re: [NTG-context] Vertical space when surrounding with textbackground

2020-11-26 Thread Aditya Mahajan
> This is some code > > > > a second line > > > > \stoptyping > > > > > > > > \stoptext > > > > > > > > Wolfgang > > > Okay so first sorry that the example missed the \starttext ... \stoptext. > > > Won't &

Re: [NTG-context] Vertical space when surrounding with textbackground

2020-11-26 Thread Johann Birnick
; > > 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

[NTG-context] Vertical space when surrounding with textbackground

2020-11-26 Thread Johann Birnick
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

[NTG-context] MP background for text typeset by \typefile

2020-11-05 Thread context
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

[NTG-context] Line numbering skips lines

2020-10-30 Thread Felix Krause
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

Re: [NTG-context] xhtml export internal command \dostarttaging modify display and other XML/XHTML attributes

2020-04-10 Thread Christoph Hintermüller
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

Re: [NTG-context] ntg-context Digest, Vol 189, Issue 28

2020-03-15 Thread Wolfgang Schuster
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

Re: [NTG-context] ntg-context Digest, Vol 189, Issue 28

2020-03-15 Thread Yves Cloutier
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

Re: [NTG-context] Syntax hightlighting

2019-08-28 Thread Hans Hagen
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

[NTG-context] Syntax hightlighting

2019-08-28 Thread Fabrice L
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

Re: [NTG-context] Pretty printer for matlab

2019-02-21 Thread Otared Kavian
-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

Re: [NTG-context] Which commands to use to show setups?

2018-11-25 Thread Wolfgang Schuster
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

Re: [NTG-context] setuptyping

2018-09-11 Thread Wolfgang Schuster
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:

Re: [NTG-context] setuptyping

2018-09-10 Thread Wolfgang Schuster
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

Re: [NTG-context] setuptyping

2018-09-10 Thread Taco Hoekwater
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

[NTG-context] having all lines with \setuptyping

2017-08-15 Thread Pablo Rodriguez
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

Re: [NTG-context] Couple of questions

2017-07-27 Thread Aditya Mahajan
=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

Re: [NTG-context] Custom pretty printer pass option to buff-imp-.lua

2017-01-22 Thread Lorenz
, 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.

[NTG-context] Custom pretty printer pass option to buff-imp-.lua

2017-01-22 Thread Lorenz
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

Re: [NTG-context] Questions about Scite lexers

2016-04-13 Thread Wolfgang Schuster
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

Re: [NTG-context] Questions about Scite lexers

2016-04-13 Thread Nicola
) ... 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

Re: [NTG-context] \installprettytype problem

2015-08-21 Thread root
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

Re: [NTG-context] \installprettytype problem

2015-08-21 Thread Renaud AUBIN
, 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

Re: [NTG-context] \installprettytype problem

2015-08-21 Thread Matthieu Leroy
] \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

[NTG-context] \installprettytype problem

2015-08-20 Thread Matthieu Leroy
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

Re: [NTG-context] \installprettytype problem

2015-08-20 Thread Renaud AUBIN
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

Re: [NTG-context] where are the pret-xxxx.lua ?

2015-07-17 Thread Eric Détrez
-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

Re: [NTG-context] Environments

2015-07-07 Thread luigi scarso
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

Re: [NTG-context] Environments

2015-07-07 Thread Hans Aberg
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

Re: [NTG-context] line number overwriting

2015-04-29 Thread Pierre-François Bonnefoi
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

Re: [NTG-context] line number overwriting

2015-04-29 Thread Wolfgang Schuster
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

Re: [NTG-context] line number overwriting

2015-04-29 Thread Wolfgang Schuster
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

Re: [NTG-context] line number overwriting

2015-04-29 Thread Pierre-François Bonnefoi
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

Re: [NTG-context] \setupinterlinespace not working in style

2015-04-16 Thread Hans Hagen
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

[NTG-context] \setupinterlinespace not working in style

2015-04-15 Thread Pablo Rodriguez
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

[NTG-context] \installprettytype gets me undefined control sequence

2014-05-09 Thread Xan
,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

Re: [NTG-context] \installprettytype gets me undefined control sequence

2014-05-09 Thread Rik Kabel
,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

[NTG-context] How to place a verbatim environment in the text such that the following paragraph is not indented?

2014-05-07 Thread Thomas Möbius
] \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

Re: [NTG-context] How to place a verbatim environment in the text such that the following paragraph is not indented?

2014-05-07 Thread Wolfgang Schuster
“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

Re: [NTG-context] \starttyping while processing XML causing error

2014-03-28 Thread Xan
\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

Re: [NTG-context] \starttyping while processing XML causing error

2014-03-28 Thread Hans Hagen
. 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

Re: [NTG-context] \starttyping while processing XML causing error

2014-03-28 Thread Xan
\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

[NTG-context] issue with font in typing environment

2014-02-02 Thread Pablo Rodriguez
][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

Re: [NTG-context] issue with font in typing environment

2014-02-02 Thread Wolfgang Schuster
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

Re: [NTG-context] apply typing environment to \typebuffer

2014-01-15 Thread Pablo Rodriguez
. 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

Re: [NTG-context] apply typing environment to \typebuffer

2014-01-15 Thread Peter Münster
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

Re: [NTG-context] apply typing environment to \typebuffer

2014-01-15 Thread Pablo Rodriguez
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

Re: [NTG-context] apply typing environment to \typebuffer

2014-01-15 Thread Wolfgang Schuster
[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

[NTG-context] apply typing environment to \typebuffer

2014-01-14 Thread Pablo Rodriguez
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

Re: [NTG-context] apply typing environment to \typebuffer

2014-01-14 Thread Marco Patzer
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

Re: [NTG-context] verbatim boxes

2012-11-26 Thread Wolfgang Schuster
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

[NTG-context] Problem with codelistings and linenumbers

2012-09-07 Thread Markus Hubig
] | \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

Re: [NTG-context] Left margin of vim module output

2012-08-01 Thread Aditya Mahajan
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

Re: [NTG-context] Left margin of vim module output

2012-08-01 Thread Marco Patzer
. 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

Re: [NTG-context] ntg-style error

2012-06-06 Thread Taco Hoekwater
, 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

[NTG-context] Text background broken frame

2012-04-01 Thread Kip Warner
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

Re: [NTG-context] Syntax highlighting for C-code

2012-01-15 Thread Wolfgang Schuster
] \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

Re: [NTG-context] Fatal error

2011-11-03 Thread Kip Warner
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

Re: [NTG-context] Fatal error

2011-11-02 Thread Wolfgang Schuster
] ??? \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

[NTG-context] Font selection ranges

2011-09-30 Thread 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] \setuptyping[code][margin=yes] \starttext

Re: [NTG-context] Font selection ranges

2011-09-30 Thread luigi scarso
,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

Re: [NTG-context] Font selection ranges

2011-09-30 Thread Wolfgang Schuster
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

Re: [NTG-context] Font selection ranges

2011-09-30 Thread Khaled Hosny
] \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

[NTG-context] Blank lines inside verbatim environment

2011-09-28 Thread Jaroslav Hajtmar
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

[NTG-context] Typesetting in verbatim

2011-09-08 Thread Thomas Friedrich
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

Re: [NTG-context] Typesetting in verbatim

2011-09-08 Thread 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] [ option=commands, before={\startframedtext[width

Re: [NTG-context] Typesetting in verbatim

2011-09-08 Thread 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 be able to give me a hint. My code looks as follows: \definetyping [Haskell

Re: [NTG-context] Typesetting in verbatim

2011-09-08 Thread Thomas Friedrich
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

[NTG-context] Line length limitation of typing block?

2011-08-16 Thread Vladimir Lomov
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

Re: [NTG-context] Line length limitation of typing block?

2011-08-16 Thread Wolfgang Schuster
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

Re: [NTG-context] Line length limitation of typing block?

2011-08-16 Thread Vladimir Lomov
' 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

[NTG-context] How to prevent line split in typing block when using custom command?

2011-08-16 Thread Vladimir Lomov
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   2   3   >