For some time I help WP in editing a journal for which LaTeX is used. The
journal uses simple twocolum layout with multicolumn
package.
For headers/footers fancyhdr
package is used.
Recently I was asked to enable
full page insertions with headers/footers suspended (probably for big advertisements).
The task is not as straightforward as it seems for a novice user of LaTeX.
The following naive approach (\thispagestyle
inside float environment) usually fails:
\begin{figure*}{p} \thispagestyle{empty} ... \end{figure}
LaTeX will supress headers/footers on the page at which \thispagestyle
command was executed, not on the page at which the float was finally inserted.
If the float is moved to the next page(s), headers/footers will be suspended on the wrong page.
Fortunately fancyhdr
provides the \iffloatpage
macro that can be used
to customize headers and footers for pages which contain only floats.
The use of \iffloatpage
is simple:
\pagestyle{fancy} %% supress rules \renewcommand{\headrulewidth}{\iffloatpage{0pt}{0.4pt}} \renewcommand{\footrulewidth}{\iffloatpage{0pt}{0.4pt}} %% \fancyhead[RO]{\iffloatpage{}{\PM@HeaderFont \@shorttitle}} \fancyhead[LE]{\iffloatpage{}{\PM@HeaderFont \@shortauthorlist}} %% \fancyfoot[RO]{\iffloatpage{}{\PM@FooterFont\thepage}} \fancyfoot[LE]{\iffloatpage{}{\PM@FooterFont\thepage}} %% then in the document body: \begin{figure*}{p} %% --stuff to insert-- %% \end{figure*}
Note: ``private'' (ie. defined in my class)
commands \PM@HeaderFont
/\PM@HeaderFont
set the font for
headers/footers and \@shorttitle
/\@shortauthorlist
insert some content.
To enable bash beep command (Fedora Core 15) one have to execute:
yum install beep
Then as root
:
chmod 4755 /usr/bin/beep # remove snd-pcsp module from blacklisted ones vi /etc/modprobe.d/blacklist.conf
insert #
before blacklist snd-pcsp
.
Now Emacs beeps on errors as well. To disable this feature
one has to add to .emacs
(setq visible-bell t)
The error is signaled by a screen flash now (see also [Emacs] AlarmBell).