Difference between revisions of "Command/showframe"

From Wiki
Jump to navigation Jump to search
(Created page with "Documentation for \showframe")
(No difference)

Revision as of 14:13, 29 November 2021


\showframe

Summary

The command \showframe shows a frame around page areas

Settings

\showframe[...,...][...,...]
[...,...]top header text footer bottom
[...,...]leftedge leftmargin text rightmargin rightedge

Description

Draw a rectangle around, e.g, the right margin area's footer. If no arguments are specified, all text areas are outlined; if one argument is specified, it must specify one or more of the horizontal components; if both arguments are specified, any vertical part(s) of interest can be specified, too.

In every case a green rectangle is drawn around the page edge. To change the color of that rectangle, use e.g. \definepalet[layout][page=blue].

If you define a background eg. in a layer and want to preserve its output, you have to put the \showframe command before those \setupbackgrounds commands in your document, because \showframe is merely a wrapper around several calls to \setupbackgrounds so it may alter your layer's background.

Examples

Framing all areas

\definepapersize[A11][height=26mm, width=18mm]
\setuppapersize[A11]
\setuplayout[
    % paperwidth - width - backspace
    %     = 6mm outer space
    backspace=6mm,  width=6mm,
    marginleft=2mm, marginright=2mm,
    leftedge=2mm,   rightedge=2mm]
\showframe
\starttext
asdf
\stoptext

Framing only the page

\definepapersize[A11][height=26mm, width=18mm]
\setuppapersize[A11]
\setuplayout[
    % paperwidth - width - backspace
    %     = 6mm outer space
    backspace=6mm,  width=6mm,
    marginleft=2mm, marginright=2mm,
    leftedge=2mm,   rightedge=2mm]
\showframe[]
\starttext
asdf
\stoptext

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: