Difference between revisions of "Command/setupheadertexts"

From Wiki
Jump to navigation Jump to search
m (cleanup)
(Corrected the syntax (command takes four parameters not three).)
Line 7: Line 7:
 
<table cellspacing="4" cellpadding="2" class="cmd">
 
<table cellspacing="4" cellpadding="2" class="cmd">
 
   <tr>
 
   <tr>
     <td colspan="2" class="cmd">\setupheadertexts<span class="first" style="color:red;">[...]</span><span class="second" >[...]</span><span class="third" >[...]</span></td>
+
     <td colspan="2" class="cmd">\setupheadertexts<span class="first" style="color:red;">[...]</span><span class="second" >[...]</span><span class="third" >[...]</span><span class="fourth" style="background-color:yellow;">[...]</span></td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="first">
 
   <tr valign="top" class="first">
 
     <td class="cmd">[...]</td>
 
     <td class="cmd">[...]</td>
     <td><strong>text</strong> margin edge </td>
+
     <td><strong>text</strong> on the left handed side of odd pages </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="second">
 
   <tr valign="top" class="second">
 
     <td class="cmd">[...]</td>
 
     <td class="cmd">[...]</td>
     <td>text section date mark pagenumber </td>
+
     <td><strong>text</strong> on the right handed side of odd pages </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="third">
 
   <tr valign="top" class="third">
 
     <td class="cmd">[...]</td>
 
     <td class="cmd">[...]</td>
     <td>text section date mark pagenumber </td>
+
     <td><strong>text</strong> on the right handed side of even pages </td>
 +
  </tr>
 +
  <tr valign="top" class="fourth" style="background-color:yellow;">
 +
    <td class="cmd">[...]</td>
 +
    <td><strong>text</strong> on the left handed side of even pages </td>
 
   </tr>
 
   </tr>
 
</table>
 
</table>
  
  
== Description ==  
+
== Description ==
Place headers and footers with the commands setupheadertexts  and setupfootertexts. These commands takes 4 arguments. The first is for the left margin on odd pages, the second for the right margin on odd pages, the third for the left margin on even pages, and the fourth for the right margin on even pages.
+
Place headers and footers with the commands \setupheadertexts  and [[cmd:setupfootertexts|\setupfootertexts]].
 +
 
 +
These commands take 4 arguments. The first is for the left handed side on odd pages, the second for the right handed side on odd pages, the third for the right handed side on even pages, and the fourth for the left handed side on even pages.
 +
 
 +
== Example ==
 +
<!-- Please fill in an example if you can -->
 +
 
 +
This example produces the same header on odd and even pages.
  
 
<texcode>
 
<texcode>
 
\setupheadertexts
 
\setupheadertexts
[{chapter \getmarking[chapter]}] [{page \pagenumber}]
+
        [{\getmarking[chapter]}]   [{page \pagenumber}]
[{page \pagenumber}] [{chapter \getmarking[chapter]}]
+
        [{page \pagenumber}]       [{\getmarking[chapter]}]
\setupfootertexts
+
\setuppagenumbering[location=]
[{chapter \getmarking[chapter]}] [{page \pagenumber}]
 
[{page \pagenumber}] [{chapter \getmarking[chapter]}]
 
 
</texcode>
 
</texcode>
  
 
+
'''Note:''' '''\setuppagenumbering[location=]''' supresses the default output (i.e. centered in header) of the page number on every page.
== Example ==
 
<!-- Please fill in an example if you can -->
 
  
 
== See also ==
 
== See also ==
 
<!-- something like [[cmd:goto|\goto]] -->
 
<!-- something like [[cmd:goto|\goto]] -->
 +
 +
[[cmd:setupheader|\setupheader]]
  
 
[[Category:Reference/en|setupheadertexts]]
 
[[Category:Reference/en|setupheadertexts]]

Revision as of 15:04, 18 August 2010

\setupheadertexts

Syntax

\setupheadertexts[...][...][...][...]
[...] text on the left handed side of odd pages
[...] text on the right handed side of odd pages
[...] text on the right handed side of even pages
[...] text on the left handed side of even pages


Description

Place headers and footers with the commands \setupheadertexts and \setupfootertexts.

These commands take 4 arguments. The first is for the left handed side on odd pages, the second for the right handed side on odd pages, the third for the right handed side on even pages, and the fourth for the left handed side on even pages.

Example

This example produces the same header on odd and even pages.

\setupheadertexts
        [{\getmarking[chapter]}]    [{page \pagenumber}]
        [{page \pagenumber}]        [{\getmarking[chapter]}]
\setuppagenumbering[location=]

Note: \setuppagenumbering[location=] supresses the default output (i.e. centered in header) of the page number on every page.

See also

\setupheader