Problema con testatine

  • Creatore
    Topic
  • #58320
    Up
    0
    Down
    ::


    Mi è stato proposto questo foglio di stile:

    \DeclareOption{default}{
    \setlength{\beforechapskip}{2ex} %Customizzazione del Chapter Style
    \makechapterstyle{numberabove}{
    \renewcommand{\chapnamefont}{\colorA\normalfont\huge\bfseries}
    \renewcommand{\chaptitlefont}{\colorA \scshape \Huge}
    \renewcommand{\printchaptertitle}[1]{%
    \colorB{\hrule}\vskip\onelineskip \raggedleft \chaptitlefont ##1}
    \renewcommand{\afterchaptertitle}{\vskip\onelineskip \colorB{\hrule}\vskip \afterchapskip}
    }
    \chapterstyle{numberabove}
    \copypagestyle{custom}{headings}%Pagestyle
    \makeheadrule{custom}{\textwidth}{\normalrulethickness}
    \pagestyle{custom}
    \renewcommand{\customheadrule}{\colorB\hrule}
    \renewcommand{\MakeUppercase}{}% \MakeUppercase non fa pi nulla
    \makeoddhead{custom}{\colorA\slshape\rightmark}{}{\colorA\thepage}% Headings and footers
    \makeoddfoot{plain}{}{\colorA\thepage}{}
    \makeevenhead{custom}{\colorA\thepage}{}{\colorA\slshape\leftmark}
    \makeevenfoot{plain}{}{\colorA\thepage}{}
    \setsecheadstyle{\colorA\Large\bfseries\raggedright}%Stile di section, subsection e subsubsection
    \setsubsecheadstyle{\colorA\large\bfseries\raggedright}
    \setsubsubsecheadstyle{\colorA\normalsize\bfseries\raggedright}
    \setparaheadstyle{\colorA\normalsize\bfseries}
    \setsubparaheadstyle{\colorA\normalsize\bfseries}
    }

    Teoricamente dovrebbe avere delle testatine in stile “Headings” colorate di rosso. La mia domanda è: cosa devo cambiare per lasciare le testatine così come sono (quindi in rosso ed in alto a sinistra) ma con numero di pagina in basso al centro anziché in alto a destra?
    Grazie
    Alberto

Visualizzazione 3 filoni di risposte
  • Autore
    Risposte
    • #58321
      Up
      0
      Down
      ::

      Mi è stato proposto questo foglio di stile:

      \DeclareOption{default}{
      \setlength{\beforechapskip}{2ex} %Customizzazione del Chapter Style
      \makechapterstyle{numberabove}{
      \renewcommand{\chapnamefont}{\colorA\normalfont\huge\bfseries}
      \renewcommand{\chaptitlefont}{\colorA \scshape \Huge}
      \renewcommand{\printchaptertitle}[1]{%
      \colorB{\hrule}\vskip\onelineskip \raggedleft \chaptitlefont ##1}
      \renewcommand{\afterchaptertitle}{\vskip\onelineskip \colorB{\hrule}\vskip \afterchapskip}
      }
      \chapterstyle{numberabove}
      \copypagestyle{custom}{headings}%Pagestyle
      \makeheadrule{custom}{\textwidth}{\normalrulethickness}
      \pagestyle{custom}
      \renewcommand{\customheadrule}{\colorB\hrule}
      \renewcommand{\MakeUppercase}{}% \MakeUppercase non fa pi nulla
      \makeoddhead{custom}{\colorA\slshape\rightmark}{}{\colorA\thepage}% Headings and footers
      \makeoddfoot{plain}{}{\colorA\thepage}{}
      \makeevenhead{custom}{\colorA\thepage}{}{\colorA\slshape\leftmark}
      \makeevenfoot{plain}{}{\colorA\thepage}{}
      \setsecheadstyle{\colorA\Large\bfseries\raggedright}%Stile di section, subsection e subsubsection
      \setsubsecheadstyle{\colorA\large\bfseries\raggedright}
      \setsubsubsecheadstyle{\colorA\normalsize\bfseries\raggedright}
      \setparaheadstyle{\colorA\normalsize\bfseries}
      \setsubparaheadstyle{\colorA\normalsize\bfseries}
      }

      Teoricamente dovrebbe avere delle testatine in stile “Headings” colorate di rosso. La mia domanda è: cosa devo cambiare per lasciare le testatine così come sono (quindi in rosso ed in alto a sinistra) ma con numero di pagina in basso al centro anziché in alto a destra?
      Grazie
      Alberto

      Impossibile rispondere perché manca qualsiasi riferimento alla classe usata e ai pacchetti necessari. Tuttavia, una serie di macro in cui c’è una ridefinizione di \MakeUppercase in modo che non faccia niente è da buttar via al più presto: significa che è stata scritta da gente che non ha ben chiaro come funziona LaTeX.

      Ciao
      Enrico

    • #58322
      Up
      0
      Down
      ::


      Grazie Enrico per la risposta. Si concordo in pieno con quanto mi hai scritto, difatti ho cercato di risolvere in diversi modi questo problema ma, non essendo molto esperto, credevo fosse solo una mia deficienza. Sono riuscito a farmi dare il foglio si stile completo, eccolo:
      \NeedsTeXFormat{LaTeX2e}
      \ProvidesPackage{tesicafoscari}[2008/30/01 v1.1 addon for memoir]

      \newcommand{\cdl}{}
      \newcommand{\setcdl}[1]{
      \renewcommand{\cdl}{#1}}
      \newcommand{\tdl}{Tesi}
      \newcommand{\la}{}
      \newcommand{\setla}[1]{
      \renewcommand{\la}{{#1}}}
      \newcommand\setmatri{Matricola }
      \newcommand\setAA{Anno Accademico }
      \newcommand{\anno}{}
      \newcommand{\setanno}[1]{
      \renewcommand{\anno}{{#1}}}
      \newcommand{\titolo}{}
      \newcommand{\settitolo}[1]{
      \renewcommand{\titolo}{#1}}
      \newcommand{\matrico}{}
      \newcommand{\setmatricola}[1]{
      \renewcommand{\matrico}{{#1}}}
      \newcommand{\rel}{}
      \newcommand{\setrel}[1]{
      \renewcommand{\rel}{#1}}
      \newcommand{\therelatore}{}
      \newcommand{\settherelatore}[1]{
      \renewcommand{\therelatore}{#1}}
      \newcommand{\dimstleftskip}{\setlength{\leftskip}{1cm}}
      \newcommand{\colorA}{}
      \newcommand{\colorB}{}
      \newcommand{\inslogo}[1]{\includegraphics{#1}}
      \newcommand{\setlogooptions}[1]{
      \renewcommand{\inslogo}{\includegraphics[#1]}}
      \newcommand{\logo}{logo3}
      \newcommand{\setlogo}[1]{
      \renewcommand{\logo}{#1}}
      \newcommand{\titlingpagefooter}{\today}
      \renewcommand{\maketitle}{
      {\large\bfseries\rel}\\
      \large\therelatore\\\bigskip\\
      {\large\bfseries\la}\\
      \large\theauthor\\
      \large\setmatri\matrico\\
      \bigskip
      {\large\setAA}\\
      {\large\anno}
      }
      \newcommand{\settitlingpagefooter}[1]{
      \renewcommand{\titlingpagefooter}{#1}}
      \newcommand{\settitlingpagetitle}[1]{
      \renewcommand{\maketitle}{#1}}
      \newcommand{\ppar}{\vspace{1.5ex}}%Paragrafo
      \newenvironment{dimst}{%Ambiente dimst – dimostrazioni
      \dimstleftskip
      \ppar
      \slshape
      }
      \makeatletter
      \renewcommand{\footnoterule}{%
      {\colorB\kern-3\p@
      \hrule width .4\columnwidth
      \kern 2.6\p@}}
      \renewcommand{\@epirule}{{\colorB\rule[.5ex]{\epigraphwidth}{\epigraphrule}}}
      \newcommand{\titling}{\thispagestyle{empty}
      %\vspace{-5cm}
      %\begin{titlingpage}
      \textsf{
      \begin{tabular}{c@{\hspace{2cm}}c}%\vspace{-5\baselineskip}
      \begin{tabular}{c}
      \inslogo{\logo}\end{tabular}
      &\\%\vspace{\stretch{.5}}
      \\
      \\
      &
      %%
      \LARGE\begin{tabular}{p{11cm}}
      {{Corso di Laurea}}\\{{in }}\cdl
      \\
      %~\\
      \vspace{0.2pt}
      {Prova finale di Laurea}\end{tabular}\\
      &\huge\begin{tabular}{p{11cm}}
      \vspace{1.5cm}\titolo\end{tabular}\\
      & \large\begin{tabular}{p{11cm}}
      \vspace{2cm}\maketitle
      \end{tabular}
      \end{tabular}}
      %\vspace{1cm}~
      % \end{titlingpage}
      }
      \makeatother

      %layout predefiniti per la pagina
      \DeclareOption{centered}{
      \setlrmarginsandblock{3cm}{3cm}{*}
      \setulmarginsandblock{3.5cm}{3cm}{*}
      \checkandfixthelayout
      \fixpdflayout
      \interfootnotelinepenalty=10000
      }
      \DeclareOption{left5mm}{
      \setlrmarginsandblock{3.5cm}{2.5cm}{*}
      \setulmarginsandblock{3.5cm}{3cm}{*}
      \checkandfixthelayout
      \fixpdflayout
      \interfootnotelinepenalty=10000
      }
      \DeclareOption{left8mm}{
      \setlrmarginsandblock{3.8cm}{2.2cm}{*}
      \setulmarginsandblock{3.5cm}{3cm}{*}
      \checkandfixthelayout
      \fixpdflayout
      \interfootnotelinepenalty=10000
      }
      % Colori – richiedono il pacchetto color
      \DeclareOption{redFoscari}{
      \newcommand{\black}{\color{black}}
      \renewcommand{\colorA}{\color[cmyk]{0,0.91,0.72,0.23}}
      \renewcommand{\colorB}{\color[cmyk]{0.2,0.9,0.5,0}}}
      % Specifica un layout di default
      % NB: elimina il comando \MakeUppercase
      \DeclareOption{default}{
      \setlength{\beforechapskip}{2ex} %Customizzazione del Chapter Style
      \makechapterstyle{numberabove}{
      \renewcommand{\chapnamefont}{\colorA\normalfont\huge\bfseries}
      \renewcommand{\chaptitlefont}{\colorA \scshape \Huge}
      \renewcommand{\printchaptertitle}[1]{%
      \colorB{\hrule}\vskip\onelineskip \raggedleft \chaptitlefont ##1}
      \renewcommand{\afterchaptertitle}{\vskip\onelineskip \colorB{\hrule}\vskip \afterchapskip}
      }
      \chapterstyle{numberabove}
      \copypagestyle{custom}{headings}%Pagestyle
      \makeheadrule{custom}{\textwidth}{\normalrulethickness}
      \pagestyle{custom}
      \renewcommand{\customheadrule}{\colorB\hrule}
      \renewcommand{\MakeUppercase}{}% \MakeUppercase non fa pi nulla
      \makeoddhead{custom}{\colorA\slshape\rightmark}{}{\colorA\thepage}% Headings and footers
      \makeoddfoot{plain}{}{\colorA\thepage}{}
      \makeevenhead{custom}{\colorA\thepage}{}{\colorA\slshape\leftmark}
      \makeevenfoot{plain}{}{\colorA\thepage}{}
      \setsecheadstyle{\colorA\Large\bfseries\raggedright}%Stile di section, subsection e subsubsection
      \setsubsecheadstyle{\colorA\large\bfseries\raggedright}
      \setsubsubsecheadstyle{\colorA\normalsize\bfseries\raggedright}
      \setparaheadstyle{\colorA\normalsize\bfseries}
      \setsubparaheadstyle{\colorA\normalsize\bfseries}
      }
      % Opzioni per la profondit dell’indice e della numerazione delle varie sezioni, sottosezioni, etc.
      \DeclareOption{numparagraph}{
      \maxsecnumdepth{paragraph}
      \setsecnumdepth{paragraph}
      }
      \DeclareOption{tocparagraph}{
      \maxtocdepth{paragraph}
      \settocdepth{paragraph}
      }
      \DeclareOption{numsubsubsection}{
      \maxsecnumdepth{subsubsection}
      \setsecnumdepth{subsubsection}
      }
      \DeclareOption{tocsubsubsection}{
      \maxtocdepth{subsubsection}
      \settocdepth{subsubsection}
      }
      \DeclareOption{numsubsection}{
      \maxsecnumdepth{subsection}
      \setsecnumdepth{subsection}
      }
      \DeclareOption{tocsubsection}{
      \maxtocdepth{subsection}
      \settocdepth{subsection}
      }
      \DeclareOption{logonofooter}{
      \renewcommand{\titling}{
      \begin{titlingpage}
      \begin{center}
      \inslogo{\logo}
      \end{center}
      \vspace{\stretch{3}}\maketitle
      \vspace{\stretch{3}}

      \end{titlingpage}}
      }
      \DeclareOption{logobg}{
      \renewcommand{\titling}{
      \begin{titlingpage}
      \AddToShipoutPicture*{\AtPageCenter{\makebox(0,0){\inslogo{\logo}}}}
      \maketitle
      \vspace{\stretch{8}}
      \begin{center}
      {\colorB\rule[.5ex]{50ex}{.4pt}}\\
      \titlingpagefooter
      \end{center}
      \end{titlingpage}}
      }
      \DeclareOption{logobgnofooter}{
      \renewcommand{\titling}{
      \begin{titlingpage}
      \AddToShipoutPicture*{\AtPageCenter{\makebox(0,0){\inslogo{\logo}}}}
      \maketitle
      \end{titlingpage}}
      }
      \DeclareOption{nofooter}{
      \renewcommand{\titling}{
      \begin{titlingpage}
      \maketitle
      \end{titlingpage}}
      }
      %%% Opzioni per i paragrafi
      \DeclareOption{noparindent}{
      \setlength{\parindent}{0pt}
      }
      \DeclareOption{noparskip}{
      \setlength{\parskip}{0pt}
      }
      \ProcessOptions
      \endinput
      Ora, ritieni che si possa risolvere in qualche maniera, anche se il codice non è ben scritto, oppure mi consigli di lasciar perdere tutto?
      Grazie
      Alberto

    • #58323
      Up
      0
      Down
      ::

      Grazie Enrico per la risposta. Si concordo in pieno con quanto mi hai scritto, difatti ho cercato di risolvere in diversi modi questo problema ma, non essendo molto esperto, credevo fosse solo una mia deficienza. Sono riuscito a farmi dare il foglio si stile completo, eccolo:

      Ora, ritieni che si possa risolvere in qualche maniera, anche se il codice non è ben scritto, oppure mi consigli di lasciar perdere tutto?

      Ora occorre anche un esempio di documento.

      Ciao
      Enrico

    • #58324
      Up
      0
      Down
      ::


      \documentclass[a4paper,12pt,oneside]{memoir}

      \usepackage[italian]{babel}
      \usepackage[applemac]{inputenc}
      \usepackage[T1]{fontenc}
      \usepackage{microtype}

      \usepackage[redFoscari,default,centered,numsubsubsection,tocsubsubsection]
      {tesicafoscari}

      \usepackage{color}
      \usepackage{palatino}
      \usepackage{graphicx}
      \usepackage{eso-pic}
      \usepackage{hyperref}
      \usepackage{memhfixc}
      \usepackage[hyphenbreaks]{breakurl}
      \usepackage{eurosym}
      \usepackage{nomencl}
      \usepackage{amsmath}
      \usepackage{amsfonts}
      \usepackage{amssymb}
      \usepackage{dsfont}
      \usepackage{pxfonts}
      \usepackage{enumerate}

      \begin{document}

      \author{}

      \settitolo{}
      \setanno{}

      \setlogo{logo3}
      \setlogooptions{bb=150 50 500 500,width=0.15\textwidth}

      \setcdl{}

      \setla{}

      \setmatricola{}

      \setrel{Relatore}

      \settherelatore{}

      \titling

      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Front Matter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \frontmatter

      %%%Indice
      \newpage
      \tableofcontents
      \cleardoublepage
      \listoftables
      \cleardoublepage
      \listoffigures
      \cleardoublepage
      \movetooddpage[\thispagestyle{empty}]
      \printnomenclature

      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Main Matter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

      \mainmatter

      \fontsize{12}{24}\selectfont

      \input{preambolo}
      \input {capitolo1}
      \input{capitolo2}
      \input{capitolo3}
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Back Matter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \input{bibliografia}
      \printnomenclature

      \write18{makeindex researchprop.nlo -s nomencl.ist -o researchprop.nls}
      \end{document}

      Grazie per l’interessamento
      Alberto

Visualizzazione 3 filoni di risposte
  • Devi essere connesso per rispondere a questo topic.

Go to top