Hi, I uploaded a new version of mkiv (regular zip). - attribute based color support, thanks to peter rolf for extensive testing of metapost related issues (colo-new.* files, original colo-ini still present do deleting the new ones brings you the old mechanism) - intercharacter spacing based on attributes and node processing - pre/post character spacing (for french) using similar mechanism - case changing using attributes and node processing simple test file for spacing and casing: \starttext test: oeps {\setcharacterspacing[frenchpunctuation] x: xx \bfd x: xx} oeps: test test \WORD{test TEST \TeX} test test \word{test TEST \TeX} test test \Word{test TEST \TeX} test {\setcharacterkerning[extrakerning]\input zapf\endgraf } {\setcharacterkerning[extrakerning]bla bla||bla bla effe fietsen} \hbox{\setcharacterkerning[extrakerning]fietsen} \hbox{\setcharacterkerning[extrakerning]fiet\-sen} \hbox{\setcharacterkerning[extrakerning]} \hbox{\setcharacterkerning[extrakerning]f} \hbox{\setcharacterkerning[extrakerning]fi} \stoptext Hans ----------------------------------------------------------------- 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 Fri, 24 Aug 2007, Hans Hagen wrote:
Hi,
I uploaded a new version of mkiv (regular zip).
- attribute based color support, thanks to peter rolf for extensive testing of metapost related issues (colo-new.* files, original colo-ini still present do deleting the new ones brings you the old mechanism)
- intercharacter spacing based on attributes and node processing
- pre/post character spacing (for french) using similar mechanism
- case changing using attributes and node processing
I have not gone through all the details, but with this new feature, is it possible to use - instead of |-| and get normal hypenation for both words? Aditya
Aditya Mahajan wrote:
On Fri, 24 Aug 2007, Hans Hagen wrote:
Hi,
I uploaded a new version of mkiv (regular zip).
- attribute based color support, thanks to peter rolf for extensive testing of metapost related issues (colo-new.* files, original colo-ini still present do deleting the new ones brings you the old mechanism)
- intercharacter spacing based on attributes and node processing
- pre/post character spacing (for french) using similar mechanism
- case changing using attributes and node processing
I have not gone through all the details, but with this new feature, is it possible to use - instead of |-| and get normal hypenation for both words?
hm, not that hard to implement if we can cook up specs, i.e. we have bla-bla bla/bla but also special unicode chars; i can make a feature but you have to locate all unicode slots that needs treatment then Hans ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Am 24.08.2007 um 19:11 schrieb Hans Hagen:
Aditya Mahajan wrote:
I have not gone through all the details, but with this new feature, is it possible to use - instead of |-| and get normal hypenation for both words?
hm, not that hard to implement if we can cook up specs, i.e. we have
bla-bla bla/bla
Does this also cover the following: The Problem of a word with |\-| moving at the and of a line and thus loosing the hyphen (see below). Steffen
Von: Steffen Wolfrum
Datum: 19. März 2007 14:27:53 MEZ An: mailing list for ConTeXt users Betreff: Re: [NTG-context] broken: noligature AND hyphenation Just for the records:
One has to be careful with this kind of avoiding ligatures. In most cases it works perfect, but when the word moves towards the end of the line and should be broken then the hyphen misses!
But I guess there is no solution that fits *both* situations: regularly on a line and cross lines?
Steffen
On Wed, 29 Nov 2006 15:01:14 +0100, Taco Hoekwater wrote:
Hans Hagen wrote:
In TeX (or only LaTeX?) Auf"-lagen or Auf"|lagen would do this. But what is the equivalent in ConTeXt?
\-
To be precise, make that Auf|\-|lagen.
Taco
Steffen Wolfrum wrote:
Am 24.08.2007 um 19:11 schrieb Hans Hagen:
Aditya Mahajan wrote:
I have not gone through all the details, but with this new feature, is it possible to use - instead of |-| and get normal hypenation for both words?
hm, not that hard to implement if we can cook up specs, i.e. we have
bla-bla bla/bla
Does this also cover the following: The Problem of a word with |\-| moving at the and of a line and thus loosing the hyphen (see below).
\- is meant to work that way -) try |-| Hans ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Am 26.08.2007 um 16:01 schrieb Hans Hagen:
Does this also cover the following: The Problem of a word with |\-| moving at the and of a line and thus loosing the hyphen (see below).
\- is meant to work that way -)
try |-|
Hans
That doesn't help here. I meant those trick situations which were discussed in that thread below:
Von: Hans Hagen
Datum: 20. März 2007 07:24:20 MEZ An: mailing list for ConTeXt users Betreff: Re: [NTG-context] broken: noligature AND hyphenation Antwort an: mailing list for ConTeXt users Steffen Wolfrum wrote:
Just for the records:
One has to be careful with this kind of avoiding ligatures. In most cases it works perfect, but when the word moves towards the end of the line and should be broken then the hyphen misses!
But I guess there is no solution that fits *both* situations: regularly on a line and cross lines?
not yet, luatex will be more clever
Hans
Is Mark IV already that clever? Mark II wasn't. Run the following test please. \starttext \showframe \switchtobodyfont[rm,24pt] test test test test test test test test Auflage Auflage% ligature is wrong here test test test test test test test test Auf|\-|lage Auf|\-|lage% no- ligature is right, but missing at the line end test test test test test test test test Auf|-|lage Auf|-|lage% right behaviour at the line end, but a mess otherwise \stoptext What should be done? Steffen
Steffen Wolfrum wrote:
Am 26.08.2007 um 16:01 schrieb Hans Hagen:
Does this also cover the following: The Problem of a word with |\-| moving at the and of a line and thus loosing the hyphen (see below). \- is meant to work that way -)
try |-|
Hans
That doesn't help here. I meant those trick situations which were discussed in that thread below:
that's work in progress... ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Aditya Mahajan wrote:
On Fri, 24 Aug 2007, Hans Hagen wrote:
Hi,
I uploaded a new version of mkiv (regular zip).
- attribute based color support, thanks to peter rolf for extensive testing of metapost related issues (colo-new.* files, original colo-ini still present do deleting the new ones brings you the old mechanism)
- intercharacter spacing based on attributes and node processing
- pre/post character spacing (for french) using similar mechanism
- case changing using attributes and node processing
I have not gone through all the details, but with this new feature, is it possible to use - instead of |-| and get normal hypenation for both words?
i'll send you some code that shows in what direction to think then Hans ----------------------------------------------------------------- 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 Fri, 24 Aug 2007, Hans Hagen wrote:
Aditya Mahajan wrote:
On Fri, 24 Aug 2007, Hans Hagen wrote:
Hi,
I uploaded a new version of mkiv (regular zip).
- attribute based color support, thanks to peter rolf for extensive testing of metapost related issues (colo-new.* files, original colo-ini still present do deleting the new ones brings you the old mechanism)
- intercharacter spacing based on attributes and node processing
- pre/post character spacing (for french) using similar mechanism
- case changing using attributes and node processing
I have not gone through all the details, but with this new feature, is it possible to use - instead of |-| and get normal hypenation for both words?
i'll send you some code that shows in what direction to think then
Thanks. I do not really understand unicode. I will try to figure out which unicode characters need special consideration, and then make up the specs. I would really help if someone who knows about different joining characters in unicode could give a pointer or two. Aditya
Am 2007-08-24 um 20:26 schrieb Aditya Mahajan:
I do not really understand unicode. I will try to figure out which unicode characters need special consideration, and then make up the specs. I would really help if someone who knows about different joining characters in unicode could give a pointer or two.
BTW if you're at it: MkII ConTeXt chokes on decomposed UTF-8 (as used by MacOS X's file system). Is MkIV able to handle that? At the moment I'm not planning to switch - need my old LilyPond module working and simply no time to cope with an "maybe working" installation... Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
Henning Hraban Ramm wrote:
Am 2007-08-24 um 20:26 schrieb Aditya Mahajan:
I do not really understand unicode. I will try to figure out which unicode characters need special consideration, and then make up the specs. I would really help if someone who knows about different joining characters in unicode could give a pointer or two.
BTW if you're at it: MkII ConTeXt chokes on decomposed UTF-8 (as used by MacOS X's file system). Is MkIV able to handle that?
in mkiv i collapse utf sequences Hans ----------------------------------------------------------------- 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 -----------------------------------------------------------------
I do not really understand unicode. I will try to figure out which unicode characters need special consideration, and then make up the specs.
In Unicode the most important dash-or-hyphen-like characters are: U+002D HYPHEN-MINUS (-): The “usual” ASCII character with an ambiguous meaning (hyphen? minus?); U+00AD SOFT HYPHEN (): Indicate a line break opportunity, no visible glyph; U+2010 HYPHEN (‐): Carries the “hyphenation” meaning of hyphen-minus; preferred over the latter to indicate a visible hyphen; U+2011 NON-BREAKING HYPHEN (‑): Well ... a hyphen, but non-breaking; U+2012 FIGURE DASH (‒): Same ambiguous meaning as hyphen-minus, but has the same width as digits; U+2013 EN DASH (–): Used to indicate ranges of values (1910–2007); the equivalent to TeX's “--” ligature; U+2014 EM DASH (—): Used to separate quotes—like this—; the equivalent to TeX's “---” ligature. The above is an extract of the “Dashes and hyphen” paragraph of section 6.2 of the Unicode Standard (http://www.unicode.org/versions/Unicode5.0.0/ch06.pdf). You might also want to look into the Unicode line breaking properties for a complete description (http://www.unicode.org/reports/tr14/). I can summarize that for you if you want. Arthur
On Mon, 27 Aug 2007, Arthur Reutenauer wrote:
I do not really understand unicode. I will try to figure out which unicode characters need special consideration, and then make up the specs.
In Unicode the most important dash-or-hyphen-like characters are:
[snip]
The above is an extract of the “Dashes and hyphen” paragraph of section 6.2 of the Unicode Standard (http://www.unicode.org/versions/Unicode5.0.0/ch06.pdf). You might also want to look into the Unicode line breaking properties for a complete description (http://www.unicode.org/reports/tr14/). I can summarize that for you if you want.
Thank you Arthur. This should be sufficient for the moment. I will ask if I do not understand something. Thanks, Aditya
Hello Hans, On 8/24/07, Hans Hagen wrote:
Hi,
I uploaded a new version of mkiv (regular zip).
Thanks a lot!
- case changing using attributes and node processing
simple test file for spacing and casing:
I'm attaching a not-so-trivial test file for "casing", just to see how well it works for Croatian. A few observations: - LM doesn't have any lj, nj, dz, dž, ... (probably another request for the Polish guys) - It would be great if MK IV did the trasformation from digraphs to normal letters in case those digraphs are not present in the font itself (for ij, lj, nj, dz, dž, ... just as it would be great if ccaron was automatically composed out of c and caron if the letter wasn't present in that font). Visually there is probably no difference in plain text, except in exactly the cases for which you're sending the tests (that's casing and spacing). See http://en.wikipedia.org/wiki/Gaj's_Latin_alphabet how the word "MJENJAČNICA" is split into letters. Normal people still type n+j in text, not the digraph "nj" (nj), but in case you get some text with those digraphs which are valid Unicode letters, it would be nice if they were processed ...
\starttext
test: oeps {\setcharacterspacing[frenchpunctuation] x: xx \bfd x: xx} oeps: test
test \WORD{test TEST \TeX} test
test \word{test TEST \TeX} test
test \Word{test TEST \TeX} test
Another few observations: - \word doesn't work in XeTeX - What exactly is \Words supposed to do (with non-first letters in a word)? - ConTeXt with XeTeX outputs dozens of empty lines to the console. An extra challenge would be to get this work (but unless some Croats ask you for that or unless you have too much time left, don't bother about that - it needs slightly more than only lccode and uccode of a letter since there are three forms: one for lowercase [ljubljana -> lj], one for all-uppercase words [LJUBLJANA -> LJ] and one for the first letter of a word starting with an uppercase [Ljubljana -> Lj]): In Unicode: \word{ljubljana} -> ljubljana \Word{ljubljana} -> Ljubljana \WORD{ljubljana} -> LJUBLJANA \word{Ljubljana} -> ljubljana \Word{Ljubljana} -> Ljubljana \WORD{Ljubljana} -> LJUBLJANA \word{LJUBLJANA} -> ljubljana \Word{LJUBLJANA} -> Ljubljana \WORD{LJUBLJANA} -> LJUBLJANA In Latin transcript (in case you have problems seing some Unicode letters): \word{ljubljana} -> ljubljana \Word{ljubljana} -> Ljubljana \WORD{ljubljana} -> LJUBLJANA \word{Ljubljana} -> ljubljana \Word{Ljubljana} -> Ljubljana \WORD{Ljubljana} -> LJUBLJANA \word{LJUBLJANA} -> ljubljana \Word{LJUBLJANA} -> Ljubljana \WORD{LJUBLJANA} -> LJUBLJANA See also: http://unicode.org/cldr/data/common/collation/hr.xml http://en.wikipedia.org/wiki/Gaj's_Latin_alphabet
{\setcharacterkerning[extrakerning]\input zapf\endgraf }
(That could be "backported" to XeTeX. I think it enables a similar feature now, but I should check.) Mojca
On Fri, 24 Aug 2007, Hans Hagen wrote:
- pre/post character spacing (for french) using similar mechanism
Thank you very much, a feature that I highly appreciate!! Even this works very well (utf-encoding) and could perhaps be added into core-spa.mkiv: \setupcharacterspacing [frenchpunctuation] [\number`«] [right=.250] \setupcharacterspacing [frenchpunctuation] [\number`»] [left=.250] Cheers, Peter -- http://pmrb.free.fr/contact/
Peter Münster wrote:
On Fri, 24 Aug 2007, Hans Hagen wrote:
- pre/post character spacing (for french) using similar mechanism
Thank you very much, a feature that I highly appreciate!!
Even this works very well (utf-encoding) and could perhaps be added into core-spa.mkiv:
\setupcharacterspacing [frenchpunctuation] [\number`«] [right=.250] \setupcharacterspacing [frenchpunctuation] [\number`»] [left=.250]
can you lookup the hex numbers of all those glyphs? (handy as comment) ----------------------------------------------------------------- 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 8/27/07, Hans Hagen wrote:
Peter Münster wrote:
On Fri, 24 Aug 2007, Hans Hagen wrote:
- pre/post character spacing (for french) using similar mechanism
Thank you very much, a feature that I highly appreciate!!
Even this works very well (utf-encoding) and could perhaps be added into core-spa.mkiv:
\setupcharacterspacing [frenchpunctuation] [\number`«] [right=.250] \setupcharacterspacing [frenchpunctuation] [\number`»] [left=.250]
can you lookup the hex numbers of all those glyphs? (handy as comment)
00AB guillemotleft « leftguillemot 00BB guillemotright » rightguillemot Mojca
On Mon, 27 Aug 2007, Hans Hagen wrote:
\setupcharacterspacing [frenchpunctuation] [\number`«] [right=.250] \setupcharacterspacing [frenchpunctuation] [\number`»] [left=.250]
can you lookup the hex numbers of all those glyphs? (handy as comment)
00AB « LEFT-POINTING DOUBLE ANGLE QUOTATION MARK = left guillemet usually opening, sometimes closing 00BB » RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK = right guillemet usually closing, sometimes opening Cheers, Peter -- http://pmrb.free.fr/contact/
Peter Münster wrote:
On Mon, 27 Aug 2007, Hans Hagen wrote:
\setupcharacterspacing [frenchpunctuation] [\number`«] [right=.250] \setupcharacterspacing [frenchpunctuation] [\number`»] [left=.250] can you lookup the hex numbers of all those glyphs? (handy as comment)
From http://www.unicode.org/charts/PDF/U0080.pdf :
00AB « LEFT-POINTING DOUBLE ANGLE QUOTATION MARK = left guillemet usually opening, sometimes closing
00BB » RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK = right guillemet usually closing, sometimes opening
so ... \ctxlua{characters.context.show(\number"00AB)} in the distribution is char-def.lua ... we can extend this tabel with more info if needed ----------------------------------------------------------------- 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 -----------------------------------------------------------------
\setupcharacterspacing [frenchpunctuation] [\number`«] [right=.250] \setupcharacterspacing [frenchpunctuation] [\number`»] [left=.250]
And actually, to be very precise, in French typography the space before the colon is supposed to be the same as the normal space, not a fraction of it like before ; ? ! etc ... :-) Arthur
Arthur Reutenauer wrote:
\setupcharacterspacing [frenchpunctuation] [\number`«] [right=.250] \setupcharacterspacing [frenchpunctuation] [\number`»] [left=.250]
And actually, to be very precise, in French typography the space before the colon is supposed to be the same as the normal space, not a fraction of it like before ; ? ! etc ... :-)
so it's .5 is better then ? (fraction of an em) ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Arthur Reutenauer wrote:
so it's .5 is better then ? (fraction of an em)
I guess so. I wonder, though, if it should not better be defined as fractions of \fontdimen2 (normal space) rather than em's.
i can introduce a unit=enspace|emspace key Hans ----------------------------------------------------------------- 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 (7)
-
Aditya Mahajan
-
Arthur Reutenauer
-
Hans Hagen
-
Henning Hraban Ramm
-
Mojca Miklavec
-
Peter Münster
-
Steffen Wolfrum