Latex: package babel

  • Creatore
    Topic
  • #44550
    Up
    0
    Down
    ::


    Ciao ragazzi,

    quando cerco di compilare con latex ottengo questo errore:
    `! Package babel Error: You haven't defined the language ITALIAN yet.

    See the babel package documentation for explanation.
    Type H for immediate help.
    … `

    Il problema è che il pacchetto è definito correttamente (credo!), in quanto gli dico:

    `\usepackage[italian,english]{babel}`

    Come posso risolvere? Grazie,

    samuele

Visualizzazione 8 filoni di risposte
  • Autore
    Risposte
    • #44551
      Up
      0
      Down
      ::

      Ciao ragazzi,

      quando cerco di compilare con latex ottengo questo errore:
      `! Package babel Error: You haven't defined the language ITALIAN yet.

      See the babel package documentation for explanation.
      Type H for immediate help.
      … `

      Il problema è che il pacchetto è definito correttamente (credo!), in quanto gli dico:

      `\usepackage[italian,english]{babel}`

      Come posso risolvere? Grazie,

      samuele

      Cancella il file .aux; sei sicuro di voler scrivere in inglese come lingua principale?

      Ciao
      Enrico

    • #44552
      Up
      0
      Down
      ::


      Si, devo scrivere in inglese!
      Comunque, cosa faccio? Cancello il file tesi.aux e sono a posto? Grazie mille 🙂

    • #44553
      Up
      0
      Down
      ::


      Aspetta.. Qui temo ci sia qualcosa che non torna..
      Allora, ti posto i vari errori/warning e, più sotto, ti copio il mio file tesi.tex. Mi puoi dare una mano?

      Dunque:

      samiam@lax:~/Ubuntu One/thesis$ latex thesis.tex
      This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
      %&-line parsing enabled.
      entering extended mode
      (./thesis.tex
      LaTeX2e <2005/12/01>
      Babel and hyphenation patterns for english, usenglishmax, dumylang, noh
      yphenation, italian, loaded.
      (/usr/share/texmf-texlive/tex/latex/base/book.cls
      Document Class: book 2005/09/16 v1.4f Standard LaTeX document class
      (/usr/share/texmf-texlive/tex/latex/base/bk12.clo))
      (/usr/share/texmf-texlive/tex/generic/babel/babel.sty
      (/usr/share/texmf-texlive/tex/generic/babel/italian.ldf
      (/usr/share/texmf-texlive/tex/generic/babel/babel.def))
      (/usr/share/texmf-texlive/tex/generic/babel/english.ldf))
      (/usr/share/texmf-texlive/tex/latex/base/inputenc.sty
      (/usr/share/texmf-texlive/tex/latex/base/utf8.def
      (/usr/share/texmf-texlive/tex/latex/base/t1enc.dfu)
      (/usr/share/texmf-texlive/tex/latex/base/ot1enc.dfu)
      (/usr/share/texmf-texlive/tex/latex/base/omsenc.dfu)))
      (/usr/share/texmf-texlive/tex/latex/graphics/graphicx.sty
      (/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty)
      (/usr/share/texmf-texlive/tex/latex/graphics/graphics.sty
      (/usr/share/texmf-texlive/tex/latex/graphics/trig.sty)
      (/etc/texmf/tex/latex/config/graphics.cfg)
      (/usr/share/texmf-texlive/tex/latex/graphics/dvips.def)))
      (/usr/share/texmf-texlive/tex/latex/caption/caption.sty
      (/usr/share/texmf-texlive/tex/latex/caption/caption3.sty))
      (/usr/share/texmf-texlive/tex/latex/amsfonts/amsfonts.sty)
      (/usr/share/texmf-texlive/tex/latex/fancyhdr/fancyhdr.sty)
      (/usr/share/texmf-texlive/tex/latex/graphics/color.sty
      (/etc/texmf/tex/latex/config/color.cfg)
      (/usr/share/texmf-texlive/tex/latex/graphics/dvipsnam.def))
      (/usr/share/texmf-texlive/tex/latex/lastpage/lastpage.sty)
      (/usr/share/texmf-texlive/tex/latex/tools/longtable.sty)
      (/usr/share/texmf-texlive/tex/generic/texdraw/texdraw.sty
      (/usr/share/texmf-texlive/tex/generic/texdraw/texdraw.tex))
      (/usr/share/texmf-texlive/tex/latex/base/makeidx.sty)
      (/usr/share/texmf-texlive/tex/latex/epigraph/epigraph.sty)
      (/usr/share/texmf-texlive/tex/latex/natbib/natbib.sty)
      (/usr/share/texmf-texlive/tex/latex/tools/verbatim.sty)
      (/usr/share/texmf-texlive/tex/latex/ltxmisc/a4wide.sty
      (/usr/share/texmf-texlive/tex/latex/ntgclass/a4.sty))
      (/usr/share/texmf-texlive/tex/latex/tools/multicol.sty)
      (/usr/share/texmf-texlive/tex/latex/float/float.sty)
      (/usr/share/texmf-texlive/tex/latex/listings/listings.sty
      (/usr/share/texmf-texlive/tex/latex/listings/lstpatch.sty)
      (/usr/share/texmf-texlive/tex/latex/listings/lstmisc.sty)
      (/usr/share/texmf-texlive/tex/latex/listings/listings.cfg))
      (/usr/share/texmf-texlive/tex/latex/base/textcomp.sty
      (/usr/share/texmf-texlive/tex/latex/base/ts1enc.def
      (/usr/share/texmf-texlive/tex/latex/base/ts1enc.dfu)))
      (/usr/share/texmf-texlive/tex/latex/base/alltt.sty) (./doxygen.sty
      (/usr/share/texmf-texlive/tex/latex/tools/array.sty)
      (/usr/share/texmf-texlive/tex/latex/tools/calc.sty)
      (/usr/share/texmf-texlive/tex/latex/base/fontenc.sty
      (/usr/share/texmf-texlive/tex/latex/base/t1enc.def)))
      (/usr/share/texmf-texlive/tex/latex/listings/lstlang1.sty)
      (/usr/share/texmf-texlive/tex/latex/listings/lstlang1.sty)
      (/usr/share/texmf-texlive/tex/latex/listings/lstmisc.sty)
      No file thesis.aux.
      (/usr/share/texmf-texlive/tex/generic/babel/lgrcmr.fd)
      (/usr/share/texmf-texlive/tex/latex/base/ts1cmr.fd)
      (/usr/share/texmf-texlive/tex/latex/ragged2e/ragged2e.sty
      (/usr/share/texmf-texlive/tex/latex/everysel/everysel.sty))
      (./copertina/copertina.tex [1]) [2] (./dedica/dedica.tex
      [1]) (./abs/sommario.tex [2]

      Package natbib Warning: Citation `art:jean’ on page III undefined on input line
      3.

      ) [3] (./abs/abs.tex [4] (/usr/share/texmf-texlive/tex/latex/amsfonts/umsa.fd)
      (/usr/share/texmf-texlive/tex/latex/amsfonts/umsb.fd)) [5]
      (./ringraziamenti/ring.tex [6]
      Underfull \vbox (badness 10000) has occurred while \output is active [7]
      Underfull \vbox (badness 10000) has occurred while \output is active [8])
      [9] (./ringraziamenti/ackn.tex [10]
      Underfull \vbox (badness 10000) has occurred while \output is active [11]
      Underfull \vbox (badness 10000) has occurred while \output is active [12])
      [13] [14]
      No file thesis.toc.

      ! Package babel Error: You haven’t defined the language ENGLISH yet.

      See the babel package documentation for explanation.
      Type H for immediate help.

      l.130 \mainmatter

      ?

      [15] [16] (./chap1/chap1.tex
      Chapter 1.

      LaTeX Warning: Reference `chap:2′ on page 1 undefined on input line 5.

      LaTeX Warning: Reference `sec:target’ on page 1 undefined on input line 5.

      LaTeX Warning: Reference `sec:state_art’ on page 1 undefined on input line 6.

      LaTeX Warning: Reference `sec:appl_pratiche’ on page 1 undefined on input line
      7.

      Underfull \vbox (badness 10000) has occurred while \output is active [1]

      LaTeX Warning: Reference `sec:algorithm’ on page 2 undefined on input line 34.

      ! Package babel Error: You haven’t defined the language ENGLISH yet.

      See the babel package documentation for explanation.
      Type H for immediate help.

      l.35

      ?
      [2]

      LaTeX Warning: Reference `sec:LSS’ on page 3 undefined on input line 39.

      LaTeX Warning: Reference `sec:LSS’ on page 3 undefined on input line 39.

      )
      Underfull \vbox (badness 10000) has occurred while \output is active

      ! Package babel Error: You haven’t defined the language ENGLISH yet.

      See the babel package documentation for explanation.
      Type H for immediate help.

      l.131 \include{chap1/chap1}

      [3]

      ! Package babel Error: You haven’t defined the language ENGLISH yet.

      See the babel package documentation for explanation.
      Type H for immediate help.

      l.131 \include{chap1/chap1}

      ?

      [4] (./chap2/chap2.tex
      Chapter 2.
      )
      Underfull \vbox (badness 10000) has occurred while \output is active [5]

      ! Package babel Error: You haven’t defined the language ENGLISH yet.

      See the babel package documentation for explanation.
      Type H for immediate help.

      l.132 \include{chap2/chap2}

      ?
      [6] (./chap3/chap3.tex
      Chapter 3.
      ) [7] (./chap4/chap4.tex [8]
      Chapter 4.
      ) [9] [10]
      No file thesis.bbl.
      No file biblio/biblio.tex.
      No file thesis.ind.
      AED: lastpage setting LastPage

      Package natbib Warning: There were undefined citations.

      (./thesis.aux (./copertina/copertina.aux) (./dedica/dedica.aux)
      (./abs/sommario.aux) (./abs/abs.aux) (./ringraziamenti/ring.aux)
      (./ringraziamenti/ackn.aux) (./chap1/chap1.aux) (./chap2/chap2.aux)
      (./chap3/chap3.aux) (./chap4/chap4.aux) (./biblio/biblio.aux))

      LaTeX Warning: There were undefined references.

      LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.

      )
      Output written on thesis.dvi (28 pages, 43984 bytes).
      Transcript written on thesis.log.
      [/quote ]

      Il mio file tex è il seguente:

      \documentclass [12pt,a4paper,twoside,openright]{book}

      %———————-Definition of usefull packages
      %\usepackage[italian,english]{babel}
      \usepackage[english]{babel}
      \usepackage[utf8]{inputenc}
      \usepackage{graphicx}
      \usepackage{caption}
      \usepackage{amsfonts}
      \usepackage{fancyhdr}
      \usepackage{color}
      \usepackage{lastpage}
      \usepackage{longtable}
      \usepackage{texdraw}
      \usepackage{makeidx}
      \usepackage{epigraph}
      \usepackage{natbib}
      \usepackage{verbatim}
      \usepackage{a4wide}
      \usepackage{multicol}
      \usepackage{float}
      \usepackage{listings}
      \usepackage{textcomp}
      \usepackage{alltt}
      \usepackage{times}
      \usepackage{doxygen}
      \renewcommand{\footrulewidth}{0.4pt}

      %———————-Set Toc Counter
      \setcounter{secnumdepth}{4}
      \setcounter{tocdepth}{4}

      %———————-Line Setting
      %\linespread{1.3}

      %———————-Do Index
      %\makeindex

      %———————-New environments
      \newcommand{\fncyblank}{\fancyhf{}}
      \newenvironment{abstract}
      {\cleardoublepage\fncyblank\null \vfill\begin{center}
      \bfseries \abstractname \end{center}}
      {\vfill\null}

      %———————-Page Style Setting
      \newcommand{\fncymain}{
      \fancyhead[RO]{\footnotesize\MakeUppercase{\rightmark}}
      \fancyfoot[RO]{\thepage}
      \fancyhead[LE]{\footnotesize\MakeUppercase{\leftmark}}
      \fancyfoot[LE]{\thepage}
      \fancyfoot[C]{}
      \renewcommand{\headrulewidth}{0.3pt}}
      \newcommand{\fncyfront}{
      \fancyhead[RO]{\footnotesize{\rightmark}}
      \fancyfoot[RO]{\thepage}
      \fancyhead[LE]{\footnotesize{\leftmark}}
      \fancyfoot[LE]{\thepage}
      \fancyhead[RE,LO]{}
      \fancyfoot[C]{}
      \renewcommand{\headrulewidth}{0.3pt}}

      %———————-Commands to avoid head/footnote at the end of each chapter
      \makeatletter
      \def\cleardoublepage{\clearpage\if@twoside
      \ifodd\c@page
      \else\hbox{}\thispagestyle{empty}\newpage
      \if@twocolumn\hbox{}\newpage\fi\fi\fi}
      \makeatother

      %———————-Beginning Document
      \begin{document}
      \fncyfront
      %———————-frontmatter
      \frontmatter
      %———————-Copertina
      \include{copertina/copertina}\cleardoublepage
      \include{abs/abs}
      \tableofcontents
      %———————-Mainmatter
      \fncymain
      \mainmatter
      \input{chap1/chap1}
      \input{chap2/chap2}
      \input{chap3/chap3}
      \input{chap4/chap4}
      \end{document}

    • #44554
      OldClaudio
      Partecipante
        Up
        0
        Down
        ::


        Mi lascia perplesso il fatto che ITALIAN, nel tuo primo messaggio, e ENGLISH, net tuo ultimo messaggio siano in maiuscolo.
        Siccome nelle testatine delle classi standard viene solitamente trasformato in maiuscolo ciò che vi deve apparire, non è per caso che hai scritto qualche titolo di capitolo o di sezione che contenga anche il cambio di lingua?
        Se fosse così, togli quel cambio di lingua che non serve a niente, o almeno usa l’argomento facoltativo di \chapter o \section per specificare lo stesso titolo, senza il cambio di lingua; In fondo la testatina è fatta di una sola riga e non è il caso di andare a capo (in questo caso usa un argomento facoltativo più breve) e certamente non ci sono nomi “infix” (Capitolo, Figura, Indice generale, o simili parole in inglese).

      • #44555
        Up
        0
        Down
        ::


        Scusa, posso allegare qui dei file?
        Oppure, se mi contatti via mail (samuele.zampini@gmail.com) posso mandarti i miei file. potresti dare un occhio??

      • #44556
        Up
        0
        Down
        ::


        Ciao. Allora, ho capito qual è il problema..
        Ovvero, quel warning (con ENGLISH o ITALIAN maiuscoli) me lo dà quando uso il pacchetto doxygen.
        Solo che – dovendo inserire nel documento la documentazione Doxygen – non posso fare a meno di quel pacchetto.

        Hai idea di come possa risolvere??

      • #44557
        Up
        0
        Down
        ::

        Ciao. Allora, ho capito qual è il problema..
        Ovvero, quel warning (con ENGLISH o ITALIAN maiuscoli) me lo dà quando uso il pacchetto doxygen.
        Solo che – dovendo inserire nel documento la documentazione Doxygen – non posso fare a meno di quel pacchetto.

        Hai idea di come possa risolvere??

        Prova a mettere nel tuo preambolo la seguente magia:
        `\providecommand{\csletcs}[2]{%
        \expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname}
        \newcommand{\equivUC}[3][\def]{%
        \expandafter#1\csname#2\expandafter\endcsname\expandafter{%
        \csname#3\endcsname}}
        \newcommand{\UPCASElang}[1]{
        \uppercase{\def\temp{#1}}
        \csletcs{l@\temp}{l@#1}
        \equivUC{date\temp}{date#1}
        \equivUC{captions\temp}{captions#1}
        \equivUC{extras\temp}{extras#1}
        \equivUC{noextras\temp}{noextras#1}
        \equivUC[\edef]{\temp hyphenmins}{#1hyphenmins}
        }
        \UPCASElang{english}
        \UPCASElang{italian}`
        Ciao
        Enrico

      • #44558
        Up
        0
        Down
        ::


        Questa è davvero una magia.
        Grazie!

      • #44559
        Up
        0
        Down
        ::

        Questa è davvero una magia.
        Grazie!

        Non avendo a disposizione doxygen né il tempo di esaminarlo, ho curato il sintomo. Il pacchetto babel si aspetta di conoscere certi comandi legati a una lingua; per l’inglese sono \l@english, \dateenglish, \captionsenglish, \extrasenglish, \noextrasenglish e \englishhyphenmins. Analogamente per l’italiano e le altre lingue. Ho quindi creato un’infrastruttura che definisce i comandi necessari con il nome della lingua maiuscolo, in modo da non dover ripetere macro complicate per ogni lingua.

        Ciao
        Enrico

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

    Go to top