Changes

Jump to navigation Jump to search
3,107 bytes added ,  14:13, 29 November 2021
Created page with "Documentation for \showframe"
<cd:commandgroup name="showframe" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
<cd:shortdesc>The command <tt>\showframe</tt> shows a frame around page areas</cd:shortdesc>
<cd:variants>
<cd:command category="layout" file="page-run.mkiv" interfacedate="2020-07-14T09:24" interfacefile="i-layout.xml" level="document" name="showframe" variantnumber="1">
<cd:arguments>
<cd:keywords list="yes" optional="yes" ordinal="1">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="top"></cd:constant>
<cd:constant type="header"></cd:constant>
<cd:constant type="text"></cd:constant>
<cd:constant type="footer"></cd:constant>
<cd:constant type="bottom"></cd:constant>
</cd:keywords>
<cd:keywords list="yes" optional="yes" ordinal="2">
<cd:keywordsdoc></cd:keywordsdoc>
<cd:constant type="leftedge"></cd:constant>
<cd:constant type="leftmargin"></cd:constant>
<cd:constant type="text"></cd:constant>
<cd:constant type="rightmargin"></cd:constant>
<cd:constant type="rightedge"></cd:constant>
</cd:keywords>
</cd:arguments>
</cd:command>
</cd:variants>
<cd: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. {{cmd|definepalet|2=[layout][page=blue]}}.

If you define a background eg. in a layer and want to preserve its output, you have to put the <tt>\showframe</tt> command before those {{cmd|setupbackgrounds}} commands in your document, because <tt>\showframe</tt> is merely a wrapper around several calls to {{cmd|setupbackgrounds}} so it may alter your layer's background.</cd:description>
<cd:examples><cd:example title="Framing all areas"><context source="yes">
\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
</context>
</cd:example><cd:example title="Framing only the page"><context source="yes">
\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
</context>
</cd:example></cd:examples>
<cd:notes></cd:notes>
<cd:seealso>
<cd:source file="page-run.mkiv" originator="system"></cd:source>
<cd:wikipage originator="system" page="Category:Layout"></cd:wikipage>
<cd:commandref name="setupbackgrounds"></cd:commandref>
<cd:commandref name="showsetups">to print all the of the layout's various dimension variables.</cd:commandref></cd:seealso>
</cd:commandgroup>

Navigation menu