ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: Otso Helenius <context@pi-xi.net>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Hyphenating compound words in MKIV & microtypographyy
Date: Mon, 23 May 2011 18:27:14 +0200	[thread overview]
Message-ID: <4DDA8AE2.60902@wxs.nl> (raw)
In-Reply-To: <20110523155403.GA13604@innsmouth.lan>

On 23-5-2011 5:54, Otso Helenius wrote:
>> it produces larger files, take more runtime and in most cases does
>> not look better at all; for instance one can argue that protrusion
>> gives more width but at the same time it introduces the boundary
>> condition that some characters have to hang; or take hz (expansion)
>> ... when applied so much that it gets visible, it will also lead to
>> similar shapes in successive lines to look different
>>
>> so, just enabling these features assuming that the output looks
>> better is debatable (sometimes adding or removing a word is more
>> effective)
>
> I agree, in many cases automatic layout of content can look horrific because the algorithms
> aren't able to solve each possible case in a near optimal way (while we as humans are).
> And also, there is no question about it, *every* setting should be possible to turn on and off
> depending on the situation.
>
> Just as with WYSIWYG tools such as InDesign, manual adjustment of layout is needed to achieve
> optimal results. But my actual complaint is this: the example I pasted was a very trivial
> and simple typesetting task. Even the current versions MS Office can automatically achieve
> acceptable paragraph look with the given input. In such case there should not be any need
> to manually adjust spacing and expansion of words nor forcing the column into a ragged one.
>
> The output of this MKIV source:
>
> \mainlanguage[fi]
> \language[fi]
> \definefontfeature[default][default][protrusion=quality, expansion=quality]
> \setupalign[hz, hanging, spacing]
> \starttext
> \startcolumns[n=2]
> \dorecurse{10}{kolmivaihekilowattituntimittari ympäristöliiketoiminta epäjärjestelmällisyydellistyttymättömyydellänsäkään järjestelmällisentelentelemättömyydellänsäkään hääyöaie kolmivaihekilowattituntimittari ympäristöliiketoiminta epäjärjestelmällisyydellistyttymättömyydellänsäkään järjestelmällisentelentelemättömyydellänsäkään hääyöaie}
> \stopcolumns
> \stoptext
>
> can be downloaded here: https://pi-xi.net/share/context_hyphen.pdf
>
> I also wrote a "close as possible" equivalent of the code above in LaTeX and
> compiled it with pdfTeX (TL 2011):
>
> \documentclass[12pt, twocolumn, a4paper, finnish]{article}
> \usepackage[utf8]{inputenc}
> \usepackage[finnish]{babel}
> \usepackage{ae}
> \usepackage[auto=true, spacing=true, kerning=true, tracking=true, protrusion=true, expansion=true]{microtype}
> \usepackage{pgffor}
> \setlength{\parindent}{0mm}
> \newcommand{\Repeat}[2]{\foreach \n in {1,...,#1}{#2}}
> \begin{document}
> \foreach \n in {1,...,10}{kolmivaihekilowattituntimittari ympäristöliiketoiminta epäjärjestelmällisyydellistyttymättömyydellänsäkään järjestelmällisentelentelemättömyydellänsäkään hääyöaie kolmivaihekilowattituntimittari ympäristöliiketoiminta epäjärjestelmällisyydellistyttymättömyydellänsäkään järjestelmällisentelentelemättömyydellänsäkään hääyöaie}
> \end{document}
>
> The LaTeX example can be downloaded here: https://pi-xi.net/share/latex_hyphen.pdf
>
> As can be seen, the neither versions have any specific adjustments done by hand: both
> only have the microtypographic features turned on. There is no comparison, the pdfTeX
> version looks superior: there are no rivers, all lines are justified to equal length,
> and the expansion and spacing are both acceptable.

(1) The 'spacing' options does not work and even gives an error in mkiv) 
so remove that one. What version of context are you running? I've 
already fotgotten about it but I think it was an experimental pdftesx 
feature with side effects. In pdftex hz and protrusion is also somewhat 
tricky as it can bleed from one font instance to another (due to 
traditional tex's internal font sharing), although context takes some 
precautions.

(2) But, more important: add \setuplayout[width=middle] to give context 
a more similar opportunity to produce something acceptable. You're now 
giving context a disadvantage of narrower columns.

(3) You can remove the \language as you already set \mainlanguage.

(4) In context protrusion and expansion is a font property and applying 
it globally to all fonts (with some flag) will not happen. Actually, in 
some situations you need to turn it on explicitly (imaging hanging 
happening when you're doing a table).

I don't know what latex's default layout setup is but if you want to do 
an experiment, you need to make sure that you use the same widths of 
columns.

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


      parent reply	other threads:[~2011-05-23 16:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-23 12:07 Hyphenating compound words in MKIV & microtypography Otso Helenius
2011-05-23 12:40 ` Hans Hagen
     [not found]   ` <20110523155403.GA13604@innsmouth.lan>
2011-05-23 16:27     ` Hans Hagen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DDA8AE2.60902@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=context@pi-xi.net \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).