Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm new to LaTeX (<48hrs experience) and am currently writing up a whitepaper using a the "Technical Report" template available through TeXnicCenter (code available at http://pastebin.com/mku5maC6.)

I would like to add a two sentence disclosure footer, but my text spills off the page and I receive an Overfull error. Neither \sloppy nor \usepackage{microtype} resolved the issue.

The code in question is:

% ********* Header and Footer **********
% This is something to play with forever. I use here the advanced settings of the KOMA script

\usepackage{scrpage2} %header and footer using the options for the KOMA script
\renewcommand{\headfont}{\footnotesize\sffamily} % font for the header
\renewcommand{\pnumfont}{\footnotesize\sffamily} % font for the pagenumbers

%the following lines define the pagestyle for the main document
\defpagestyle{cb}{%
(\textwidth,0pt)% sets the border line above the header
{\pagemark\hfill\headmark\hfill}% doublesided, left page
{\hfill\headmark\hfill\pagemark}% doublesided, right page
{\hfill\headmark\hfill\pagemark}%  onesided
(\textwidth,1pt)}% sets the border line below the header
%
{(\textwidth,1pt)% sets the border line above the footer
{{\it Federation Confidential}\hfill Chief O'Brian}% doublesided, left page
{Chief O'Brian\hfill{\it Federation Confidential}}% doublesided, right page
{Chief O'Brian\hfill{\it Federation Confidential}} % one sided printing
(\textwidth,0pt)% sets the border line below the footer
}

My attempt:

% ********* Header and Footer **********
% This is something to play with forever. I use here the advanced settings of the KOMA     script

\usepackage{scrpage2} %header and footer using the options for the KOMA script
\renewcommand{\headfont}{\footnotesize\sffamily} % font for the header
\renewcommand{\pnumfont}{\footnotesize\sffamily} % font for the pagenumbers

%%the following lines define the pagestyle for the main document
\defpagestyle{cb}{%
(\textwidth,0pt)% sets the border line above the header
{\pagemark\hfill\headmark\ Company X, LLC}% doublesided, left page
{Company X, LLC\headmark\hfill\pagemark}% doublesided, right page
{Company X, LLC\headmark\hfill\pagemark}%  onesided
(\textwidth,1pt)}% sets the border line below the header
%
{(\textwidth,1pt)% sets the border line above the footer
{\it This document contains unpublished confidential and proprietary information of      Company X. No disclosure or use of
any portion of these materials may be made without the express written consent of   Company X.}% doublesided, left page
{\it This document contains unpublished confidential and proprietary information of   Company X. No disclosure or use of
any portion of these materials may be made without the express written consent of  Company X.}% doublesided, right page
{\it This document contains unpublished confidential and proprietary information of Company X. No disclosure or use of
any portion of these materials may be made without the express written consent of Company     X.} % one sided printing
(\textwidth,0pt)% sets the border line below the footer
}

Any help or guidance would be much appreciated.

share|improve this question
    
Use \noindent\parbox{\linewidth}{\itshape This document ...} instead of {\it ...}. Give some feedback on your success. –  Werner Dec 31 '12 at 7:41
    
Thanks!! It now fits and wraps, but the upper border line is located between the first and second lines. In this case, I simply removed it, but would it be possible to reposition the line above the footer in the future? Cheers –  nitrl Dec 31 '12 at 7:53
    
You should create a minimal working example (MWE) rather than providing the code snippets we currently see. That way we have something to work with, from which we can help you. –  Werner Dec 31 '12 at 7:56
    
    
Okay, MWEs it is for future posts. And thanks the last two links- I had a feeling I was dealing with code that was not completely up to date. –  nitrl Dec 31 '12 at 8:04

1 Answer 1

up vote 1 down vote accepted

The footer's reference point is placed in a fixed position, so you need to use \parbox[t]{...}{...}; here's an example:

\documentclass[a4paper]{scrreprt}

\usepackage{scrpage2} %header and footer using the options for the KOMA script
\renewcommand{\headfont}{\footnotesize\sffamily} % font for the header
\renewcommand{\pnumfont}{\footnotesize\sffamily} % font for the pagenumbers

\newcommand{\confidentialtext}{\parbox[t]{\textwidth}{This document contains unpublished
  confidential and proprietary information of Company X. No disclosure or use of any
  portion of these materials may be made without the express written consent of Company X.}}

%%the following lines define the pagestyle for the main document
\defpagestyle{cb}{%
  (\textwidth,0pt)% sets the border line above the header
  {\pagemark\hfill\headmark\ Company X, LLC}% doublesided, left page
  {Company X, LLC\headmark\hfill\pagemark}% doublesided, right page
  {Company X, LLC\headmark\hfill\pagemark}%  onesided
  (\textwidth,1pt)}% sets the border line below the header
%
  {(\textwidth,1pt)% sets the border line above the footer
  {\slshape\confidentialtext}% doublesided, left 
  {\slshape\confidentialtext}% doublesided, right page
  {\slshape\confidentialtext}% one sided printing
  (\textwidth,0pt)% sets the border line below the footer
}

\usepackage{kantlipsum} % for the mock text

\begin{document}
\pagestyle{cb}
\kant
\end{document}

Notice that I've put the footer's text in a more convenient form: with a macro you don't need to edit the same text over and over. Since it is in sans serif type, \slshape is better suited.

enter image description here

share|improve this answer
    
Thanks egreg. Also, would this be the type of MWE @Werner was talking about? –  nitrl Jan 3 '13 at 16:28
    
@nitrl Yes, this is a MWE. –  egreg Jan 3 '13 at 16:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.