Page LayoutTwo Title Page Problems

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
NinV
Posts: 69
Joined: Sun Oct 05, 2008 12:57 pm

Two Title Page Problems

Post by NinV »

Hi all,

two years ago I wrote a booklet using as editor TeXMaker and I didn't have any problems.

Now having to modify it I tried to recompile the old code, but I get three annoying problems.

The first one is a wrong right alignement of the words "Edition - 2011" at the end of the title page.

The second ones are two warnings which don't seem to affect the resulting pdf, but I don't understand the cause of these warnings.

This is the first warning:
! Package xkeyval Error: `hidelinks' undefined in families `Hyp'.
This is the second one:
! Undefined control sequence.
\\maketitle ...{10cm} TITLE\\ \vspace {.2cm}\HUGE
title } \\[0.4cm] \textsc ...
l.355
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Here is the MWE:

Code: Select all

%%%%%%%%%%%%%%%%%%%%
% COMPILED WITH TeXMaker
% F1 LaTeX
% F4 DVI->PS
% F9 PS->PDF
%%%%%%%%%%%%%%%%%%%%
\documentclass[
paper=a4,
fontsize=10pt,
DIV=calc,
headsepline,
footsepline,
titlepage,
headings=normal,
version=last,
twoside=true,
headinclude=true,
footinclude=true,
mpinclude=true,
BCOR=1.8cm
]{scrbook}

\usepackage[english]{babel}
\usepackage{arabtex}
\usepackage{psbao}
\usepackage{array}
\usepackage[hyphens]{url}
\usepackage{float}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage[%
  automark,
  headsepline,
  footsepline,
  markuppercase
]{scrpage2}
\usepackage{times}
\usepackage{lettrine}
\usepackage{indentfirst}
\usepackage{makeidx,titletoc}
\usepackage{rotating}
\usepackage{eso-pic}
\usepackage{cmap}
\usepackage[T1]{fontenc}
\usepackage{inputenc}
\usepackage[tiling]{pst-fill}
\usepackage{pst-text,pst-grad,pst-plot}
\usepackage{natbib}
\usepackage{xspace}
\usepackage{xifthen}
\usepackage[backref=false, hidelinks]{hyperref}
\usepackage[amsmath,thref]{ntheorem}
\usepackage{marginnote}
\usepackage{mparhack}
\usepackage[pointedenum]{paralist} 
\usepackage{scrhack}
\usepackage{blindtext}

\hyphenation{diagr}

\clearscrheadings

\setdefaultleftmargin{.5em}{.5em}{.5em}{.5em}{.5em}{.5em}
\addtokomafont{caption}{\itshape\small}

\setlength\textheight{205.9mm} % 210-1,8alto-2,3basso=205,9

\setlength{\oddsidemargin} {2.4cm}  %3  margine sx
\setlength{\evensidemargin} {2.4cm}  %3  margine dx
\setlength{\topmargin} {0pt}       %4  margine sx ???
\setlength{\headsep} {.7cm}        %6  distanza fra intestazione e testo
\setlength{\textwidth} {106.5mm}     %8  ampiezza del testo
\setlength{\textheight} {155.5mm}    %7  altezza del testo
\setlength{\footskip} {1.2cm}       %11 spazio per il piede   
\setlength{\paperwidth} {210mm}    %15
\setlength{\paperheight} {296mm}   %16

\newcommand\BackgroundPic{%
 \put(0,-1){%
  \parbox[b][0.4\paperheight]{\paperwidth}{%
   \vfill%
   \includegraphics[width =.5\paperwidth]{img/copertina.eps}%
   \vfill%
  }%
 }%
}

\newcommand\AlCentroPagina[1]{%
 \AddToShipoutPicture*{
  \AtPageCenter {%
   \makebox(0,-.3){
    \includegraphics %
     [width =0.2\paperwidth]{#1}
   }
  }
 }
}

\newcommand{\pstricks}{\textsf{PSTricks}}
\newcommand{\commandname}[1]{{\ttfamily\symbol{'134}#1}}

\setbaounit{0.5cm}

\makeatletter
\newcounter{pl}

\def\us{\char`\_\char`\_\char`\_\char`\_\char`\_\quad}

\def\cleardoublepage{
\clearpage
\if@twoside 
 \ifodd
  \c@page
 \else% 
  \hbox{}% 
  \thispagestyle{empty}
  \newpage% 
  \if@twocolumn
   \hbox{}\newpage
  \fi
 \fi
\fi} 

\renewtheoremstyle{marginbreak}%
  {
   \stepcounter{pl}\label{pl-\thepl}%
   \item[]%
   \leavevmode\raise.2em\hbox{%
    \marginnote{\rotatebox{90}{\theorem@headerfont##1\ ##2}
    }%
   }%
  }
  {
   \stepcounter{pl}\label{pl-\thepl}%
   \item[]%
   \leavevmode\raise.2em\hbox{%
    \marginnote{\rotatebox{90}{\theorem@headerfont##1\ ##2}}%
    }%
    {\theorem@headerfont##3}
    \theorem@separator\\\nopagebreak%
  }

%% Define a new 'leo' style for the package that will use a smaller font.
\def\url@leostyle{%
  \@ifundefined{selectfont}{\def\UrlFont{\sf}}{\def\UrlFont{\small\ttfamily}}}

\renewcommand{\@makechapterhead}[1] {     % Heading for \chapter command
 \vspace*{5pt}                          % No space at top of text page.
  {\parindent 0pt%  
   \Huge%
   \bf                            % Title.
   #1\par                                                           
   \nobreak                             % TeX penalty to prevent page break.
    \vskip 40pt                          % Space between title and text.
  } }

% Safty first
\@ifundefined{chapter}{%
  \let\chapter\undefined
  \chapter must be defined to use chapter thumbs!}%
  {%
   % Two new commands for the width and height of the boxes with the
   % chapter number at the thumbs (use of commands instead of lengths
   % for sparing registers)
   \newcommand*{\chapterthumbwidth}{3em} % altezza ruotata
   \newcommand*{\chapterthumbheight}{3em} % larghezza ruotata
 
   % Two new commands for the colors of the box background and the
   % chapter numbers of the thumbs
   \newcommand*{\chapterthumbboxcolor}{black}
   \newcommand*{\chapterthumbtextcolor}{white}
 
   % New command to set a chapter thumb. I'm using a group at this
   % command, because I'm changing the temporary dimension \@tempdima
   \newcommand*{\putchapterthumb}{%
    \begingroup
     \Large
     % calculate the horizontal position of the right paper border
     % (I ignore \hoffset, because I interprete \hoffset moves the page
     % at the paper e.g. if you are using cropmarks)
     \setlength{\@tempdima}{\@oddheadshift}% (internal from scrpage2)
     \setlength{\@tempdima}{-\@tempdima}%
%     \addtolength{\@tempdima}{\paperwidth}%
     \addtolength{\@tempdima}{17.8cm}%
     \addtolength{\@tempdima}{-\oddsidemargin}%
     \addtolength{\@tempdima}{-.65in}%
     % putting the thumbs should not change the horizontal
     % position
     \rlap{%
      % move to the calculated horizontal position
      \hspace*{\@tempdima}%
      % putting the thumbs should not change the vertical
      % position
      \vbox to 0pt{%
        % calculate the vertical position of the thumbs (I ignore
        % \voffset for the same reasons told above)
        \setlength{\@tempdima}{\chapterthumbwidth}%
        \multiply\@tempdima by\value{chapter}%
        \addtolength{\@tempdima}{-\chapterthumbwidth}%
        \addtolength{\@tempdima}{-1\baselineskip}%
        % move to the calculated vertical position
        \vspace*{\@tempdima}%
        % put the thumbs left so the current horizontal position
        \llap{%
         % and rotate them
         \rotatebox{90}
         {\colorbox{\chapterthumbboxcolor}%
          {%
           \parbox[c][\chapterthumbheight][c]{\chapterthumbwidth}%
           {%
            \centering
            \textcolor{\chapterthumbtextcolor}{%
%             \strut\Huge\thechapter
             \strut\Huge\raisebox{2ex}{\thechapter}             
             }  
           }%
          }%
        }%
      }%
      % avoid overfull \vbox messages
      \vss
     }%
   }%
   \endgroup
   }
   % New command, which works like \lohead but also puts the thumbs
   % (you cannot use \ihead with this definition but you may change
   % this, if you use more internal scrpage2 commands)
   \newcommand*{\loheadwithchapterthumbs}[2][]{%
    \lohead[\putchapterthumb#1]{\putchapterthumb#2}%
   }
\pagestyle{scrheadings}
\loheadwithchapterthumbs{} 
}   

\renewcommand*\maketitle[1][1]{%
 \begin{titlepage}
  \setcounter{page}{%
        #1%
  }%
  \begin{flushright}
   {\LARGE
    \bfseries Author \\
    \Large
    \normalfont\itshape editor\\[1.5cm]
   }
   {\huge
    \bfseries \hspace{10cm} TITLE\\ \vspace{.2cm}\HUGE title
   }
   \\[0.4cm]
   \textsc{\Large Subtitle 1} \\[0.5cm]
   {\Large
    \normalfont\itshape (subtitle 2)\\[0.5cm]
   }
   \vspace{3cm}   
   {\large
    \vfill
    {
     \clogo\large PUBLISHER\black \\Edition - 2011
    }
   }
   \vfill\null

   \if@twoside\next@tpage
     \begin{minipage}[t]{\textwidth}
      \@uppertitleback
     \end{minipage}\par
     \vfill
     \begin{minipage}[b]{\textwidth}
      \@lowertitleback
     \end{minipage}
   \fi
  \end{flushright}
 \end{titlepage}
 \setcounter{footnote}{0}%
 \let\thanks\relax
 \let\maketitle\relax
 \let\@maketitle\relax
 \global\let\@thanks\@empty
 \global\let\@author\@empty
 \global\let\@date\@empty
 \global\let\@title\@empty
 \global\let\@subtitle\@empty
 \global\let\@extratitle\@empty
 \global\let\@titlehead\@empty
 \global\let\@subject\@empty
 \global\let\@publishers\@empty
 \global\let\@uppertitleback\@empty
 \global\let\@lowertitleback\@empty
 \global\let\@dedication\@empty
 \global\let\author\relax
 \global\let\title\relax
 \global\let\extratitle\relax
 \global\let\titlehead\relax
 \global\let\subject\relax
 \global\let\publishers\relax
 \global\let\uppertitleback\relax
 \global\let\lowertitleback\relax
 \global\let\dedication\relax
 \global\let\date\relax
 \global\let\and\relax
}%

\makeatother

%% Now actually use the newly defined style.
\urlstyle{leo}

\renewcommand{\captionformat}{}
\setcapindent{0.5em}
\newrgbcolor{clogo}{0 0.33 0}
\newcommand{\enquote}[1]{``#1''}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\newcommand{\HBRule}{
\blue
\rule{1.5\linewidth}{0.8cm}
\black
}

\begin{document}

\setheadwidth[0cm]{11.6cm}
\setfootwidth[0cm]{11.6cm}

\lowertitleback{
\protect\small
This book has been written by \LaTeX\vskip .5em

Copyright\\
\copyright\ 2010, Author\\Second edition 2011\vskip .5em

Printed for Publisher\\
by Printer
}

\lefoot[\pagemark]{\pagemark}
\cefoot{}
\refoot{\protect\small\protect\it Authot -- \protect Title}
\rofoot{\pagemark}
\cofoot{}
 \lofoot{\protect\small\protect\it Author -- \protect Title}

 \maketitle

 \newcommand{\footrulewidth}{9cm}
 \blinddocument
\end{document}
Can you help me to fix them?

Thank you very much,
Nino

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
NinV
Posts: 69
Joined: Sun Oct 05, 2008 12:57 pm

Re: Two Title Page Problems

Post by NinV »

Sorry for bothering you all!

I've seen my trifling mistake: \HUGE instead of \Huge :oops:

The other one problem seems to be caused by the hyperef option "hidelinks".

Thanks.
Nino
Post Reply