#1 Le 09/09/2007, à 12:24
- GandalfoS
[Résolu] LaTeX hyphenation utf8
Bonjour j'ai déjà posté ce message dans les archives, mais il y a peu de chance qu'il y soit lu, donc je me suis permis de créer un nouveau sujet pour mon problème:
j'ai un soucis avec la commande LaTeX \hyphenation pour préciser les césures de certains mots. Elle fonctionne très bien chez moi (Feisty), à partir du moment où le mot ne contient pas d'accents. Le message d'erreur est le suivant (compilation avec pdflatex)
This is pdfeTeX, Version 3.141592-1.30.5-2.2 (Web2C 7.5.5)
entering extended mode
(./These_MJ_2007.tex
LaTeX2e <2003/12/01>
Babel <v3.8g> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, french, basque, loaded.
(/usr/share/texmf-texlive/tex/latex/base/book.cls
Document Class: book 2004/02/16 v1.4f Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/bk12.clo))
(/usr/share/texmf-texlive/tex/latex/geometry/geometry.sty
(/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty)
(/usr/share/texmf-texlive/tex/latex/geometry/geometry.cfg))
(/usr/share/texmf-texlive/tex/latex/graphics/graphicx.sty
(/usr/share/texmf-texlive/tex/latex/graphics/graphics.sty
(/usr/share/texmf-texlive/tex/latex/graphics/trig.sty)
(/usr/share/texmf-texlive/tex/latex/config/graphics.cfg)
(/usr/share/texmf-texlive/tex/latex/graphics/pdftex.def)))
(/usr/share/texmf-texlive/tex/latex/amsfonts/amssymb.sty
(/usr/share/texmf-texlive/tex/latex/amsfonts/amsfonts.sty))
(/usr/share/texmf-texlive/tex/latex/oberdiek/epstopdf.sty)
(/usr/share/texmf-texlive/tex/latex/natbib/natbib.sty)
(/usr/share/texmf-texlive/tex/generic/babel/babel.sty
(/usr/share/texmf-texlive/tex/generic/babel/frenchb.ldf
(/usr/share/texmf-texlive/tex/generic/babel/babel.def)
*************************************
* Local config file frenchb.cfg used
*
(/usr/share/texmf-texlive/tex/generic/babel/frenchb.cfg)))
(/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/color.sty
(/usr/share/texmf-texlive/tex/latex/config/color.cfg))
(/usr/share/texmf-texlive/tex/latex/setspace/setspace.sty
Package: `setspace' 6.7 <2000/12/01>
) (/usr/share/texmf-texlive/tex/latex/fancyhdr/fancyhdr.sty)
(/usr/share/texmf-texlive/tex/latex/sectsty/sectsty.sty)
(/usr/share/texmf-texlive/tex/latex/fancyvrb/fancyvrb.sty
Style option: `fancyvrb' v2.6, with DG/SPQR fixes <1998/07/17> (tvz)
No file fancyvrb.cfg.
) (/usr/share/texmf-texlive/tex/latex/hyperref/hyperref.sty
(/usr/share/texmf-texlive/tex/latex/hyperref/pd1enc.def)
(/usr/share/texmf-texlive/tex/latex/config/hyperref.cfg)
Implicit mode ON; LaTeX internals redefined
(/usr/share/texmf-texlive/tex/latex/ltxmisc/url.sty))
*hyperref using driver hpdftex*
(/usr/share/texmf-texlive/tex/latex/hyperref/hpdftex.def
(/usr/share/texmf-texlive/tex/latex/psnfss/pifont.sty
(/usr/share/texmf-texlive/tex/latex/psnfss/upzd.fd)
(/usr/share/texmf-texlive/tex/latex/psnfss/upsy.fd)))
(/usr/share/texmf-texlive/tex/latex/tools/tabularx.sty
(/usr/share/texmf-texlive/tex/latex/tools/array.sty))
(/usr/share/texmf-texlive/tex/latex/rotating/rotating.sty
(/usr/share/texmf-texlive/tex/latex/base/ifthen.sty))
(/usr/share/texmf-texlive/tex/latex/tools/multicol.sty)
(/usr/share/texmf-texlive/tex/latex/multirow/multirow.sty)
(/usr/share/texmf-texlive/tex/latex/caption/caption.sty
(/usr/share/texmf-texlive/tex/latex/caption/caption3.sty))
(/usr/share/texmf-texlive/tex/latex/tools/longtable.sty)
(/usr/share/texmf-texlive/tex/latex/tools/enumerate.sty)
! Improper \hyphenation will be flushed.
\leavevmode ->\unhbox
\voidb@x
l.82 \hyphenation{expé
-ri-men-ta-le-ment}
?
Je suis en utf8, voici mon préambule
\documentclass[12pt,twoside,openright]{book}
\usepackage{geometry}
\geometry{a4paper, hmargin=2.5cm, vmargin=2.5cm}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{epstopdf}
\usepackage[round]{natbib}
\usepackage[frenchb]{babel}
\usepackage[utf8]{inputenc}
% On peut ici definir ses propres couleurs en RGB
\usepackage{color}
\definecolor{darkgrey}{rgb}{0.25,0.25,0.25}
\definecolor{violette}{rgb}{0.19,0.04,0.41}
\definecolor{orange}{rgb}{1.,0.63,0.0}
\usepackage{setspace}
\onehalfspace
% Les headers and footers
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{\textbf{\thechapter}.\ \emph{#1}}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ \boldmath\textbf{#1}\unboldmath}}
\fancyhf{}
\fancyhead[RO]{\nouppercase{\leftmark}}
\fancyhead[LE]{\rightmark}
\fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0.5pt}
% Les titres des sections avec une police sans serif
\usepackage{sectsty}
\allsectionsfont{\sffamily}
% mettre de la couleur dans le mode verbatim
\usepackage{fancyvrb}
% Propriété du PDF généré.
\usepackage[pdftex]{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=violette,
citecolor=darkgrey,
filecolor=magenta,
urlcolor=blue,
pdfpagemode=UseThumbs,
pdfstartview=FitH,
pdftitle={Manuscrit de Thèse - John Doe},
pdfauthor={John Doe,
pdfsubject={Unknown},
pdfkeywords={None}
}
% Gestion des tables
% colonnes de taille variable
\usepackage{tabularx}
% tables verticales
\usepackage{rotating}
% fusions lignes/colonnes
\usepackage{multicol}
\usepackage{multirow}
% Ne pas lister la table
\usepackage[font=small, width=0.95\textwidth, labelfont=bf]{caption}
% Pour les tables qui font plusieurs pages
\usepackage{longtable}
% Pour avoir de belle listes
\usepackage{enumerate}
% On definit comment decouper ou pas certains mots
\hyphenation{expé-ri-men-ta-le-ment}
\begin{document}
Existe t il une solution ? merci.
Dernière modification par GandalfoS (Le 09/09/2007, à 16:54)
Si t'en reveux, y'en rena !
Hors ligne
#2 Le 09/09/2007, à 16:29
- Pikachu_2014
Re : [Résolu] LaTeX hyphenation utf8
Bonjour,
ajoute en préambule l'appel au paquetage fontenc :
\usepackage[T1]{fontenc}
C'est justement lui qui permet la césure des mots accentués, par défaut impossible, par l'appel à des fontes accentuées (CM Super). Optionnel, mais plus que largement conseillé, appelle également le paquetage lmodern :
\usepackage{lmodern}
Ces fontes sont identiques aux fontes CM, mais de meilleure finition que CM Super.
Hors ligne
#3 Le 09/09/2007, à 16:53
- GandalfoS
Re : [Résolu] LaTeX hyphenation utf8
Super cela marche très bien. J'ai juste du installer le paquet lmodern qui n'était pas présent sur ma feisty (
sudo apt-get install lmodeln
). Du coup, comme il sait comment couper des mots avec accent, la commande \hyphenation n'est même plus nécessaire
Un grand merci.
Si t'en reveux, y'en rena !
Hors ligne