inserting time in the header or footer

599 views
Skip to first unread message

chip

unread,
Feb 28, 2015, 6:31:58 PM2/28/15
to tufte...@googlegroups.com
Hi
I'm having a problem inserting the date into the tufte book header or footer. I actually have a landscape version (that you helped me with a long time ago), but I've not done anything special to the fancy header stuff.

If I put into my preamble:

\pagestyle{fancy}
\fancyfoot{}
\fancyfoot[CO,CE]{\today}

I would expect that I'd get today's date centered on the even and the odd pages in a footer. But nothing happens at all.

First, of course I could be doing this wrong. But I've checked with another fake document and it does what I'd expect.

So is there something in the Tufte class that makes this different?

thanks
Ray Brock

Kevin Godby

unread,
Feb 28, 2015, 9:06:03 PM2/28/15
to tufte-latex
Hi, Ray.
\documentclass{tufte-handout}% or tufte-book
\title{Test header date}
\author{Kevin M. Godby}
\usepackage{lipsum}
\begin{document}
\fancyfoot[CE,CO]{\today}
\maketitle
\lipsum[1-10]
\end{document}

It works okay for me.

Note, however, that the \frontmatter and \mainmatter commands will
reset the running heads and feet.

—Kevin

Chip Brock

unread,
Feb 28, 2015, 10:05:19 PM2/28/15
to tufte...@googlegroups.com, Chip Brock
hi
Thanks, but are you sure it works in the book class?

If I go to the sample-book.tex example and simply add:

\begin{document}

\fancyfoot[CE,CO]{\today}
\fancyhead[CE,CO]{\today}

There is no such footnote or header addition.

Ray
> --
> You received this message because you are subscribed to a topic in the Google Groups "tufte-latex" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/tufte-latex/K5TDONWEI7Y/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to tufte-latex...@googlegroups.com.
> To post to this group, send email to tufte...@googlegroups.com.
> Visit this group at http://groups.google.com/group/tufte-latex.
> For more options, visit https://groups.google.com/d/optout.

Kevin Godby

unread,
Mar 1, 2015, 12:08:15 AM3/1/15
to tufte-latex
On Sat, Feb 28, 2015 at 9:05 PM, Chip Brock <raymon...@gmail.com> wrote:
> Thanks, but are you sure it works in the book class?
>
> If I go to the sample-book.tex example and simply add:
>
> \begin{document}
>
> \fancyfoot[CE,CO]{\today}
> \fancyhead[CE,CO]{\today}
>
> There is no such footnote or header addition.

I tested my example with tufte-book, too. The sample book uses
\frontmatter and \mainmatter which will reset the headers and footers.
You'd need to add your \fancyfoot and \fancyhead macros after each
call to \frontmatter and \mainmatter.

—Kevin

Chip Brock

unread,
Mar 1, 2015, 12:21:36 AM3/1/15
to tufte...@googlegroups.com, Chip Brock
hi

That’s totally it. There is a \mainmatter after \begin{document} and I was putting the fancywherever commands in the preamble.

Thanks, as always,

Ray
Reply all
Reply to author
Forward
0 new messages