For typographical fine-tuning one needs often non-breaking spaces. But not only full spaces, but half spaces, or even less. I have this example: and\hskip1pt/or But \hskip1pt is not non-breaking, like "\," (half space) is. How to make it non-breaking? Or are there predfined ones, analog to \, ? Huseyin
On 4/17/2013 9:08 AM, "H. Özoguz" wrote:
For typographical fine-tuning one needs often non-breaking spaces. But not only full spaces, but half spaces, or even less. I have this example:
and\hskip1pt/or
But \hskip1pt is not non-breaking, like "\," (half space) is. How to make it non-breaking? Or are there predfined ones, analog to \, ?
\nobreakspace \ideographicspace \ideographichalffillspace \twoperemspace \threeperemspace \fourperemspace \sixperemspace \figurespace \punctuationspace \breakablethinspace \hairspace \zerowidthspace \zwnj \zwj \narrownobreakspace or just their utf representation ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Hi Hans,
These commands are good to know!
On Wed, 17 Apr 2013 07:16:41 -0600, Hans Hagen
\narrownobreakspace
If a font does not have U+202F defined, what's the best way to redefine this to, say, one half of the current font's regular space U+0020 (with no shrinking or stretching of course). Best wishes Idris -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523
On 4/17/2013 3:30 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
Hi Hans,
These commands are good to know!
On Wed, 17 Apr 2013 07:16:41 -0600, Hans Hagen
wrote: \narrownobreakspace
If a font does not have U+202F defined, what's the best way to redefine this to, say, one half of the current font's regular space U+0020 (with no shrinking or stretching of course).
it has nothing to do with fonts ... they are not characters bound to glyphs .. independent so to say ... dealt with at another level 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 -----------------------------------------------------------------
On Wed, 17 Apr 2013 07:56:41 -0600, Hans Hagen
On 4/17/2013 3:30 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
Hi Hans,
These commands are good to know!
On Wed, 17 Apr 2013 07:16:41 -0600, Hans Hagen
wrote: \narrownobreakspace
If a font does not have U+202F defined, what's the best way to redefine this to, say, one half of the current font's regular space U+0020 (with no shrinking or stretching of course).
it has nothing to do with fonts ... they are not characters bound to glyphs .. independent so to say ... dealt with at another level
In spac-chr.mkiv there is Line 73: \edef\narrownobreakspace {\normalUchar"202F} So in the preamble we have to do something like (spac-hor.mkiv, line 905) \edef\narrownobreakspace{\penalty\plustenthousand\kern .7ex} Then I can say, e.g. \defineactivecharater + {\narrownobreakspace} و+الباب (untested, but on my list) But per the current definition I should be able to define U+"202F as, e.g., .7ex in the font and get the same effect, right? Best wishes Idris -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523
On 4/17/2013 4:30 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
On Wed, 17 Apr 2013 07:56:41 -0600, Hans Hagen
wrote: On 4/17/2013 3:30 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
Hi Hans,
These commands are good to know!
On Wed, 17 Apr 2013 07:16:41 -0600, Hans Hagen
wrote: \narrownobreakspace
If a font does not have U+202F defined, what's the best way to redefine this to, say, one half of the current font's regular space U+0020 (with no shrinking or stretching of course).
it has nothing to do with fonts ... they are not characters bound to glyphs .. independent so to say ... dealt with at another level
In spac-chr.mkiv there is
Line 73: \edef\narrownobreakspace {\normalUchar"202F}
So in the preamble we have to do something like (spac-hor.mkiv, line 905)
\edef\narrownobreakspace{\penalty\plustenthousand\kern .7ex}
why redefine it? just keep it as is ... such an utf char automagically in mkiv becomes a combination of kern / skip / penalty ... if you start redefining yourself it also gets out of control when it's passed around don't worry about how that happens (just assume the abstraction is taken care of)
Then I can say, e.g.
\defineactivecharater + {\narrownobreakspace}
و+الباب
(untested, but on my list)
But per the current definition I should be able to define U+"202F as, e.g., .7ex in the font and get the same effect, right?
why make a character active and let it expand to itself as letter? normally the font handler never sees that character as there is no character -> glyph issue involved just insert the utf character as-is 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 -----------------------------------------------------------------
On Wed, 17 Apr 2013 08:51:37 -0600, Hans Hagen
\defineactivecharater + {\narrownobreakspace}
و+الباب
(untested, but on my list)
But per the current definition I should be able to define U+"202F as, e.g., .7ex in the font and get the same effect, right?
why make a character active and let it expand to itself as letter?
normally the font handler never sees that character as there is no character -> glyph issue involved
just insert the utf character as-is
Sure, but two motivations: 1) In fine Arabic typesetting this can occur literally dozens of times a page, so I need something visible/convenient analogous to tilda/~ (which -- I am ashamed to say -- I still use in mkiv) 2) I can't currently "see" "202F in my editor (notepad++) and the current syntax-highlighting features don't display it automatically. (Eventually I have to port the ConTeXt support package for Npp to a lexer/plugin where I can define these things explicitly, but first I need someone who knows that lexer stuff to help...) Best wishes Idris -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523
On 4/17/2013 5:28 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
(Eventually I have to port the ConTeXt support package for Npp to a lexer/plugin where I can define these things explicitly, but first I need someone who knows that lexer stuff to help...)
it would be nice if there was a (say special dejavu mono) that has visual appearances for such characters anyway .. my scite lexer visualizes the spacers ----------------------------------------------------------------- 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 -----------------------------------------------------------------
[no cc]
On Wed, 17 Apr 2013 09:35:43 -0600, Hans Hagen
On 4/17/2013 5:28 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
(Eventually I have to port the ConTeXt support package for Npp to a lexer/plugin where I can define these things explicitly, but first I need someone who knows that lexer stuff to help...)
it would be nice if there was a (say special dejavu mono) that has visual appearances for such characters
anyway .. my scite lexer visualizes the spacers
My Npp is from a year ago. I just checked and http://www.notepad-plus-plus.org/news/notepad-6.2-release-udl2.html http://udl20.weebly.com/operators.html So I'll update after the work week is over and see if this new framework can accommodate the spacers etc. Then I'll prepare a new ConTeXt support package for npp. Best wishes Idris -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523
Hi,
On Wed, 17 Apr 2013 01:08:30 -0600, H. Özoguz
How to make it non-breaking?
See also my reply to Hans, basically you need a \penalty10000 (See TeXBook, page 353, 110) Best wishes Idris -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523
participants (3)
-
"H. Özoguz"
-
Hans Hagen
-
Idris Samawi Hamid ادريس سماوي حامد