Text FormattingHyphen confusion

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
rajini
Posts: 64
Joined: Mon Mar 22, 2010 2:27 pm

Hyphen confusion

Post by rajini »

Hello all,

Where to put the following code:

Code: Select all

\hyphenpenalty=3000
\tolerance=1000
If put immediately after

Code: Select all

\usepackage[ngerman,english]{babel}
i get a pdf with some hyphen pattern.
But that hyphenation is entirely different if i put the penality just before \begin{document}.
Why it is like that..Or which is correct place to declare the commands

Code: Select all

\hyphenpenalty=3000
\tolerance=1000
thanks

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

johnjamessmith0
Posts: 37
Joined: Sun Mar 29, 2009 1:41 am

Hyphen confusion

Post by johnjamessmith0 »

I'm confused about your question. After

Code: Select all

\usepackage[ngerman,english]{babel}
and before

Code: Select all

\begin{document}
should be the same place -- all of your "\usepackage"s should be in the preamble. If they are, and you're moving the hyphen penalty around in the preamble and it's causing different results, that means the other packages and commands you've put in the preamble are interfering, and no one can help you if you don't tell us what those are.
rajini
Posts: 64
Joined: Mon Mar 22, 2010 2:27 pm

Hyphen confusion

Post by rajini »

Hello John,
thank you for your reply. Here you find all my codes. If the code '\hyphenpenalty=4000 and \tolerance=500' is moved to last line (of the code below), then a different hyphen is obtained.

Code: Select all

\documentclass[paper=a4,fontsize=12pt,BCOR=20mm,DIV=15,headsepline,liststotoc,
bibtotoc,cleardoublepage=empty,appendixprefix,chapterprefix]{scrbook}
\linespread{1.3}
\KOMAoptions{DIV=last}
\usepackage{scrpage2}
\usepackage[ngerman,english]{babel}
\hyphenpenalty=4000
\tolerance=500
\usepackage{amsmath,mathptmx}
\usepackage{upgreek}
\usepackage{threeparttablex,threeparttable,environ}
\usepackage{multirow,longtable}
\usepackage{graphicx}
\usepackage{afterpage,float}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[page,titletoc]{appendix}
\usepackage[intoc]{nomencl}
\makenomenclature
\renewcommand{\nomname}{List of symbols and abbreviations}
\RequirePackage{ifthen}
\renewcommand{\nomgroup}[1]{%
\ifthenelse{\equal{#1}{R}}{\item[\textbf{\sffamily\large Abbreviations}]}{%
\ifthenelse{\equal{#1}{G}}{\item[\textbf{\sffamily\large Symbols}]}{}}}
\setkomafont{captionlabel}{\bfseries}
\setkomafont{pagehead}{\normalfont\normalcolor}
\clubpenalty=10000
\widowpenalty=10000
\displaywidowpenalty=10000
\tolerance=500
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\renewcommand{\appendixpagename}{\sffamily \Large APPENDICES}
Post Reply