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
___________________________________________________________________________________

Reply via email to