Difference between revisions of "Makeup"

From Wiki
Jump to navigation Jump to search
(some explanation added)
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
== Description ==
 
== Description ==
  
A makeup has a special layout, allowing for custom and temporary header & footer sections. Pages that need not rely on the current page layout style typically include covers, colophons, or similar. There is one standard makeup page, but you can define more if needed.
+
A makeup is a single page with a special layout, allowing for custom and temporary header and footer sections.
 +
 
 +
Makeups don’t rely on the current page layout style, and they typically include covers, colophons or similar ones.
 +
 
 +
In any case, it is important not to forget that makeup contents will never split in pages. All makeup contents must fit on a single page.
 +
 
 +
There are predefined makeups: <code>standard</code>, <code>page</code>, <code>text</code> and <code>middle</code>. Of course, you can define as many as you may need.
 +
 
 +
By default, makeups have the following properties:
 +
 
 +
# They aren’t numbered in the final document (<code>pagestate=start</code> changes this).
 +
# In double-sided documents, they are always on an odd page with the next page empty (<code>page=yes</code> and <code>doublesided=no</code> change each of these defaults).
 +
# They don’t include header or footers (use either <code>headerstate=start</code> or <code>footerstate=start</code> to change it).
 +
# They are left aligned (use the <code>align</code> option key [and {{cmd|dontleavehmode}} with {{cmd|externalfigure}}]).
 +
 
 +
All makeups have an associated layout. So you may use {{cmd|setuplayout}} to tweak it (besides configuring the makeup itself).
  
 
== Examples ==
 
== Examples ==
  
There are a few ways to invoke a custom makeup:
+
There are a few ways to invoke a custom makeup (and to compare it with the other predefined makeups):
  
 
<texcode>
 
<texcode>
 +
\showframe
 +
\setuppagenumbering[alternative=doublesided, page=,]
 +
\setupmakeup[pagestate=start]
 
\definemakeup[custom][align=middle]
 
\definemakeup[custom][align=middle]
 
\starttext
 
\starttext
 
\startmakeup[custom]
 
\startmakeup[custom]
 +
This is a title page.
 +
\stopmakeup
 +
 +
\startmakeup[text]
 +
This is a title page.
 +
\stopmakeup
 +
 +
 +
\startmakeup[middle]
 +
This is a title page.
 +
\stopmakeup
 +
 +
\startmakeup[standard]
 +
This is a title page.
 +
\stopmakeup
 +
 +
\startmakeup[page]
 
This is a title page.
 
This is a title page.
 
\stopmakeup
 
\stopmakeup
Line 42: Line 77:
 
</texcode>
 
</texcode>
  
Another way to start a previously defined <code>makeup</code> is to put it into the <code>\start</code> invocation, i.e.,  \start<''name''>makeup</code>.  In the above case we can easily refer to ''custom'' makeup with <code>\startcustommakeup</code>:
+
Another way to start a previously defined <code>makeup</code> is to put it into the <code>\start</code> invocation, i.e.,  \start<''name''>makeup</code>.  In the above case we can simply refer to the ''custom'' <code>makeup</code> with <code>\startcustommakeup</code>:
  
 
<texcode>
 
<texcode>
Line 59: Line 94:
 
<texcode>
 
<texcode>
 
\definemakeup[customone][align=middle]
 
\definemakeup[customone][align=middle]
\definemakeup[customtwo][bottom=,] % See note below
+
\definemakeup[customtwo][bottom=,] % See note below on Vertical Alignment
 
\starttext
 
\starttext
 
\startcustomonemakeup
 
\startcustomonemakeup
Line 100: Line 135:
 
</texcode>
 
</texcode>
  
Horizontal aligment is specified with the <code>align</code> option.
+
== Horizontal Aligment ==
 +
 
 +
Horizontal aligment is specified with the <code>align</code> option as in:
 +
 
 +
<texcode>
 +
\definemakeup[custom][align=flushright] % align here is used to set text flush to the right
 +
\starttext
 +
\startcustommakeup
 +
This is a title page.
 +
\stopcustommakeup
 +
 
 +
\input zapf
 +
\stoptext
 +
</texcode>
  
 
== See Also ==
 
== See Also ==

Latest revision as of 17:06, 15 February 2023

Description

A makeup is a single page with a special layout, allowing for custom and temporary header and footer sections.

Makeups don’t rely on the current page layout style, and they typically include covers, colophons or similar ones.

In any case, it is important not to forget that makeup contents will never split in pages. All makeup contents must fit on a single page.

There are predefined makeups: standard, page, text and middle. Of course, you can define as many as you may need.

By default, makeups have the following properties:

  1. They aren’t numbered in the final document (pagestate=start changes this).
  2. In double-sided documents, they are always on an odd page with the next page empty (page=yes and doublesided=no change each of these defaults).
  3. They don’t include header or footers (use either headerstate=start or footerstate=start to change it).
  4. They are left aligned (use the align option key [and \dontleavehmode with \externalfigure]).

All makeups have an associated layout. So you may use \setuplayout to tweak it (besides configuring the makeup itself).

Examples

There are a few ways to invoke a custom makeup (and to compare it with the other predefined makeups):

\showframe
\setuppagenumbering[alternative=doublesided, page=,]
\setupmakeup[pagestate=start]
\definemakeup[custom][align=middle]
\starttext
\startmakeup[custom]
This is a title page.
\stopmakeup

\startmakeup[text]
This is a title page.
\stopmakeup


\startmakeup[middle]
This is a title page.
\stopmakeup

\startmakeup[standard]
This is a title page.
\stopmakeup

\startmakeup[page]
This is a title page.
\stopmakeup

\input zapf
\stoptext

This may be easily extended to having multiple divider (title) pages:

\definemakeup[custom][align=middle]
\starttext
\startmakeup[custom]
This is a divider page.
\stopmakeup
\input tufte

\startmakeup[custom]
This is a second divider page.
\stopmakeup

\input ward

\startmakeup[custom]
This is a divider title page.
\stopmakeup

\input zapf
\stoptext

Another way to start a previously defined makeup is to put it into the \start invocation, i.e., \start<name>makeup. In the above case we can simply refer to the custom makeup with \startcustommakeup:

\definemakeup[custom][align=middle]
\starttext
\startcustommakeup
This is a title page.
\stopcustommakeup

\input zapf
\stoptext

And then extend to others:

\definemakeup[customone][align=middle]
\definemakeup[customtwo][bottom=,] % See note below on Vertical Alignment
\starttext
\startcustomonemakeup
This is a title/divider page using customone.
\stopcustomonemakeup

\input ward

\startcustomtwomakeup
This is a title/divider page using customtwo.
\stopcustomtwomakeup

\input zapf
\stoptext

By default, makeups lack both header and footers. They are vertically centered and horizontally aligned to the left..

Vertical Aligment

Makeups are centered vertically by default.

The way to align them vertically to the top or to the bottom is the following:

\setuppapersize[A6]
\starttext
\startstandardmakeup[top=,]
This is vertically aligned to the top.
\stopstandardmakeup

\startstandardmakeup[bottom=,]
This is vertically aligned to the bottom.
\stopstandardmakeup

\startstandardmakeup
This is the default: vertically centered.
\stopstandardmakeup
\stoptext

Horizontal Aligment

Horizontal aligment is specified with the align option as in:

\definemakeup[custom][align=flushright] % align here is used to set text flush to the right
\starttext
\startcustommakeup
This is a title page.
\stopcustommakeup

\input zapf
\stoptext

See Also