Load the package breakurl with hyperref in DVI output (fix bug 7033).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36860 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2010-12-13 07:58:07 +00:00
parent d79902fe7d
commit 0f2cfd957e
3 changed files with 34 additions and 0 deletions

View File

@ -251,6 +251,7 @@
\TestPackage{bm} \TestPackage{bm}
\TestPackage{booktabs} \TestPackage{booktabs}
\TestPackage{braille} \TestPackage{braille}
\TestPackage{breakurl}
\TestPackage{CJKutf8} \TestPackage{CJKutf8}
\TestPackage{color} % this one should be there if graphics.sty is there. \TestPackage{color} % this one should be there if graphics.sty is there.
\TestPackage{covington} \TestPackage{covington}

View File

@ -4458,6 +4458,35 @@ bibtopic
is used to split BibTeX created bibliographies into sections. is used to split BibTeX created bibliographies into sections.
\end_layout \end_layout
\begin_layout Subsection
breakurl
\end_layout
\begin_layout Description
Found:
\begin_inset Info
type "package"
arg "breakurl"
\end_inset
\end_layout
\begin_layout Description
CTAN:
\family typewriter
macros/latex/contrib/breakurl/
\end_layout
\begin_layout Description
Notes: The package
\family sans
breakurl
\family default
assures that url's are correctly broken at the end of lines with DVI output
when hyperref is used.
\end_layout
\begin_layout Subsection \begin_layout Subsection
CJKutf8 CJKutf8
\end_layout \end_layout

View File

@ -1789,6 +1789,10 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
texrow.newlines(lines); texrow.newlines(lines);
// set back for the rest // set back for the rest
lyxpreamble.clear(); lyxpreamble.clear();
// correctly break URLs with hyperref and dvi output
if (features.runparams().flavor == OutputParams::LATEX
&& features.isAvailable("breakurl"))
lyxpreamble += "\\usepackage{breakurl}\n";
} else if (features.isRequired("nameref")) } else if (features.isRequired("nameref"))
// hyperref loads this automatically // hyperref loads this automatically
lyxpreamble += "\\usepackage{nameref}\n"; lyxpreamble += "\\usepackage{nameref}\n";