ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* What's the proper way to typeset a slash in a text flow?
@ 2010-12-20 23:34 Marco Pessotto
  2010-12-20 23:55 ` Hans Hagen
  2010-12-21  5:43 ` Wolfgang Schuster
  0 siblings, 2 replies; 8+ messages in thread
From: Marco Pessotto @ 2010-12-20 23:34 UTC (permalink / raw)
  To: ntg-context


See the following minimal example (I'm not trying to typeset urls or
filesystem paths in this way, just regular text):

%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\myslash{/\penalty-5000}
\starttext

\type{/}

{\bfd Love/Hate/Play/Love/Hate/Play/Love/Hate/Play/Love/Hate/Play}

\type{\slash}

{\bfd Love\slash Hate\slash Play\slash Love\slash
Hate\slash Play\slash Love\slash Hate\slash Play\slash Love\slash
Hate\slash Play}

\type{\textslash}

{\bfd Love\textslash Hate\textslash Play\textslash Love\textslash
Hate\textslash Play\textslash Love\textslash Hate\textslash
Play\textslash Love\textslash Hate\textslash Play}

\type{\myslash}

{\bfd Love\myslash Hate\myslash Play\myslash Love\myslash Hate\myslash
Play\myslash Love\myslash Hate\myslash Play\myslash Love\myslash
Hate\myslash Play}

\stoptext
%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Neither one of the first three solutions above give me the right thing,
because the line won't break at /. What am I missing?

A workaround seems to be 

 \def\myslash{/\penalty-5000} 

and then using \myslash instead of \slash, but I'm pretty sure I'm not
doing this right.

Thanks in advance

-- 
Marco

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: What's the proper way to typeset a slash in a text flow?
  2010-12-20 23:34 What's the proper way to typeset a slash in a text flow? Marco Pessotto
@ 2010-12-20 23:55 ` Hans Hagen
  2010-12-21  8:31   ` Marco Pessotto
  2010-12-21  5:43 ` Wolfgang Schuster
  1 sibling, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2010-12-20 23:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Marco Pessotto

On 21-12-2010 12:34, Marco Pessotto wrote:
>
> See the following minimal example (I'm not trying to typeset urls or
> filesystem paths in this way, just regular text):
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%
> \def\myslash{/\penalty-5000}
> \starttext
>
> \type{/}
>
> {\bfd Love/Hate/Play/Love/Hate/Play/Love/Hate/Play/Love/Hate/Play}
>
> \type{\slash}
>
> {\bfd Love\slash Hate\slash Play\slash Love\slash
> Hate\slash Play\slash Love\slash Hate\slash Play\slash Love\slash

bla|/|bla

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: What's the proper way to typeset a slash in a text flow?
  2010-12-20 23:34 What's the proper way to typeset a slash in a text flow? Marco Pessotto
  2010-12-20 23:55 ` Hans Hagen
@ 2010-12-21  5:43 ` Wolfgang Schuster
  2010-12-21 12:04   ` Marco Pessotto
  1 sibling, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2010-12-21  5:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 21.12.2010 um 00:34 schrieb Marco Pessotto:

> 
> See the following minimal example (I'm not trying to typeset urls or
> filesystem paths in this way, just regular text):
> 
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%
> \def\myslash{/\penalty-5000}
> \starttext
> 
> \type{/}
> 
> {\bfd Love/Hate/Play/Love/Hate/Play/Love/Hate/Play/Love/Hate/Play}
> 
> \type{\slash}
> 
> {\bfd Love\slash Hate\slash Play\slash Love\slash
> Hate\slash Play\slash Love\slash Hate\slash Play\slash Love\slash
> Hate\slash Play}
> 
> \type{\textslash}
> 
> {\bfd Love\textslash Hate\textslash Play\textslash Love\textslash
> Hate\textslash Play\textslash Love\textslash Hate\textslash
> Play\textslash Love\textslash Hate\textslash Play}
> 
> \type{\myslash}
> 
> {\bfd Love\myslash Hate\myslash Play\myslash Love\myslash Hate\myslash
> Play\myslash Love\myslash Hate\myslash Play\myslash Love\myslash
> Hate\myslash Play}
> 
> \stoptext
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%
> 
> Neither one of the first three solutions above give me the right thing,
> because the line won't break at /. What am I missing?
> 
> A workaround seems to be 
> 
> \def\myslash{/\penalty-5000} 
> 
> and then using \myslash instead of \slash, but I'm pretty sure I'm not
> doing this right.

MkIV: \setbreakpoints[compound]

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: What's the proper way to typeset a slash in a text flow?
  2010-12-20 23:55 ` Hans Hagen
@ 2010-12-21  8:31   ` Marco Pessotto
  0 siblings, 0 replies; 8+ messages in thread
From: Marco Pessotto @ 2010-12-21  8:31 UTC (permalink / raw)
  To: ntg-context

Hans Hagen <pragma@wxs.nl> writes:

> On 21-12-2010 12:34, Marco Pessotto wrote:
>>
>> See the following minimal example (I'm not trying to typeset urls or
>> filesystem paths in this way, just regular text):
>>
>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%
>> \def\myslash{/\penalty-5000}
>> \starttext
>>
>> \type{/}
>>
>> {\bfd Love/Hate/Play/Love/Hate/Play/Love/Hate/Play/Love/Hate/Play}
>>
>> \type{\slash}
>>
>> {\bfd Love\slash Hate\slash Play\slash Love\slash
>> Hate\slash Play\slash Love\slash Hate\slash Play\slash Love\slash
>
> bla|/|bla
>

Thanks!

-- 
Marco

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: What's the proper way to typeset a slash in a text flow?
  2010-12-21  5:43 ` Wolfgang Schuster
@ 2010-12-21 12:04   ` Marco Pessotto
  2010-12-22 11:45     ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Marco Pessotto @ 2010-12-21 12:04 UTC (permalink / raw)
  To: ntg-context

Wolfgang Schuster <schuster.wolfgang@googlemail.com> writes:

> Am 21.12.2010 um 00:34 schrieb Marco Pessotto:
>
>> 
>> See the following minimal example (I'm not trying to typeset urls or
>> filesystem paths in this way, just regular text):
>> 
>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%
>> \def\myslash{/\penalty-5000}
>> \starttext
>> 
>> \type{/}
>> 
>> {\bfd Love/Hate/Play/Love/Hate/Play/Love/Hate/Play/Love/Hate/Play}
>> 
>> \type{\slash}
>> 
>> {\bfd Love\slash Hate\slash Play\slash Love\slash
>> Hate\slash Play\slash Love\slash Hate\slash Play\slash Love\slash
>> Hate\slash Play}
>> 
>> \type{\textslash}
>> 
>> {\bfd Love\textslash Hate\textslash Play\textslash Love\textslash
>> Hate\textslash Play\textslash Love\textslash Hate\textslash
>> Play\textslash Love\textslash Hate\textslash Play}
>> 
>> \type{\myslash}
>> 
>> {\bfd Love\myslash Hate\myslash Play\myslash Love\myslash Hate\myslash
>> Play\myslash Love\myslash Hate\myslash Play\myslash Love\myslash
>> Hate\myslash Play}
>> 
>> \stoptext
>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%
>> 
>> Neither one of the first three solutions above give me the right thing,
>> because the line won't break at /. What am I missing?
>> 
>> A workaround seems to be 
>> 
>> \def\myslash{/\penalty-5000} 
>> 
>> and then using \myslash instead of \slash, but I'm pretty sure I'm not
>> doing this right.
>
> MkIV: \setbreakpoints[compound]
>

Ah, that's odd, because I've already defined that and I didn't realize
it fixed the problem (but I was used to type \slash from LaTeX, breaking
the typesetting). 

This \setbreakpoints looks like a panacea to me (it already fixed the
hyphen issue some weeks ago, but I didn't know it fixed the slash too).

I'm thinking how to make this information more accessible (because from
my point of view hate/love is not a compound word) on the wiki.

I found this in cont-new.mkiv

% potential new defaults: \setbreakpoints[compound]

Is this going to happen or there are serious reasons not to have it as
default?

Thanks again

-- 
Marco

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: What's the proper way to typeset a slash in a text flow?
  2010-12-21 12:04   ` Marco Pessotto
@ 2010-12-22 11:45     ` Hans Hagen
  2010-12-22 12:01       ` Marco Pessotto
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2010-12-22 11:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Marco Pessotto

On 21-12-2010 1:04, Marco Pessotto wrote:

> Is this going to happen or there are serious reasons not to have it as
> default?

The problem with automatisms is that they need a lot of testing and have 
the disadvantage that when one is unaware of it and doesn't want its 
effects it can take ages to conclude that the automatism is doing the 
unexpected thing.

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: What's the proper way to typeset a slash in a text flow?
  2010-12-22 11:45     ` Hans Hagen
@ 2010-12-22 12:01       ` Marco Pessotto
  2010-12-22 13:06         ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Marco Pessotto @ 2010-12-22 12:01 UTC (permalink / raw)
  To: ntg-context

Hans Hagen <pragma@wxs.nl> writes:

> On 21-12-2010 1:04, Marco Pessotto wrote:
>
>> Is this going to happen or there are serious reasons not to have it as
>> default?
>
> The problem with automatisms is that they need a lot of testing and
> have the disadvantage that when one is unaware of it and doesn't want
> its effects it can take ages to conclude that the automatism is doing
> the unexpected thing.
>

Thanks for your answer

I see and understand your point, and you're (obviously) right. 

I've updated this: 

http://wiki.contextgarden.net/Composed_words

\setbreakpoints[compounds] will set as breakpoint "-" "+" "/" "(" and ")" 

Is it correct? (I've looked in the source, but just to be sure).

Bests

-- 
Marco

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: What's the proper way to typeset a slash in a text flow?
  2010-12-22 12:01       ` Marco Pessotto
@ 2010-12-22 13:06         ` Hans Hagen
  0 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2010-12-22 13:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Marco Pessotto

On 22-12-2010 1:01, Marco Pessotto wrote:

> Is it correct? (I've looked in the source, but just to be sure).

yes

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-12-22 13:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-20 23:34 What's the proper way to typeset a slash in a text flow? Marco Pessotto
2010-12-20 23:55 ` Hans Hagen
2010-12-21  8:31   ` Marco Pessotto
2010-12-21  5:43 ` Wolfgang Schuster
2010-12-21 12:04   ` Marco Pessotto
2010-12-22 11:45     ` Hans Hagen
2010-12-22 12:01       ` Marco Pessotto
2010-12-22 13:06         ` Hans Hagen

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).