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

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