[dev-context] spac-ver.mkiv

2011-06-16 Thread Wolfgang Schuster
Hi Hans,

-\setvalue{@strut@\s!empty  }{\setstrut}
+\setvalue{@strut@\empty}{\setstrut}

This should be \empty otherwise \setupstrut (without arguments) expands to 
\setcharstrut without any content.

Wolfgang

___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] --iftouched not working

2011-06-16 Thread Hans Hagen

On 16-6-2011 12:01, Aditya Mahajan wrote:

Hi,

mtxrun --iftouched does not work. The reason is that line 147000 of
mtxrun.lua has

local oldname, newname = string.split(touchname, ,)

This sets oldname to be equal to a table and newname to nil.
Consequently, the next test

if oldname and newname and oldname ~=  and newname ~=  then

fails. An easy fix is to wrap string.split inside a unpack.

local oldname, newname = unwrap(string.split(touchname, ,))

but there might be more canonical ways of fixing this.


I've made a string.splitup(str,,) for this (saves a temp table).

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


[dev-context] spac-ver.mkiv

2011-06-16 Thread Wolfgang Schuster
-\def\dodomoveongrid[#1]%
+\def\domoveongrid[#1]%
  {} % gone, unless we set an attribute

Wolfgang

___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


[dev-context] cont-new.mkiv

2011-06-16 Thread Wolfgang Schuster
\def\dostartgridcorrection[#1]%
  {\ifgridsnapping
-\iffirstargument\doifsomething{#1}{\moveongrid[#1]}\fi
-\snaptogrid\vbox\bgroup
+\snaptogrid[#1]\vbox\bgroup
   \else
 \startbaselinecorrection
   \fi}

Wolfgang

___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


[dev-context] \defineheadplacement

2011-06-16 Thread Wolfgang Schuster
Hi Hans,

is it possible to integrate the two parameters for the number and text in the 
definition of the command?

%\def\dodefineheadplacement[#1][#2]% #3#4
%  {\setvalue{\??ns:#1}{#2}%
%   \setvalue{\??ns::#1}}

\def\dodefineheadplacement[#1][#2]%
  {\setvalue{\??ns:#1}{#2}%
   \setvalue{\??ns::#1}##1##2}


As \defineheadplacement is a user command it should be possible to use it in 
the form

  \defineheadplacement[test][horizontal]{\inleft{#1 #2}}


Wolfgang

___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


[dev-context] \defineheadplacement

2011-06-16 Thread Wolfgang Schuster
Hi Hans,

is it possible to integrate the two parameters for the number and text in the 
definition of the command?

%\def\dodefineheadplacement[#1][#2]% #3#4
%  {\setvalue{\??ns:#1}{#2}%
%   \setvalue{\??ns::#1}}

\def\dodefineheadplacement[#1][#2]%
 {\setvalue{\??ns:#1}{#2}%
  \setvalue{\??ns::#1}##1##2}


As \defineheadplacement is a user command it should be possible to use it in 
the form

 \defineheadplacement[test][horizontal]{\inleft{#1 #2}}


Wolfgang

___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] \defineheadplacement

2011-06-16 Thread Hans Hagen

On 16-6-2011 9:18, Wolfgang Schuster wrote:

Hi Hans,

is it possible to integrate the two parameters for the number and text in the 
definition of the command?

%\def\dodefineheadplacement[#1][#2]% #3#4
%  {\setvalue{\??ns:#1}{#2}%
%   \setvalue{\??ns::#1}}

\def\dodefineheadplacement[#1][#2]%
   {\setvalue{\??ns:#1}{#2}%
\setvalue{\??ns::#1}##1##2}


As \defineheadplacement is a user command it should be possible to use it in 
the form

   \defineheadplacement[test][horizontal]{\inleft{#1 #2}}


I grepped all my projects and if you want that we need a more clever patch:

\def\dodefineheadplacementyes[#1][#2]%#3#4%
  {\setvalue{\??ns:#1}{#2}%
   \setvalue{\??ns::#1}##1##2}

\def\dodefineheadplacementnop[#1][#2]%
  {\setvalue{\??ns:#1}{#2}%
   \setvalue{\??ns::#1}}

\def\dodefineheadplacement[#1][#2]%
  {\doifnextbgroupelse
 {\dodefineheadplacementyes[#1][#2]}%
 {\dodefineheadplacementnop[#1][#2]}}

% \dodefineheadplacement[sectiona][vertical]{#1-#2}
% \dodefineheadplacement[sectionb][vertical]#1#2{#1-#2}

% \setuphead[section][alternative=sectiona]
% \setuphead[subsection][alternative=sectionb]

Can you check that?

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


[dev-context] strc-sec.mkiv

2011-06-16 Thread Wolfgang Schuster
-\ifdefined \else \let\presetnumberheadalternative\relax \fi
+\ifdefined\presetnumberheadalternative \else 
\let\presetnumberheadalternative\relax \fi

Wolfgang

___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] \defineheadplacement

2011-06-16 Thread Wolfgang Schuster

Am 16.06.2011 um 23:27 schrieb Hans Hagen:

 I grepped all my projects and if you want that we need a more clever patch:
 
 […]
 
 Can you check that?

It works with and without parameters.

As the command is at user level it’s better to get rid of the arguments (like 
\define[2]\Command and \def\Command#1#2).

Wolfgang

___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context