Re: [NTG-context] Type-setting filenames
I am using \filename to type-set filenames. Some of these are very long (greater than 30 characters) and overhang the right hand margin, sometimes even disappearing off the edge of the page. The first line break is just before the full stop. There are usually plenty of spaces in the names. Can I get ConTeXt to put a line-break into filenames?
Did you try \hyphenatedfilename ?
Yes, I tried that, no difference. I presume that \hyphenatedfilename is for use with filenames that already have hyphens in them? Mine don't, but I want them to split. Perhaps splitting filenames is frowned upon - if so, what is the best way to put them into documents? Or perhaps I should use shorter filenames, but why should I compromise readability? One example is "Transfer functions for PID and KF controllers.xmcd" Any ideas or comments? Richard
richard.stephens@converteam.com wrote:
I am using \filename to type-set filenames. Some of these are very long (greater than 30 characters) and overhang the right hand margin, sometimes even disappearing off the edge of the page. The first line break is just before the full stop. There are usually plenty of spaces in the names. Can I get ConTeXt to put a line-break into filenames? Did you try \hyphenatedfilename ?
Yes, I tried that, no difference. I presume that \hyphenatedfilename is for use with filenames that already have hyphens in them? Mine don't, but I want them to split. Perhaps splitting filenames is frowned upon - if so, what is the best way to put them into documents? Or perhaps I should use shorter filenames, but why should I compromise readability? One example is "Transfer functions for PID and KF controllers.xmcd"
Any ideas or comments? \def\myfilename#1{{\spaceskip.25em plus 1em\relax\tttf\normallanguage\zerocount#1}}
\myfilename{Transfer functions for PID and KF controllers.xmcd} \myfilename{Transfer functions for PID and KF controllers.xmcd} \myfilename{Transfer functions for PID and KF controllers.xmcd} \myfilename{Transfer functions for PID and KF controllers.xmcd} ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Thu, Sep 18, 2008 at 11:09 AM, Hans Hagen
richard.stephens@converteam.com wrote:
I am using \filename to type-set filenames. Some of these are very long (greater than 30 characters) and overhang the right hand margin, sometimes even disappearing off the edge of the page. The first line break is just before the full stop. There are usually plenty of spaces in the names. Can I get ConTeXt to put a line-break into filenames? Did you try \hyphenatedfilename ?
Yes, I tried that, no difference. I presume that \hyphenatedfilename is for use with filenames that already have hyphens in them? Mine don't, but I want them to split. Perhaps splitting filenames is frowned upon - if so, what is the best way to put them into documents? Or perhaps I should use shorter filenames, but why should I compromise readability? One example is "Transfer functions for PID and KF controllers.xmcd"
Any ideas or comments? \def\myfilename#1{{\spaceskip.25em plus 1em\relax\tttf\normallanguage\zerocount#1}}
\myfilename{Transfer functions for PID and KF controllers.xmcd} \myfilename{Transfer functions for PID and KF controllers.xmcd} \myfilename{Transfer functions for PID and KF controllers.xmcd} \myfilename{Transfer functions for PID and KF controllers.xmcd}
Why do you use the language trick and not just \nohyphens? Wolfgang
Wolfgang Schuster wrote:
On Thu, Sep 18, 2008 at 11:09 AM, Hans Hagen
wrote: richard.stephens@converteam.com wrote:
I am using \filename to type-set filenames. Some of these are very long (greater than 30 characters) and overhang the right hand margin, sometimes even disappearing off the edge of the page. The first line break is just before the full stop. There are usually plenty of spaces in the names. Can I get ConTeXt to put a line-break into filenames? Did you try \hyphenatedfilename ? Yes, I tried that, no difference. I presume that \hyphenatedfilename is for use with filenames that already have hyphens in them? Mine don't, but I want them to split. Perhaps splitting filenames is frowned upon - if so, what is the best way to put them into documents? Or perhaps I should use shorter filenames, but why should I compromise readability? One example is "Transfer functions for PID and KF controllers.xmcd"
Any ideas or comments? \def\myfilename#1{{\spaceskip.25em plus 1em\relax\tttf\normallanguage\zerocount#1}}
\myfilename{Transfer functions for PID and KF controllers.xmcd} \myfilename{Transfer functions for PID and KF controllers.xmcd} \myfilename{Transfer functions for PID and KF controllers.xmcd} \myfilename{Transfer functions for PID and KF controllers.xmcd}
Why do you use the language trick and not just \nohyphens?
because of a bug in luatex -) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
richard.stephens@converteam.com
-
Wolfgang Schuster