Difference between revisions of "Command/setupmakeup"

From Wiki
Jump to navigation Jump to search
(add description based on mail by taco)
(Added 2nd example incorporating a mailing list response from Wolfgang)
(13 intermediate revisions by 6 users not shown)
Line 5: Line 5:
  
 
== [[Help:Reference|Syntax]] ==
 
== [[Help:Reference|Syntax]] ==
<table cellspacing="4" cellpadding="2" class="cmd">
+
<syntax>setupmakeup</syntax>
  <tr>
 
    <td colspan="2" class="cmd">\setupmakeup<span class="first" >[...]</span><span class="second" >[...,...=...,...]</span></td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[...]</td>
 
    <td>name </td>
 
  </tr>
 
  <tr valign="top" class="second">
 
    <td class="cmd">[[Reference/en/keyword:width|width]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="second">
 
    <td class="cmd">[[Reference/en/keyword:height|height]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="second">
 
    <td class="cmd">[[Reference/en/keyword:voffset|voffset]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="second">
 
    <td class="cmd">[[Reference/en/keyword:hoffset|hoffset]]</td>
 
    <td>[[Reference/en/value:dimension|dimension]] </td>
 
  </tr>
 
  <tr valign="top" class="second">
 
    <td class="cmd">[[Reference/en/keyword:page|page]]</td>
 
    <td>[[Reference/en/value:left|left]] [[Reference/en/value:yes|yes]] [[Reference/en/value:right|right]] </td>
 
  </tr>
 
  <tr valign="top" class="second">
 
    <td class="cmd">[[Reference/en/keyword:commands|commands]]</td>
 
    <td>[[Reference/en/value:command|command]] </td>
 
  </tr>
 
  <tr valign="top" class="second">
 
    <td class="cmd">[[Reference/en/keyword:doublesided|doublesided]]</td>
 
    <td>[[Reference/en/value:yes|yes]] [[Reference/en/value:no|no]] [[Reference/en/value:empty|empty]] </td>
 
  </tr>
 
  <tr valign="top" class="second">
 
    <td class="cmd">[[Reference/en/keyword:headerstate|headerstate]]</td>
 
    <td>[[Reference/en/value:normal|normal]] [[Reference/en/value:stop|stop]] [[Reference/en/value:start|start]] [[Reference/en/value:empty|empty]] [[Reference/en/value:none|none]] [[Reference/en/value:nomarking|nomarking]] </td>
 
  </tr>
 
  <tr valign="top" class="second">
 
    <td class="cmd">[[Reference/en/keyword:footerstate|footerstate]]</td>
 
    <td>[[Reference/en/value:normal|normal]] [[Reference/en/value:stop|stop]] [[Reference/en/value:start|start]] [[Reference/en/value:empty|empty]] [[Reference/en/value:none|none]] [[Reference/en/value:nomarking|nomarking]] </td>
 
  </tr>
 
  <tr valign="top" class="second">
 
    <td class="cmd">[[Reference/en/keyword:textstate|textstate]]</td>
 
    <td>[[Reference/en/value:normal|normal]] [[Reference/en/value:stop|stop]] [[Reference/en/value:start|start]] [[Reference/en/value:empty|empty]] [[Reference/en/value:none|none]] [[Reference/en/value:nomarking|nomarking]] </td>
 
  </tr>
 
  <tr valign="top" class="second">
 
    <td class="cmd">[[Reference/en/keyword:topstate|topstate]]</td>
 
    <td>[[Reference/en/value:stop|stop]] [[Reference/en/value:start|start]] </td>
 
  </tr>
 
  <tr valign="top" class="second">
 
    <td class="cmd">[[Reference/en/keyword:bottomstate|bottomstate]]</td>
 
    <td>[[Reference/en/value:stop|stop]] [[Reference/en/value:start|start]] </td>
 
  </tr>
 
  <tr valign="top" class="second">
 
    <td class="cmd">[[Reference/en/keyword:pagestate|pagestate]]</td>
 
    <td>[[Reference/en/value:stop|stop]] [[Reference/en/value:start|start]] </td>
 
  </tr>
 
  <tr valign="top" class="second">
 
    <td class="cmd">[[Reference/en/keyword:color|color]]</td>
 
    <td>[[Reference/en/value:name|name]] </td>
 
  </tr>
 
</table>
 
 
 
  
 
== Description ==
 
== Description ==
Line 78: Line 13:
  
 
It is a page type with a special layout / header & footer sections that last only temporarily. The key point is that such a page does not (have to) rely on the current page layout style, which is especially useful for title pages.
 
It is a page type with a special layout / header & footer sections that last only temporarily. The key point is that such a page does not (have to) rely on the current page layout style, which is especially useful for title pages.
 +
 +
By default the page layout set up with {{cmd|setuplayout}} is being reused. However, a custom page layout can be used as well. {{cmd|definemakeup}} automatically uses a layout defined with {{cmd|definelayout}} with the same name as the makeup.
 +
 +
There are two different ways to switch to the defined makeups:
 +
 +
<texcode>
 +
\startmakeup [custom]
 +
… some content …
 +
\stopmakeup
 +
</texcode>
 +
 +
and
 +
 +
<texcode>
 +
\startcustommakeup
 +
… some content …
 +
\stopcustommakeup
 +
</texcode>
  
 
== Example ==
 
== Example ==
<!-- Please fill in an example if you can -->
+
=== Example 1 ===
 +
<texcode>
 +
% this layout is automatically used by the “custom” makeup
 +
\definelayout
 +
  [custom]
 +
  [backspace=5mm]
 +
 
 +
\definemakeup
 +
  [custom]
 +
 
 +
\starttext
 +
 
 +
  \startmakeup [custom]
 +
    \input ward
 +
  \stopmakeup
 +
 
 +
  \input knuth
 +
 
 +
  \startcustommakeup
 +
    \input ward
 +
  \stopcustommakeup
 +
 
 +
\stoptext
 +
</texcode>
 +
=== Example 2 ===
 +
Set the bodyfont on just the makeup page
 +
<texcode>
 +
 
 +
\definemakeup [custom] [style={\switchtobodyfont[heros,14pt]}]
 +
</texcode>
  
 
== See also ==
 
== See also ==
<!-- something like [[cmd:goto|\goto]] -->
+
* [[Makeup]]
 +
* [[Layout]]
 +
* [[Standardmakeup background]] (2013)
 +
* {{src|page-mak.mkiv}}
 +
* {{cmd|setuplayout}}
 +
 
 +
== Help from ConTeXt-Mailinglist/Forum ==
 +
All issues with:
 +
{{Forum|{{SUBPAGENAME}}}}
 +
 
 +
[[Category:Command/Layout|setupmakeup]]
  
[[Category:Reference/en|setupmakeup]]
+
[[Category:Layout]]

Revision as of 22:26, 27 August 2021

\setupmakeup

Syntax

\setupmakeup[...,...][...=...,...]
[...,...]name
pagesee \page
commandcommand
widthdimension
heightdimension
alignsee \setupalign
setupsname
topcommand
bottomcommand
beforecommand
aftercommand
locationtop
referencereference
pagestatestart stop
headerstatestart stop high empty none normal
footerstatestart stop high empty none normal
topstatestart stop high empty none normal
bottomstatestart stop high empty none normal
textstatestart stop high empty none normal
doublesidedyes no empty
stylestyle command
colorcolor


Description

from a mail by Taco:

A makeup is a separate page, like a title page or colofon. There is one standard makeup page, but you can define more if needed.

It is a page type with a special layout / header & footer sections that last only temporarily. The key point is that such a page does not (have to) rely on the current page layout style, which is especially useful for title pages.

By default the page layout set up with \setuplayout is being reused. However, a custom page layout can be used as well. \definemakeup automatically uses a layout defined with \definelayout with the same name as the makeup.

There are two different ways to switch to the defined makeups:

\startmakeup [custom]
 … some content …
\stopmakeup

and

\startcustommakeup
 … some content …
\stopcustommakeup

Example

Example 1

% this layout is automatically used by the “custom” makeup
\definelayout
  [custom]
  [backspace=5mm]

\definemakeup
  [custom]

\starttext

  \startmakeup [custom]
    \input ward
  \stopmakeup

  \input knuth

  \startcustommakeup
    \input ward
  \stopcustommakeup

\stoptext

Example 2

Set the bodyfont on just the makeup page


\definemakeup [custom] [style={\switchtobodyfont[heros,14pt]}]

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: