I'm using texlive-babel-french
(on Fedora) with Lyx, and text overflows instead of having clear cuts because of hyphenation. When I change language from French to English in Document > Preferences > Language, hyphenation works correctly, but LaTeX generated text (like Abstract) is not in French anymore, so I can't use the english package.
Edit: a sort of minimal example. I kept all Lyx code, because I don't know if it's of any use.
%% LyX 2.1.2 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[12pt,a4paper,french]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{babel}
\makeatletter
\addto\extrasfrench{%
\providecommand{\og}{\leavevmode\flqq~}%
\providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}%
}
\makeatother
\usepackage[unicode=true,pdfusetitle,
bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=false]
{hyperref}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\pdfpageheight\paperheight
\pdfpagewidth\paperwidth
\makeatother
\begin{document}
Les \og visual guidelines \fg{} étaient complètes pour les usages
abordés, et la référence de l'API (qui explique chaque méthode) explicative
et claire. La documentation, quant à elle, laissait à désirer. Tout
comme d'autres documentations the rest is private information, sorry
:) but you can see how the text continues without any problem. But
I have long words like documentation documentation documentation documentation
documentationdocumentation documentation documentation documentation...
\end{document}
\usepackage[T1]{fontenc}
which properly hyphenates accentuated words.\usepackage[T1]{fontenc}
in the Lyx preamble, but it didn't change anything. The word that overflows in my example isn't accentuated. How do I provide a minimal example with Lyx? Do I export to LaTeX ?\usepackage[T1]{fontenc}
, it doesn't work either.texlive-collection-langfrench
, which didn't change a thing. I tried creating a new document in LaTeXila, and I didn't have a problem. The only difference is\usepackage[francais]{babel}
(français is french for french). I used this in my Lyx preamble and it raised a "option clash for package babel" error, but it works. I'll try to specify that in Lyx.