General ⇒ Controlling hyphenation for words globally?
Controlling hyphenation for words globally?
Hi,
I found out that for some words hyphenation is totally wrong. Now, instead of changing every word to use "\-" at the right position, is there any way to define the correct hyphenation of a word globally? That way I could once and for all define how a certain word was hyphenated and dont have to go through the 180 pages of my book.
Thanks,
Ben
I found out that for some words hyphenation is totally wrong. Now, instead of changing every word to use "\-" at the right position, is there any way to define the correct hyphenation of a word globally? That way I could once and for all define how a certain word was hyphenated and dont have to go through the 180 pages of my book.
Thanks,
Ben
Re: Controlling hyphenation for words globally?
There may be several reasons for your problem: do you write in english or in a language with accented letters? In the last case you may have problems if you don't use the T1 encoding. Are the correct hyphenation patterns for your language loaded? If you write in english, do you need the american or the british ones? Finally, there exists a 'hyphenation' command which lets you specify in your preamble the hyphenation points of such and such word. Take a look at the UK TeX FAQ, questions 271--278 for details.
Regards,
B.A.
Regards,
B.A.
Controlling hyphenation for words globally?
You can use
to force the hyphenation of "internet" globally.
Code: Select all
\hyphenation{in-ter-net}
- localghost
- Site Moderator
- Posts: 9201
- Joined: Fri Feb 02, 2007 12:06 pm
Re: Controlling hyphenation for words globally?
It would be very interesting what you do in your preamble to control hyphenation.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Re: Controlling hyphenation for words globally?
Thanks for the replies! I am writing in German and there is several words where the hyphenation is wrong and some cases where the hyphenation is unusual (e.g. "Suchergebnis" gets "Sucher-gebnis" but it should be "Such-ergebnis").
Here is some details from my header.tex:
\documentclass[
pdftex,
11pt,
a4paper,
pagesize,
%DIVcalc,
BCOR12mm,
smallheadings,
halfparskip,
plainheadsepline,
plainfootsepline,
openright,
]{scrbook}
\usepackage{german, ngerman}
\usepackage[german]{babel}
\usepackage[latin1]{inputenc}
I will try the hyphenation command too!
Here is some details from my header.tex:
\documentclass[
pdftex,
11pt,
a4paper,
pagesize,
%DIVcalc,
BCOR12mm,
smallheadings,
halfparskip,
plainheadsepline,
plainfootsepline,
openright,
]{scrbook}
\usepackage{german, ngerman}
\usepackage[german]{babel}
\usepackage[latin1]{inputenc}
I will try the hyphenation command too!
Controlling hyphenation for words globally?
Hm I tried setting
but it did not change anything. Maybe some commands I use in my header is not compatible with this command?
Code: Select all
\hyphenation{Such-ergeb-nisse}
Re: Controlling hyphenation for words globally?
Are you sure you can load simultaneously german and ngerman? Take a look at your log file.
B.A.
B.A.
- localghost
- Site Moderator
- Posts: 9201
- Joined: Fri Feb 02, 2007 12:06 pm
Controlling hyphenation for words globally?
Forget the packages german and ngerman, because these are obsolete. Only use the babel package with the ngerman option. Add the fontenc package with the T1 encoding option to enable Cork Encoding for better hyphenation.
The fontenc package serves in every language for better hyphenation, not only in German.
Code: Select all
\documentclass[
pdftex,
11pt,
a4paper,
pagesize,
%DIVcalc,
BCOR12mm,
smallheadings,
halfparskip,
plainheadsepline,
plainfootsepline,
openright,
]{scrbook}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[ngerman]{babel}
…
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Board Rules
Avoidable Mistakes[/size]
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Controlling hyphenation for words globally?
Hm, I tried to follow your instructions but the result is very weird now. See the attached screenshot. Here is the full header.tex I am using now:
Btw this seems to be caused by using
Code: Select all
\documentclass[
pdftex,
11pt,
a4paper,
pagesize,
%DIVcalc,
BCOR12mm,
smallheadings,
halfparskip,
plainheadsepline,
plainfootsepline,
openright,
]{scrbook}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{url}
\usepackage{fixltx2e}
% Theoreme
\usepackage{amsmath, amsthm, amssymb}
\usepackage{paralist}
%Änderung der Tabulatoren ist möglich. Außerdem können Zeilennummern hinzugefügt werden
\usepackage{moreverb}
%Zum Einbinden von Grafiken
\usepackage{graphicx}
%Source-Code printer for LaTeX:
\usepackage{listings}
\usepackage[square]{natbib}
\usepackage[babel,german=quotes]{csquotes}
\usepackage{color}
\usepackage{textcomp} %Für Sonderzeichen
\usepackage{tabularx}
\usepackage[table]{xcolor}
\usepackage{booktabs}
\usepackage{array}
% --- Kopfzeilen mit Koma ---
% Linien auf alle Seiten oben und unten um Kopf- und Fußzeilen abzutrennen
\usepackage{scrpage2}
\usepackage{microtype} % optischer Randausgleich
% --- Grafiken sofort plazieren ---
\usepackage{float}
%\floatplacement{figure}{H}
% --- mehrere Literaturverzeichnisse ---
\usepackage[resetlabels]{multibib}
\newcites{www}{Internet-Quellen}
% --- pdf and hyperlink support. should be last in package list ---
\usepackage[
bookmarks=true,
bookmarksopenlevel=3,
bookmarksopen=true,
bookmarksnumbered=true,
linkbordercolor={1 1 1},
citebordercolor={1 1 1},
urlbordercolor={1 1 1},
pdfstartview={FitH}
linktocpage=true % fix fuer lange ueberschriften
plainpages=false,% correct hyperlinks
]{hyperref}
%% --- Schusterjungen und Hurenkinder verhindern. Siehe deutsches TeX-FAQ (6.1.3) ---
\widowpenalty = 10000
\clubpenalty = 10000
\displaywidowpenalty = 10000
\raggedbottom
% Definition von Farbwerten
\definecolor{lightgray}{rgb}{0.95,0.95,0.95}
\definecolor{gray}{rgb}{0.90,0.90,0.90}
\definecolor{darkred}{rgb}{0.5,0,0}
\definecolor{darkgreen}{rgb}{0,0.5,0}
\definecolor{darkblue}{rgb}{0,0,0.5}
Code: Select all
\usepackage[T1]{fontenc}
- Attachments
-
- Weird output
- img.png (34.67 KiB) Viewed 16018 times
Controlling hyphenation for words globally?
benowar wrote: Hm I tried setting
but it did not change anything. Maybe some commands I use in my header is not compatible with this command?Code: Select all
\hyphenation{Such-ergeb-nisse}
Keep in mind that ''Such-ergeb-nisse'' will do the job for EXACTLY that word: ''suchergebnisse''. It will not be applied, i.e., for ''suchergebnis'' and similar words. You should specify all forms of word you want hyphenated.