latex - How to use Sweave (R) code inside a fancyhdr? -
I am automatically generating with the periodic report server generated, I use a fancyheard package to create a good header I'm actually working so far. Now, since my reports are from time to time, I want to change the headers dynamically without giving any argument to the function. This is the reason why I wrote a small R function, which just checks which header is based on the length of which a header string is generated in R.
Long story short, I know that today is in latex but I just do not need to use specific information coming from R date.
Here is my code:
\ usepackage {fancyhdr} \ pagestyle {fancy} \ renewcommand {\ chaptermark} [1] {% \ markboth {# 1} { }} \ Renewcommand {\ sectionmark} [1] {% \ markman {\ section \ # 1}} \ fancyhf {} \ fancyhead [LE, RO] {\ bfseries \ thepage} \ fancyhead [LO] {\ rightmark { Lt; & Lt; & Gt; & Gt; Renew {{footHolder}} {0}} \ addtolength {\ headheight} {0.5pt} \ print [TexHeader] @}} \ fancyhead [RE] {\ bfseries \ leftmark} \ renewable {\ headrulewidth} {0.5pt} Fancypagestyle {plain} {% \ fancyhead {} \ renewal command {\ headrulewidth} {0pt}}
causing the following error:
package Functioner Alert: Without the dual option, the `e 'option of \ fancyhead uses less on input line 23.
This is actually the line where my TexHeader has been placed in advance for any suggestions Thx!
For one-sided documents, you \ fancyhead [L] {...}
and \ fancyhead [R] {...}
.
In addition, in this case, & lt; & Lt; Results = tex, echo = FALSE>> =
. Here's an example:
\ documentclass [a4paper] {report} \ usepackage {fancyhdr} \ usepackage {lipsum} \ pagestyle {fancy} \ renewal command {\ chapter mark} [1] { % \ Markboth {# 1} {}} \ Renewable {\ sectionmark} [1] {% \ Mark Wright {\ ejection \ # 1}} \ fancyhf {} \ fancyhead [r] {\ bfseries \ thepage} \ fancyhead [ L] {\ correct sign {%
Comments
Post a Comment