Difference between revisions of "Makeup"

From Wiki
Jump to navigation Jump to search
m
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
== Description ==
 
== Description ==
  
A makeup is a separate page, like a title page or colofon. The page has a special layout, allowing for custom and temporary header & footer sections. The idea is that such pages need not rely on the current page layout style, which is especially useful for title pages. There is one standard makeup page, but you can define more if needed.
+
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.
  
== See Also ==
+
== Examples ==
  
* http://wiki.contextgarden.net/Command/setupmakeup
+
There are a few ways to invoke a custom makeup:
* http://www.ntg.nl/pipermail/ntg-context/2010/049662.html
 
  
 +
<texcode>
 +
\definemakeup[custom][align=middle]
 +
\starttext
 +
\startmakeup[custom]
 +
This is a title page.
 +
\stopmakeup
  
<pre>
+
\input zapf
> Hi everyone,                                                                 
+
\stoptext
>                                                                             
+
</texcode>
> I cannot see any effect when using voffset and hoffset as a parameter for   
 
> \startstandardmakeup. For example:                                           
 
>                                                                             
 
>      \startstandardmakeup[headerstate=none, footerstate=none,               
 
>                          hoffset=1in, hoffset=1in, width=4in, height=7.0in] 
 
>      ...                                                                     
 
>      \stopstandardmakeup                                                     
 
>                                                                             
 
> I'd expect them to shift the page content up and to the                     
 
> right, respectively. This is guessing from their name: I actually cannot find
 
> any documentation on these parameters. Am I missing something?               
 
  
indeed they are obsolete ... layers are better for that
+
This may be easily extended to having multiple divider (title) pages:
</pre>
 
&mdash; Hans, http://www.ntg.nl/pipermail/ntg-context/2010/051896.html
 
  
=Introduction=
+
<texcode>
A makeup is an special kind of page that some documents might contain.
+
\definemakeup[custom][align=middle]
It is intended for covers, colophons or similar pages. Their key
+
\starttext
feature is that they don’t have to rely on the current page layout
+
\startmakeup[custom]
style.
+
This is a divider page.
 +
\stopmakeup
 +
\input tufte
  
There is one standard makeup, but more can be defined when needed.
+
\startmakeup[custom]
 +
This is a second divider page.
 +
\stopmakeup
  
The way to invoke them is one of the following two:
+
\input ward
  
<texcode>
 
\definemakeup[custom][align=middle]
 
\starttext
 
 
\startmakeup[custom]
 
\startmakeup[custom]
This is a title page.
+
This is a divider title page.
 
\stopmakeup
 
\stopmakeup
  
Line 48: Line 41:
 
\stoptext
 
\stoptext
 
</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 simply refer to the ''custom'' <code>makeup</code> with <code>\startcustommakeup</code>:
  
 
<texcode>
 
<texcode>
Line 59: Line 54:
 
\stoptext
 
\stoptext
 
</texcode>
 
</texcode>
By default, makeups lack both header and footers. They are vertically
 
centered and horizontally aligned to the left.
 
  
Configuration options can be found at <cmd>setupmakeup</cmd>.
+
And then extend to others:
  
=Vertical aligment of makeups=
+
<texcode>
 +
\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
 +
</texcode>
 +
 
 +
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.
 
Makeups are centered vertically by default.
Line 87: Line 100:
 
</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 ==
 +
 
 +
* {{cmd|setupmakeup}}
 +
* http://wiki.contextgarden.net/Command/setupmakeup
 +
* http://www.ntg.nl/pipermail/ntg-context/2010/049662.html
 +
* http://www.ntg.nl/pipermail/ntg-context/2010/051896.html
 +
 
 +
[[Category:Basics]]
 +
[[Category:Layout]]

Revision as of 19:36, 3 November 2021

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.

Examples

There are a few ways to invoke a custom makeup:

\definemakeup[custom][align=middle]
\starttext
\startmakeup[custom]
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