Re: [NTG-context] \hyphenation problems

2010-03-22 Thread Tom
I am very confused. Inserting 
{\definedfont[Serif sa 8]^^45^^78^^61^^6d^^70^^6c^^65^^21} results in
Example in very large type being placed in my output and seems not to
affect the hyphenation or justification.

Tom Benjey
717-258-9733 voice
717-243-0074 fax
Twitter: @TomBenjey




-Original Message-
From: ntg-context-boun...@ntg.nl [mailto:ntg-context-boun...@ntg.nl] On
Behalf Of Wolfgang Schuster
Sent: Monday, March 22, 2010 1:21 AM
To: mailing list for ConTeXt users
Subject: Re: [NTG-context] \hyphenation problems

Am 22.03.10 02:48, schrieb Tom:
 When I wrap text around the right side of a figure, the justification
along
 the right margin is a bit ragged in a couple of places. One problem is
that
 it can't hyphenate cfbdatawarehouse.com, even when I provide the
hyphenation
 via a \hyphenation command.  The malhyphenation error seems to be caused
by
 the embedded dot.

 Another line ends with last letter of the last word on the line (head)
 extending into the margin. That word cannot be hyphenated. How does on get
 the justification to work correctly in such cases?

\starttext
{\definedfont[Serif sa 8]^^45^^78^^61^^6d^^70^^6c^^65^^21}
\stoptext

Wolfgang


___
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

___


___
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
___


Re: [NTG-context] \hyphenation problems

2010-03-22 Thread Thomas A. Schmitz

On Mar 22, 2010, at 2:01 PM, Tom wrote:

 I am very confused. Inserting 
 {\definedfont[Serif sa 8]^^45^^78^^61^^6d^^70^^6c^^65^^21} results in
 Example in very large type being placed in my output and seems not to
 affect the hyphenation or justification.

I think Wolfgang was trying to steer you to this: 
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl

Thomas
___
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
___


Re: [NTG-context] \hyphenation problems

2010-03-22 Thread Tom
Boy, am I thick. Here is an example that demonstrates the problem. You
should be able to see that cfbdatawarehouse.com did not hyphenate. To get
the malhyphenation error, it is necessary to uncomment the \hyphenation
command. Changing the width of the figure to 2.0 inches will demonstrate
additional ragged right problems. An unrelated issue is that the leading for
the caption is larger than I would like.

\definepapersize[6X9][width=6.14in, height=9.21in]
\setuppapersize[6X9][6X9]

\setuplayout[
 width=middle,
 height=middle,
 backspace=.75 in,
 topspace=.5 in,
 header=.25 in,
 footer=0 in,
 headerdistance=.25 in,
 footerdistance=0 in,
 bottomspace=0.9 in,
 cutspace=.875 in,
]
\setupcaptions[location=bottom,number=no,style=rm,align=middle]

%\hyphenation{cfb-da-ta-ware-house-.-com}

\starttext

\placefigure [left]
 {{\centerline {\switchtobodyfont[9pt] Joel Wheelock in track uniform}} 
  {\centerline {\switchtobodyfont[9pt]{\it Cumberland County Historical}}}
  {\centerline {\switchtobodyfont[9pt]{\it Society, Carlisle, PA
 {\externalfigure[dummy][width=1.8 in]}


On the whole he was a good coach and deserves praise for developing such a
fine squad out of so many raw recruits, for we must remember that only a few
of our last year's Varsity men came back this year. The school's yearbook
recorded 1917 as a 3--4 season but {\it cfbdatawarehouse.com} includes two
more games, a forfeit by Temple and a 73--0 thrashing of Millersburg, giving
Wheelock a 5--4 record for his only year as a head coach.

\stoptext

Tom Benjey
717-258-9733 voice
717-243-0074 fax
Twitter: @TomBenjey




-Original Message-
From: ntg-context-boun...@ntg.nl [mailto:ntg-context-boun...@ntg.nl] On
Behalf Of Thomas A. Schmitz
Sent: Monday, March 22, 2010 9:14 AM
To: mailing list for ConTeXt users
Subject: Re: [NTG-context] \hyphenation problems


On Mar 22, 2010, at 2:01 PM, Tom wrote:

 I am very confused. Inserting 
 {\definedfont[Serif sa 8]^^45^^78^^61^^6d^^70^^6c^^65^^21} results in
 Example in very large type being placed in my output and seems not to
 affect the hyphenation or justification.

I think Wolfgang was trying to steer you to this:
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl

Thomas

___
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

___


___
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
___


Re: [NTG-context] \hyphenation problems

2010-03-22 Thread Thomas A. Schmitz

On Mar 22, 2010, at 3:16 PM, Tom wrote:

 Boy, am I thick. Here is an example that demonstrates the problem. You
 should be able to see that cfbdatawarehouse.com did not hyphenate. To get
 the malhyphenation error, it is necessary to uncomment the \hyphenation
 command. Changing the width of the figure to 2.0 inches will demonstrate
 additional ragged right problems. An unrelated issue is that the leading for
 the caption is larger than I would like.

:-) Not sure if I can solve all your problems, but here are a few pointers:

1. for the url, you could use a command which provides a url that can be 
hyphenated. Surprisingly enough, it is called \hyphenatedurl{}.

2. TeX doesn't hyphenate in certain situations, e.g., when a word is already 
hyphenated (and apparently when it contains a period). In ConTeXt, you can wrap 
these symbols into ||, and TeX will happily hyphenate (see section 7.8 of 
cont-eni). In your case, you can write cfbdatawarehouse|.|com

3. Your caption: well, since you do not apply the bodyfontswitch to all of the 
lines, but to each line individually, you never give ConTeXt a chance to 
calculate the interlinespace. You shouldn't format individual lines, but use 
something like this:

\setupcaptions[style={\switchtobodyfont[9pt]},
   align=center]

However, I was surprised to see that the caption was not centered below the 
image, so I ended up with

\placefigure [left]
{\framed[align=middle,frame=off]{Joel Wheelock in track uniform \\
{\it Cumberland County Historical \\
Society, Carlisle, PA}}}
{\externalfigure[dummy][width=2.2 in]}

This works, but seems like a kludge. Anything better?

4. As for words sticking out in the margin: TeX does its best, but sometimes, 
no good line breaks can be found. A certain word processor will then go on and 
stretch your interword space and even interletter space within words. TeX 
doesn't do that and will let words stick out to warn you. If you don't want to 
/ can't edit the text, you'll have to allow it to be less strict. You should 
read about \setuptolerance in cont-eni, section 4.13.

HTH

Thomas

___
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
___


Re: [NTG-context] \hyphenation problems

2010-03-22 Thread Wolfgang Schuster

Am 22.03.10 16:03, schrieb Thomas A. Schmitz:

4. As for words sticking out in the margin: TeX does its best, but sometimes, 
no good line breaks can be found. A certain word processor will then go on and 
stretch your interword space and even interletter space within words. TeX 
doesn't do that and will let words stick out to warn you. If you don't want to 
/ can't edit the text, you'll have to allow it to be less strict. You should 
read about \setuptolerance in cont-eni, section 4.13.
   

You can tell TeX to stretch the interword space, version 3 introduced
the \emergencystretch comand, you can use it in ConTeXt with

  \setupalign[stretch]

or

  \setuptolerance[horizontal,stretch]

In combination with protrusion and font expansion this prevents nearly
all overfull boxes in the running text (at least for me).

Wolfgang

___
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
___


Re: [NTG-context] \hyphenation problems

2010-03-22 Thread Wolfgang Schuster

Am 22.03.10 16:03, schrieb Thomas A. Schmitz:

3. Your caption: well, since you do not apply the bodyfontswitch to all of the 
lines, but to each line individually, you never give ConTeXt a chance to 
calculate the interlinespace. You shouldn't format individual lines, but use 
something like this:

\setupcaptions[style={\switchtobodyfont[9pt]},
   align=center]

However, I was surprised to see that the caption was not centered below the 
image, so I ended up with

\placefigure [left]
{\framed[align=middle,frame=off]{Joel Wheelock in track uniform \\
{\it Cumberland County Historical \\
Society, Carlisle, PA}}}
{\externalfigure[dummy][width=2.2 in]}

This works, but seems like a kludge. Anything better?
   

\setupcaptions
[number=no,
style={\switchtobodyfont[9pt]\raggedcenter}]

\starttext

\placefigure
[left]
{Joel Wheelock in track uniform\crlf
\it Cumberland County Historical\crlf
Society, Carlisle, PA}
{\externalfigure[dummy][width=1.8in]}

On the whole he was a good coach and deserves praise for developing such a
fine squad out of so many raw recruits, for we must remember that only a few
of our last year's Varsity men came back this year. The school's yearbook
recorded 1917 as a 3–4 season but {\it cfbdatawarehouse.com} includes two
more games, a forfeit by Temple and a 73–0 thrashing of Millersburg, giving
Wheelock a 5–4 record for his only year as a head coach.

\stoptext

Wolfgang

___
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
___


Re: [NTG-context] \hyphenation problems

2010-03-22 Thread Peter Rolf
Am 22.03.2010 15:16, schrieb Tom:
 Boy, am I thick. Here is an example that demonstrates the problem. You
 should be able to see that cfbdatawarehouse.com did not hyphenate. To get
 the malhyphenation error, it is necessary to uncomment the \hyphenation
 command. Changing the width of the figure to 2.0 inches will demonstrate
 additional ragged right problems. An unrelated issue is that the leading for
 the caption is larger than I would like.
 

same topic, different example. look at the attached picture to see how
the original text 'rgb(255,255,255)' was broken. quite funny :)

hyphenation has its limitations. i finally used a simple macro to get
the desired result.

\def\RGB(#1,#2,#3){\bgroup\nohyphens rgb\allowbreak
(#1,\allowbreak#2,\allowbreak#3)\egroup}


best wishes,

Peter

 \definepapersize[6X9][width=6.14in, height=9.21in]
 \setuppapersize[6X9][6X9]
 
 \setuplayout[
  width=middle,
  height=middle,
  backspace=.75 in,
  topspace=.5 in,
  header=.25 in,
  footer=0 in,
  headerdistance=.25 in,
  footerdistance=0 in,
  bottomspace=0.9 in,
  cutspace=.875 in,
 ]
 \setupcaptions[location=bottom,number=no,style=rm,align=middle]
 
 %\hyphenation{cfb-da-ta-ware-house-.-com}
 
 \starttext
 
 \placefigure [left]
  {{\centerline {\switchtobodyfont[9pt] Joel Wheelock in track uniform}} 
   {\centerline {\switchtobodyfont[9pt]{\it Cumberland County Historical}}}
   {\centerline {\switchtobodyfont[9pt]{\it Society, Carlisle, PA
  {\externalfigure[dummy][width=1.8 in]}
 
 
 On the whole he was a good coach and deserves praise for developing such a
 fine squad out of so many raw recruits, for we must remember that only a few
 of our last year's Varsity men came back this year. The school's yearbook
 recorded 1917 as a 3--4 season but {\it cfbdatawarehouse.com} includes two
 more games, a forfeit by Temple and a 73--0 thrashing of Millersburg, giving
 Wheelock a 5--4 record for his only year as a head coach.
 
 \stoptext
 
 Tom Benjey
 717-258-9733 voice
 717-243-0074 fax
 Twitter: @TomBenjey
 
 
 
 
 -Original Message-
 From: ntg-context-boun...@ntg.nl [mailto:ntg-context-boun...@ntg.nl] On
 Behalf Of Thomas A. Schmitz
 Sent: Monday, March 22, 2010 9:14 AM
 To: mailing list for ConTeXt users
 Subject: Re: [NTG-context] \hyphenation problems
 
 
 On Mar 22, 2010, at 2:01 PM, Tom wrote:
 
 I am very confused. Inserting 
 {\definedfont[Serif sa 8]^^45^^78^^61^^6d^^70^^6c^^65^^21} results in
 Example in very large type being placed in my output and seems not to
 affect the hyphenation or justification.
 
 I think Wolfgang was trying to steer you to this:
 http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl
 
 Thomas
 
 ___
 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
 
 ___
 
 
 ___
 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
 ___
 


attachment: linebreak.png___
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
___


Re: [NTG-context] \hyphenation problems

2010-03-22 Thread Tom
As the Pennsylvania Dutch say, Wonderful good. The captions are now fine
except when used in combinations of two images. Then the font and spacing is
the same as for the text. The \setupcaption seems to be ignored for
combinations.

Tom Benjey
717-258-9733 voice
717-243-0074 fax
Twitter: @TomBenjey




-Original Message-
From: ntg-context-boun...@ntg.nl [mailto:ntg-context-boun...@ntg.nl] On
Behalf Of Thomas A. Schmitz
Sent: Monday, March 22, 2010 11:03 AM
To: mailing list for ConTeXt users
Subject: Re: [NTG-context] \hyphenation problems


On Mar 22, 2010, at 3:16 PM, Tom wrote:

 Boy, am I thick. Here is an example that demonstrates the problem. You
 should be able to see that cfbdatawarehouse.com did not hyphenate. To get
 the malhyphenation error, it is necessary to uncomment the \hyphenation
 command. Changing the width of the figure to 2.0 inches will demonstrate
 additional ragged right problems. An unrelated issue is that the leading
for
 the caption is larger than I would like.

:-) Not sure if I can solve all your problems, but here are a few pointers:

1. for the url, you could use a command which provides a url that can be
hyphenated. Surprisingly enough, it is called \hyphenatedurl{}.

2. TeX doesn't hyphenate in certain situations, e.g., when a word is already
hyphenated (and apparently when it contains a period). In ConTeXt, you can
wrap these symbols into ||, and TeX will happily hyphenate (see section 7.8
of cont-eni). In your case, you can write cfbdatawarehouse|.|com

3. Your caption: well, since you do not apply the bodyfontswitch to all of
the lines, but to each line individually, you never give ConTeXt a chance to
calculate the interlinespace. You shouldn't format individual lines, but use
something like this:

\setupcaptions[style={\switchtobodyfont[9pt]},
   align=center]

However, I was surprised to see that the caption was not centered below the
image, so I ended up with

\placefigure [left]
{\framed[align=middle,frame=off]{Joel Wheelock in track uniform \\
{\it Cumberland County Historical \\
Society, Carlisle, PA}}}
{\externalfigure[dummy][width=2.2 in]}

This works, but seems like a kludge. Anything better?

4. As for words sticking out in the margin: TeX does its best, but
sometimes, no good line breaks can be found. A certain word processor will
then go on and stretch your interword space and even interletter space
within words. TeX doesn't do that and will let words stick out to warn you.
If you don't want to / can't edit the text, you'll have to allow it to be
less strict. You should read about \setuptolerance in cont-eni, section
4.13.

HTH

Thomas


___
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

___


___
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
___


[NTG-context] \hyphenation problems

2010-03-21 Thread Tom
When I wrap text around the right side of a figure, the justification along
the right margin is a bit ragged in a couple of places. One problem is that
it can't hyphenate cfbdatawarehouse.com, even when I provide the hyphenation
via a \hyphenation command.  The malhyphenation error seems to be caused by
the embedded dot.

Another line ends with last letter of the last word on the line (head)
extending into the margin. That word cannot be hyphenated. How does on get
the justification to work correctly in such cases?

Tom Benjey
717-258-9733 voice
717-243-0074 fax
Twitter: @TomBenjey





___
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
___


Re: [NTG-context] \hyphenation problems

2010-03-21 Thread Wolfgang Schuster

Am 22.03.10 02:48, schrieb Tom:

When I wrap text around the right side of a figure, the justification along
the right margin is a bit ragged in a couple of places. One problem is that
it can't hyphenate cfbdatawarehouse.com, even when I provide the hyphenation
via a \hyphenation command.  The malhyphenation error seems to be caused by
the embedded dot.

Another line ends with last letter of the last word on the line (head)
extending into the margin. That word cannot be hyphenated. How does on get
the justification to work correctly in such cases?
   

\starttext
{\definedfont[Serif sa 8]^^45^^78^^61^^6d^^70^^6c^^65^^21}
\stoptext

Wolfgang

___
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
___