impostazioni backref classicthesis

  • Creatore
    Topic
  • #67729
    Up
    0
    Down
    ::


    Ciao a tutti,
    sto incontrando un problema nella stesura della mia tesi di laurea.
    utilizzo texshop su un macbook, con texlive2011 installato, e lo stile classicthesis v3.1.
    ho raggiunto un buon livello (a mio parere) di stesura del documento, ma stamattina mi sono accorto che le backreferences nella bibliografia alla fine del documento sono in lingua inglese (i.e. “Cited on page –“).
    confrontando il mio preambolo con l’originale di classithesis ho notato che all’inizio del lavoro avevo tolto le righe di codice:

    `\newcommand{\backrefnotcitedstring}{\relax}%(Not cited.)
    \newcommand{\backrefcitedsinglestring}[1]{(Citato alla pagina~#1.)}
    \newcommand{\backrefcitedmultistring}[1]{(Citato alle pagine~#1.)}
    \ifthenelse{\boolean{enable-backrefs}}%
    {%
    \PassOptionsToPackage{hyperpageref}{backref}
    \usepackage{backref} % to be loaded after hyperref package
    \renewcommand{\backreftwosep}{ e~} % separate 2 pages
    \renewcommand{\backreflastsep}{, e~} % separate last of longer list
    \renewcommand*{\backref}[1]{} % disable standard
    \renewcommand*{\backrefalt}[4]{% detailed backref
    \ifcase #1 %
    \backrefnotcitedstring%
    \or%
    \backrefcitedsinglestring{#2}%
    \else%
    \backrefcitedmultistring{#2}%
    \fi}%
    }{\relax} `

    perchè durante la compilazione sorgevano errori del tipo: command already defined.
    solo che non riuscivo a capire qual’è l’altro pacchetto che li definisce, allora le avevo semplicemente tolte dal preambolo e tutto funzionava, ma non mi ero accorto che i riferimenti erano in lingua inglese. stamattina ho aggiunto di nuovo quelle righe di codice al preambolo e ottengo sempre i soliti errori. ignorandoli, il risultato è corretto, i riferimenti sono in italiano, ma vorrei eliminare quella ridondanza fastidiosa in fase di compilazione.
    il preambolo completo è il seguente:

    `% 1. Configure classicthesis for your needs here, e.g., remove “drafting” below
    % in order to deactivate the time-stamp on the pages

    \PassOptionsToPackage{eulerchapternumbers,subfig,beramono,%
    eulermath,pdfspacing,drafting,parts}{classicthesis}

    \usepackage{ifthen}
    \newboolean{enable-backrefs} % enable backrefs in the bibliography
    \setboolean{enable-backrefs}{true} % true false

    % ****************************************************************************************************
    % 2. Personal data and user ad-hoc commands
    % ****************************************************************************************************
    \newcommand{\myTitle}{Tesi di Laurea Magistrale in Ingegneria Gestionale\xspace}
    \newcommand{\mySubtitle}{La gestione operativa del magazzino: il problema di Storage Location Assignment\xspace}
    %\newcommand{\myDegree}{\xspace}
    \newcommand{\myName}{Marco Braglia\xspace}
    \newcommand{\myProf}{Mauro Dell'Amico\xspace}
    \newcommand{\myOtherProf}{Put name here\xspace}
    \newcommand{\mySupervisor}{Put name here\xspace}
    \newcommand{\myFaculty}{Facoltà di Ingegneria\xspace}
    \newcommand{\myDepartment}{Sede di Reggio nell'Emilia\xspace}
    \newcommand{\myUni}{\protect{Università degli Studi di Modena e Reggio Emilia}\xspace}
    \newcommand{\myLocation}{Reggio Emilia\xspace}
    \newcommand{\myTime}{Novembre 2011\xspace}
    \newcommand{\myVersion}{version 3.1 BETA\xspace}

    % ********************************************************************
    % Setup, finetuning, and useful commands
    % ********************************************************************
    %\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.}
    % ****************************************************************************************************

    % ****************************************************************************************************
    % 3. Loading some handy packages
    % ****************************************************************************************************
    % ********************************************************************
    % Packages with options that might require adjustments
    % ********************************************************************

    \PassOptionsToPackage{applemac}{inputenc}
    \usepackage{inputenc}

    \PassOptionsToPackage{italian}{babel}
    \usepackage{babel}

    \PassOptionsToPackage{square}{natbib}
    \usepackage{natbib}

    \PassOptionsToPackage{fleqn}{amsmath} % math environments and more by the AMS
    \usepackage{amsmath}
    \usepackage{amsthm}

    \usepackage[shortlabels]{enumitem}
    \usepackage{eurosym}

    \usepackage{braket}
    % ********************************************************************
    % General useful packages
    % ********************************************************************

    \PassOptionsToPackage{T1}{fontenc} % T2A for cyrillics
    \usepackage{fontenc}
    \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{caption}
    \captionsetup{format=hang,font=small}
    \usepackage{subfig}
    \usepackage{multirow}
    % ****************************************************************************************************

    % ****************************************************************************************************
    % 5. Setup code listings
    % ****************************************************************************************************
    \usepackage{listings}
    %\lstset{emph={trueIndex,root},emphstyle=\color{BlueViolet}}%\underbar} % for special keywords
    \lstset{language=[LaTeX]Tex,%C++,
    keywordstyle=\color{RoyalBlue},%\bfseries,
    basicstyle=\small\ttfamily,
    %identifierstyle=\color{NavyBlue},
    commentstyle=\color{Green}\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
    \PassOptionsToPackage{italian}{varioref}
    \usepackage{varioref}
    \pdfcompresslevel=9
    \pdfadjustspacing=1
    \PassOptionsToPackage{pdftex}{graphicx}
    \usepackage{graphicx}

    \newcommand{\backrefnotcitedstring}{\relax}%(Not cited.)
    \newcommand{\backrefcitedsinglestring}[1]{(Citato alla pagina~#1.)}
    \newcommand{\backrefcitedmultistring}[1]{(Citato alle pagine~#1.)}
    \ifthenelse{\boolean{enable-backrefs}}%
    {%
    \PassOptionsToPackage{hyperpageref}{backref}
    \usepackage{backref} % to be loaded after hyperref package
    \renewcommand{\backreftwosep}{ e~} % separate 2 pages
    \renewcommand{\backreflastsep}{, e~} % separate last of longer list
    \renewcommand*{\backref}[1]{} % disable standard
    \renewcommand*{\backrefalt}[4]{% detailed backref
    \ifcase #1 %
    \backrefnotcitedstring%
    \or%
    \backrefcitedsinglestring{#2}%
    \else%
    \backrefcitedmultistring{#2}%
    \fi}%
    }{\relax}

    \makeatletter
    \AtBeginDocument{
    \def\vr@f#1{%
    \leavevmode\unskip\vref@space
    \begingroup
    % \let\T@pageref\@pagerefstar
    \hyperref[{#1}]{\ref*{#1}}%
    \vpageref[\unskip]{#1}%
    \endgroup
    }
    }
    \makeatother

    \usepackage{marginnote}

    % ********************************************************************
    % Hyperreferences
    % ********************************************************************
    \hypersetup{%
    %draft, % = no hyperlinking at all (useful in b/w printouts)
    colorlinks=true, linktocpage=true, pdfstartpage=3, pdfstartview=FitV,%
    % uncomment the following line if you want to have black links (e.g., for printing)
    %colorlinks=false, linktocpage=false, pdfborder={0 0 0}, pdfstartpage=3, pdfstartview=FitV,%
    breaklinks=true, pdfpagemode=UseNone, pageanchor=true, pdfpagemode=UseOutlines,%
    plainpages=false, bookmarksnumbered, bookmarksopen=true, bookmarksopenlevel=1,%
    hypertexnames=true, pdfhighlight=/O,%nesting=true,%frenchlinks,%
    urlcolor=webbrown, linkcolor=RoyalBlue, citecolor=webgreen, %pagecolor=RoyalBlue,%
    %urlcolor=Black, linkcolor=Black, citecolor=Black, %pagecolor=Black,%
    pdftitle={\myTitle},%
    pdfauthor={\textcopyright\ \myName, \myUni, \myFaculty},%
    pdfsubject={},%
    pdfkeywords={},%
    pdfcreator={pdfLaTeX},%
    pdfproducer={LaTeX with hyperref and classicthesis}%
    }

    \usepackage{classicthesis-ldpkg}
    \usepackage{classicthesis}
    %\usepackage{arsclassica}

    `

    qualche idea?
    grazie in anticipo

Visualizzazione 6 filoni di risposte
  • Autore
    Risposte
    • #67730
      lorenzo.pantieri
      Partecipante
        Up
        0
        Down
        ::


        Il mio consiglio è di passare senz’altro a biblatex, che fra l’altro permette di avere i riferimenti finali nella lingua corretta senza accrocchi manuali.

        Ciao.

      • #67731
        Up
        0
        Down
        ::

        lorenzo.pantieri” post=66726Il mio consiglio è di passare senz’altro a biblatex, che fra l’altro permette di avere i riferimenti finali nella lingua corretta senza accrocchi manuali.

        Ciao.

        uso biblatex in effetti, e ho creato il database utilizzando l’ottimo jabref.
        Questo è il file tex della bibliografia.
        `%********************************************************************
        % Bibliography
        %*******************************************************
        % work-around to have small caps also here in the headline
        \manualmark
        \markboth{\spacedlowsmallcaps{\bibname}}{\spacedlowsmallcaps{\bibname}} % work-around to have small caps also
        %\phantomsection
        \refstepcounter{dummy}
        \addtocontents{toc}{\protect\vspace{\beforebibskip}} % to have the bib a bit from the rest in the toc
        \addcontentsline{toc}{chapter}{\tocEntry{\bibname}}
        \bibliographystyle{plainnat}
        \label{app:bibliography}
        \bibliography{TesiBibliografia}
        `

        ma il pacchetto biblatex non l’ho caricato manualmente,lo carica classicthesis o classicthesis-ldpkg?

      • #67732
        Up
        0
        Down
        ::


        Penso di non avere molto chiaro il funzionamento della mia bibliografia 🙂
        ora mi leggo la guida sul tuo sito.

      • #67733
        Up
        0
        Down
        ::


        Allora, ricapitoliamo un attimo la faccenda della bibliografia ia. Io ho preso il template di classicthesis trovato dentro al pacchetto, ho modificato il preambolo secondo i miei bisogni e inserito il contenuto della mia tesi.
        In un secondo momento ho creato il file bib utilizzando jabref e ho inserito le citazioni nel testo. Non mi ero posto il problema di caricare i pacchetti, era la mia prima esperienza con latex e la bibliografia semplicemente funzionava. Finché non ho notato i link in inglese.
        Domanda: ma classicthesis come la gestisce la bibliografia? L’unica cosa che vedo nel preambolo è il caricamento. Del pacchetto natbib.
        Grazie e scusa l’ignoranza in materia

      • #67734
        Up
        0
        Down
        ::


        Got it! 🙂
        avevo fatto confusione tra il programma BibTex e il pacchetto BibLatex.
        avendo lasciato il template classicthesis più o meno inalterato utilizzava natbib.
        sostituito con BibLatex, modificato i comandi \citep con \parencite e il gioco è fatto.
        grazie mille per la risposta, mi hai messo la pulce nell’orecchio che mi ha fatto capire cosa non andava!
        cheers

      • #67735
        lorenzo.pantieri
        Partecipante
          Up
          0
          Down
          ::

          marcob8986″ post=66738sostituito con BibLatex, modificato i comandi \citep con \parencite e il gioco è fatto.

          Ben fatto. 🙂

          Visto che ci siamo, ti consiglio lo stile philosophy-modern. L’opzione natbib, in particolare, permette di avere una compatibilità praticamente totale con bibliografie concepite per l’omonimo pacchetto.

          Ciao.

        • #67736
          Up
          0
          Down
          ::


          Grazie mille.
          Questo stile è molto più bello del classico authoryear. Saperlo prima evitavo di sostituire tutte le voci a mano 😛
          cheers

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

      Go to top