Problema da Oneside a Twoside…

  • Questo topic ha 7 risposte, 2 partecipanti ed è stato aggiornato l'ultima volta 19 anni, 1 mese fa da cys.
  • Creatore
    Topic
  • #16224
    cys
      Up
      0
      Down
      ::


      Salve, sto scrivendo la tesi e utilizzo un foglio di stile che non dà problemi con l’ opzione oneside. Però mi dispiacerebbe sprecare metà fogli… E quindi ho sostituito oneside con twoside…
      Ora il problema è che risultano questi errori …

      ./tesi.tex:151:Undefined control sequence. \include{capitolo1}
      ./tesi.tex:153:Undefined control sequence. \include{capitolo2}
      ./tesi.tex:163:Undefined control sequence. \include{bib}

      Lo scheletro della tesi è questo:
      `
      \documentclass[a4paper,12pt]{thesis}
      .
      .
      .

      \begin{document}
      \selectlanguage{italian}
      \maketitle
      \include{abstract}
      \tableofcontents
      \listoffigures
      \listoftables
      \preface
      \introduction
      \include{capitolo1}
      \include{capitolo2}
      \include{capitolo3}
      \include{capitolo4}
      \include{capitolo5}
      \bibliographystyle{ieeetr}
      \bibliography{bib.bib}
      \include{bib}

      \end{document}`

      Mentre la parte del file thesis dedicata all’ opzione oneside e twoside è questa:
      `
      \DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
      \DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue}
      .
      .
      \ExecuteOptions{letterpaper,10pt,twoside,onecolumn,final,openany}
      .
      .
      .
      \if@twoside
      \def\ps@headings{%
      \let\@oddfoot\@empty\let\@evenfoot\@empty
      \def\@evenhead{\thepage\hfil\slshape\leftmark}%
      \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
      \let\@mkboth\markboth
      \def\chaptermark##1{%
      \markboth {\uppercase{\ifnum \c@secnumdepth >\m@ne
      \@chapapp\ \thechapter. \ \fi
      ##1}}{}}%
      \def\sectionmark##1{%
      \markright {\uppercase{\ifnum \c@secnumdepth >\z@
      \thesection. \ \fi
      ##1}}}}
      \else
      \def\ps@headings{%
      \let\@oddfoot\@empty
      \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
      \let\@mkboth\markboth
      \def\chaptermark##1{%
      \markright {\uppercase{\ifnum \c@secnumdepth >\m@ne
      \@chapapp\ \thechapter. \ \fi
      ##1}}}}
      \fi
      .
      .
      \def\@endpart{\vfil\newpage
      \if@twoside
      \hbox{}%
      \thispagestyle{empty}%
      \newpage
      \fi
      \if@tempswa
      \twocolumn
      \fi}
      .
      .
      \if@twoside
      \else
      \raggedbottom
      \fi
      `

      Qualche aiuto? Grazie.
      🙄

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

        Salve, sto scrivendo la tesi e utilizzo un foglio di stile che non dà problemi con l’ opzione oneside. Però mi dispiacerebbe sprecare metà fogli… E quindi ho sostituito oneside con twoside…
        Ora il problema è che risultano questi errori …
        `
        ./tesi.tex:151:Undefined control sequence. \include{capitolo1}
        ./tesi.tex:153:Undefined control sequence. \include{capitolo2}
        ./tesi.tex:163:Undefined control sequence. \include{bib}
        `

        Il log! Non il breve riassuntino di TeXnic Center. E non tutto il log, ma solo la parte rilevante che riguarda il primo errore. Di certo non si tratta del comando \include, ma di qualcosa che sta nel file capitolo1.tex

        E che c’è nel file bib.tex?

        Fra l’altro non occorre ovviamente modificare il file thesis.cls: basta aggiungere twoside alle opzioni di \documentclass.

        Ciao
        Enrico

      • #16226
        cys
          Up
          0
          Down
          ::


          Se ho capito bene vuoi questo:

          [PDFLaTeX] tesi.tex => tesi.pdf (pdflatex)
          [PDFLaTeX] finished with exit status 1
          ./tesi.tex:0: destination with the same identifier (name{page.1}) has been already used, duplicate ignored\penaltyl.90 \include{abstract}[1
          ./capitolo1.tex:0: destination with the same identifier (name{page.1}) has been already used, duplicate ignored\penaltyl.10 \section{Nome Sezione} [1
          .
          .
          ./tesi.tex:0: destination with the same identifier (name{page.2}) has been already used, duplicate ignored\penaltyl.151 \include{capitolo1}
          ./tesi.tex:151:Undefined control sequence. \include{capitolo1}
          ./tesi.tex:0: destination with the same identifier (name{page.3}) has been already used, duplicate ignored\penaltyl.151 \include{capitolo1}[

          Poi ci sono altre warning e errori.
          😥

        • #16227
          cys
            Up
            0
            Down
            ::

            E che c’è nel file bib.tex?

            Giusto, dovrei risolvere lasciando nel file tesi.tex solo \include{bib} e poi all’ interno di bib.tex mettere:

            \begin{thebibliography}
            \bibliographystyle{ieeetr}
            \bibliography{bib.bib}
            \end{thebibliography}

            ???

          • #16228
            Up
            0
            Down
            ::

            Se ho capito bene vuoi questo:

            [PDFLaTeX] tesi.tex => tesi.pdf (pdflatex)
            [PDFLaTeX] finished with exit status 1
            ./tesi.tex:0: destination with the same identifier (name{page.1}) has been already used, duplicate ignored\penaltyl.90 \include{abstract}[1
            ./capitolo1.tex:0: destination with the same identifier (name{page.1}) has been already used, duplicate ignored\penaltyl.10 \section{Nome Sezione} [1
            .
            .
            ./tesi.tex:0: destination with the same identifier (name{page.2}) has been already used, duplicate ignored\penaltyl.151 \include{capitolo1}
            ./tesi.tex:151:Undefined control sequence. \include{capitolo1}
            ./tesi.tex:0: destination with the same identifier (name{page.3}) has been already used, duplicate ignored\penaltyl.151 \include{capitolo1}[

            Poi ci sono altre warning e errori.
            😥

            Non puoi pretendere che ti aiutiamo se non ci dici quali sono gli errori. Quelli che mostri sono i soliti messaggi di TeXnic Center, accidenti a loro! 🙂

            Hai certamente un file che si chiama come il tuo documento principale, ma con l’estensione .log. Da qualche parte di quello c’è riportato “Undefined control sequence”: serve vedere quello che c’è dopo.

            Ciao
            Enrico

          • #16229
            cys
              Up
              0
              Down
              ::


              Perdonami. 😳
              Ecco qua:

              l.151 \include{capitolo1}

              ! Undefined control sequence.
              \makeevenhead …baselinestretch {1}\footnatesize
              \sf \rightmark \hfil \null
              l.151 \include{capitolo1}

              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.

              l.153 \include{capitolo2}

              ! Undefined control sequence.
              \makeevenhead …baselinestretch {1}\footnatesize
              \sf \rightmark \hfil \null
              l.153 \include{capitolo2}

              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.

              ! Undefined control sequence.
              \makeevenhead …baselinestretch {1}\footnatesize
              \sf \rightmark \hfil \null
              l.163 \include{biblio}

              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.

              Spero vada bene.

            • #16230
              Up
              0
              Down
              ::

              Perdonami. 😳
              Ecco qua:
              `l.151 \include{capitolo1}

              ! Undefined control sequence.
              \makeevenhead …baselinestretch {1}\footnatesize
              \sf \rightmark \hfil \null
              l.151 \include{capitolo1}
              …`
              Spero vada bene.

              E adesso, non ti diventa chiaro che da qualche parte, probabilmente nel tuo codice che riguarda fancyhdr, hai scritto \footnatesize invece che \footnotesize?

              Ciao
              Enrico

            • #16231
              cys
                Up
                0
                Down
                ::


                Grazie Enrico, immaginavo fosse una stupidaggine… Quel pezzo di codice mi era stato dato per Sacra Scrittura, e non lo avevo preso troppo in considerazione.
                Ora inizierò a consultare il file di log…
                🙄 😉

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

            Go to top