Hi All, How to setup the complicated header/footer compared to LaTeX fancyhdr package? For example, how to use change line from the header/footer like follow LaTeX code? <code> \pagestyle{fancy} \headheight 35pt \fancyhf{} %delete current setting of header and footer \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}} \renewcommand{\headrulewidth}{1pt} \renewcommand{\footrulewidth}{0.6pt} \lhead{\bfseries \rightmark} \chead{\textbf{\thepage}}% \rhead{\usebox{\mylogo}} \lfoot{} \cfoot{ \begin{tabular}{c} \textbf{Copyright 2009, My Company}\\ \small{You are free to copy, distribute, display, and perform the work}\\ \end{tabular}}% \rfoot{} </code> Thanks in advance. Best regards, Joshua
On Oct 3, 2009, at 5:25 PM, Joshua Lee wrote:
Hi All, How to setup the complicated header/footer compared to LaTeX fancyhdr package? For example, how to use change line from the header/footer like follow LaTeX code? <code> \pagestyle{fancy} \headheight 35pt \fancyhf{} %delete current setting of header and footer \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}} \renewcommand{\headrulewidth}{1pt} \renewcommand{\footrulewidth}{0.6pt} \lhead{\bfseries \rightmark} \chead{\textbf{\thepage}}% \rhead{\usebox{\mylogo}} \lfoot{} \cfoot{ \begin{tabular}{c} \textbf{Copyright 2009, My Company}\\ \small{You are free to copy, distribute, display, and perform the work}\\ \end{tabular}}% \rfoot{} </code>
Thanks in advance.
Best regards, Joshua
Nobody here knows what this code does. This is the ConTeXt mailing list, you know. Thomas
Hi Thomas, Sorry about that, attach the pdf file for the result. ConTeXt should have the capability to implement the similar effect, but i can not find it from the wiki or mailing list. Best regards, Joshua On Sat, 03 Oct 2009, Thomas A. Schmitz wrote:
On Oct 3, 2009, at 5:25 PM, Joshua Lee wrote:
Hi All, How to setup the complicated header/footer compared to LaTeX fancyhdr package? For example, how to use change line from the header/footer like follow LaTeX code? <code> \pagestyle{fancy} \headheight 35pt \fancyhf{} %delete current setting of header and footer \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}} \renewcommand{\headrulewidth}{1pt} \renewcommand{\footrulewidth}{0.6pt} \lhead{\bfseries \rightmark} \chead{\textbf{\thepage}}% \rhead{\usebox{\mylogo}} \lfoot{} \cfoot{ \begin{tabular}{c} \textbf{Copyright 2009, My Company}\\ \small{You are free to copy, distribute, display, and perform the work}\\ \end{tabular}}% \rfoot{} </code>
Thanks in advance.
Best regards, Joshua
Nobody here knows what this code does. This is the ConTeXt mailing list, you know.
Thomas ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- Joshua Lee Alpha Networks(Chengdu) Co., LTD Shanghai Branch TEL: (86-21)61609650 EXT: 8020 FAX: (86-21)61609650 EXT: 8041 ADD: Suite 301, No.10, 198 Lane, Zhangheng Road, ZJ Hi-Tech Park, Shanghai, China 201204
On Oct 3, 2009, at 5:58 PM, Joshua Lee wrote:
Hi Thomas, Sorry about that, attach the pdf file for the result. ConTeXt should have the capability to implement the similar effect, but i can not find it from the wiki or mailing list.
Best regards, Joshua
Here is something similar to what you have in your example (and compared to your LaTeX code, I find the ConTeXt way of coding this wonderfully simple and elegant): \startsetups[header] \framed[width=\textwidth,frame=off,bottomframe=on,align=right] {\rlap{\headnumber[chapter] \getmarking[chapter]} \hfill \pagenumber \hfill \llap{\externalfigure[cow][height=1cm]}} \stopsetups \startsetups[footer] \framed[width=\textwidth,frame=off,topframe=on,align=center] {{\bf Copyright 2009, My Company} \\ Blablabla} \stopsetups \setupheadertexts[\setups{header}] \setupfootertexts[\setups{footer}] \starttext \chapter{One} Hello World \stoptext The main reference is the file http://www.pragma-ade.com/general/manuals/cont-eni.pdf , you want to read the sections on headers and footers and on framing (\framed is one of the most powerful and versatile commands in ConTeXt). HTH Thomas
Hi Thomas, Thanks, the frametext is an elegant way. ConTeXt is worth taking more time to study. Best regards, Joshua On Sun, 04 Oct 2009, Thomas A. Schmitz wrote:
On Oct 3, 2009, at 5:58 PM, Joshua Lee wrote:
Hi Thomas, Sorry about that, attach the pdf file for the result. ConTeXt should have the capability to implement the similar effect, but i can not find it from the wiki or mailing list.
Best regards, Joshua
Here is something similar to what you have in your example (and compared to your LaTeX code, I find the ConTeXt way of coding this wonderfully simple and elegant):
\startsetups[header] \framed[width=\textwidth,frame=off,bottomframe=on,align=right] {\rlap{\headnumber[chapter] \getmarking[chapter]} \hfill \pagenumber \hfill \llap{\externalfigure[cow][height=1cm]}} \stopsetups
\startsetups[footer] \framed[width=\textwidth,frame=off,topframe=on,align=center] {{\bf Copyright 2009, My Company} \\ Blablabla} \stopsetups
\setupheadertexts[\setups{header}]
\setupfootertexts[\setups{footer}]
\starttext
\chapter{One}
Hello World
\stoptext
The main reference is the file http://www.pragma-ade.com/general/manuals/cont-eni.pdf , you want to read the sections on headers and footers and on framing (\framed is one of the most powerful and versatile commands in ConTeXt).
HTH
Thomas ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- Joshua Lee Alpha Networks(Chengdu) Co., LTD Shanghai Branch TEL: (86-21)61609650 EXT: 8020 FAX: (86-21)61609650 EXT: 8041 ADD: Suite 301, No.10, 198 Lane, Zhangheng Road, ZJ Hi-Tech Park, Shanghai, China 201204
On Sun, Oct 4, 2009 at 5:50 PM, Joshua Lee
Hi Thomas, Thanks, the frametext is an elegant way. ConTeXt is worth taking more time to study.
Consider also layers http://wiki.contextgarden.net/Layers and here too http://www.ntg.nl/EuroTeX2009/slides/willi-slides.pdf -- luigi
participants (3)
-
Joshua Lee
-
luigi scarso
-
Thomas A. Schmitz