Text FormattingProblem with reformating footnotes

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
camillemartin
Posts: 3
Joined: Thu Apr 07, 2011 10:51 am

Problem with reformating footnotes

Post by camillemartin »

Bonjour,

I would like to reformat my footnotes directly in my personnal class :

Code: Select all

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%  Définition de la classe                                                 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{tech}[2001/08/22 v0.0(beta) Tech style document class]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%  Classe de base                                                 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\LoadClass[11pt]{article}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%  Appels des packages nécessaires                                                 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage[utf8]{inputenc} % Package de déclaration de l'encodage
\RequirePackage[frenchb]{babel} % Package de francisation
\RequirePackage[T1]{fontenc} % Package pour les caractères accentués

\RequirePackage{graphicx, color} % Package permettant d'ajouter des images
\RequirePackage{caption} % Package pour les titres des figures
\RequirePackage{amsmath, amssymb} % Packages pour les maths
\RequirePackage[amssymb, pstricks]{SIunits} % Package pour les unités
\RequirePackage{lipsum} % Package pour ajouter du texte débile
\RequirePackage{lastpage} % Package pour avoir la dernière page
\RequirePackage{geometry} % Package pour définir la géométrie de la page
\usepackage{fancyhdr}
\RequirePackage{hyperref} % Package pour les liens

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%  Définition de la géométrie de la page                                                 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\geometry{a4paper}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%  Définition des paramètres personnels                                                 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand\ouverture[1]{%
	\Title{#1}
	\Author{}
	\date{\today}
	\hypersetup{pdftitle={#1}}
	\company{\includegraphics[scale=.3]{Tech.eps}}}
	
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%  Définition des caractéristiques Pdf                                                 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\hypersetup{pdfauthor={},
			colorlinks=true,
			linkcolor=black}
	
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%  Définnition des couleurs corporate                                                 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\definecolor{tech-blue}{rgb}{0,0.38,0.67}
\definecolor{tech-red}{rgb}{0.89,0.01,0.18}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%  Définition des variables spécifiques                                                 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand\tableofcontent{\thispagestyle{empty}\tableofcontents}

\newcommand\@Title{\relax}
\newcommand\@TTitle{\relax}
\newcommand\Title[1]{\renewcommand\@Title{\textnormal{#1}}%
                       \renewcommand\@TTitle{\par\textnormal{#1}}}

\newcommand\@Author{\relax}
\newcommand\@TAuthor{\relax}
\newcommand\Author[1]{\renewcommand\@Author{\textnormal{#1}}%
					 \renewcommand\@TAuthor{\par\textnormal{#1}}}
					
\newcommand\@company{\relax}
\newcommand\@tcompany{\relax}
\newcommand\company[1]{\renewcommand\@company{\textnormal{#1}}%
                       \renewcommand\@tcompany{\par\textnormal{#1}}}

\newcommand\@confidential{\relax}
\newcommand\@tconfidential{\relax}
\newcommand\confidential[1]{\renewcommand\@confidential{\textnormal{#1}}
                            \renewcommand\@tconfidential{\par\textbf{#1}}}

\newcommand\fullcenter[1]{\hbox to\linewidth{\hss\hbox to\fullwidth{\parbox[c]{\fullwidth}{\begin{center}#1\end{center}}}}}
\newcommand{\footruleskipe}{\normalbaselineskip}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%  Redéfinition des notes en bas de page                                                 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Suppression de la barre verticale
\renewcommand\footnoterule{%
  \kern-3\p@
  \hrule\@width0\columnwidth
  \kern2.6\p@}

% Mise en italique
\renewcommand\@makefntext[1]{%
    \parindent 100em%
    \noindent
    \hb@xt@1.8em{\hss\@makefnmark}{\itschape#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%  Début du code du package                                                 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\rmdefault}{ptm} % Police Helvética

% Définition des variables pour la justification
\newdimen\leftmarginwidth
\newdimen\fullwidth

% Commande pour la justification du texte
\newcommand\settextfraction[1]%
{
  \setlength\@tempdima{\paperwidth} % la variable temporaire prend la largeur papier
  \addtolength\@tempdima{-1.5in} % soustraction de la marge totale

  \if@twocolumn
      \setlength\textwidth{\@tempdima} 
  \else
      \setlength\fullwidth{\@tempdima} % récupération de l'espace pratique
      \@settopoint\fullwidth
      \setlength\textwidth{#1\fullwidth}  % calcul de l'espace de texte
  \fi

  \@settopoint\textwidth

  \setlength\leftmarginwidth{\fullwidth}
  \addtolength\leftmarginwidth{-\textwidth} 

  \setlength\@tempdima        {\paperwidth}
  \addtolength\@tempdima      {-2in} % décalage 
  \addtolength\@tempdima      {-\fullwidth}
  \setlength\oddsidemargin    {.5\@tempdima}
  \addtolength\oddsidemargin  {\leftmarginwidth}
  \@settopoint\oddsidemargin
  \setlength\evensidemargin  {\oddsidemargin}
  \setlength\marginparwidth  {\oddsidemargin}
  \addtolength\marginparwidth {-\marginparsep}
  \setlength\marginparpush{0\p@}
}

% Commande pour le décalage des titres
\newcommand\secshape{\leftskip=-\leftmarginwidth%
                     \rightskip=\@flushglue%
                     \hyphenpenalty=2000}

% Redéfinition des sections
\renewcommand\section{\@startsection {section}{1}{\z@}%
                     {-3.5ex \@plus -1ex \@minus -.2ex}%
                     {2.3ex \@plus.2ex}%
                     {\secshape\normalfont\Large\bfseries}}

% Redéfinition des sous-sections
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
			          {-3.25ex\@plus -1ex \@minus -.2ex}%
			          {1.5ex \@plus .2ex}%
			          {\secshape\normalfont\large\bfseries}}

% Redéfinition des sous-soussections			
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
				         {-3.25ex\@plus -1ex \@minus -.2ex}%
						 {1.5ex \@plus .2ex}%
				         {\secshape\normalfont\normalsize\bfseries}}
% Redéfinition des paragraphes				
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
				     {3.25ex \@plus1ex \@minus.2ex}%
				     {-1em}%
				     {\normalfont\normalsize\bfseries}}

% Redéfiniton des sous-paragraphes				
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
					    {3.25ex \@plus1ex \@minus .2ex}%
					    {-1em}%
					    {\normalfont\normalsize\bfseries}}


% Appel de la fonction de justification
\settextfraction{0.8} 

% Définition de la ligne de séparation
\def\longrule{\hbox to \linewidth{\hss
              \vrule width \fullwidth height 0.2\p@ depth \z@}}

% Redéfinition du titre
\def\@maketitle{%
    \newpage
    \null
    \hbox to\linewidth{\hss\hbox to\fullwidth{\makebox[\fullwidth][c]{\@tconfidential}}}
    \longrule\vskip1.5em%
    {\secshape \parskip\z@ \parindent\z@
    \Large\bfseries \@Title \par}%
    \vskip1.5em\longrule\vskip1.5em%
    {\normalsize
      \lineskip .5em%
      \begin{flushright}%
        {\slshape\@Author\@tcompany\par}
        \vskip 0.2em%
        {\@date}%
      \end{flushright}\par}%
    \vskip 1.5em}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%  Définition des en-têtes                                                 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\@oddhead{\vbox{\hbox to\linewidth{\hss\hbox to\fullwidth{
      {\rlap{\parbox[b]{\textwidth}{\raggedright{\@Title}}}\hfill%
      \parbox[b]{\textwidth}{\centering{\@confidential}}\hfill%
      \llap{\parbox[b]{\textwidth}{\raggedleft{\@company}}}}}}%
      \vskip  3.0\p@ \longrule}}

\def\@oddfoot{\vbox{\vskip\footruleskipe%
      \longrule\vskip 1.0\p@%
      \vskip-\footruleskipe%
      \hbox to\linewidth{\hss\hbox to\fullwidth{%
      {\rlap{\parbox[t]{0.8\fullwidth}{\textit{\@Author}}}\hfill%
      \llap{\parbox[t]{\textwidth}{\raggedleft{\thepage\,/\,\pageref{LastPage}}}}}}}}}

\def\@evenfoot{\@oddfoot}
\def\@evenhead{\@oddhead}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%  Fin du fichier de classe tech.cls                                                 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
For this, I have redefined the macro \footnoterule in order to suppress the rule. It works.
But, when I have tried to redefine the macro @makefntext to have the footnotes in italic nothing happens.

Do you know why ?

Thanks a lot,

Camille
Last edited by camillemartin on Thu Apr 07, 2011 9:58 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

camillemartin
Posts: 3
Joined: Thu Apr 07, 2011 10:51 am

Re: Problem with reformating footnotes

Post by camillemartin »

Hi,

In fact, I think that I have found the answer :

Babel is the problem. When you suppress this package, everything is OK.

I have to look into this package.

Thanks

Camille
camillemartin
Posts: 3
Joined: Thu Apr 07, 2011 10:51 am

Problem with reformating footnotes

Post by camillemartin »

Hi,

To finish with this problem, you can add this little code before redefining the footnotes :

Code: Select all

\frenchbsetup{FrenchFootnotes=false}
That's all,

Camille
Post Reply