From: "Procházka Lukáš Ing. - Pontex s. r. o." <LPr@pontex.cz>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: \setuphead[part] - special look
Date: Mon, 29 Jun 2015 14:05:44 +0200 [thread overview]
Message-ID: <op.x0zqju0ttpjj8f@lpr> (raw)
In-Reply-To: <55896D1E.8070809@gmail.com>
[-- 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
___________________________________________________________________________________
next prev parent reply other threads:[~2015-06-29 12:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-22 7:35 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. [this message]
2015-06-29 12:33 ` Wolfgang Schuster
2015-06-29 13:09 ` Procházka Lukáš Ing. - Pontex s. r. o.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=op.x0zqju0ttpjj8f@lpr \
--to=lpr@pontex.cz \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).