ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \setuphead[part] - special look
@ 2015-06-22  7:35 Procházka Lukáš Ing. - Pontex s. r. o.
  2015-06-22  8:51 ` Wolfgang Schuster
  0 siblings, 1 reply; 9+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2015-06-22  7:35 UTC (permalink / raw)
  To: ConTeXt

[-- Attachment #1: Type: text/plain, Size: 1743 bytes --]

Hello,

I'm trying to \setuphead[part] to have the following features:

1. Part head to fill the whole page.

2. Part number and name to be placed (approx.) in the golden ratio of the page.

3. Page background (for the \part only!) to be colored, e.g. blue.

----
\define[2]\MyPartCmd{%
     {%
       \vbox to\vsize{%
         \vfill\vfill%
         #1
         \blank[big]
         #2
         \vfill\vfill\vfill%
       }
     }%
}

\define[1]\MyPartCmdText{%
   \hbox to\hsize{\hfill \bf DĂl #1\hfill}%
}

\definefontsize[e]
\definebodyfontenvironment[default][e=5.]

\define[1]\MyPartCmdNum{%
   \hbox to\hsize{\hfill \bfe\sc#1\hfill}%
}

\setuphead[part]
   [command=\MyPartCmd,
    numbercommand=\MyPartCmdText,
    textcommand=\MyPartCmdNum,
    placehead=yes,header=none,page=odd,
    before={\setupbackgrounds[page][background=color,backgroundcolor=blue,state=start]},
    %after={\setupbackgrounds[page][background=]},
   ]

\starttext
   \showboxes
   \part{Part}
   \input knuth
\stoptext
----

The code above doesn't satisfy the features:

Ad 1: Some text (from knuth) appears in the bottom (should be solved by "after=\page", but is there a better solution, e.g. to affect height of the \vbox in \MyPartCmd?)

Ad 3: I'm able to make only the part page blue (now all pages are blue; when I uncomment "after={\setupbackgrounds[page][background=]},", no page is blue).

Could anyone help me to "tune" the \setuphead[part]?

Thank you in advance.

Best regards,

Lukas


-- 
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o.      | mailto:pontex@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

[-- Attachment #2: Ull-Gra.test.mkiv --]
[-- Type: application/octet-stream, Size: 755 bytes --]

\define[2]\MyPartCmd{%
    {%
      \vbox to\vsize{%
        \vfill\vfill%
        #1
        \blank[big]
        #2
        \vfill\vfill\vfill%
      }
    }%
}

\define[1]\MyPartCmdText{%
  \hbox to\hsize{\hfill \bf Díl #1\hfill}%
}

\definefontsize[e]
\definebodyfontenvironment[default][e=5.]

\define[1]\MyPartCmdNum{%
  \hbox to\hsize{\hfill \bfe\sc#1\hfill}%
}

\setuphead[part]
  [command=\MyPartCmd,
   numbercommand=\MyPartCmdText,
   textcommand=\MyPartCmdNum,
   placehead=yes,header=none,page=odd,
   before={\setupbackgrounds[page][background=color,backgroundcolor=blue,state=start]},
   %after={\setupbackgrounds[page][background=]},
  ]

\starttext
  \showboxes
  \part{Part}
  \input knuth
\stoptext

[-- Attachment #3: Ull-Gra.test.pdf --]
[-- Type: application/pdf, Size: 33828 bytes --]

[-- Attachment #4: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: \setuphead[part] - special look
  2015-06-22  7:35 \setuphead[part] - special look Procházka Lukáš Ing. - Pontex s. r. o.
@ 2015-06-22  8:51 ` Wolfgang Schuster
  2015-06-22  9:42   ` Procházka Lukáš Ing. - Pontex s. r. o.
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2015-06-22  8:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2653 bytes --]


> Procházka Lukáš Ing. - Pontex s. r. o. <mailto:LPr@pontex.cz>
> 22. Juni 2015 09:35
> Hello,
>
> I'm trying to \setuphead[part] to have the following features:
>
> 1. Part head to fill the whole page.
>
> 2. Part number and name to be placed (approx.) in the golden ratio of 
> the page.
>
> 3. Page background (for the \part only!) to be colored, e.g. blue.
>
> ----
> \define[2]\MyPartCmd{%
>     {%
>       \vbox to\vsize{%
>         \vfill\vfill%
>         #1
>         \blank[big]
>         #2
>         \vfill\vfill\vfill%
>       }
>     }%
> }
>
> \define[1]\MyPartCmdText{%
>   \hbox to\hsize{\hfill \bf DĂl #1\hfill}%
> }
>
> \definefontsize[e]
> \definebodyfontenvironment[default][e=5.]
>
> \define[1]\MyPartCmdNum{%
>   \hbox to\hsize{\hfill \bfe\sc#1\hfill}%
> }
>
> \setuphead[part]
>   [command=\MyPartCmd,
>    numbercommand=\MyPartCmdText,
>    textcommand=\MyPartCmdNum,
>    placehead=yes,header=none,page=odd,
>    
> before={\setupbackgrounds[page][background=color,backgroundcolor=blue,state=start]}, 
>
>    %after={\setupbackgrounds[page][background=]},
>   ]
>
> \starttext
>   \showboxes
>   \part{Part}
>   \input knuth
> \stoptext
> ----
>
> The code above doesn't satisfy the features:
>
> Ad 1: Some text (from knuth) appears in the bottom (should be solved 
> by "after=\page", but is there a better solution, e.g. to affect 
> height of the \vbox in \MyPartCmd?)
The \page command is needed here.
> Ad 3: I'm able to make only the part page blue (now all pages are 
> blue; when I uncomment 
> "after={\setupbackgrounds[page][background=]},", no page is blue).
You can use the \pushbackground and \popbackground command to limit the 
background changes to a certain part of your document.
> Could anyone help me to "tune" the \setuphead[part]?
\defineheadalternative
   [partpage]
   [renderingsetup=partpage]

\startsetups[partpage]

     \startmakeup[part]
         \headsetupspacing
         \headnumbercontent
         \blank[big]
         \headtextcontent
     \stopmakeup

\stopsetups

\definemakeup
   [part]
   [align=middle,
    top=\vfill\vfill,
    bottom=\vfill\vfill\vfill]

\setuphead
   [part]
   [placehead=yes,
    alternative=partpage,
    page=right,
    
before={\pushbackground[page]\setupbackgrounds[page][background=color,backgroundcolor=blue]},
    after={\page\popbackground},
    bodypartlabel=part,
    align=middle,
    numberstyle=\bfb,
    textstyle=\bfd\sc]

\setuplabeltext[en][part=DĂl ]

\starttext
   \part{Part}
   \input knuth
\stoptext

BTW: Where is Ad 2?

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 4344 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: \setuphead[part] - special look
  2015-06-22  8:51 ` Wolfgang Schuster
@ 2015-06-22  9:42   ` Procházka Lukáš Ing. - Pontex s. r. o.
  2015-06-22 16:36     ` Wolfgang Schuster
  0 siblings, 1 reply; 9+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2015-06-22  9:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello Wolfgang,

thank you for the solution, it pretty systemic.

Ad "Ad 2": There was no question as succeeded placing page number and name into the page gold ratio, so just mentioned as one of the features required.

After some plying with your solution, I deduce:

We have to derive a new alternative for "part" (here "partpage") as we CAN assign a new "renderingsetup" to this alternative but we CANNOT assign a rendering setup in the scope of \setuphead.

IOW, there is no "\setuphead[part][renderingsetup=partpage]".

If there was the option "\setuphead[part][renderingsetup=partpage]" we could simplify to:

----
% No headalternative here

\startsetups[partpage]
    \startmakeup[part]
        \headsetupspacing
        \headnumbercontent
        \blank[big]
        \headtextcontent
    \stopmakeup
\stopsetups

\definemakeup
  [part]
  [align=middle,
   top=\vfill\vfill,
   bottom=\vfill\vfill\vfill]

\setuphead
  [part]
  [...
   renderingsetup=partpage,
   ...
  ]

...

----

Am I right?

(And, I understand that the aim is not to support all extraordinary request(s) in \setuphead by its keys/options - it is enough to have A way to get them, here using a "headalternative"...)

Thanks again.

Best regards,

Lukas


On Mon, 22 Jun 2015 10:51:46 +0200, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:

>
> You can use the \pushbackground and \popbackground command to limit the
> background changes to a certain part of your document.

> \defineheadalternative
>    [partpage]
>    [renderingsetup=partpage]
>
> \startsetups[partpage]
>
>      \startmakeup[part]
>          \headsetupspacing
>          \headnumbercontent
>          \blank[big]
>          \headtextcontent
>      \stopmakeup
>
> \stopsetups
>
> \definemakeup
>    [part]
>    [align=middle,
>     top=\vfill\vfill,
>     bottom=\vfill\vfill\vfill]
>
> \setuphead
>    [part]
>    [placehead=yes,
>     alternative=partpage,
>     page=right,
>before={\pushbackground[page]\setupbackgrounds[page][background=color,backgroundcolor=blue]},
>     after={\page\popbackground},
>     bodypartlabel=part,
>     align=middle,
>     numberstyle=\bfb,
>     textstyle=\bfd\sc]
>
> \setuplabeltext[en][part=DĂl ]
>
> \starttext
>    \part{Part}
>    \input knuth
> \stoptext
>
> BTW: Where is Ad 2?
>
> Wolfgang
>


-- 
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o.      | mailto:pontex@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: \setuphead[part] - special look
  2015-06-22  9:42   ` Procházka Lukáš Ing. - Pontex s. r. o.
@ 2015-06-22 16:36     ` Wolfgang Schuster
  2015-06-23  7:45       ` Procházka Lukáš Ing. - Pontex s. r. o.
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2015-06-22 16:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2085 bytes --]


> Procházka Lukáš Ing. - Pontex s. r. o. <mailto:LPr@pontex.cz>
> 22. Juni 2015 11:42
> Hello Wolfgang,
>
> thank you for the solution, it pretty systemic.
>
> Ad "Ad 2": There was no question as succeeded placing page number and 
> name into the page gold ratio, so just mentioned as one of the 
> features required.
>
> After some plying with your solution, I deduce:
>
> We have to derive a new alternative for "part" (here "partpage") as we 
> CAN assign a new "renderingsetup" to this alternative but we CANNOT 
> assign a rendering setup in the scope of \setuphead.
>
> IOW, there is no "\setuphead[part][renderingsetup=partpage]".
>
> If there was the option "\setuphead[part][renderingsetup=partpage]" we 
> could simplify to:
This method to set your own layout is also used by other command (e.g. 
the list mechanism used for the table of contents) and the 
\defineheadplacement has also a alternative key which is needed when you 
want an inline heading (e.g. \setuphead[...][alternative=text]).
> ----
> % No headalternative here
>
> \startsetups[partpage]
>    \startmakeup[part]
>        \headsetupspacing
>        \headnumbercontent
>        \blank[big]
>        \headtextcontent
>    \stopmakeup
> \stopsetups
>
> \definemakeup
>  [part]
>  [align=middle,
>   top=\vfill\vfill,
>   bottom=\vfill\vfill\vfill]
>
> \setuphead
>  [part]
>  [...
>   renderingsetup=partpage,
>   ...
>  ]
>
> ...
>
> ----
>
> Am I right?
>
> (And, I understand that the aim is not to support all extraordinary 
> request(s) in \setuphead by its keys/options - it is enough to have A 
> way to get them, here using a "headalternative"...)
The necessary key would be endless with each new layout and with the 
\defineheadplacement command to create your own without adding 
additional keys but you can also use the command key instead of 
\defineheadplacement. The advantage of \defineheadplacement is that you 
can better structure the code in the setups environment because you 
don't have to worry about spaces.

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 3392 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: \setuphead[part] - special look
  2015-06-22 16:36     ` Wolfgang Schuster
@ 2015-06-23  7:45       ` Procházka Lukáš Ing. - Pontex s. r. o.
  2015-06-23 14:28         ` Wolfgang Schuster
  0 siblings, 1 reply; 9+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2015-06-23  7:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1499 bytes --]

Hello,

I'm really satisfied with the way you coded the part page layout.

I've modified a bit your code - just to highlight the dependencies (rendering setup, makeup and so on; if anyone interested, see the attachment).

On Mon, 22 Jun 2015 18:36:03 +0200, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:

> This method to set your own layout is also used by other command (e.g.
> the list mechanism used for the table of contents) and the
> \defineheadplacement has also a alternative key which is needed when you
> want an inline heading (e.g. \setuphead[...][alternative=text]).

...

> The necessary key would be endless with each new layout and with the
> \defineheadplacement command to create your own without adding
> additional keys but you can also use the command key instead of
> \defineheadplacement. The advantage of \defineheadplacement is that you
> can better structure the code in the setups environment because you
> don't have to worry about spaces.
>
> Wolfgang

As "\defineheadplacement" is concerned:

You mentioned this command in your response, but "\defineheadplacement" is used nowhere in your code and there is no info about on wiki.

Could you provide a MWE how \defineheadplacement is supposed to be used?

Best regards,

Lukas


-- 
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o.      | mailto:pontex@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

[-- Attachment #2: Ull-Gra.test2.mkiv --]
[-- Type: application/octet-stream, Size: 856 bytes --]

\defineheadalternative
  [PartAlt]
  [renderingsetup=set:PartPage]

\startsetups[set:PartPage]
  \startmakeup[mu:PartPage]
    \white
      \headnumbercontent
      \blank[2*big]
      \headtextcontent
  \stopmakeup
\stopsetups

\definemakeup
  [mu:PartPage]
  [align=middle,
   top=\vfill\vfill,
   bottom=\vfill\vfill\vfill,
  ]

\definefontsize[e]
\definebodyfontenvironment[default][e=5.]

\setuphead
  [part]
  [placehead=yes,
   alternative=PartAlt,
   page=right,
   header=none,
   before={\pushbackground[page]
           \setupbackgrounds[page][background=color,backgroundcolor=black]},
   after={\page\popbackground},
   bodypartlabel=MyPart,
   align=middle,
   numberstyle=\bfc,
   textstyle=\bfe,
  ]

\setuplabeltext[en][MyPart=Díl ]

\starttext
  \part{My First Part}
    \input knuth
\stoptext

[-- Attachment #3: Ull-Gra.test2.pdf --]
[-- Type: application/pdf, Size: 12008 bytes --]

[-- Attachment #4: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: \setuphead[part] - special look
  2015-06-23  7:45       ` Procházka Lukáš Ing. - Pontex s. r. o.
@ 2015-06-23 14:28         ` Wolfgang Schuster
  2015-06-29 12:05           ` Procházka Lukáš Ing. - Pontex s. r. o.
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2015-06-23 14:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2458 bytes --]


> Procházka Lukáš Ing. - Pontex s. r. o. <mailto:LPr@pontex.cz>
> 23. Juni 2015 09:45
> Hello,
>
> I'm really satisfied with the way you coded the part page layout.
>
> I've modified a bit your code - just to highlight the dependencies 
> (rendering setup, makeup and so on; if anyone interested, see the 
> attachment).
You can drop the \definebodyfontenvironment line when you use 
\definefont to set the part fonts, e.g.

\definefont[PartText][SerifBold sa 5]
\setuphead[part][textstyle=PartText]

> On Mon, 22 Jun 2015 18:36:03 +0200, Wolfgang Schuster 
> <schuster.wolfgang@gmail.com> wrote:
>
>> This method to set your own layout is also used by other command (e.g.
>> the list mechanism used for the table of contents) and the
>> \defineheadplacement has also a alternative key which is needed when you
>> want an inline heading (e.g. \setuphead[...][alternative=text]).
>
> ...
>
>> The necessary key would be endless with each new layout and with the
>> \defineheadplacement command to create your own without adding
>> additional keys but you can also use the command key instead of
>> \defineheadplacement. The advantage of \defineheadplacement is that you
>> can better structure the code in the setups environment because you
>> don't have to worry about spaces.
>>
>> Wolfgang
>
> As "\defineheadplacement" is concerned:
>
> You mentioned this command in your response, but 
> "\defineheadplacement" is used nowhere in your code and there is no 
> info about on wiki.
>
> Could you provide a MWE how \defineheadplacement is supposed to be used?
You shouldn't use it because Hans kept it only for backwards 
compatibility and \defineheadplacement is the better alternative. You 
can also use the same rendering (the content of the setups environment) 
for different head alternatives where you set the differences with the 
\defineheadalternative command.

% HeadA

\defineheadplacement[HeadA][vertical]#1#2%
   {\startframedtext
      #1\quad #2%
    \stopframedtext}

\definehead[HeadA][section][alternative=HeadA]

% HeadB

\defineheadalternative[HeadB][renderingsetup=HeadB] % alternative=vertical

\startsetups[HeadB]
   \startframedtext
     \headnumbercontent \qquad \headtextcontent
   \stopframedtext
\stopsetups

\definehead[HeadB][section][alternative=HeadB]

\starttext

\HeadA{Knuth}

\input knuth

\HeadB{Tufte}

\input tufte

\stoptext

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 4013 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: \setuphead[part] - special look
  2015-06-23 14:28         ` Wolfgang Schuster
@ 2015-06-29 12:05           ` Procházka Lukáš Ing. - Pontex s. r. o.
  2015-06-29 12:33             ` Wolfgang Schuster
  0 siblings, 1 reply; 9+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2015-06-29 12:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 3395 bytes --]

Hello,

one more question.

When I place \part into \...bodymatter and \...appendices, the \part in body matter yields "Díl " + number, which is OK, but in appendices it gives "<nothing>" + Roman number ("I", "II", ...).

What is the most systemic to \setuphead[part] to give "Díl..." in body matter and "Dodatek..." in appendices, and also to get letter numbering ("A", "B"...) in appendices (so "Dodatek A", "Doadatek B", ...)?

A sample source code with body matter and appendices is attached...

Best regards,

Lukas


On Tue, 23 Jun 2015 16:28:46 +0200, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:

>
>> Procházka Lukáš Ing. - Pontex s. r. o. <mailto:LPr@pontex.cz>
>> 23. Juni 2015 09:45
>> Hello,
>>
>> I'm really satisfied with the way you coded the part page layout.
>>
>> I've modified a bit your code - just to highlight the dependencies
>> (rendering setup, makeup and so on; if anyone interested, see the
>> attachment).
> You can drop the \definebodyfontenvironment line when you use
> \definefont to set the part fonts, e.g.
>
> \definefont[PartText][SerifBold sa 5]
> \setuphead[part][textstyle=PartText]
>
>> On Mon, 22 Jun 2015 18:36:03 +0200, Wolfgang Schuster
>> <schuster.wolfgang@gmail.com> wrote:
>>
>>> This method to set your own layout is also used by other command (e.g.
>>> the list mechanism used for the table of contents) and the
>>> \defineheadplacement has also a alternative key which is needed when you
>>> want an inline heading (e.g. \setuphead[...][alternative=text]).
>>
>> ...
>>
>>> The necessary key would be endless with each new layout and with the
>>> \defineheadplacement command to create your own without adding
>>> additional keys but you can also use the command key instead of
>>> \defineheadplacement. The advantage of \defineheadplacement is that you
>>> can better structure the code in the setups environment because you
>>> don't have to worry about spaces.
>>>
>>> Wolfgang
>>
>> As "\defineheadplacement" is concerned:
>>
>> You mentioned this command in your response, but
>> "\defineheadplacement" is used nowhere in your code and there is no
>> info about on wiki.
>>
>> Could you provide a MWE how \defineheadplacement is supposed to be used?
> You shouldn't use it because Hans kept it only for backwards
> compatibility and \defineheadplacement is the better alternative. You
> can also use the same rendering (the content of the setups environment)
> for different head alternatives where you set the differences with the
> \defineheadalternative command.
>
> % HeadA
>
> \defineheadplacement[HeadA][vertical]#1#2%
>    {\startframedtext
>       #1\quad #2%
>     \stopframedtext}
>
> \definehead[HeadA][section][alternative=HeadA]
>
> % HeadB
>
> \defineheadalternative[HeadB][renderingsetup=HeadB] % alternative=vertical
>
> \startsetups[HeadB]
>    \startframedtext
>      \headnumbercontent \qquad \headtextcontent
>    \stopframedtext
> \stopsetups
>
> \definehead[HeadB][section][alternative=HeadB]
>
> \starttext
>
> \HeadA{Knuth}
>
> \input knuth
>
> \HeadB{Tufte}
>
> \input tufte
>
> \stoptext
>
> Wolfgang
>


-- 
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o.      | mailto:pontex@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

[-- Attachment #2: Ull-Gra.test2.mkiv --]
[-- Type: application/octet-stream, Size: 968 bytes --]

\defineheadalternative
  [PartAlt]
  [renderingsetup=set:PartPage]

\startsetups[set:PartPage]
  \startmakeup[mu:PartPage]
    \white
      \headnumbercontent
      \blank[2*big]
      \headtextcontent
  \stopmakeup
\stopsetups

\definemakeup
  [mu:PartPage]
  [align=middle,
   top=\vfill\vfill,
   bottom=\vfill\vfill\vfill,
  ]

\definefont[PartText][SerifBold sa 5]

\setuphead
  [part]
  [placehead=yes,
   alternative=PartAlt,
   page=right,
   header=none,
   before={\pushbackground[page]
           \setupbackgrounds[page][background=color,backgroundcolor=black]},
   after={\page\popbackground},
   bodypartlabel=MyPart,
   align=middle,
   numberstyle=\bfc,
   textstyle=PartText,
  ]

\setuplabeltext[en][MyPart=Díl ]

\starttext
  \startbodymatter
    \part{My First Part}
      \input knuth
  \stopbodymatter
  \startappendices
    \part{My First Appendix}
      \input tufte
  \stopappendices
\stoptext

[-- Attachment #3: Ull-Gra.test2.pdf --]
[-- Type: application/pdf, Size: 14410 bytes --]

[-- Attachment #4: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: \setuphead[part] - special look
  2015-06-29 12:05           ` Procházka Lukáš Ing. - Pontex s. r. o.
@ 2015-06-29 12:33             ` Wolfgang Schuster
  2015-06-29 13:09               ` Procházka Lukáš Ing. - Pontex s. r. o.
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2015-06-29 12:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1724 bytes --]


> Procházka Lukáš Ing. - Pontex s. r. o. <mailto:LPr@pontex.cz>
> 29. Juni 2015 14:05
> Hello,
>
> one more question.
>
> When I place \part into \...bodymatter and \...appendices, the \part 
> in body matter yields "Díl " + number, which is OK, but in appendices 
> it gives "<nothing>" + Roman number ("I", "II", ...).
You have to change the default conversion for the appendix.
> What is the most systemic to \setuphead[part] to give "Díl..." in body 
> matter and "Dodatek..." in appendices, and also to get letter 
> numbering ("A", "B"...) in appendices (so "Dodatek A", "Doadatek B", 
> ...)?
You have to set a label for the appendix with the appendixlabel key.
> A sample source code with body matter and appendices is attached...
% Method 1: change the values of the predefined "default" conversion set,
% you can use name of the sectionblock as prefix (separated by a :) to set
% the values only for a certain part (e.g. the appendix) of your document

\defineconversionset[appendix:default][A,R][n]

% Method 2: Create your own conversion set and apply it to all sections
%
% \defineconversionset[bodypart:myconversion][n,n][n]
% \defineconversionset[appendix:myconversion][A,R][n]
% \setuphead[part,chapter,section][sectionconversionset=myconversion]

\setuphead
   [part]
   [placehead=yes,
    bodypartlabel=bodypart-mypart,
    appendixlabel=appendix-mypart]

\setuplabeltext[en][bodypart-mypart=Díl ,appendix-mypart=Dodatek ]

\starttext
     \startbodymatter
         \part{My First Part}
         \input knuth
     \stopbodymatter
     \startappendices
         \part{My First Appendix}
         \input tufte
     \stopappendices
\stoptext

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 3324 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: \setuphead[part] - special look
  2015-06-29 12:33             ` Wolfgang Schuster
@ 2015-06-29 13:09               ` Procházka Lukáš Ing. - Pontex s. r. o.
  0 siblings, 0 replies; 9+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2015-06-29 13:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello Wolfgang,

thanks again, it works perfectly.

Best regards,

Lukas


On Mon, 29 Jun 2015 14:33:41 +0200, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:

>
>> Procházka Lukáš Ing. - Pontex s. r. o. <mailto:LPr@pontex.cz>
>> 29. Juni 2015 14:05
>> Hello,
>>
>> one more question.
>>
>> When I place \part into \...bodymatter and \...appendices, the \part
>> in body matter yields "Díl " + number, which is OK, but in appendices
>> it gives "<nothing>" + Roman number ("I", "II", ...).
> You have to change the default conversion for the appendix.
>> What is the most systemic to \setuphead[part] to give "Díl..." in body
>> matter and "Dodatek..." in appendices, and also to get letter
>> numbering ("A", "B"...) in appendices (so "Dodatek A", "Doadatek B",
>> ...)?
> You have to set a label for the appendix with the appendixlabel key.
>> A sample source code with body matter and appendices is attached...
> % Method 1: change the values of the predefined "default" conversion set,
> % you can use name of the sectionblock as prefix (separated by a :) to set
> % the values only for a certain part (e.g. the appendix) of your document
>
> \defineconversionset[appendix:default][A,R][n]
>
> % Method 2: Create your own conversion set and apply it to all sections
> %
> % \defineconversionset[bodypart:myconversion][n,n][n]
> % \defineconversionset[appendix:myconversion][A,R][n]
> % \setuphead[part,chapter,section][sectionconversionset=myconversion]
>
> \setuphead
>    [part]
>    [placehead=yes,
>     bodypartlabel=bodypart-mypart,
>     appendixlabel=appendix-mypart]
>
> \setuplabeltext[en][bodypart-mypart=Díl ,appendix-mypart=Dodatek ]
>
> \starttext
>      \startbodymatter
>          \part{My First Part}
>          \input knuth
>      \stopbodymatter
>      \startappendices
>          \part{My First Appendix}
>          \input tufte
>      \stopappendices
> \stoptext
>
> Wolfgang
>


-- 
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o.      | mailto:pontex@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-06-29 13:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-22  7:35 \setuphead[part] - special look Procházka Lukáš Ing. - Pontex s. r. o.
2015-06-22  8:51 ` Wolfgang Schuster
2015-06-22  9:42   ` Procházka Lukáš Ing. - Pontex s. r. o.
2015-06-22 16:36     ` Wolfgang Schuster
2015-06-23  7:45       ` Procházka Lukáš Ing. - Pontex s. r. o.
2015-06-23 14:28         ` Wolfgang Schuster
2015-06-29 12:05           ` Procházka Lukáš Ing. - Pontex s. r. o.
2015-06-29 12:33             ` Wolfgang Schuster
2015-06-29 13:09               ` Procházka Lukáš Ing. - Pontex s. r. o.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).