![](https://secure.gravatar.com/avatar/27c34cb91f1e92bd850fe60b3d9ef336.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
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 -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/27c34cb91f1e92bd850fe60b3d9ef336.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 17-6-2011 7:20, Wolfgang Schuster wrote:
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).
sure, but eventually the preferred way will be no arguments and all and calling up data with commands (as there can be more now than number and title e.g. userdata) 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 -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Wolfgang Schuster