Re: [NTG-context] \autoinsertedspace fails

2023-01-05 Thread Hans Hagen via ntg-context
cases with \autoinsertedspace. I have now re-read lowlevel-macros.pdf and have a better understanding of what I read when first I approached it; I still have a way to go. /Tolerant/ removes the need for /dodoubleempty/ and friends and the two-step /macro/ and /doMacro/ dance. There was a small

Re: [NTG-context] \autoinsertedspace fails

2023-01-05 Thread Rik Kabel via ntg-context
lowlevel-macros.pdf and have a better understanding of what I read when first I approached it; I still have a way to go. /Tolerant/ removes the need for /dodoubleempty/ and friends and the two-step /macro/ and /doMacro/ dance. There was a small advantage to the two-step, however. I had two separate

Re: [NTG-context] Title for tabulate

2021-12-16 Thread Benjamin Buchmuller via ntg-context
m the source if >> there is any argument to spike-in some formatting.) >> So, if there is no easy way to access this one, we can work around: >> \definetabulate[recipetab][|l|l|p|l|] >> \setuptabulate >> [recipetab] >> [ >> bodyfont=smal

Re: [NTG-context] Title for tabulate

2021-12-14 Thread Hans Hagen via ntg-context
uot; headstyle=bold, headcolor=red, ] \define\startrecipe{\dodoubleempty\dostartrecipe} \long\def\dostartrecipe[#1][#2]#3\stoprecipe{% \iffirstargument {\bi #1}\blank[medium] \fi \ifsecondargument \startrecipetab[#2]

Re: [NTG-context] Title for tabulate

2021-12-14 Thread Benjamin Buchmuller via ntg-context
k around: \definetabulate[recipetab][|l|l|p|l|] \setuptabulate [recipetab] [ bodyfont=small, distance=medium, before={\blank[back, small]}, % header=text, % THIS MUST NOT BE "text" headstyle=bold, headcolor=red, ]

[NTG-context] Space before/after combinations + centring

2021-11-17 Thread Marco Patzer via ntg-context
: \unprotect \unexpanded\def\startcombination {\blank[halfline]%% \startalignment[middle]%% \dontleavehmode \bgroup \pack_combinations_push \dodoubleempty\pack_combinations_start} \unexpanded\def\stopcombination {\bgroup\normalexpanded{\egroup{}\ntimes{{}{}}\c_pack_combinations_y}% brr

Re: [NTG-context] Outlined text (from MP) inline in ConText has incorrect baseline (i.e. no depth)

2021-10-12 Thread Rudd, Kevin via ntg-context
% \OutlinedText[fill][outline]{text} \def\OutlinedText{\dodoubleempty\doOutlinedText} \def\doOutlinedText[#1][#2]#3% {% \ifsecondargument \makeOutlinedText{#1}{#2}{#3}% \else\iffirstargument \makeOutlinedText{#1}{black}{#3}% \else \makeOutlinedText

Re: [NTG-context] Outlined text (from MP) inline in ConText has incorrect baseline (i.e. no depth)

2021-10-08 Thread Rudd, Kevin via ntg-context
pth of the text itself but that doesn't seem to work. I expect that there's an easy way either in MP or ConTeXt, but I haven't found it yet. % \OutlinedText[glyph][outline]{text} \def\OutlinedText{\dodoubleempty\doOutlinedTex

Re: [NTG-context] Outlined text (from MP) inline in ConText has incorrect baseline (i.e. no depth)

2021-10-08 Thread Hans Hagen via ntg-context
} \def\OutlinedText{\dodoubleempty\doOutlinedText} \def\doOutlinedText[#1][#2]#3% {%     % \type{#1}::\type{#2}::\type{#3}     \ifsecondargument         \makeOutlinedText{#1}{#2}{#3}%     \else\iffirstargument         \makeOutlinedText{#1}{black}{#3}%     \else         \makeOutlinedText

[NTG-context] Outlined text (from MP) inline in ConText has incorrect baseline (i.e. no depth)

2021-10-07 Thread Rudd, Kevin via ntg-context
itself but that doesn't seem to work. I expect that there's an easy way either in MP or ConTeXt, but I haven't found it yet. % \OutlinedText[glyph][outline]{text} \def\OutlinedText{\dodoubleempty\doOutlinedText} \def

[NTG-context] issue with \cite in ConTeXt ver: 2020.12.22 22:14 LMTX fmt: 2020.12.22

2020-12-22 Thread Alan Bowen
}]}% } \def\startbibitem{\dodoubleempty\dostartbibitem} \def\stopbibitem{\stopBibItem} \definedescription[BibItem][ width=broad, margin=1.5pc, indenting={no}, indentnext=no, alternative=hanging, hang=1, headcommand=\gobbleoneargument, align=right, before={\directsetup{tightspace}\bgroup\language

Re: [NTG-context] image across 2 page spread

2020-04-30 Thread Henning Hraban Ramm
empty, pagestate=start, ] \def\doublepagefig{\dodoubleempty\doDoublePagefig} \def\doDoublePagefig[#1][#2]#3#4{ \startfullpagemakeup \setlayer[bgpicleft]{\textreference[#1]{}% \clip[ hoffset=0mm, voffset=0mm,

Re: [NTG-context] checking whether file is landscape or portrait

2020-01-28 Thread Wolfgang Schuster
ode, but it has not > failed me yet. > > \newdimen\MYfigurewidth > \newdimen\MYfigureheight > \unexpanded\def\MYgetfiguredimensions > {\dodoubleempty\MYdogetfiguredimensions} > > \def\MYdogetfiguredimensions[#1][#2]% > {\setbox0=\hbox{\externalf

Re: [NTG-context] checking whether file is landscape or portrait

2020-01-28 Thread Pablo Rodriguez
ode, but it has not > failed me yet. > > \newdimen\MYfigurewidth > \newdimen\MYfigureheight > \unexpanded\def\MYgetfiguredimensions > {\dodoubleempty\MYdogetfiguredimensions} > > \def\MYdogetfiguredimensions[#1][#2]% > {\setbox0=\hbox{\externalf

Re: [NTG-context] checking whether file is landscape or portrait

2020-01-28 Thread Taco Hoekwater
\unexpanded\def\MYgetfiguredimensions {\dodoubleempty\MYdogetfiguredimensions} \def\MYdogetfiguredimensions[#1][#2]% {\setbox0=\hbox{\externalfigure[#1][#2]}% \MYfigurewidth=\wd0 \MYfigureheight=\ht0 } And used like: \MYgetfiguredimensions[cow.pdf][page=1] \ifdim

Re: [NTG-context] Defining command with optional and mandatory arguments

2018-05-24 Thread Christoph Reller
the latest version of ConTeXt the output is >>>> >>>> number 1: A >>>> number 2: B >>>> number 2: A >>>> >>>> Is this behavior intended? How can I make a definition whose behavior >>>> does not change in new versions of

Re: [NTG-context] Defining command with optional and mandatory arguments

2018-05-24 Thread Hans Hagen
ur end but this is the best way: \unexpanded\def\MyCommand {\dodoubleempty\doMyCommand} \def\doMyCommand[#1][#2]% {\iffirstargument number 1: #1% \par \fi \ifsecondargument number 2: #2% \fi \blank[big]} \starttext \MyCommand[A][B] \MyC

[NTG-context] Defining command with optional and mandatory arguments

2018-05-24 Thread Christoph Reller
gt;> >> number 1: A >> number 2: B >> number 2: A >> >> Is this behavior intended? How can I make a definition whose behavior >> does not change in new versions of ConTeXt? > i'm not sure wht happens at your end but this is the best way: > > \unexpanded

Re: [NTG-context] Defining command with optional and mandatory arguments

2018-05-23 Thread Hans Hagen
: B number 2: A Is this behavior intended? How can I make a definition whose behavior does not change in new versions of ConTeXt? i'm not sure wht happens at your end but this is the best way: \unexpanded\def\MyCommand {\dodoubleempty\doMyCommand} \def\doMyCommand[#1][#2]% {\iffirstargument

Re: [NTG-context] Typesetting an interview

2018-02-11 Thread Wolfgang Schuster
align=flushleft, alternative=hanging, ] \def\dostartInterview[#1][#2]% {\doifsomethingelse{#2}% {\startInterview[reference={#1},title={#2}]}% {\startInterview[title={#1}]}% } \def\startInt{\dodoubleempty\dostartInterview} \def\stopInt{\stopInterview} \starttext \chapter{An Interview} \startInt[{Hen

Re: [NTG-context] Typesetting an interview

2018-02-11 Thread Henning Hraban Ramm
uot; > > Working example: > > > \definedescription[Interview][ > headstyle=italic, > style=normal, > align=flushleft, > alternative=hanging, > ] > > \def\dostartInterview[#1][#2]% > {\doifsomethingelse{#2}% >{\startInterview[reference={#1},title

[NTG-context] Typesetting an interview

2018-02-07 Thread Henning Hraban Ramm
{\startInterview[title={#1}]}% } \def\startInt{\dodoubleempty\dostartInterview} \def\stopInt{\stopInterview} \starttext \chapter{An Interview} \startInt[{Hennning Hraban Ramm (HR)}] This might be a short question or a long response. Name or initials of the person should stand in their own line (wit

Re: [NTG-context] Problem with \definemathmatrix

2018-01-18 Thread Aditya Mahajan
: \ifdefined\c!simplecommand\else\def\c!simplecommand{simplecommand}\fi \appendtoks \edef\p_simplecommand{\mathmatrixparameter\c!simplecommand}% \ifx\p_simplecommand\empty\else \setuevalue{\p_simplecommand}{\dodoubleempty\math_matrix_simple[\currentmathmatrix]}% \fi \to \everydefinemathmatrix

Re: [NTG-context] Problem with \definemathmatrix

2018-01-18 Thread Hans Hagen
\endgroup} %D We hook it into the normal mathmatrix code: \ifdefined\c!simplecommand\else\def\c!simplecommand{simplecommand}\fi \appendtoks \edef\p_simplecommand{\mathmatrixparameter\c!simplecommand}% \ifx\p_simplecommand\empty\else \setuevalue{\p_simplecommand}{\dodoubleempty

Re: [NTG-context] automatically splitting big images (calculation problem)

2017-09-10 Thread Henning Hraban Ramm
Am 2017-09-10 um 11:09 schrieb Herbert Voss <herbert.v...@fu-berlin.de>: > Am 10.09.2017 um 09:13 schrieb Henning Hraban Ramm: >> My current code actually looks like >> % split in #1 page size parts >> \def\clipfigure{\dodoubleempty\doClipFigure} >> \def\doClipFig

Re: [NTG-context] automatically splitting big images (calculation problem)

2017-09-10 Thread Herbert Voss
Am 10.09.2017 um 09:13 schrieb Henning Hraban Ramm: My current code actually looks like % split in #1 page size parts \def\clipfigure{\dodoubleempty\doClipFigure} \def\doClipFigure[#1][#2]{ \ifsecondargument \dorecurse{#1}{% \tooltip{\clip[ height=\textheight, voffset=\dimexpr

Re: [NTG-context] automatically splitting big images (calculation problem)

2017-09-10 Thread Herbert Voss
Am 10.09.2017 um 09:13 schrieb Henning Hraban Ramm: \def\ausschnitt{\dodoubleempty\doAusschnitt} \def\doAusschnitt#1#2{\clip[height=\textheight,voffset=#1]{\externalfigure[#2][width=\textwidth]}\par} This also doesn’t work; there I’m trying to set the y coordinate for the start like

Re: [NTG-context] automatically splitting big images (calculation problem)

2017-09-10 Thread Henning Hraban Ramm
Am 2017-09-09 um 22:06 schrieb Aditya Mahajan <adit...@umich.edu>: > On Sat, 9 Sep 2017, Henning Hraban Ramm wrote: > >> Ahoi, >> I got some long images that I’d like to split over several pages. >> >> \def\clipfigure{\dodoubleempty\doClipFigure} >> \

Re: [NTG-context] automatically splitting big images (calculation problem)

2017-09-09 Thread Aditya Mahajan
On Sat, 9 Sep 2017, Henning Hraban Ramm wrote: Ahoi, I got some long images that I’d like to split over several pages. \def\clipfigure{\dodoubleempty\doClipFigure} \def\doClipFigure[#1][#2]{ \dorecurse{#1}{% \clip[ height=\textheight, voffset=\dimexpr((\recurselevel -1

[NTG-context] automatically splitting big images (calculation problem)

2017-09-09 Thread Henning Hraban Ramm
Ahoi, I got some long images that I’d like to split over several pages. \def\clipfigure{\dodoubleempty\doClipFigure} \def\doClipFigure[#1][#2]{ \dorecurse{#1}{% \clip[ height=\textheight, voffset=\dimexpr((\recurselevel -1) * \textheight) ]{\externalfigure[#2][width=\textwidth

Re: [NTG-context] Clickable question/answer numbers

2016-11-04 Thread Otared Kavian
titlestyle=, > titlecolor=black, > headstyle={\sc}, > headcolor=darkred, > style=, > number=yes, > ] > > > > \def\startquestion{\dodoubleempty\dostartquestion} > > \long\def\dostartquestion[#1][#2]#3\stopquestion{% > \iffirstargument >\setupenumera

Re: [NTG-context] Clickable question/answer numbers

2016-11-03 Thread Mikael P. Sundqvist
headcolor=darkred, style=, number=yes, ] \def\startquestion{\dodoubleempty\dostartquestion} \long\def\dostartquestion[#1][#2]#3\stopquestion{% \iffirstargument \setupenumeration[exercise][text={\goto{Question}[A:#1]}] \ifsecondargument \startexercise[#1]{#2} \else \sta

Re: [NTG-context] \showmathfontcharacters ?

2016-10-09 Thread Meer, Hans van der
>> \stoptext >> >> When that macro is defined in s-mat-10.mkiv as >> \unexpanded\def\showmathfontcharacters >> {\dodoubleempty\doshowmathfontcharacters} >> >> >> ConTeXt ver: 2013.04.16 12:08 MKIV beta fmt: 2013.4.19 int: >> english/e

Re: [NTG-context] toc and macro

2015-05-28 Thread Harry
{Oops!} \def\Teil{\dodoubleempty\doTeil} \def\doTeil[#1][#2]#3{% \def\tit{#1} %... \startchapter[title={\tit},reference={#2}] #3 \stopchapter %... } \protect \starttext \completecontent \doTeil[Hallo][hallo]{Text Text Text Text Text Text Text} Why do you \doTeil

[NTG-context] toc and macro

2015-05-28 Thread Harry
Hi, I hope that this is the right address to post my question. If not I would be glad for a tip. I wanted to do something like this: ___ \unprotect %This line uncommented leads to an error \def\tit{Oops!} \def\Teil{\dodoubleempty\doTeil} \def\doTeil[#1][#2]#3{% \def\tit

Re: [NTG-context] toc and macro

2015-05-28 Thread Wolfgang Schuster
!} \def\Teil{\dodoubleempty\doTeil} \def\doTeil[#1][#2]#3{% \def\tit{#1} %... \startchapter[title={\tit},reference={#2}] #3 \stopchapter %... } \protect \starttext \completecontent \doTeil[Hallo][hallo]{Text Text Text Text Text Text Text} Why do you \doTeil

[NTG-context] Changing font for math function

2015-05-15 Thread Maggyero
in userfriendlyness, we the new macro \definemathcommand should be added in math-ini.mkiv: ——— \unexpanded\def\definemathfunction{\dodoubleempty\dodefinemathfunction} \def\dodefinemathfunction[#1][#2]#3% {\ifsecondargument \definemathcommand[#1]{\mfunction[#2]{#3}} \else

[NTG-context] Changing font for math function

2015-05-13 Thread Maggyero
of \definemathfunction. ——— \unexpanded\def\definemathfunction{\dodoubleempty\dodefinemathfunction} \def\dodefinemathfunction[#1][#2]#3% {\ifsecondargument \definemathcommand[#1]{\mfunction[#2]{#3}} \else \definemathcommand[#1]{\mfunction{#3}} \fi

Re: [NTG-context] resize and center and clip image

2014-05-01 Thread Aditya Mahajan
[width=\textwidth, height=\textheight] \unexpanded\def\scaleandclip{\dodoubleempty\doscaleandclip} \def\doscaleandclip[#1][#2]% {\bgroup \ifsecondargument \edef\currentscaleandclip{#1}% \setupcurrentscaleandclip[#2]% \else\iffirstargument \doifassignmentelse{#1

Re: [NTG-context] resize and center and clip image

2014-05-01 Thread Mikael P. Sundqvist
{scaleandclip} \installcommandhandler \scaleandclip {scaleandclip} \scaleandclip \setupscaleandclip [width=\textwidth, height=\textheight] \unexpanded\def\scaleandclip{\dodoubleempty\doscaleandclip} \def\doscaleandclip[#1][#2]% {\bgroup \ifsecondargument \edef

Re: [NTG-context] resize and center and clip image

2014-05-01 Thread Wolfgang Schuster
{scaleandclip} \installcommandhandler \scaleandclip {scaleandclip} \scaleandclip \setupscaleandclip [width=\textwidth, height=\textheight] \unexpanded\def\scaleandclip{\dodoubleempty\doscaleandclip} \def\doscaleandclip[#1][#2]% {\bgroup \ifsecondargument \edef

[NTG-context] Expansion or Referencing problem

2014-02-06 Thread Andreas Schneider
.tuc file) but still \about (and the other referencing commands) won't show/find it. What am I missing here? -- Best Regards, Andreas\mainlanguage[en] \def\moduleid{TEST} \def\transaction{\dodoubleempty\dotransaction} \def\dotransaction[#1][#2]{% \getparameters[tr][module=\moduleid,#2

Re: [NTG-context] a way to implement \testcolumn in mixedcolumns

2013-11-28 Thread Hans Hagen
somewhere? I see in page-brk.mkiv the following definition for \testcolumn: \def\testcolumn {\dodoubleempty\page_tests_columns_test} \def\page_tests_columns_test[#1][#2]% {\endgraf \ifdim\pagegoal\maxdimen \ifdim\pagetotal\pagegoal \d_page_tests_test\dimexpr

[NTG-context] a way to implement \testcolumn in mixedcolumns

2013-11-20 Thread Lars Huttar
the following definition for \testcolumn: \def\testcolumn {\dodoubleempty\page_tests_columns_test} \def\page_tests_columns_test[#1][#2]% {\endgraf \ifdim\pagegoal\maxdimen \ifdim\pagetotal\pagegoal \d_page_tests_test\dimexpr \pagegoal -\pagetotal \ifdim\lastskip

Re: [NTG-context] Alignment table with comma, and long long space after

2013-09-22 Thread Xan
={\stopframedtext\egroup}] % Intent fer una comanda per a fer requadres a les coses importants % http://www.ntg.nl/pipermail/ntg-context/2013/074823.html \def\important{\dodoubleempty\doimportant} \def\doimportant[#1][#2]{\bgroup \ifsecondargument \startframedtext[background=color

Re: [NTG-context] Defined command troubles

2013-09-05 Thread Wolfgang Schuster
Am 05.09.2013 um 17:42 schrieb Xan dxpubl...@telefonica.net: Hi, I just want to define a shortcut for framedtexts... That's it: \def\important{\dodoubleempty\doimportant} \def\doimportant[#1][#2]{\bgroup \ifsecondargument \startframedtext[background=#2,frame=off,width=broad

[NTG-context] Defined command troubles

2013-09-05 Thread Xan
Hi, I just want to define a shortcut for framedtexts... That's it: \def\important{\dodoubleempty\doimportant} \def\doimportant[#1][#2]{\bgroup \ifsecondargument \startframedtext[background=#2,frame=off,width=broad]% #1 \else \startframedtext[background=screen,frame

[NTG-context] \showmathfontcharacters ?

2013-05-01 Thread Meer, H. van der
Why do I get an error on \starttext \showmathfontcharacters \stoptext When that macro is defined in s-mat-10.mkiv as \unexpanded\def\showmathfontcharacters {\dodoubleempty\doshowmathfontcharacters} ConTeXt ver: 2013.04.16 12:08 MKIV beta fmt: 2013.4.19 int: english/english ! Undefined

Re: [NTG-context] \showmathfontcharacters ?

2013-05-01 Thread Wolfgang Schuster
Am 01.05.2013 um 19:15 schrieb Meer, H. van der h.vanderm...@uva.nl: Why do I get an error on \starttext \showmathfontcharacters \stoptext When that macro is defined in s-mat-10.mkiv as \unexpanded\def\showmathfontcharacters {\dodoubleempty\doshowmathfontcharacters} ConTeXt

Re: [NTG-context] Defined and not defined and better be done global

2013-04-27 Thread Cecil Westerhof
. Was a ‘little while ago’ I wrote it. I thought that 1.5em was used for relative definitions. I have a inc file that I use. In this I have: \def\Title{\dodoubleempty\doTitle} \def\doTitle[#1][#2]{ \ifsecondargument \testpage[#2] \else \testpage[15] \fi

[NTG-context] date handling maltreated?

2013-03-20 Thread H. van der Meer
\month - \month WHY NOT monthname?} \writestatus{}{\meaning\year - \the\year} \writestatus{}{\meaning\time - \the\time} \stoptext Result: \time- \time \protected macro:-\dodoubleempty \syst_converters_date - \date \day- 20 macro

[NTG-context] date handling maltreated?

2013-03-20 Thread H. van der Meer
\month - \month WHY NOT monthname?} \writestatus{}{\meaning\year - \the\year} \writestatus{}{\meaning\time - \the\time} \stoptext Result: \protected macro:-\dodoubleempty \syst_converters_date - \date \day- 20 macro:#1-\ctxcommand {monthname(#1)}- \labeltext {unknown}HY NOT monthname? \year

Re: [NTG-context] date handling maltreated?

2013-03-20 Thread Wolfgang Schuster
{}{\meaning\date - \date} \writestatus{}{\meaning\day - \the\day} \writestatus{}{\meaning\month - \month WHY NOT monthname?} \writestatus{}{\meaning\year - \the\year} \writestatus{}{\meaning\time - \the\time} \stoptext Result: \protected macro:-\dodoubleempty \syst_converters_date - \date \day

[NTG-context] Any ConTeXt-Lua changes

2013-01-14 Thread Rogers, Michael K
\def\defineschedule{\dodoubleempty\dodefineschedule} \def\dodefineschedule[#1][#2]{\ctxlua{userdata.schedule.new(#1,#2)}} Thanks for any tips, Michael This e-mail message (including any attachments) is for the sole use of the intended recipient(s) and may contain

Re: [NTG-context] Any ConTeXt-Lua changes

2013-01-14 Thread Wolfgang Schuster
, but here's the ConTeXt command that sends an ID (#1) and a parameters (#2) to Lua \def\defineschedule{\dodoubleempty\dodefineschedule} \def\dodefineschedule[#1][#2]{\ctxlua{userdata.schedule.new(#1,#2)}} What’s the error message, there is no way to tell what’s wrong with only these two code

Re: [NTG-context] Any ConTeXt-Lua changes

2013-01-14 Thread Rogers, Michael K
for you, but here's the ConTeXt command that sends an ID (#1) and a parameters (#2) to Lua \def\defineschedule{\dodoubleempty\dodefineschedule} \def\dodefineschedule[#1][#2]{\ctxlua{userdata.schedule.new(#1,#2)}} What’s the error message, there is no way to tell what’s wrong with only

Re: [NTG-context] defineindenting

2012-10-26 Thread Marco Patzer
. To indent the first line you can use \setupindenting [yes, 2cm] That, however, is not configurable. And frankly I've never seen varying paragraph indentations in a document. If you really need it you can build a wrapper around this. \def\defineindenting {\dodoubleempty\dodefineindenting} \def

Re: [NTG-context] defineindenting

2012-10-26 Thread Piotr Kopszak
paragraph indentations in a document. If you really need it you can build a wrapper around this. \def\defineindenting {\dodoubleempty\dodefineindenting} \def\dodefineindenting [#1][#2] {\setvalue{#1}{\setupindenting[yes, #2]}} \defineindenting [first] [2cm] \defineindenting [second] [3cm

Re: [NTG-context] New module: pararef

2012-10-13 Thread Wolfgang Schuster
{referencecommand} \installdirectcommandhandler \referencecommand {referencecommand} \def\referencecommand {\dodoubleempty\referencecommand_direct} \def\referencecommand_direct[#1][#2]% {\begingroup \ifsecondargument \setupreferencecommand[#1]% \edef\m_reference{#2}% \else

Re: [NTG-context] \define a command with square-bracket arguments

2012-09-28 Thread Sietse Brouwer
Question for the others: What's the difference of \dodoubleargument and \dodoubleempty? I expected \dodoubleargument to throw an error since the arguments are supposed to be mandatory. In MkIV Hans didn’t add this check and in MkII he disabled is for command with three or less argument

Re: [NTG-context] \define a command with square-bracket arguments

2012-09-28 Thread Hans Hagen
On 28-9-2012 14:41, Sietse Brouwer wrote: Question for the others: What's the difference of \dodoubleargument and \dodoubleempty? I expected \dodoubleargument to throw an error since the arguments are supposed to be mandatory. In MkIV Hans didn’t add this check and in MkII he disabled

Re: [NTG-context] \define a command with square-bracket arguments

2012-09-27 Thread Marco Patzer
is already defined”. Can I use \define, or a related command, to define a command that takes square-bracket arguments, like so: \mycommand[...][...] \def\mycommand {\dodoubleempty\domycommand} \def\domycommand [#1][#2] {first: #1, second: #2} \mycommand [foo] [bar] \mycommand [foo][bar

[NTG-context] Problem with \useMPlibrary[txt]

2012-09-17 Thread pol stra
\setupshapetexts% 146 {\dodoubleempty\getparameters[\??sh]} 147 148 \setupshapetexts% 149 [\c!bodyfont=] 150 151 %%% rotfont nog definieren 152 153 \doifundefined{RotFont}{\definefont[RotFont][RegularBold]} 154 155 \def\processfollowingtoken#1% strut

Re: [NTG-context] Draft version of document

2012-08-07 Thread Hans Hagen
\strc_floats_set_current_tag{#tag}% \dodoubleempty\strc_floats_start_place_indeed} % and store the user data for a while \def\strc_floats_start_place_indeed[#settings][#userdata]% {\strc_floats_reset_variables \edef\savedfloatlocation{\floatcaptionparameter\c!location}% \setupcurrentfloatcaption[\c!location

Re: [NTG-context] Luatex error in latest beta (standalone)

2012-08-03 Thread Alan Bowen
\setupfootnotes {\setupnote [\v!footnote]} 1707\def\footnotetext {\setnotetext [\v!footnote]} 1708 \unexpanded\def\placefootnotes {\dodoubleempty\strc_notes_place_footnotes [\v!footnote]} 1709 \unexpanded\def

[NTG-context] startalign broken in latest checkout

2012-07-04 Thread Prashanth
\stoptext 9 lt;templategt; \endtemplate \NR -gt;\aligntab \dostoptagged \dodoubleempty \math_alignment_NR_indeed l.4 \NC v \NC = u + at \NR ! Use of \expandafter doesn't match its definition. system gt; tex gt; error on line 5 in file demo.context: Use of ... 1

[NTG-context] expansion and \processaction

2012-06-07 Thread Philipp Gesang
as \processaction to retrieve the items. But naively I didn’t consider expansion ... My code so far: ··8 \unprotect \def\definestates{\dodoubleempty\do_define_states} \def\do_define_states[#1][#2]{% \expandafter\edef\csname#1_states

Re: [NTG-context] expansion and \processaction

2012-06-07 Thread Wolfgang Schuster
\processcommalist to generate the mapping n-list item, as well as \processaction to retrieve the items. But naively I didn’t consider expansion ... My code so far: ··8 \unprotect \def\definestates{\dodoubleempty\do_define_states

Re: [NTG-context] expansion and \processaction

2012-06-07 Thread Philipp Gesang
\unprotect \def\definestates{\dodoubleempty\do_define_states} \def\do_define_states[#1][#2]{% \expandafter\edef\csname#1_states\endcsname{% \nstates0 %% this is supposed to be expanded so we employ the \raw... variety \rawprocesscommalist[#2

Re: [NTG-context] expansion and \processaction

2012-06-07 Thread Wolfgang Schuster
\unprotect \def\definestates{\dodoubleempty\do_define_states} \def\do_define_states[#1][#2]{% \expandafter\edef\csname#1_states\endcsname{% \nstates0 %% this is supposed to be expanded so we employ the \raw... variety

Re: [NTG-context] MLA Bibliography

2012-04-18 Thread Philipp Gesang
, ] \setuppublications[ alternative=apa, ] \glet\originalcite\cite \let\cite\relax \unprotect \def\cite{\dodoubleempty\do_cite} \def\do_cite[#1][#2]{% %%% Wraps citations into footnotes. \iffirstargument \startfootnote \ifsecondargument \originalcite[#1][#2]% \else \originalcite

Re: [NTG-context] MLA Bibliography

2012-04-18 Thread Kip Warner
: \setupbibtex[ database=sample, sort=author, ] \setuppublications[ alternative=apa, ] \glet\originalcite\cite \let\cite\relax \unprotect \def\cite{\dodoubleempty\do_cite} \def\do_cite[#1][#2]{% %%% Wraps citations into footnotes

Re: [NTG-context] Bibtex with ConTeXt mkiv

2012-04-17 Thread Kip Warner
this: \unexpanded\def\mycite{\dodoubleempty\domycite} \def\domycite[#1][#2]% {\ifsecondargument \footnote{\cite[alternative=data,#1][#2]}% \else \footnote{\cite[data][#1]}% \fi} Then \mycite[key] also inserts the \footnote command automatically, and you can

Re: [NTG-context] Problem with \writebetweenlist

2012-02-26 Thread Hans Hagen
\unexpanded\def\writebetweenlist{\dodoubleempty \strc_lists_write_between} \unexpanded\def\writedatatolist {\dotripleargument\strc_lists_write_data_to} \unexpanded\def\writetolist {\dodoubleempty \strc_lists_write_to} \def\strc_lists_write_between[#tag]% {\begingroup \edef\currentlist{#tag

Re: [NTG-context] solution for missing bookmark (minimal example)

2012-02-25 Thread Steffen Wolfrum
al.}] \newbibfield[shorttitle] \newbibfield[shortauthor] \unexpanded\def\mycite {\dodoubleempty\domycite} \def\domycite[#1][#2]#3% {\bgroup \nocite[#3]% \getcitedata[shortauthor][#3] to \myshortauthor% \getcitedata[shorttitle][#3] to \myshorttitle% \getcitedata[title][#3

[NTG-context] solution for missing bookmark (minimal example)

2012-02-23 Thread Steffen Wolfrum
={}, left={},right={},andtext={|::|}, otherstext={ \tf et al.}] \newbibfield[shorttitle] \newbibfield[shortauthor] \unexpanded\def\mycite {\dodoubleempty\domycite} \def\domycite[#1][#2]#3% {\bgroup \nocite[#3]% \getcitedata[shortauthor][#3] to \myshortauthor% \getcitedata[shorttitle][#3

Re: [NTG-context] problem with \getparameters

2012-02-23 Thread luigi scarso
for this case \setup.. seems to inglobe \define... \unexpanded\def\definelinenumbering {\dosingleempty\dodefinelinenumbering} \def\dodefinelinenumbering[#1]% {\edef\currentlinenumbering{#1}% \mkdefinetextlinenumbering} \unexpanded\def\setuplinenumbering {\dodoubleempty\dosetuplinenumbering

Re: [NTG-context] problem with \getparameters

2012-02-23 Thread Wolfgang Schuster
} \unexpanded\def\setuplinenumbering {\dodoubleempty\dosetuplinenumbering} \def\dosetuplinenumbering[#1][#2]% {\ifsecondargument \def\currentlinenumbering{#1}% \getparameters[\??rn#1][#2]% \else \let\currentlinenumbering\empty \getparameters[\??rn][#1]% \fi

Re: [NTG-context] \startstopcomment fails on latest beta

2012-02-03 Thread Hans Hagen
!stop\currentcomment}} should be \unexpanded\def\scrn_comment_start#category% {\def\currentcomment{#category}% \doifelselocation {\dodoubleempty\scrn_comment_start_status} {\dodoubleempty\scrn_comment_start_ignore}} \def\scrn_comment_start_status

Re: [NTG-context] What’s your favorite command?

2012-01-31 Thread Hans Hagen
not passing an examn ... here's a fix (actually the random args were always swapped but the mkii code is not sensitive for wrong random ranges) \unexpanded\def\fakefigure {\dodoubleempty\dofakefigure} \def\dofakefigure[#1][#2]#3#4#5#6% {\getvalue{\e!place\v!figure} [#1][#2

Re: [NTG-context] setupinteraction kills dodoubleargument

2011-11-21 Thread Wolfgang Schuster
is this? Can it be repaired? Change your definition for \testa and \testb to \unexpanded\def\testa{\dosingleempty\dotesta} and \unexpanded\def\testb{\dodoubleempty\dotestb} Wolfgang ___ If your question

Re: [NTG-context] setupinteraction kills dodoubleargument

2011-11-21 Thread Meer, H. van der
{\dodoubleempty\dotestb} This is a solution, so I can go on with my document. But isn't it better in general when the problem is solved in \footnote? Because outside it I encountered no problem with the \dodouble's. It would be a pity if everyone who tries to something of the sort, will have to tackle

Re: [NTG-context] setupinteraction kills dodoubleargument

2011-11-21 Thread Hans Hagen
. and \unexpanded\def\testb{\dodoubleempty\dotestb} This is a solution, so I can go on with my document. But isn't it better in general when the problem is solved in \footnote? Because outside it I encountered no problem with the \dodouble's. It would be a pity if everyone who tries to something

[NTG-context] setuplayerframed broken?

2011-09-16 Thread Henning Hraban Ramm
,height=30mm,state=start] 2 \setupbackgrounds[paper] [setups=ALayer,background=MyBg,state=start] 3 4 \starttext 5 6 \strut to be read again \let \noshowargumenterror -\let \expectedarguments \noexpectedarguments \dodoubleempty #1

Re: [NTG-context] bib module (again)

2011-07-07 Thread Andreas Schneider
if anyone else feels like providing a better solution for the Ibidem-problem: please do! -- Best Regards, Andreas\def\mycite{\dodoubleempty\domycite} \def\defaultciterepeat{Ebenda} \def\defaultciteprefix{Vgl. } \def\defaultcitepage{S. } \def\defaultcitechapter{Kap. } \def\domycite[#1][#2

Re: [NTG-context] export: graphic url (special chars?)

2011-06-20 Thread Aditya Mahajan
On Mon, 20 Jun 2011, Reviczky, Adam wrote: Further, if the url has a % symbol then the name property stops at that, see: --- \setupbackend[export=test.xml] \enabledirectives[schemes.cleanmethod=md5] \def\googlechart {\begingroup \setcatcodetable\vrbcatcodes \dodoubleempty\dogooglechart} \def

[NTG-context] export: graphic url (special chars?)

2011-06-19 Thread Reviczky, Adam
=test.xml] \enabledirectives[schemes.cleanmethod=md5] \def\googlechart {\begingroup \setcatcodetable\vrbcatcodes \dodoubleempty\dogooglechart} \def\dogooglechart[#1][#2]% {\endgroup \externalfigure[#1][method=png,#2]} \starttext \googlechart[http://chart.apis.google.com/chart?chs=350x220cht

Re: [NTG-context] bug with showlayout

2011-05-16 Thread Hans Hagen
!repeat]} \gdef\showframe {\dodoubleempty\doshowframe} \gdef\showsetups {\ctxcommand{showlayoutvariables()}} \gdef\showlayout % interfereert lelijk met een \typefile er na {\ctxcommand{showlayout()}} \gdef\showmargins {\starttabulate \NC asynchrone \NC \doifoddpageelse {odd} {even

Re: [NTG-context] Google Chart URL

2011-04-18 Thread Wolfgang Schuster
] \asciimode \asciimode can be overkill because it makes also “%” a normal character, better you define a command which change the catcodes. \def\googlechart {\begingroup \setcatcodetable\vrbcatcodes \dodoubleempty\dogooglechart} \def\dogooglechart[#1][#2]% {\endgroup \externalfigure[#1

Re: [NTG-context] Google Chart URL

2011-04-18 Thread Reviczky, Adam
\asciimode can be overkill because it makes also “%” a normal character, better you define a command which change the catcodes. \def\googlechart {\begingroup \setcatcodetable\vrbcatcodes \dodoubleempty\dogooglechart} \def\dogooglechart[#1][#2]% {\endgroup \externalfigure

Re: [NTG-context] Google Chart URL

2011-04-18 Thread Wolfgang Schuster
\googlechart {\begingroup \setcatcodetable\vrbcatcodes \dodoubleempty\dogooglechart} \def\dogooglechart[#1][#2]% {\endgroup \externalfigure[#1][method=png,#2]} \starttext \googlechart[http://chart.apis.google.com/chart?chs=350x220cht=p3chd=s:G99pchdl=2|1|1|6|2|0|52|52|2|2|1|1|2|2|2|2|2|1|1

Re: [NTG-context] prevent gobbling of spaces when omitting optional argument

2011-02-01 Thread Wolfgang Schuster
Am 28.01.2011 um 23:24 schrieb Florian Wobbe: Hi, please consider the following minimal example: \def\before{\dodoubleempty\dobefore}% \def\dobefore[#1][#2]{before} \starttext \before[] after (should be: \before[]\ after without explicit \type{\ })\par \before[]after\par \before

Re: [NTG-context] prevent gobbling of spaces when omitting optional argument

2011-01-29 Thread Wolfgang Schuster
Am 28.01.2011 um 23:24 schrieb Florian Wobbe: Hi, please consider the following minimal example: \def\before{\dodoubleempty\dobefore}% \def\dobefore[#1][#2]{before} \starttext \before[] after (should be: \before[]\ after without explicit \type{\ })\par \before[]after\par \before

Re: [NTG-context] prevent gobbling of spaces when omitting optional argument

2011-01-29 Thread Florian Wobbe
Hi, please consider the following minimal example: \def\before{\dodoubleempty\dobefore}% \def\dobefore[#1][#2]{before} \starttext \before[] after (should be: \before[]\ after without explicit \type{\ })\par \before[]after\par \before[][] after\par % this works \before[][]after\par

[NTG-context] prevent gobbling of spaces when omitting optional argument

2011-01-28 Thread Florian Wobbe
Hi, please consider the following minimal example: \def\before{\dodoubleempty\dobefore}% \def\dobefore[#1][#2]{before} \starttext \before[] after (should be: \before[]\ after without explicit \type{\ })\par \before[]after\par \before[][] after\par % this works \before[][]after\par \stoptext

Re: [NTG-context] Working with conditionals

2011-01-03 Thread Vianney le Clément
\def\Title{\dodoubleempty\doTitle} \def\doTitle[#1][#2]{ \ifsecondargument \testpage[#2] \else \testpage[10] \fi \startalignment[center] { \blank[2*big] \switchtobodyfont[1.5em] \bf\em#1 } \blank \stopalignment } Vianney On Mon, Jan 3, 2011 at 10:46, Cecil

Re: [NTG-context] Working with conditionals

2011-01-03 Thread luigi scarso
2011/1/3 Vianney le Clément vleclem...@gmail.com: \def\Title{\dodoubleempty\doTitle} \def\doTitle[#1][#2]{  \ifsecondargument     \testpage[#2]  \else     \testpage[10]  \fi  \startalignment[center]  {     \blank[2*big]     \switchtobodyfont[1.5em]     \bf\em#1  }  \blank

Re: [NTG-context] Working with conditionals

2011-01-03 Thread Cecil Westerhof
2011/1/3 Vianney le Clément vleclem...@gmail.com: \def\Title{\dodoubleempty\doTitle} \def\doTitle[#1][#2]{  \ifsecondargument     \testpage[#2]  \else     \testpage[10]  \fi  \startalignment[center]  {     \blank[2*big]     \switchtobodyfont[1.5em]     \bf\em#1  }  \blank

Re: [NTG-context] \placeformula

2010-12-01 Thread Hans Hagen
On 30-11-2010 8:10, Wolfgang Schuster wrote: Hi Hans, a fix for strc-mat.mkiv \unexpanded\def\placeformula - {\doglobal\settrue\insideplaceformula + {\global\settrue\insideplaceformula \settrue\incrementformulanumber \dodoubleempty\doplaceformula} \unexpanded\def\placesubformula

[NTG-context] \placeformula

2010-11-30 Thread Wolfgang Schuster
Hi Hans, a fix for strc-mat.mkiv \unexpanded\def\placeformula - {\doglobal\settrue\insideplaceformula + {\global\settrue\insideplaceformula \settrue\incrementformulanumber \dodoubleempty\doplaceformula} \unexpanded\def\placesubformula - {\doglobal\settrue\insideplacesubformula + {\global

  1   2   3   >