Re: [NTG-context] Title for tabulate

2021-12-16 Thread Benjamin Buchmuller via ntg-context
Yes, this works! Thanks!

I'll try to add a section on the Wiki. Is there a reason why the second 
approach works while the other doesn't?

> On Dec 16, 2021, at 12:46, Hans Hagen  wrote:
> 
> On 12/16/2021 11:39 AM, Benjamin Buchmuller wrote:
>> Thanks again, Hans, for all the different approaches, very instructive!
>> However, after playing around a bit, I do have a question that I can't work 
>> out:
>> \getdummyparameters[headtitle=,#1]
>> \ifempty{\dummyparameter{headtitle}}
> can you try
> 
> \ifcstok{\dummyparameter{headtitle}}\emptytoks
> 
> instead
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -

___
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://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Extra shift with ornament

2021-12-16 Thread Mikael Sundqvist via ntg-context
Hi,

When using an ornament on a \startframedtext \stoptextframed the frame
is shifted just a little bit. Can one get rid of that shift? MWE
below.

/Mikael

\defineornament[MyOrn][
  corner={right,bottom},
  location={right,top},
  alternative=b,
  ][
  frame=off,
  ]

\showframe

\starttext
\startframedtext[width=\textwidth,height=2cm]foo\stopframedtext

\MyOrn{bar}{\startframedtext[width=\textwidth,height=2cm]foo\stopframedtext}
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] \startcolumnset ... \stopcolumnset fatal error: return code 11

2021-12-16 Thread Jeong Dal via ntg-context
Hi,

I have used newcolumnset module to make a test sheet. It was made by the help 
of experts in the list.
It worked fine a month ago and also worked via TeXlive 2021.
But I got error using the recent version.
Thanks Nicola and John for testing.

I have listed it before and tried to find out the cause.
I have test the following file in the editors,  vscode, vim, atom and even in 
the terminal.
It might be an apple binary problem as Hans suspected.
I’d like to know that it is the only problem for Mac users.

Here is the code and the part of error message:
It was tested in vscode, vim and terminal too.

I am using Mac OSX, 
ConTeXt  ver: 2021.12.03 15:20 LMTX  fmt: 2021.12.9  int: english/english

Thank you for reading.
Best regards,

Dalyoung

%%%
\startuseMPgraphic{verticalrule0}
  if CurrentColumn < NOfColumns :
draw rightboundary OverlayBox shifted (4mm,0);
setbounds currentpicture to OverlayBox enlarged 2.5mm;
  fi;
\stopuseMPgraphic

\startuseMPgraphic{squareBox}
   draw topboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;
   draw rightboundary OverlayBox shifted (1mm,0); %if CurrentColumn = 1: 
shifted(-2mm,0) fi ;
   draw leftboundary OverlayBox shifted (-1mm,0); %if CurrentColumn = 2: 
shifted(2mm,0) fi ;  
   draw bottomboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;
 \stopuseMPgraphic
\defineoverlay
  [headerBox]
  [\useMPgraphic{squareBox}]

\startuseMPgraphic{verticalrule3}
   draw rightboundary OverlayBox shifted (1mm,0); %if CurrentColumn = 1: 
shifted(-2mm,0) fi ;
   draw leftboundary OverlayBox shifted (-1mm,0); %if CurrentColumn = 2: 
shifted(2mm,0) fi ;  
   draw bottomboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;
 \stopuseMPgraphic

\defineoverlay
  [verticalrule]
  [\useMPgraphic{verticalrule3}]

\definecolumnset
  [exam]
  [n=2,
   background=verticalrule]


\setuplayout[width=19cm, height=26cm, header=1cm, footer=.5cm,backspace=1cm]
\setupheader[before=\vfil, after=\vfil]
\setupbackgrounds[header][text][frame=off, background=headerBox, 
align=lohi]%topframe=
\setupbackgrounds[footer][text][frame=off, background=screen]

\define[3]\headTitle{\setupheadertexts[][\bf #1  \hfill #2  \hfill #3  \hfill 
ID:  \hskip 2cm Name: \hskip 2cm]}

\setupmathematics[autopunctuation=no, integral=nolimits]

\setupbodyfont[rm,10pt]
\setuppagenumbering[location=footer]
\setupcolors[state=start]
%\setupexternalfigure[directory={/Users/graph/Documents/figures,}]

\headTitle{2021. 12. 9.}{Set Theory}{Final Exam}

\usemodule[newcolumnsets]

\starttext

%\startcolumns[rule=on,n=2,leftframe=on]
\startcolumnset[exam]

\startitemize[n]
  \item The first problem.
  \vfill
  \column

  \item The second problem.
  \vfill
  \column

  \item The third problem.
  \vfill
  \column

\stopitemize

\stopcolumnset
%\stopcolumns
\stoptext


%%
…
open source > level 2, order 3, name 
‘/Users/graph/ConTeXtLM/tex/texmf-context/tex/context/base/mkiv/m-newcolumnsets.mkiv'
close source> level 2, order 3, name 
'/Users/graph/ConTeXtLM/tex/texmf-context/tex/context/base/mkiv/m-newcolumnsets.mkiv'
mtx-context | fatal error: return code: 11
The terminal process "zsh '-c', 'mtxrun --autogenerate --script context 
--autopdf --purge '/Users/graph/Library/Mobile 
Documents/com~apple~CloudDocs/texMain/ColumnsetTest.tex''" terminated with exit 
code: 1.

___
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://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] About "clearpage"

2021-12-16 Thread Wolfgang Schuster via ntg-context

MANUEL GONZALEZ SUAREZ via ntg-context schrieb am 16.12.2021 um 20:15:

Hi all:

In the example below:

[...]

\newdimen\Margin
\Margin=2cm
\newdimen\MarginRaise
\MarginRaise=56ex

[...]

\startsetups[text a]
\raise\MarginRaise\hbox{\vtop{\hsize=\Margin%
\startalignment[right]
\getmarking[chapter]
\stopalignment
}}
\stopsetups

\startsetups[text b]
\raise\MarginRaise\hbox{\vtop{\hsize=\Margin%
\startalignment[left]
\getmarking[section]
\stopalignment
}}
\stopsetups



\definemeasure [MarginWidth] [2cm]
\definemeasure [MarginRaise] [56ex]

\defineframed
  [MarginBlock]
  [frame=off,
   width=\measure{MarginWidth},
   height=max,
   offset=0pt,
   boffset=\measure{MarginRaise},
   align={inner,lohi}]

\startsetups[text a]
\startframed[MarginBlock]
\getmarking[chapter]
\stopframed
\stopsetups

\startsetups[text b]
\startframed[MarginBlock]
\getmarking[section]
\stopframed
\stopsetups


How can I avoid the last page of the first chapter that appears in the 
PDF (page 4 in my output) before starting the new chapter?



Chapters start by default on a right page when you use a doublesided 
layout, to change this behavior set a different value to the page key.


\setuphead [chapter] [page=yes]


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-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] About "clearpage"

2021-12-16 Thread MANUEL GONZALEZ SUAREZ via ntg-context
Hi all:

In the example below:


\setuppagenumbering[alternative=doublesided, location={footer,right},page=no]


\newdimen\Margin

\Margin=2cm

\newdimen\MarginRaise

\MarginRaise=56ex

\setuptexttexts[margin][][\setups{text a}][\setups{text b}][]

\setuptext[leftstyle=\sc,rightstyle=\em]

\startsetups[text a]

\raise\MarginRaise\hbox{\vtop{\hsize=\Margin%

  \startalignment[right]

  \getmarking[chapter]

  \stopalignment

}}

\stopsetups


\startsetups[text b]

\raise\MarginRaise\hbox{\vtop{\hsize=\Margin%

  \startalignment[left]

  \getmarking[section]

  \stopalignment

}}

\stopsetups


\starttext

\chapter{First}

\section{first}

\dorecurse{6}{\input tufte}


\input tufte


\input tufte


\input tufte


\input tufte

\chapter{Second}

\section{second}

\dorecurse{6}{\input tufte}

\chapter{Third}

\section{third}

\dorecurse{6}{\input tufte}

\stoptext


How can I avoid the last page of the first chapter that appears in the PDF 
(page 4 in my output) before starting the new chapter?

Thank you

M. González.
___
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://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] LTR footnotes from RTL paragraph

2021-12-16 Thread Pablo Rodriguez via ntg-context
On 12/16/21 12:34 PM, Denis Maier via ntg-context wrote:
> Ok, this works:
>
> \setupnote[footnote][align=l2r]
>
> Does that have any drawbacks?

Hi Denis,

I don’t think it may have (other than forgetting other options, such as
hz or hanging).

> Is it possible to change the text direction for single notes?

It doesn’t seem an option for \startfootnote. How about defining a new
command?

  \definedelimitedtext[rtlblockquote][before={\righttoleft}]
  \definenote[otnote][footnote]
  \setupnote[otnote][align=l2r]
  \starttext
  \input zapf
  \startblockquote
  \input zapf\footnote{this starts on the left.}
  \stopblockquote
  \startrtlblockquote
  \input zapf\footnote{this should start on the left.}
  \input zapf\otnote{this should start on the left.}
  \stoprtlblockquote
  \input zapf
  \stoptext

Just in case it might help,

Pablo
___
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://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] x86-64-amd-linux binary?

2021-12-16 Thread Hans Hagen via ntg-context

On 12/16/2021 3:01 PM, Ramkumar KB wrote:

Hans,

Thank you. Just to clarify, in my current installation - context and 
mtxrun are already symlinks to the luametatex.


best make a copy of your tex directory and install in there

(btw, why is a new luametatex bin needed? are you sure the rest of 
context is in sync? e.g. Some internal (lua) keys were normalized recently.)


So all I need to do is replace the luametatex binay (dl from the build 
server - debian9 build)? I also notice the luatex binary - I just leave 
it as is?

luatex is the same fr a while already

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] x86-64-amd-linux binary?

2021-12-16 Thread Ramkumar KB via ntg-context
Hans,

Thank you. Just to clarify, in my current installation - context and mtxrun
are already symlinks to the luametatex.

So all I need to do is replace the luametatex binay (dl from the build
server - debian9 build)? I also notice the luatex binary - I just leave it
as is?

best regards,
Ramkumar

On Thu, Dec 16, 2021 at 5:52 PM Hans Hagen  wrote:

> On 12/16/2021 1:01 PM, Ramkumar KB via ntg-context wrote:
> > Hello All,
> >
> > If I have to just upgrade my context version installed in my linux VM
> > (x88-64 - amd - redhat) - is debain9 the correct package?
> >
> > https://build.contextgarden.net/#/ 
> > - So I just replace the luametatex binary after download the binary from
> > the build server? Is this correct?
> keep in mind that context code and bin have to be in sync (at least as
> long as we move on)
>
> basically three bins: luametatex, context and mtxrun but the last two
> can be symlinks to luametatex
>
> Hans
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
___
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://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] x86-64-amd-linux binary?

2021-12-16 Thread Hans Hagen via ntg-context

On 12/16/2021 1:01 PM, Ramkumar KB via ntg-context wrote:

Hello All,

If I have to just upgrade my context version installed in my linux VM 
(x88-64 - amd - redhat) - is debain9 the correct package?


https://build.contextgarden.net/#/  
- So I just replace the luametatex binary after download the binary from 
the build server? Is this correct?
keep in mind that context code and bin have to be in sync (at least as 
long as we move on)


basically three bins: luametatex, context and mtxrun but the last two 
can be symlinks to luametatex


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] x86-64-amd-linux binary?

2021-12-16 Thread Ramkumar KB via ntg-context
Hello All,

If I have to just upgrade my context version installed in my linux VM
(x88-64 - amd - redhat) - is debain9 the correct package?

https://build.contextgarden.net/#/ - So I just replace the luametatex
binary after download the binary from the build server? Is this correct?

Thank you,

best regards,
Ramkumar
___
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://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Title for tabulate

2021-12-16 Thread Hans Hagen via ntg-context

On 12/16/2021 11:39 AM, Benjamin Buchmuller wrote:

Thanks again, Hans, for all the different approaches, very instructive!

However, after playing around a bit, I do have a question that I can't work out:

\getdummyparameters[headtitle=,#1]

\ifempty{\dummyparameter{headtitle}}

can you try

\ifcstok{\dummyparameter{headtitle}}\emptytoks

instead

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] LTR footnotes from RTL paragraph

2021-12-16 Thread Denis Maier via ntg-context
Ok, this works:

\setupnote[footnote][align=l2r]

Does that have any drawbacks?

Is it possible to change the text direction for single notes ?

Denis


Von: ntg-context  Im Auftrag von Denis Maier via 
ntg-context
Gesendet: Donnerstag, 16. Dezember 2021 12:09
An: ntg-context@ntg.nl
Cc: Maier, Denis Christian (UB) 
Betreff: [NTG-context] LTR footnotes from RTL paragraph

Hi

Footnotes originating from an RTL paragraph will be also typeset in RTL mode as 
the following example illustrates:

%%
\setupdelimitedtext[blockquote]
[leftmargin=1.5em,rightmargin=0em,]

\definedelimitedtext[rtlblockquote]
\setupdelimitedtext[rtlblockquote]
[leftmargin=0em,rightmargin=1.5em,before={\righttoleft}]


\starttext

\input knuth

\startblockquote
\input knuth\footnote{this starts on the left.}
\stopblockquote

\startrtlblockquote
\input knuth\footnote{this should start on the left, but it doesn't.}
\stoprtlblockquote

\input knuth

\stoptext


According to the wiki, that's the expected behaviour 
(https://wiki.contextgarden.net/RTL#Footnotes).
However, I'd prefer to keep the footnotes as LTR footnotes. Can I convince 
ConTeXt to typeset these footnotes in LTR mode?

Best,
Denis
___
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://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] LTR footnotes from RTL paragraph

2021-12-16 Thread Denis Maier via ntg-context
Hi

Footnotes originating from an RTL paragraph will be also typeset in RTL mode as 
the following example illustrates:

%%
\setupdelimitedtext[blockquote]
[leftmargin=1.5em,rightmargin=0em,]

\definedelimitedtext[rtlblockquote]
\setupdelimitedtext[rtlblockquote]
[leftmargin=0em,rightmargin=1.5em,before={\righttoleft}]


\starttext

\input knuth

\startblockquote
\input knuth\footnote{this starts on the left.}
\stopblockquote

\startrtlblockquote
\input knuth\footnote{this should start on the left, but it doesn't.}
\stoprtlblockquote

\input knuth

\stoptext


According to the wiki, that's the expected behaviour 
(https://wiki.contextgarden.net/RTL#Footnotes).
However, I'd prefer to keep the footnotes as LTR footnotes. Can I convince 
ConTeXt to typeset these footnotes in LTR mode?

Best,
Denis
___
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://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Title for tabulate

2021-12-16 Thread Benjamin Buchmuller via ntg-context
Thanks again, Hans, for all the different approaches, very instructive!

However, after playing around a bit, I do have a question that I can't work 
out: 

\getdummyparameters[headtitle=,#1]

\ifempty{\dummyparameter{headtitle}}

will never be true? See below in context:

> On Dec 14, 2021, at 19:16, Hans Hagen  wrote:
> 
> On 12/14/2021 6:16 PM, Benjamin Buchmuller via ntg-context wrote:
>> Hi!
>> I'd like to follow up on a problem that Denis came across recently with the 
>> titles argument in tabulate. (It's more a solution than a question, but any 
>> hints to improve the answer are welcome.) I wanted to use this argument for 
>> an easy specification of, well, a title for a "recipe". The advantage is 
>> that all information is held together and it's easy to use for people who 
>> are not (too) familiar with ConTeXt.
>> So, in one file I can define all styles (which the end-user would not need 
>> to see):
>> \definetabulate[recipe][|l|l|p|l|]
>> \setuptabulate
>>  [recipe]
>>  [
>>  bodyfont=small,
>>  distance=medium,
>>  before={\blank[back, small]},
>>  header=text,
>>  headstyle=\bi, % this formats the "\BC" cells
>>  headcolor=red, % this formats the "\BC" cells
>>  ]
>> \starttext
>> And then use:
>> \startrecipe[title={Whatever mixture 1}]
>> \FL
>> \NC Absolute \BC Stock \NC Ingredient \NC Final \NR
>> \HL
>> \NC 1 \NR
>> \LL
>> \stoprecipe
>> \startrecipe[title={Whatever mixture 2}]
>> \FL
>> \BC Absolute \BC Stock \BC Ingredient \BC Final \NR
>> \HL
>> \NC 1 \NR
>> \LL
>> \stoprecipe
>> \stoptext
>> etc.
>> However, I cannot change the way the title is styled (or spaced from the 
>> table) unless I do "title={\bi Some text.}". However, blank commands are 
>> also stripped off at this place. (I also don't get a clue from 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=small,
>>  distance=medium,
>>  before={\blank[back, small]},
>>  % header=text, % THIS MUST NOT BE "text"
>>  headstyle=bold,
>>  headcolor=red,
>>  ]
>> \define\startrecipe{\dodoubleempty\dostartrecipe}
>> \long\def\dostartrecipe[#1][#2]#3\stoprecipe{%
>>  \iffirstargument
>>  {\bi #1}\blank[medium]
>>  \fi
>>  \ifsecondargument
>>  \startrecipetab[#2]
>>  #3
>>  \stoprecipetab
>>  \else
>>  \startrecipetab
>>  #3
>>  \stoprecipetab
>>  \fi
>> }
>> \startrecipe[Head 1]
>> \FL
>> \BC Absolute \BC Stock \BC Ingredient \BC Final \NR
>> \HL
>> \NC 1 \NR
>> \LL
>> \stoprecipe
>> \startrecipe[Head 2][headcolor=blue] % pass on arguments to tabulate
>> \FL
>> \BC Absolute \BC Stock \BC Ingredient \BC Final \NR
>> \HL
>> \NC 1 \NR
>> \LL
>> \stoprecipe
>> Small question though: Is there a ConTeXt way to "\long\def" or a simple way 
>> ("user interface") to filter a list of arguments for a specific key=val 
>> pair, e.g. to make a single optional argument with headertitle={Some 
>> header.}?
> context has no (need for) \long ... all is long (i mever saw a reason for 
> using it)
> 
> (1) use a proper head:
> 
> \definehead[RecipeHead][subsubsubsubsubsubject]
> \setuphead [RecipeHead][style=bolditalic,after={\blank[medium]}]
> 
> \definetabulate[recipetab][|l|l|p|l|]
> 
> \setuptabulate
>  [recipetab]
>  [bodyfont=small,
>   distance=medium,
>   before={\blank[back, small]},
>   headstyle=bold,
>   headcolor=red]
> 
> here's a one-step lmtx solution:
> 
> \let\stoprecipe\relax
> 
> \tolerant\protected\def\startrecipe[#1]#*[#2]#3\stoprecipe
>  {\ifcstok{#1}\emptytoks\else
> \RecipeHead{#1}
>   \fi
>   \ifcstok{#2}\emptytoks
> \startrecipetab#3\stoprecipetab
>   \else
> \startrecipetab[#2]#3\stoprecipetab
>   \fi}
> 
> or just
> 
> \tolerant\protected\def\startrecipe[#1]#*[#2]#3\stoprecipe
>  {\ifempty{#1}\else
> \RecipeHead{#1}
>   \fi
>   \ifempty{#2}%
> \startrecipetab#3\stoprecipetab
>   \else
> \startrecipetab[#2]#3\stoprecipetab
>   \fi}
> 
> 
> and here's one that does what you ask (in the core i'd try to avoid grabbing 
> too much arguments and if real core we'd make sure dummy parameters don;t 
> interfere):
> 
> \tolerant\protected\def\startrecipe[#1]#2\stoprecipe
>  {\ifempty{#1}%
> \startrecipetab#2\stoprecipetab
>   \orelse\ifhastok={#1}%
> \getdummyparameters[headtitle=,#1]
> \ifempty{\dummyparameter{headtitle}}\else
>   \normalexpanded{\RecipeHead{\dummyparameter{headtitle}}}
> \fi
> \startrecipetab[#1]#2\stoprecipetab
>   \else
> \RecipeHead{#1}
> \startrecipetab#2\stoprecipetab
>   \fi}
> 
> \startrecipe[headtitle={Head 3},headcolor=blue] % pass on arguments to 
> tabulate
> \FL
> \BC Absolute \BC Stock \BC Ingredient \BC Final \NR
> \HL
> \NC 1 \NR
> \LL
> \stoprecipe

Consider: