Stile numeri classicthesis

  • Creatore
    Topic
  • #79701
    Up
    0
    Down
    ::


    Salve a tutti, sto utilizzando il pacchetto classicthesis per scrivere, appunto, una tesi di carattere scientifico (sono già arrivato alla conclusione che classic e scientifico sono due parole che possono stare bene insieme se si parla di latex 🙂 ). Il pacchetto è molto bello ma una cosa che proprio non mi va giù è come vengono scritti i numeri all’interno del testo; sono infatti disallineati e fuori riga.
    Mi servirebbe sapere quindi come cambiare lo stile dei numeri.

    grazie

    giovanni

Visualizzazione 6 filoni di risposte
  • Autore
    Risposte
    • #79702
      Up
      0
      Down
      ::

      Ferraro” post=78848Salve a tutti, sto utilizzando il pacchetto classicthesis per scrivere, appunto, una tesi di carattere scientifico (sono già arrivato alla conclusione che classic e scientifico sono due parole che possono stare bene insieme se si parla di latex 🙂 ). Il pacchetto è molto bello ma una cosa che proprio non mi va giù è come vengono scritti i numeri all’interno del testo; sono infatti disallineati e fuori riga.
      Mi servirebbe sapere quindi come cambiare lo stile dei numeri.

      grazie

      giovanni

      Non ho capito che vuoi dire. Puoi riportare un codice compilabile che riproduca il tuo problema?

      Ciao
      Tommaso

    • #79703
      Up
      0
      Down
      ::


      Ciao, sto utilizzando il template di classicthesis

      `\documentclass[ twoside, openright,titlepage,numbers=noenddot,headinclude,
      dottedtoc, footinclude=true,abstractoff,cleardoublepage=empty,
      BCOR=25mm,paper=a4,fontsize=11pt,american]{scrbook}

      \PassOptionsToPackage{eulerchapternumbers, listings,%drafting,%
      pdfspacing,floatperchapter,%linedheaders,%
      subfig,beramono,eulermath,parts}{classicthesis}
      \usepackage{ifthen}
      \newboolean{enable-backrefs}
      \setboolean{enable-backrefs}{false} % true false

      \newcounter{dummy} % necessary for correct hyperlinks (to index, bib, etc.)
      \newlength{\abcd} % for ab..z string length calculation
      \providecommand{\mLyX}{L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
      \newcommand{\ie}{i.\,e.}
      \newcommand{\Ie}{I.\,e.}
      \newcommand{\eg}{e.\,g.}
      \newcommand{\Eg}{E.\,g.}

      \PassOptionsToPackage{latin9}{inputenc}
      \usepackage{inputenc}

      \usepackage{babel}

      \PassOptionsToPackage{square,numbers}{natbib}
      \usepackage{natbib}

      \PassOptionsToPackage{fleqn}{amsmath}
      \usepackage{amsmath}

      % ********************************************************************
      % General useful packages
      % ********************************************************************
      \PassOptionsToPackage{T1}{fontenc} % T2A for cyrillics
      \usepackage{fontenc}
      \usepackage{textcomp} % fix warning with missing font shapes
      \usepackage{scrhack} % fix warnings when using KOMA with listings package
      \usepackage{xspace} % to get the spacing after macros right
      \usepackage{mparhack} % get marginpar right
      \usepackage{fixltx2e} % fixes some LaTeX stuff
      \PassOptionsToPackage{printonlyused,smaller}{acronym}
      \usepackage{acronym} % nice macros for handling all acronyms in the thesis
      %\renewcommand*{\acsfont}[1]{\textssc{#1}} % for MinionPro
      \renewcommand{\bflabel}[1]{{#1}\hfill} % fix the list of acronyms
      % ****************************************************************************************************

      % ****************************************************************************************************
      % 4. Setup floats: tables, (sub)figures, and captions
      % ****************************************************************************************************
      \usepackage{tabularx} % better tables
      \setlength{\extrarowheight}{3pt} % increase table row height
      \newcommand{\tableheadline}[1]{\multicolumn{1}{c}{\spacedlowsmallcaps{#1}}}
      \newcommand{\myfloatalign}{\centering} % to be used with each float for alignment
      \usepackage[margin=2pt,font=small,width=.8\textwidth, labelsep=period, ,labelfont=bf, format=hang]{caption}
      %\captionsetup{format=hang,font=small}
      \usepackage{subfig}
      % ****************************************************************************************************

      % ****************************************************************************************************
      % 5. Setup code listings
      % ****************************************************************************************************
      \usepackage{listings}
      %\lstset{emph={trueIndex,root},emphstyle=\color{BlueViolet}}%\underbar} % for special keywords
      \lstset{language=[LaTeX]Tex,%C++,
      keywordstyle=\color{Black},%\bfseries,
      basicstyle=\small\ttfamily,
      %identifierstyle=\color{NavyBlue},
      commentstyle=\color{Black}\ttfamily,
      stringstyle=\rmfamily,
      numbers=none,%left,%
      numberstyle=\scriptsize,%\tiny
      stepnumber=5,
      numbersep=8pt,
      showstringspaces=false,
      breaklines=true,
      frameround=ftff,
      frame=single,
      belowcaptionskip=.75\baselineskip
      %frame=L
      }
      % ****************************************************************************************************

      % ****************************************************************************************************
      % 6. PDFLaTeX, hyperreferences and citation backreferences
      % ****************************************************************************************************
      % ********************************************************************
      % Using PDFLaTeX
      % ********************************************************************
      \PassOptionsToPackage{pdftex,hyperfootnotes=false,pdfpagelabels}{hyperref}
      \usepackage{hyperref} % backref linktocpage pagebackref
      \pdfcompresslevel=9
      \pdfadjustspacing=1
      \PassOptionsToPackage{pdftex}{graphicx}
      \usepackage{graphicx}

      % ********************************************************************
      % Setup the style of the backrefs from the bibliography
      % (translate the options to any language you use)
      % ********************************************************************
      \newcommand{\backrefnotcitedstring}{\relax}%(Not cited.)
      \newcommand{\backrefcitedsinglestring}[1]{(Cited on page~#1.)}
      \newcommand{\backrefcitedmultistring}[1]{(Cited on pages~#1.)}
      \ifthenelse{\boolean{enable-backrefs}}%
      {%
      \PassOptionsToPackage{hyperpageref}{backref}
      \usepackage{backref} % to be loaded after hyperref package
      \renewcommand{\backreftwosep}{ and~} % separate 2 pages
      \renewcommand{\backreflastsep}{, and~} % separate last of longer list
      \renewcommand*{\backref}[1]{} % disable standard
      \renewcommand*{\backrefalt}[1]{% detailed backref
      \ifcase #1 %
      \backrefnotcitedstring%
      \or%
      \backrefcitedsinglestring{#2}%
      \else%
      \backrefcitedmultistring{#2}%
      \fi}%
      }{\relax}

      \makeatletter
      \@ifpackageloaded{babel}%
      {%
      \addto\extrasamerican{%
      \renewcommand*{\figureautorefname}{Figure}%
      \renewcommand*{\tableautorefname}{Table}%
      \renewcommand*{\partautorefname}{Part}%
      \renewcommand*{\chapterautorefname}{Chapter}%
      \renewcommand*{\sectionautorefname}{Section}%
      \renewcommand*{\subsectionautorefname}{Section}%
      \renewcommand*{\subsubsectionautorefname}{Section}%
      }%

      % Fix to getting autorefs for subfigures right (thanks to Belinda Vogt for changing the definition)
      \providecommand{\subfigureautorefname}{\figureautorefname}%
      }{\relax}
      \makeatother

      %************************************************************************
      \listfiles

      % ********************************************************************

      \usepackage{classicthesis}

      `

      Il problema è che i numeri vengono scritti disallineati l’uno con l’altro. Siccome sto scrivendo una tesi scientifica ma farebbe piacere scriverli nella maniera classica

    • #79704
      Up
      0
      Down
      ::

      Ferraro” post=78851Ciao, sto utilizzando il template di classicthesis

      `\documentclass[ twoside, openright,titlepage,numbers=noenddot,headinclude,
      dottedtoc, footinclude=true,abstractoff,cleardoublepage=empty,
      BCOR=25mm,paper=a4,fontsize=11pt,american]{scrbook}

      \PassOptionsToPackage{eulerchapternumbers, listings,%drafting,%
      pdfspacing,floatperchapter,%linedheaders,%
      subfig,beramono,eulermath,parts}{classicthesis}
      \usepackage{ifthen}
      \newboolean{enable-backrefs}
      \setboolean{enable-backrefs}{false} % true false

      \newcounter{dummy} % necessary for correct hyperlinks (to index, bib, etc.)
      \newlength{\abcd} % for ab..z string length calculation
      \providecommand{\mLyX}{L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
      \newcommand{\ie}{i.\,e.}
      \newcommand{\Ie}{I.\,e.}
      \newcommand{\eg}{e.\,g.}
      \newcommand{\Eg}{E.\,g.}

      \PassOptionsToPackage{latin9}{inputenc}
      \usepackage{inputenc}

      \usepackage{babel}

      \PassOptionsToPackage{square,numbers}{natbib}
      \usepackage{natbib}

      \PassOptionsToPackage{fleqn}{amsmath}
      \usepackage{amsmath}

      % ********************************************************************
      % General useful packages
      % ********************************************************************
      \PassOptionsToPackage{T1}{fontenc} % T2A for cyrillics
      \usepackage{fontenc}
      \usepackage{textcomp} % fix warning with missing font shapes
      \usepackage{scrhack} % fix warnings when using KOMA with listings package
      \usepackage{xspace} % to get the spacing after macros right
      \usepackage{mparhack} % get marginpar right
      \usepackage{fixltx2e} % fixes some LaTeX stuff
      \PassOptionsToPackage{printonlyused,smaller}{acronym}
      \usepackage{acronym} % nice macros for handling all acronyms in the thesis
      %\renewcommand*{\acsfont}[1]{\textssc{#1}} % for MinionPro
      \renewcommand{\bflabel}[1]{{#1}\hfill} % fix the list of acronyms
      % ****************************************************************************************************

      % ****************************************************************************************************
      % 4. Setup floats: tables, (sub)figures, and captions
      % ****************************************************************************************************
      \usepackage{tabularx} % better tables
      \setlength{\extrarowheight}{3pt} % increase table row height
      \newcommand{\tableheadline}[1]{\multicolumn{1}{c}{\spacedlowsmallcaps{#1}}}
      \newcommand{\myfloatalign}{\centering} % to be used with each float for alignment
      \usepackage[margin=2pt,font=small,width=.8\textwidth, labelsep=period, ,labelfont=bf, format=hang]{caption}
      %\captionsetup{format=hang,font=small}
      \usepackage{subfig}
      % ****************************************************************************************************

      % ****************************************************************************************************
      % 5. Setup code listings
      % ****************************************************************************************************
      \usepackage{listings}
      %\lstset{emph={trueIndex,root},emphstyle=\color{BlueViolet}}%\underbar} % for special keywords
      \lstset{language=[LaTeX]Tex,%C++,
      keywordstyle=\color{Black},%\bfseries,
      basicstyle=\small\ttfamily,
      %identifierstyle=\color{NavyBlue},
      commentstyle=\color{Black}\ttfamily,
      stringstyle=\rmfamily,
      numbers=none,%left,%
      numberstyle=\scriptsize,%\tiny
      stepnumber=5,
      numbersep=8pt,
      showstringspaces=false,
      breaklines=true,
      frameround=ftff,
      frame=single,
      belowcaptionskip=.75\baselineskip
      %frame=L
      }
      % ****************************************************************************************************

      % ****************************************************************************************************
      % 6. PDFLaTeX, hyperreferences and citation backreferences
      % ****************************************************************************************************
      % ********************************************************************
      % Using PDFLaTeX
      % ********************************************************************
      \PassOptionsToPackage{pdftex,hyperfootnotes=false,pdfpagelabels}{hyperref}
      \usepackage{hyperref} % backref linktocpage pagebackref
      \pdfcompresslevel=9
      \pdfadjustspacing=1
      \PassOptionsToPackage{pdftex}{graphicx}
      \usepackage{graphicx}

      % ********************************************************************
      % Setup the style of the backrefs from the bibliography
      % (translate the options to any language you use)
      % ********************************************************************
      \newcommand{\backrefnotcitedstring}{\relax}%(Not cited.)
      \newcommand{\backrefcitedsinglestring}[1]{(Cited on page~#1.)}
      \newcommand{\backrefcitedmultistring}[1]{(Cited on pages~#1.)}
      \ifthenelse{\boolean{enable-backrefs}}%
      {%
      \PassOptionsToPackage{hyperpageref}{backref}
      \usepackage{backref} % to be loaded after hyperref package
      \renewcommand{\backreftwosep}{ and~} % separate 2 pages
      \renewcommand{\backreflastsep}{, and~} % separate last of longer list
      \renewcommand*{\backref}[1]{} % disable standard
      \renewcommand*{\backrefalt}[1]{% detailed backref
      \ifcase #1 %
      \backrefnotcitedstring%
      \or%
      \backrefcitedsinglestring{#2}%
      \else%
      \backrefcitedmultistring{#2}%
      \fi}%
      }{\relax}

      \makeatletter
      \@ifpackageloaded{babel}%
      {%
      \addto\extrasamerican{%
      \renewcommand*{\figureautorefname}{Figure}%
      \renewcommand*{\tableautorefname}{Table}%
      \renewcommand*{\partautorefname}{Part}%
      \renewcommand*{\chapterautorefname}{Chapter}%
      \renewcommand*{\sectionautorefname}{Section}%
      \renewcommand*{\subsectionautorefname}{Section}%
      \renewcommand*{\subsubsectionautorefname}{Section}%
      }%

      % Fix to getting autorefs for subfigures right (thanks to Belinda Vogt for changing the definition)
      \providecommand{\subfigureautorefname}{\figureautorefname}%
      }{\relax}
      \makeatother

      %************************************************************************
      \listfiles

      % ********************************************************************

      \usepackage{classicthesis}

      `

      Il problema è che i numeri vengono scritti disallineati l’uno con l’altro. Siccome sto scrivendo una tesi scientifica ma farebbe piacere scriverli nella maniera classica

      Porta pazienza: un esempio compilabile è un codice che si può incollare in un file vuoto e compilare con un clic per vedere il risultato. il tuo non lo è. Continuo a non capire che vuoi dire con “disallineati”. Forse ti riferisci al fatto che ClassicThesis usa i numeri minuscoli? Vedi i numeri andare anche sotto la linea di base delle lettere, come per esempio fa la lettera g rispetto alla lettera a?

      in questo caso, devi metterli in modo matematico, ma suppongo che tu ti debba leggere anche una guida di base. Prova a copiare questo codice nel tuo lavoro e guarda la differenza:

      `0123456789

      $0123456789$`

      Ciao
      Tommaso

    • #79705
      Up
      0
      Down
      ::

      Forse ti riferisci al fatto che ClassicThesis usa i numeri minuscoli? Vedi i numeri andare anche sotto la linea di base delle lettere, come per esempio fa la lettera g rispetto alla lettera a?

      esatto il problema è proprio questo!

      scrivendo il tutto tra $$ risolvo il problema, ma vorrei sapere se c’è un modo per evitare di scrivere ogni volta i numeri tra $, anche perchè vorrei cambiare anche quelli che compaiono nei riferimenti bibliografici, nell’indice e nella numerazione delle pagine.

    • #79706
      Up
      0
      Down
      ::


      Per capirsi meglio, non mi piace come vengono scritti i numeri
      [attachment=489]ex.png[/attachment]
      Voglio che siano allineati l’uno con l’altro

      Attachments:
      You must be logged in to view attached files.
    • #79707
      OldClaudio
      Partecipante
        Up
        0
        Down
        ::


        Per ottenere il risultato che chiedi dovresti modificare ClassicThesis, cosa che è vietata per un numero di buoni motivi, compreso il fatto che se ci si mette a modificare le classi o i file di estensione, non si sa più quali siano quelli veri e quelli rattoppati; però nessuno ti vieta di prendere il file classicthesis.sty dal tuo albero del sistema TeX; dove sia radicato questo albero dipende da sistema operativo della tua macchina, ma dopo la radice dovrebbe contenere tex/latex/classcthesis/classicthesis.sty (sulle macchine Windows cambia gli slash in backslash); copi questo file nella cartella della tua tesi e gli cambi il nome, per esempio, FerraroClassicThesis.sty (naturalmente cambi anche la chiamata di questo pacchetto nel file sorgente della tua tesi).
        Poi apri FerraroClassicThesis.sty con lo stesso editor che usi per comporre i tuoi file sorgente e vai alla riga 207 dove c’è scritto:`\PassOptionsToPackage{osf,sc}{mathpazo}%` e cancelli osf (acronimo che sta per Old Style Figures) e cancelli anche la virgola che separa questa opzione dall’opzione successiva. Salvi e componi la tua tesi con le lining figures (le cifre maiuscole) di default in tutta la tesi, invece delle cifre minuscole (old style figures) che sono certamente più eleganti da usare nel testo. Ricordati che lo scopo di ClassicThesis, secondo il suo autore, è quello di dare la possibilità ai laureandi di comporre delle belle tesi e le cifre minuscole sono un tocco di stile che rende una composizione più bella.

        Capisco benissimo la tua necessità in una tesi tecnica di volere le cifre “non saltellanti”, le cifre maiuscole. ma allora perché hai scelto ClassicThesis, la cui documentazione è esplicita a proposito dell’eleganza della composizione più adatta a tesi di tipo umanistico che di tipo tecnico? In fondo Lorenzo Pantieri ha prodotto due modelli TesiClassica e TesiModerna, e la seconda direi che è piuttosto elegante ed è adatta alla composizione di testi, anche tecnici, senza cifre minuscole.

      • #79708
        Up
        0
        Down
        ::


        Grazie, sei stato di grande aiuto

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

    Go to top