0

I have been searching for an answer for this question for too long now. I have tried different hyphenation commands and packages but they don't seem to work.

My problem is that I am writing my text in finnish and LaTeX generates a lot of hyphens in it. Finnish as a language has many long words so you can imagine what the text would look like at its worst. Is it possible to disable hyphenation and use variable space sizes to pad in the rest of the content automatically? Word seems to be capable of this.

I can somewhat live with the hyphenation, but I can't help but wonder that there should be an easy solution for a problem like this. I am currently using the following packages:

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[finnish]{babel}
\usepackage{array}
\usepackage{hyperref}

EDIT: I will make a clarification: I do not mind if the generated spaces have big differences between them. I just want a way to replace the hyphens with variable space size without making major modification to the text.

  • 1
    welcome to tex.se! in justified text you can minimize it with use of package microtype. other option is use \raggedright command on the beginning of text (then text in not aligned an the right side anymore) – Zarko Feb 10 '18 at 14:04
  • 1
    Can you please add an example of Finnish text with long words? – egreg Feb 10 '18 at 14:06
  • While that removes the hyphens it is not what I am after. I want the text body to "touch" both left and right side so horizontal line length appears to stay the same. That is why I thought of variable space length to make up for the lengthy words. – Nikolas Feb 10 '18 at 14:07
  • 1
    It sounds like you want \sloppy which tells tex to allow a lot more inter-word stretch (and so needs less hyphenation) – David Carlisle Feb 10 '18 at 14:59
  • 1
    Does your topic involve many especially long technical terms? I tried typesetting a few pages from the Finnish Wikipedia on meteorology, and — with microtype — there are few hyphens. How are things done by the better printers in the Finnish typographical tradition? If commercial fonts are an option for you, you may find that typefaces by Finnish designers work especially well for Finnish. – Thérèse Feb 10 '18 at 18:59
1

It's not difficult to avoid hyphenation, if you are willing to accept very lousy typesetting.

In the example I use two column format to emphasize the effect:

\documentclass[12pt,twocolumn]{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[finnish]{babel}

\begin{document}

Helsinki on Suomen pääkaupunki ja Uudenmaan maakuntakeskus.
Se sijaitsee Suomenlahden pohjoisrannalla Uudenmaan maakunnan
keskiosassa. Helsingin naapurikunnat ovat lännessä Espoo,
pohjoisessa Vantaa ja idässä Sipoo. Kaupungissa on 642\,045
asukasta. Helsingin keskustaajama ulottuu usean naapurikunnan
alueelle. Laajemmalla Helsingin seudun metropolialueella on
1\,456\,619 asukasta.

\hyphenpenalty=10000 \spaceskip=0.3em plus 4em minus 0.2em

Helsinki on Suomen pääkaupunki ja Uudenmaan maakuntakeskus.
Se sijaitsee Suomenlahden pohjoisrannalla Uudenmaan maakunnan
keskiosassa. Helsingin naapurikunnat ovat lännessä Espoo,
pohjoisessa Vantaa ja idässä Sipoo. Kaupungissa on 642\,045
asukasta. Helsingin keskustaajama ulottuu usean naapurikunnan
alueelle. Laajemmalla Helsingin seudun metropolialueella on
1\,456\,619 asukasta.

\end{document}

enter image description here

The same in one column format.

enter image description here

I'm not sure why you don't want hyphenation: it has been a common typographic device for centuries.

  • Both of these answers were good. I do not want hyphenation since its absence was the recommendation from my school. It is not mandatory, though. I also think text without hyphenation looks better. – Nikolas Feb 12 '18 at 7:59
1

TeX has many parameters that you can use to control the relative desirability of stretching space and hyphenation. LaTeX has to default configurations, \fussy and \sloppy. It may be that you would be happy with the \sloppy setting which allows more space stretching, but the example below shows two more "even sloppier" settings that increase the penalty for hyphenation.

enter image description here

\documentclass{article}


\def\test{%
It's Supercalifragilisticexpialidocious!
Even though the sound of it
Is something quite atrocious
It's Supercalifragilisticexpialidocious!
Even though the sound of it
Is something quite atrocious
It's Supercalifragilisticexpialidocious!
Even though the sound of it
Is something quite atrocious
It's Supercalifragilisticexpialidocious!
Even though the sound of it
Is something quite atrocious
It's Supercalifragilisticexpialidocious!
Even though the sound of it
Is something quite atrocious
It's Supercalifragilisticexpialidocious!
Even though the sound of it
Is something quite atrocious
It's Supercalifragilisticexpialidocious!
Even though the sound of it
Is something quite atrocious
It's Supercalifragilisticexpialidocious!
Even though the sound of it
Is something quite atrocious
It's Supercalifragilisticexpialidocious!
Even though the sound of it
Is something quite atrocious

}

\begin{document}

{\test}

{\sloppy
\test
}

{\sloppy\hyphenpenalty=1000 \emergencystretch10em
\test}

{\sloppy\hyphenpenalty=10000 \emergencystretch\textwidth
\test}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.