Difference between revisions of "Command/headsetupspacing"

From Wiki
Jump to navigation Jump to search
(Created page with "{{Reference |name=headsetupspacing |attributes= }} == Syntax == <table cellspacing="4" cellpadding="2" class="cmd"> <tr> <td colspan="2" class="cmd">\he...")
 
Line 12: Line 12:
  
 
== Description ==  
 
== Description ==  
This macro is to be used inside custom defined section commands to propagate the options set in {{cmd||setuphead}}.  The options which are set locally by {{cmd||headsetupspacing}} are
+
This macro is to be used inside custom defined section commands to propagate the options set in {{cmd|setuphead}}.  The options which are set locally by {{cmd|headsetupspacing}} are
 
<span class="cmd">[[Command/keyword:align|align]]</span>,
 
<span class="cmd">[[Command/keyword:align|align]]</span>,
 
<span class="cmd">[[Command/keyword:tolerance|tolerance]]</span>, and
 
<span class="cmd">[[Command/keyword:tolerance|tolerance]]</span>, and
 
<span class="cmd">[[Command/keyword:strut|strut]]</span>.
 
<span class="cmd">[[Command/keyword:strut|strut]]</span>.
The values for these are inherited from {{cmd||setuphead}}.
+
The values for these are inherited from {{cmd|setuphead}}.
  
The definition of {{cmd||headsetupspacing}} is found in {{src|strc-ren.mkiv}}.  There one can also find the historic synonym {{cmd||localheadsetup}}.  The name {{cmd||localheadsetup}} might vanish in the future; don't use it!
+
The definition of {{cmd|headsetupspacing}} is found in {{src|strc-ren.mkiv}}.  There one can also find the historic synonym {{cmd|localheadsetup}}.  The name {{cmd|localheadsetup}} might vanish in the future; don't use it!
  
 
== Example ==
 
== Example ==
  
In this example we use {{cmd||showstruts}} to emphasize that even though we set <code>strut=no</code> it is not forwarded and struts still appear.  If we use {{cmd||headsetupspacing}}, however, the struts are gone.
+
In this example we use {{cmd|showstruts}} to emphasize that even though we set <code>strut=no</code> it is not forwarded and struts still appear.  If we use {{cmd|headsetupspacing}}, however, the struts are gone.
  
 
<context mode=mkiv source="yes">
 
<context mode=mkiv source="yes">

Revision as of 08:26, 9 August 2016

\headsetupspacing

Syntax

\headsetupspacing

Description

This macro is to be used inside custom defined section commands to propagate the options set in \setuphead. The options which are set locally by \headsetupspacing are align, tolerance, and strut. The values for these are inherited from \setuphead.

The definition of \headsetupspacing is found in strc-ren.mkiv. There one can also find the historic synonym \localheadsetup. The name \localheadsetup might vanish in the future; don't use it!

Example

In this example we use \showstruts to emphasize that even though we set strut=no it is not forwarded and struts still appear. If we use \headsetupspacing, however, the struts are gone.

\showstruts

\setuphead
  [section]
  [
    strut=no,
    command=\printsection,
  ]

\starttext

\define[2]\printsection{#1 #2}
\section{First}

\define[2]\printsection{\headsetupspacing #1 #2}
\section{Second}

\stoptext

Help from ConTeXt-Mailinglist/Forum

All issues with: