[NTG-context] Re: error with definestartstop and startmode

2023-12-18 Thread Aditya Mahajan
led or disabled. > > %\enablemode[H] > > \startmode [H] >   \definestartstop [H] [color=blue] > \stopmode > > \startnotmode [H] >   \define\startH{\ignoreupto\stopH} > \stopnotmode > > \starttext > > xxx \startH yyy \sto

[NTG-context] Re: how to define an environment with key=value arguments

2023-09-08 Thread Wolfgang Schuster
better define start and stop separately? \def\startMyFigure[#1]{ % e.g. use utilities.parsers.settings_to_hash(#1) } \def\stopMyFigure{} Probably I’ll need to catch the content (\externalfigure, might become more) and use it in a \setlayer – so perhaps something like \definebuffer[MyFigure

[NTG-context] how to define an environment with key=value arguments

2023-09-08 Thread Henning Hraban Ramm
\startMyFigure[#1]{ % e.g. use utilities.parsers.settings_to_hash(#1) } \def\stopMyFigure{} Probably I’ll need to catch the content (\externalfigure, might become more) and use it in a \setlayer – so perhaps something like \definebuffer[MyFigure] \define\stopMyFigure{% \setlayer[page]{\getMyFigure

[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
[MyCode] [option=tex, numbering=file] \definebuffer [MyBuffer] [category=MyCode] \setuptyping [MyBuffer] [option=TEX, numbering=file] % \setuptyping % [buffer] % [option=TEX, %numbering=file] \startMyBuffer \fakewords{10}{20} \stopMyBuffer \starttext \startMyCode

[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
"" > \usemodule[visual] > > \definetyping[MyCode] > > \setuptyping[MyCode][ > option=tex, > numbering=file, > ] > > \definebuffer[MyBuffer] > > \startMyBuffer > \fakewords{10}{20} > \stopMyBuffer > > \starttext > > \startMyCode &g

[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] Conditional text appearing in a fixed vertical space

2022-01-11 Thread Fabrice L via ntg-context
low, the first solution has the desired behavior. The >>> second solution has the syntax I’d like, but it doesn’t make the space >>> without a solution. >>> Any ideas would be welcome! I am still pretty new to ConTeXt, so I struggle >>> mixing things

Re: [NTG-context] Conditional text appearing in a fixed vertical space

2022-01-11 Thread Gavin via ntg-context
>> second solution has the syntax I’d like, but it doesn’t make the space >> without a solution. >> Any ideas would be welcome! I am still pretty new to ConTeXt, so I struggle >> mixing things like the plain tex \vbox and ConTeXt \start…\stop concepts. >> Thanks, >

Re: [NTG-context] Conditional text appearing in a fixed vertical space

2022-01-11 Thread Hans Hagen via ntg-context
. Any ideas would be welcome! I am still pretty new to ConTeXt, so I struggle mixing things like the plain tex \vbox and ConTeXt \start…\stop concepts. Thanks, Gavin \definemode[solution][yes] % yes to enable solutions, no to disable \definebuffer [solution] % Captures solution in a buffer

[NTG-context] Conditional text appearing in a fixed vertical space

2022-01-11 Thread Gavin via ntg-context
to ConTeXt, so I struggle mixing things like the plain tex \vbox and ConTeXt \start…\stop concepts. Thanks, Gavin \definemode[solution][yes] % yes to enable solutions, no to disable \definebuffer [solution] % Captures solution in a buffer that isn't used \startmode[solution

[NTG-context] How to make \def accept block or buffer as part of (long) command argument

2022-01-02 Thread Benjamin Buchmuller via ntg-context
ile encountered % % \startMyCommand[is optional] % Still? % % \beginMyBlock % Block for something else. % \endMyBlock % \stopMyCommand \definebuffer[MyBuffer] \bf Here we test the buffer: Works \tf \startbuffer[MyBuffer] Buffer for something else. \stopbuffer \getbuffer[MyBuffer] \bf Here we t

Re: [NTG-context] Can modes be used for content control?

2021-11-17 Thread Idris Samawi Hamid ادريس سماوي حامد via ntg-context
On Wed, 17 Nov 2021 10:56:46 -0700, Aditya Mahajan via ntg-context wrote: But you don't have to directly use the modes. The following will work: \definestartstop[abridged] % By default, don't show the unabridged text \definebuffer[unabridged][local=yes, nested=yes] \startmode[unabridged

Re: [NTG-context] Can modes be used for content control?

2021-11-17 Thread Hans Hagen via ntg-context
] \defineparagraphs[translation] Then one authors the complete work in a single project, but you can produce a variety of versions, depending on the mode chosen: \definemode[unabridged] etc. Can one do this in context? Yes! This is what I do (for solutions in homework assignments): \definebuffer[solution

Re: [NTG-context] Can modes be used for content control?

2021-11-17 Thread Aditya Mahajan via ntg-context
gt; > > > Then one authors the complete work in a single project, but you can > > > produce a variety of versions, depending on the mode chosen: > > > > > > \definemode[unabridged] > > > etc. > > > > > > Can one do this in conte

Re: [NTG-context] Can modes be used for content control?

2021-11-16 Thread Idris Samawi Hamid ادريس سماوي حامد via ntg-context
, depending on the mode chosen: \definemode[unabridged] etc. Can one do this in context? Yes! This is what I do (for solutions in homework assignments): \definebuffer[solution][local=yes,nested=yes] \startmode[solution] \defineenumeration[solution][fancy setup...] \stopmode Then, in the main

Re: [NTG-context] Can modes be used for content control?

2021-11-16 Thread Aditya Mahajan via ntg-context
n the mode chosen: > > \definemode[unabridged] > etc. > > Can one do this in context? Yes! This is what I do (for solutions in homework assignments): \definebuffer[solution][local=yes,nested=yes] \startmode[solution] \defineenumeration[solution][fancy setup...]

Re: [NTG-context] TikZ in buffers: My struggle with \definestartstop

2021-07-08 Thread Hans Hagen
is appreciated. Maybe I am doing this entirely the wrong way. A couple notes: I considered using \definebuffer, but this doesn’t allow me to create named buffers, which seems like a deal breaker. I considered using \definefloat, but it don’t allow me include before and after commands, as far

[NTG-context] TikZ in buffers: My struggle with \definestartstop

2021-07-08 Thread Gavin
ted. Maybe I am doing this entirely the wrong way. A couple notes: I considered using \definebuffer, but this doesn’t allow me to create named buffers, which seems like a deal breaker. I considered using \definefloat, but it don’t allow me include before and after commands, as far as I can

Re: [NTG-context] Making text disappear depending on mode

2021-02-04 Thread Hans Hagen
[ChangeRP] [before={\startsidebar[rulecolor=green]}, after={\blank[overlay]\stopsidebar}] % \hideblocks[ChangePR] \keepblocks[ChangePR] % \keepblocks[ChangePR,ChangeRP] \enablemode[wipe] \doifelsemode {wipe} { \definebuffer[ChangePP] } { \definestartstop [ChangePP

Re: [NTG-context] Typing efficiency

2020-09-06 Thread Jan Willem Flamma
text.> \endnltext>   > \stopsection>   > \stoptext  It can also be done with buffers. \definebuffer [entext]\definebuffer [nltext] \defineselector [language] [max=2,n=1] \startmode[en] \setupselector[language][n=1] \def\stopentext{\getentext}\stopmode \startmode[nl] \setupsele

Re: [NTG-context] Typing efficiency

2020-09-04 Thread Wolfgang Schuster
It can also be done with buffers. \definebuffer [entext] \definebuffer [nltext] \defineselector [language] [max=2,n=1] \startmode[en] \setupselector[language][n=1] \def\stopentext{\getentext} \stopmode \startmode[nl] \setupselector[language][n=2] \def\stopnltext{\getnltext

Re: [NTG-context] Typesetting poetry with particular indenting

2020-07-02 Thread Tommaso Gordini
, align=flushleft, before=, after=, frame=off] \definenarrower[poemnarrower] \definelines [poemlines] [before={\startpoemnarrower[left]}, after=\stoppoemnarrower] \definebuffer[poem] \def\stoppoem{\setups{poems:buffer}} \startsetups poems:buffer \setupnarrower

Re: [NTG-context] start/stop executed conditionally on mode ?

2020-06-08 Thread Wolfgang Schuster
add as many \startQuestions / \stopQuestions you wish. Let me give a better explanation. The line \definebuffer [Questions] serves two purposes: 1. It create a Questions environment (\startQuestions ... \stopQuestions) 2. I gobbles the content of the environment. When you

Re: [NTG-context] start/stop executed conditionally on mode ?

2020-06-08 Thread Fabrice L
gt;> >> Some other text... >> % >> >> Otherwise to be: >> % >> Some other text... >> % > > If you only set `ClassRoom` mode at compile tim

Re: [NTG-context] start/stop executed conditionally on mode ?

2020-06-08 Thread Fabrice L
stion B…. >> >> Some other text... >> % >> >> Otherwise to be: >> % >> Some other text... >> % > > If you only set `ClassRoom` mod

Re: [NTG-context] start/stop executed conditionally on mode ?

2020-06-07 Thread Aditya Mahajan
rwise to be: % Some other text... % If you only set `ClassRoom` mode at compile time (rather than setting and unsetting it the middle of the document), then you can do: \definebuffer[Questions] \startmode[ClassRoom] \define\StopQuestion

Re: [NTG-context] Styling of included buffers or files

2020-05-18 Thread Jan U. Hasecke
er > [before=\blank\blackrule\startnarrower\BufferStyle, > after=\stopnarrower\blackrule\blank] > > %% alternatively define custom buffers > \definebuffer > [foobar] > > \setupblackrules > [width=1cm, >height=1pt, >color=gray] > > \defi

Re: [NTG-context] Styling of included buffers or files

2020-05-17 Thread Marco Patzer
er has before and after keys which can be used. Example: \setupbuffer [before=\blank\blackrule\startnarrower\BufferStyle, after=\stopnarrower\blackrule\blank] %% alternatively define custom buffers \definebuffer [foobar] \setupblackrules [width=1cm, height=1pt, color=gray] \definehighli

Re: [NTG-context] Grammar to parse TeX input?

2018-11-27 Thread Joseph Canedo
xpanded ? > > end > > \stopluacode > > \definebuffer[ZZZBuffer] > > \def\StartZZZ{\grabbufferdata[ZZZBuffer][StartZZZ][StopZZZ]} > > \def\StopZZZ{\ctxlua{zzz_function(buffers.getcontent('ZZZBuffer'))}} > > \StartZZZ > > \

Re: [NTG-context] Grammar to parse TeX input?

2018-11-26 Thread Hans Hagen
On 11/26/2018 3:19 PM, Joseph Canedo wrote: \startluacode function zzz_function(text) - How to process ‘text’ to get bits which are macros, groups etc… ? Eventually expanded ? end \stopluacode \definebuffer[ZZZBuffer] \def\StartZZZ{\grabbufferdata[ZZZBuffer][StartZZZ][StopZZZ]} \def

[NTG-context] Grammar to parse TeX input?

2018-11-26 Thread Joseph Canedo
function zzz_function(text) - How to process ‘text’ to get bits which are macros, groups etc… ? Eventually expanded ? end \stopluacode \definebuffer[ZZZBuffer] \def\StartZZZ{\grabbufferdata[ZZZBuffer][StartZZZ][StopZZZ]} \def\StopZZZ{\ctxlua{zzz_function(buffers.getcontent('ZZZBuffer'))}} \StartZZZ

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

2018-04-17 Thread Hans Hagen
: \unprotect \def\buff_start_indeed#1#2#3#4% {\edef\p_strip{\namedbufferparameter{#1}\c!strip}% \normalexpanded{\buff_pickup{#2}{#3}{#4}{}{\buff_stop{#4}}\ifx\p_strip\v!no\zerocount\else\plusone\fi}} \protect \definebuffer[Aditya][strip=no] \startAditya Leading spaces And some more

Re: [NTG-context] Head sections automatically marked for conditional text

2017-08-31 Thread Aditya Mahajan
set up a particular section to be wrapped in a particular mode (if that makes any sense at all). Is this possible? Here is how I usually do this: \definemode[showexamples][keep] \doifmodeelse{showexamples} {\definehead[example][subject][style=\bfc]} {\definebuffer[example]} \starttext

Re: [NTG-context] source code and result side by side

2017-08-04 Thread Henning Hraban Ramm
macros that >>> behave like buffers, you need to use \grabbufferdata (see buff-ini.mkiv). >>> But in this case, there is a simpler solution: >>> >>> \defineframed >>> [CodeExampleFramed] >>> [ >>> frame=off, >>>

Re: [NTG-context] source code and result side by side

2017-08-03 Thread Henning Hraban Ramm
; > \defineframed > [CodeExampleFramed] > [ >frame=off, >width=0.5\textwidth, >align=normal, > ] > > \definebuffer >[CodeExample] > > \define\stopCodeExample >{\placesidebyside > {\CodeExampleFramed{\typeCodeExample}} > {\C

Re: [NTG-context] source code and result side by side

2017-07-30 Thread Aditya Mahajan
ur own macros that behave like buffers, you need to use \grabbufferdata (see buff-ini.mkiv). But in this case, there is a simpler solution: \defineframed [CodeExampleFramed] [ frame=off, width=0.5\textwidth, align=normal, ] \definebuffer [CodeExample] \define\stopCodeE

Re: [NTG-context] ConTeXt gobble my mind

2014-11-09 Thread Pierre-François Bonnefoi
=== \newconditional\SkipSlide \setfalse\SkipSlide \definebuffer[Slide] \def\stopSlide {\ifconditional\SkipSlide \else \page \getbuffer[\thedefinedbuffer{Slide}]% \fi \setfalse\SkipSlide} \starttext \startSlide First Slide \stopSlide \settrue\SkipSlide \startSlide

Re: [NTG-context] ConTeXt gobble my mind

2014-11-09 Thread Hans Hagen
=== \newconditional\SkipSlide \setfalse\SkipSlide \definebuffer[Slide] \def\stopSlide {\ifconditional\SkipSlide \else \page \getbuffer[\thedefinedbuffer{Slide}]% \fi \setfalse\SkipSlide} \starttext \startSlide First Slide \stopSlide \settrue\SkipSlide \startSlide Second Slide \stopSlide

Re: [NTG-context] ConTeXt gobble my mind

2014-11-08 Thread Wolfgang Schuster
\definebuffer[Slide] \def\stopSlide {\ifconditional\SkipSlide \else \page \getbuffer[\thedefinedbuffer{Slide}]% \fi \setfalse\SkipSlide} \starttext \startSlide First Slide \stopSlide \settrue\SkipSlide \startSlide Second Slide \stopSlide \startSlide Third Slide \stopSlide

Re: [NTG-context] ConTeXt gobble my mind

2014-11-07 Thread Hans Hagen
. Perhaps Modes ? http://wiki.contextgarden.net/Modes \starttext \definebuffer[Slide] foo % \skipSlide \startSlide bla bla bla \startyping language C code \stoptyping bla bla bla \stopSlide bar \stoptext

Re: [NTG-context] ConTeXt gobble my mind

2014-11-07 Thread Pierre-François Bonnefoi
-François. On 07 Nov 2014, at 12:38, Hans Hagen pra...@wxs.nl wrote: \starttext \definebuffer[Slide] foo % \skipSlide \startSlide bla bla bla \startyping language C code \stoptyping bla bla bla \stopSlide bar \stoptext -- Bonnefoi Pierre-Francois|E

Re: [NTG-context] ConTeXt gobble my mind

2014-11-07 Thread Hans Hagen
\definebuffer[Slide] foo \startSlide bla bla bla \starttyping language C code \stoptyping bla bla bla \stopSlide bar \getbuffer[\thedefinedbuffer{Slide}] \getSlide \stoptext Does a buffer work only for verbatim content ? no, for everything best regards, Pierre-François. On 07 Nov 2014

Re: [NTG-context] ConTeXt gobble my mind

2014-11-07 Thread Pierre-François Bonnefoi
, thank you for contributing to solve my problem. I've tried your proposition : how can I get the content of the buffer afterward ? I've tried \getbuffer[Slide] with no success on MKIV beta that I've just updated. \starttext \definebuffer[Slide] foo \startSlide bla bla bla

[NTG-context] problem with buffer

2014-09-15 Thread Kenny
} {\defineenumeration[SOLUTION] % display the solutions [text=\Word{solution},number=no, after={\vskip1ex}]} {\definebuffer[SOLUTION] % hide solutions, \setupbuffer[SOLUTION][local=yes]} } \def\startsolution

Re: [NTG-context] Hiding text

2013-03-22 Thread Sietse Brouwer
adapted from Hans's \starthiding (which already exists): \definebuffer[Hidden] % uncomment the below to turn this into a non-hiding buffer. % \setupbuffer[Hidden][after={\getbuffer[Hidden]}] \startHidden asdf asdf \stopHidden Cheers, Sietse

Re: [NTG-context] Hiding text

2013-03-22 Thread Procházka Lukáš Ing . - Pontex s . r . o .
Hello, interesting trick; however, it doesn't work when used inside a macro: \definebuffer[Hidden] \def\WWW{ \startHidden DDD \stopHidden } \starttext AAA \startHidden BBB \stopHidden \WWW \stoptext Any idea? TIA. Best regards, Lukas On Fri, 22 Mar 2013

Re: [NTG-context] Hiding text

2013-03-22 Thread Sietse Brouwer
) when there are macros inside macros. But it might not be expansion. I hope that helps, but it probably doesn't. ;-) --Sietse Hello, interesting trick; however, it doesn't work when used inside a macro: \definebuffer[Hidden] \def\WWW{ \startHidden DDD \stopHidden

Re: [NTG-context] Possible inconsistency in the use of paragraphs in ConTeXt

2013-02-01 Thread Alain Delmotte
anyway. I will look into creating what I need on my own. I already have an idea. Just need to figure out the implementation. You can use \definestartsetup or \definebuffer to create your own environments. Wolfgang

Re: [NTG-context] Possible inconsistency in the use of paragraphs in ConTeXt

2013-02-01 Thread Keith J. Schultz
for the environment is misleading because columns is already taken as name. Thank you anyway. I will look into creating what I need on my own. I already have an idea. Just need to figure out the implementation. You can use \definestartsetup or \definebuffer to create your own environments

Re: [NTG-context] Possible inconsistency in the use of paragraphs in ConTeXt

2013-01-31 Thread Wolfgang Schuster
multiple paragraphs. The name for the environment is misleading because columns is already taken as name. Thank you anyway. I will look into creating what I need on my own. I already have an idea. Just need to figure out the implementation. You can use \definestartsetup or \definebuffer

Re: [NTG-context] Possible inconsistency in the use of paragraphs in ConTeXt

2013-01-31 Thread Alain Delmotte
. The name for the environment is misleading because columns is already taken as name. Thank you anyway. I will look into creating what I need on my own. I already have an idea. Just need to figure out the implementation. You can use \definestartsetup or \definebuffer to create your own environments

Re: [NTG-context] Possible inconsistency in the use of paragraphs in ConTeXt

2013-01-31 Thread Devendra Ghate
need to figure out the implementation. You can use \definestartsetup or \definebuffer to create your own environments. Wolfgang ___ If your question is of interest to others as well, please add an entry

Re: [NTG-context] buffer mechanism changed

2012-01-15 Thread Wolfgang Schuster
Am 13.01.2012 um 11:16 schrieb Steffen Wolfrum: Hi, isn't it possible to use the short way? \definebuffer[MottoSieben] \startbuffer[MottoSieben] \stopbuffer[MottoSieben] % but shouldn't it also work like this: %\startMottoSieben %\stopMottoSieben % ??? No because

[NTG-context] buffer mechanism changed

2012-01-13 Thread Steffen Wolfrum
Hi, isn't it possible to use the short way? \definebuffer[MottoSieben] \startbuffer[MottoSieben] \stopbuffer[MottoSieben] % but shouldn't it also work like this: %\startMottoSieben %\stopMottoSieben % ??? \starttext test\footnote{note} text \stoptext Steffen

[NTG-context] mkiv: append to buffer

2010-12-18 Thread Thomas Schmitz
; this is what I want to achieve: \definebuffer[MyBuffer] \def\MyGreatMacro#1#2#3% {\item[#1] #2 \par \appendtobuffer{MyBuffer}{\in[#1] #3}} \starttext \startitemize \MyGreatMacro{1}{aa}{AA} \MyGreatMacro{2}{bb}{BB} \stopitemize \page \getbuffer[MyBuffer] \resetbuffer[MyBuffer] % so I can reuse

Re: [NTG-context] mkiv: append to buffer

2010-12-18 Thread Aditya Mahajan
this, so here is some pseudo-code; this is what I want to achieve: \definebuffer[MyBuffer] \def\MyGreatMacro#1#2#3% {\item[#1] #2 \par \appendtobuffer{MyBuffer}{\in[#1] #3}} \starttext \startitemize \MyGreatMacro{1}{aa}{AA} \MyGreatMacro{2}{bb}{BB} \stopitemize \page \getbuffer[MyBuffer

Re: [NTG-context] \startmode and \startcomment inside of \def

2010-11-07 Thread Wolfgang Schuster
Solution environment or define the environment as \definebuffer[Solution][local=yes] \startmode[solutions] \setupbuffer[Solution][local=no] \stopmode \starttext ... \startSolution solution \stopSolution ... \stoptext Wolfgang

Re: [NTG-context] \startmode and \startcomment inside of \def

2010-11-07 Thread Vedran Miletić
this? Use \startmode[...] ... \stopmode in your document without your own Solution environment or define the environment as \definebuffer[Solution][local=yes] \startmode[solutions] \setupbuffer[Solution][local=no] \stopmode \starttext ... \startSolution solution \stopSolution

Re: [NTG-context] \startmode and \startcomment inside of \def

2010-11-07 Thread Aditya Mahajan
=no,before=\startframedtext,after=\stopframedtext] \stopmode In general, I agree with Wolfgang. It is better to redefine the macro at an outer level. You can even do: \defineframedtext[Solution] \startnotmode[solution] \definebuffer[Solution][local=yes] \stopnotmode However, in the few cases

[NTG-context] change affecting MPgraphic?

2010-09-24 Thread Marko Schütz Schmuck
In the default mode, the solution evironment should gobble its contents. %D I copy the definition of \tex{starthiding} to {\em hide} the solutions. \definebuffer [solution] \setupbuffer [solution] [local=yes] %D In solution mode, I redefine solution environment as an %D enumeration without

Re: [NTG-context] vbox construct breaking MKII

2010-08-04 Thread Aditya Mahajan
of \definetype and \definebuffer. Aditya ___ 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

Re: [NTG-context] vbox construct breaking MKII

2010-08-04 Thread Hans Hagen
On 4-8-2010 7:23, Aditya Mahajan wrote: (that writes contents to file and inputs the result) but cannot easily create \typevimTEX. For that I will need to reimplement all the catcode trickery of \definetype and \definebuffer. \definetype[TEXtype][option=TEX] test \TEXtype{oeps \test{oeps

Re: [NTG-context] vbox construct breaking MKII

2010-08-04 Thread Aditya Mahajan
On Wed, 4 Aug 2010, Hans Hagen wrote: On 4-8-2010 7:23, Aditya Mahajan wrote: (that writes contents to file and inputs the result) but cannot easily create \typevimTEX. For that I will need to reimplement all the catcode trickery of \definetype and \definebuffer. \definetype[TEXtype

Re: [NTG-context] vbox construct breaking MKII

2010-08-04 Thread Hans Hagen
and \definebuffer. \definetype[TEXtype][option=TEX] test \TEXtype{oeps \test{oeps}} test But I want to store the argument oeps \test{oeps} in an external file, process that external file with vim, and \input the result. As pretty printing happens in lua, you can intercept the string there. Just

Re: [NTG-context] Real help on \dostartbuffer needed

2010-04-28 Thread Wolfgang Schuster
Am 27.04.10 15:20, schrieb Antoine Cailliau: This time, it is not working, and I do not have any idea why. \defineenumeration[ENUM][] \definebuffer[Entity,before=\startENUM,after=\stopENUM] \definebuffer[Entity][before=\startENUM,after=\stopENUM] \startEntity ... \stopEntity \getEntity

Re: [NTG-context] Real help on \dostartbuffer needed

2010-04-28 Thread Antoine Cailliau
Damned, I didn't saw it. Thanks a lot for your help. On Wed, 2010-04-28 at 09:55 +0200, Wolfgang Schuster wrote: Am 27.04.10 15:20, schrieb Antoine Cailliau: This time, it is not working, and I do not have any idea why. \defineenumeration[ENUM][] \definebuffer[Entity,before=\startENUM

Re: [NTG-context] Real help on \dostartbuffer needed

2010-04-27 Thread Antoine Cailliau
This time, it is not working, and I do not have any idea why. \defineenumeration[ENUM][] \definebuffer[Entity,before=\startENUM,after=\stopENUM] \starttext \startEntity \input tufte \stopEntity \stoptext fails with ! Missing \endcsname inserted. to be read again \let

[NTG-context] \getmyAbstract

2009-09-19 Thread David Arnold
All, At one time I had a style file that handled my abstract. \definebuffer[myAbstract] \startmyAbstract In this activity you will learn how to solve systems of linear equations using LU decomposition, with both forward and back substitution. In addition, you will also be introduced

Re: [NTG-context] \getmyAbstract

2009-09-19 Thread Hans Hagen
David Arnold wrote: All, At one time I had a style file that handled my abstract. \definebuffer[myAbstract] \startmyAbstract In this activity you will learn how to solve systems of linear equations using LU decomposition, with both forward and back substitution. In addition, you will also

Re: [NTG-context] Buffers and commands with optional arguments

2008-06-02 Thread Wolfgang Schuster
{\dosingleempty\dostartletter} \def\dostartletter[#1]% {\dostartbuffer[letter][startletter][stopletter]} either use \definebuffer, or do Did not work in my case. \def\startletter {\bgroup\obeylines\dosingleempty\dostartletter} \def\dostartletter[#1]% {\egroup\dostartbuffer[letter

Re: [NTG-context] Buffers and commands with optional arguments

2008-05-31 Thread Hans Hagen
renders buffers useless for verbatim usage because I won't force users of my letter module to put a \relax after \startletter only because they use MkII. did you try \definebuffer[letter] Hans

Re: [NTG-context] Buffers and commands with optional arguments

2008-05-31 Thread Hans Hagen
[letter][startletter][stopletter]} either use \definebuffer, or do \def\startletter {\bgroup\obeylines\dosingleempty\dostartletter} \def\dostartletter[#1]% {\egroup\dostartbuffer[letter][startletter][stopletter

Re: [NTG-context] Buffers and commands with optional arguments

2008-05-31 Thread Wolfgang Schuster
is not so importand because a empty line before the \dorecurse did help. because I won't force users of my letter module to put a \relax after \startletter only because they use MkII. did you try \definebuffer[letter] Seems to be work in my example, I will try it later with my module

Re: [NTG-context] ConTeXt-ifying Kile

2008-01-02 Thread Matija Šuklje
] \defineblock[name] \definebodyfont[font size][type][files] \definebodyfontenvironment[font size][dimensions] \definebuffer[name] # \definecollector \definecolor[name]{colour values} \definecolorgroup[name][colour model][colour values] \definecombinedlist[name][list][settings] \defineconversion[name][command

Re: [NTG-context] Weird Fieldstack problem

2007-06-11 Thread Zhichu Chen
to go back to the definebuffer and processbuffer as suggested in metafun manual. I do not know if it makes sense to have a \edef version of definesymbol. In any case, getting expansion to work with \getMPdrawing is going to be difficult. Aditya

Re: [NTG-context] Weird Fieldstack problem

2007-06-08 Thread Aditya Mahajan
case. You need to go back to the definebuffer and processbuffer as suggested in metafun manual. I do not know if it makes sense to have a \edef version of definesymbol. In any case, getting expansion to work with \getMPdrawing is going to be difficult. Aditya

Re: [NTG-context] buffers

2006-08-07 Thread Aditya Mahajan
On Mon, 31 Jul 2006, Aditya Mahajan wrote: On Mon, 31 Jul 2006, Hans van der Meer wrote: The ConTeXt manual tells me on page 237: You can define your own buffer with: \definebuffer[...] ... name After this command /getbuffer and \typebuffer are available where buffer

Re: [NTG-context] buffers

2006-08-01 Thread Hans van der Meer
On Aug 1, 2006, at 0:21, Aditya Mahajan wrote: On Mon, 31 Jul 2006, Hans van der Meer wrote: The ConTeXt manual tells me on page 237: You can define your own buffer with: \definebuffer[...] ... name After this command /getbuffer and \typebuffer are available where

[NTG-context] buffers

2006-07-31 Thread Hans van der Meer
The ConTeXt manual tells me on page 237: You can define your own buffer with: \definebuffer[...] ... name After this command /getbuffer and \typebuffer are available where buffer is the name of the buffer.I do: \definebuffer[left] \startbuffer[left] left\crlf \stopbuffer \typeleftand it gives me

Re: [NTG-context] buffers

2006-07-31 Thread Aditya Mahajan
On Mon, 31 Jul 2006, Hans van der Meer wrote: The ConTeXt manual tells me on page 237: You can define your own buffer with: \definebuffer[...] ... name After this command /getbuffer and \typebuffer are available where buffer is the name of the buffer. I do

Re: [NTG-context] multiple line comments

2006-03-28 Thread Hans Hagen
because it was not enabled); i added a few lines to the buffer handler, so that now we can say: \definebuffer[mycomment][local=yes] and have \startmycomment \stopmycomment (this extension will be available in the next release) (btw, in a similar fashion verbatim supports some nesting

Re: [NTG-context] multiple line comments

2006-03-28 Thread [EMAIL PROTECTED]
that now we can say: \definebuffer[mycomment][local=yes] and have \startmycomment \stopmycomment (this extension will be available in the next release) (btw, in a similar fashion verbatim supports some nesting, which was needed in order to be able to write manuals) Hans

Re: [NTG-context] Problem with special first page of chapter setup

2005-11-01 Thread Gerben Wierda
Hello Gerben, use your second try and *remove* \definebuffer[chapter:quote] from your environment. That's was all :) Indeed! I have no idea why this worked, but it did. Thank you very much. G PS. Now I only need to know how I can use \placefigure in an endnote (and not get the figure

Re: [NTG-context] Problem with special first page of chapter setup

2005-11-01 Thread Hans Hagen
Gerben Wierda wrote: Hello Gerben, use your second try and *remove* \definebuffer[chapter:quote] from your environment. That's was all :) Indeed! I have no idea why this worked, but it did. Thank you very much. G PS. Now I only need to know how I can use \placefigure in an endnote

Re: [NTG-context] Problem with special first page of chapter setup

2005-10-31 Thread Gerben Wierda
} === and in my environment file: === \definebuffer[chapter:quote] \setuphead [chapter] [page=, before={\setups[chapter:before]}, after={\setups[chapter:after]}] \startsetups chapter:before \page[left

Re: [NTG-context] Problem with special first page of chapter setup

2005-10-31 Thread Peter Rolf
Hello Gerben, use your second try and *remove* \definebuffer[chapter:quote] from your environment. That's was all :) Greetings, Peter Gerben Wierda wrote: Thanks for the tip but I am having trouble getting this to work. I now have in my main text

Re: [NTG-context] \stopbuffer in macro

2005-06-02 Thread Peter Münster
On Tue, 31 May 2005, Hans Hagen wrote: \definebuffer[crap] \setupbuffer[crap][before=\blank\bgroup here we start,after=and here we end\egroup\blank] [...] Hello Hans and Taco, thank you for your hints, but I think, I did not explain my question well enough... I fact, all I need is to know

Re: [NTG-context] \stopbuffer in macro

2005-06-02 Thread Taco Hoekwater
This should help: \def\startLST[#1]% {\def\stopLST{End of #1}% \dostartbuffer[LST][startLST][stopLST]} This is almost the same as: \definebuffer[LST] \def\stopLST{End of LST} Except that it is a little bit more low-level and thereby allows an argument to \startLST. Using

Re: [NTG-context] \stopbuffer in macro

2005-06-02 Thread Hans Hagen
I once made the option \usememorybuffers but i'm not sure if it does the same Taco Hoekwater wrote: This should help: \def\startLST[#1]% {\def\stopLST{End of #1}% \dostartbuffer[LST][startLST][stopLST]} This is almost the same as: \definebuffer[LST] \def\stopLST

Re: [NTG-context] \stopbuffer in macro

2005-05-30 Thread Hans Hagen
\definebuffer[crap] \setupbuffer[crap][before=\blank\bgroup here we start,after=and here we end\egroup\blank] \starttext \input tufte \startcrap oeps oeps oeps oeps oesp oeps oeps oeps oeps oesp oeps oeps oeps oeps oesp oeps oeps oeps oeps oesp \stopcrap \input tufte \getcrap \input tufte