Re: [NTG-context] Bug: Reloading Font

2013-10-12 Thread Khaled Hosny
On Sat, Oct 12, 2013 at 02:19:16AM +0200, Hans Hagen wrote:
> On 10/12/2013 2:15 AM, Philipp Gesang wrote:
> >·
> >
> >>On 10/12/2013 12:48 AM, Thangalin wrote:
> >>>Hi
> >>>
> (Copperplate is going to be added soon.) Unfortunately, Context
> >>>
> >>>Keep in mind it was only Copperplate 33 BC. Also note that I could not
> >>>find any version of Copperplate 33 BC online that had the same file
> >>>size as my corrupt version. (I was trying to find the source of the
> >>>corrupt copy.)
> >>>
> >>>Most other copies, I'd imagine, are fine, so don't be too quick to 
> >>>blacklist it.
> >>
> >>indeed, and when you don't notice that it's blacklisted, it can happen
> >>that this one instance gets unnoticed
> >>
> does not yet have blacklisting functionality (it’s marked as todo
> in the source) so you’re going to have to filter out bad files
> from your font directories by hand.
> >>>
> >>>Sounds like the real solution is to fix fontforge so that it doesn't hang.
> >>
> >>sure, although a crash has the nice advantage of knowing that a font
> >>(collection) is crap (which i then can blacklist permanently in my mind)
> >
> >Sure, but there’s a difference between a crash and a freeze. The
> >latter can be quite annoying for those who work with strange
> >editors that run TeX somewhere in the background making it
> >impossible to kill the process using Ctrl-C.
> 
> it depends what causes the freeze, for instance if there is a
> circular reference someplace, then that is hard to catch unless one
> uses timeouts which in themselves are tricky (not much different
> from browsers locking up on some javascript); keep in mind that we
> load a whole font, while other applications might do a partial load
> and never see the problematic data (maybe even ignore portions of
> the font)

Which is something we ought to do, serializing the whole font to a lua
table is problematic in many ways (too slow, takes much memory, etc)
while SFNT fonts are designed in such a way that you can go directly to
the part you just want. And FontForge is not that robust (and it is not
a font loading library after all).

I have been dreaming for a while of making an optional font loader for
LuaTeX using mature font libraries, e.g. FreeType for loading fonts,
HarfBuzz for shaping, may be FriBiDi (not a priority, BiDi in Lua is not
hard) and even FontConfig (when available) for searching system fonts.
But no much time unfortunately, and the fear that I wouldn't be able to
use it with ConTeXt is not that motivating. Someone is, however,
experimenting with such a thing:
http://www.readytext.co.uk/?p=3143

Regards,
Khaled
___
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
___

Re: [NTG-context] Bug: Reloading Font

2013-10-12 Thread Khaled Hosny
On Fri, Oct 11, 2013 at 08:05:03PM -0700, Thangalin wrote:
> > In that case I'd run a separate font checker, as you never know what users
> > upload. Similar issues can occur with those tagged formats that are in fact
> > linked lists.
> 
> That's a good idea. The TTX font tool was going to be my first stop.
> 
> http://sourceforge.net/projects/fonttools/

I'd give Google's OTS a try, both Chrome and Firefox use it to sanitize
downloadable webfonts:
https://code.google.com/p/ots/

Regards,
Khaled
___
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
___


Re: [NTG-context] Bug: Reloading Font

2013-10-12 Thread Hans Hagen

On 10/12/2013 9:27 AM, Khaled Hosny wrote:

On Sat, Oct 12, 2013 at 02:19:16AM +0200, Hans Hagen wrote:

On 10/12/2013 2:15 AM, Philipp Gesang wrote:

·


On 10/12/2013 12:48 AM, Thangalin wrote:

Hi


(Copperplate is going to be added soon.) Unfortunately, Context


Keep in mind it was only Copperplate 33 BC. Also note that I could not
find any version of Copperplate 33 BC online that had the same file
size as my corrupt version. (I was trying to find the source of the
corrupt copy.)

Most other copies, I'd imagine, are fine, so don't be too quick to blacklist it.


indeed, and when you don't notice that it's blacklisted, it can happen
that this one instance gets unnoticed


does not yet have blacklisting functionality (it’s marked as todo
in the source) so you’re going to have to filter out bad files

>from your font directories by hand.

Sounds like the real solution is to fix fontforge so that it doesn't hang.


sure, although a crash has the nice advantage of knowing that a font
(collection) is crap (which i then can blacklist permanently in my mind)


Sure, but there’s a difference between a crash and a freeze. The
latter can be quite annoying for those who work with strange
editors that run TeX somewhere in the background making it
impossible to kill the process using Ctrl-C.


it depends what causes the freeze, for instance if there is a
circular reference someplace, then that is hard to catch unless one
uses timeouts which in themselves are tricky (not much different
from browsers locking up on some javascript); keep in mind that we
load a whole font, while other applications might do a partial load
and never see the problematic data (maybe even ignore portions of
the font)


Which is something we ought to do, serializing the whole font to a lua
table is problematic in many ways (too slow, takes much memory, etc)
while SFNT fonts are designed in such a way that you can go directly to
the part you just want. And FontForge is not that robust (and it is not
a font loading library after all).


The whole font is not loaded, unless one does the to_table of the font 
table, but normally it goes stepwise. Also, once the font data is at the 
lua end it's fast and efficient to use it while any interfacing to a 
library will be much slower (crossing the lua-c boundary) and (at least 
for me a no-go given what things i hav ein mind).



I have been dreaming for a while of making an optional font loader for
LuaTeX using mature font libraries, e.g. FreeType for loading fonts,
HarfBuzz for shaping, may be FriBiDi (not a priority, BiDi in Lua is not
hard) and even FontConfig (when available) for searching system fonts.
But no much time unfortunately, and the fear that I wouldn't be able to
use it with ConTeXt is not that motivating. Someone is, however,
experimenting with such a thing:
http://www.readytext.co.uk/?p=3143


Personally I think that this will defeat the purpose we had in mind with 
luatex: small basic tex kernel and everything else in extensible lua, 
not too far off what classical tex had as purpose: long term stability. 
We already have xetex that uses libraries as alternative.
(Although the fact that xetex changed libs is proof that libraries 
introduce a dependency and possible stability factor on the long run.) I 
also think that people who want to use all those libraries are better 
off with other tools than tex. We already have a dependency in xpdf 
which is a moving target too and has seen changes. The fontforge code 
was deliberately included to be independent. Okay, we have a few 
dependencies in luatex, like lfs, png, jpg, xpdf but that's somewhat 
limited. In the end we hope to have the backend at least properly isolated.


One problem of moving to for instance freetype is that we then need to 
get at least the same kind of data structures (ok, one could interface 
compatible using lua, but then I'd end up in a rewrite again, and it 
makes no sense to spend my live rewriting every few years). In the end 
I'd still need to construct and cache lua tables in order to be able to 
do the same (and more). A nice thing about the current fontforge libs 
(which taco wants to isolate as independent lib too) is that we also 
have a open source editor that has a similar structure / view on the 
font. And that was a delibarate choice!


Concerning a shaper, it would demand list deconstruction and 
construction, working within the constaints of the shaper that normally 
operates on different data structures than node lists, where (i guess) 
it becomes pretty hard then to do intermediate steps, mess around a bit, 
bypass etc etc. while in luatex we have a more or less consistent view 
on matters (read: lists). So, in the end one ends up with a patched 
shaper to deal with some matters which then defeats the purpose.  If 
we'd have chose a shaper a few years ago, would we switch now? And in 5 
years? And in 10?


Of course, when we have the swiglib interface ready (sometime next 
year), one can

Re: [NTG-context] Bug: Reloading Font

2013-10-12 Thread Hans Hagen

On 10/12/2013 10:52 AM, Khaled Hosny wrote:

On Fri, Oct 11, 2013 at 08:05:03PM -0700, Thangalin wrote:

In that case I'd run a separate font checker, as you never know what users
upload. Similar issues can occur with those tagged formats that are in fact
linked lists.


That's a good idea. The TTX font tool was going to be my first stop.

http://sourceforge.net/projects/fonttools/


I'd give Google's OTS a try, both Chrome and Firefox use it to sanitize
downloadable webfonts:
https://code.google.com/p/ots/


interesting .. something for luigi to test (swiglib)

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


Re: [NTG-context] Bug: Reloading Font

2013-10-12 Thread luigi scarso
On Sat, Oct 12, 2013 at 11:20 AM, Hans Hagen  wrote:

> On 10/12/2013 10:52 AM, Khaled Hosny wrote:
>
>> On Fri, Oct 11, 2013 at 08:05:03PM -0700, Thangalin wrote:
>>
>>> In that case I'd run a separate font checker, as you never know what
 users
 upload. Similar issues can occur with those tagged formats that are in
 fact
 linked lists.

>>>
>>> That's a good idea. The TTX font tool was going to be my first stop.
>>>
>>> http://sourceforge.net/**projects/fonttools/
>>>
>>
>> I'd give Google's OTS a try, both Chrome and Firefox use it to sanitize
>> downloadable webfonts:
>> https://code.google.com/p/ots/
>>
>
> interesting .. something for luigi to test (swiglib)
>
> https://swiglib.foundry.supelec.fr/
could be  into  the experimental folder

-- 
luigi
___
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
___

Re: [NTG-context] Bug: Reloading Font

2013-10-12 Thread Khaled Hosny
On Sat, Oct 12, 2013 at 11:18:47AM +0200, Hans Hagen wrote:
> On 10/12/2013 9:27 AM, Khaled Hosny wrote:
> >On Sat, Oct 12, 2013 at 02:19:16AM +0200, Hans Hagen wrote:
> >>On 10/12/2013 2:15 AM, Philipp Gesang wrote:
> >>>·
> >>>
> On 10/12/2013 12:48 AM, Thangalin wrote:
> >Hi
> >
> >>(Copperplate is going to be added soon.) Unfortunately, Context
> >
> >Keep in mind it was only Copperplate 33 BC. Also note that I could not
> >find any version of Copperplate 33 BC online that had the same file
> >size as my corrupt version. (I was trying to find the source of the
> >corrupt copy.)
> >
> >Most other copies, I'd imagine, are fine, so don't be too quick to 
> >blacklist it.
> 
> indeed, and when you don't notice that it's blacklisted, it can happen
> that this one instance gets unnoticed
> 
> >>does not yet have blacklisting functionality (it’s marked as todo
> >>in the source) so you’re going to have to filter out bad files
> >>from your font directories by hand.
> >
> >Sounds like the real solution is to fix fontforge so that it doesn't 
> >hang.
> 
> sure, although a crash has the nice advantage of knowing that a font
> (collection) is crap (which i then can blacklist permanently in my mind)
> >>>
> >>>Sure, but there’s a difference between a crash and a freeze. The
> >>>latter can be quite annoying for those who work with strange
> >>>editors that run TeX somewhere in the background making it
> >>>impossible to kill the process using Ctrl-C.
> >>
> >>it depends what causes the freeze, for instance if there is a
> >>circular reference someplace, then that is hard to catch unless one
> >>uses timeouts which in themselves are tricky (not much different
> >>from browsers locking up on some javascript); keep in mind that we
> >>load a whole font, while other applications might do a partial load
> >>and never see the problematic data (maybe even ignore portions of
> >>the font)
> >
> >Which is something we ought to do, serializing the whole font to a lua
> >table is problematic in many ways (too slow, takes much memory, etc)
> >while SFNT fonts are designed in such a way that you can go directly to
> >the part you just want. And FontForge is not that robust (and it is not
> >a font loading library after all).
> 
> The whole font is not loaded, unless one does the to_table of the
> font table, but normally it goes stepwise. Also, once the font data
> is at the lua end it's fast and efficient to use it while any
> interfacing to a library will be much slower (crossing the lua-c
> boundary) and (at least for me a no-go given what things i hav ein
> mind).
> 
> >I have been dreaming for a while of making an optional font loader for
> >LuaTeX using mature font libraries, e.g. FreeType for loading fonts,
> >HarfBuzz for shaping, may be FriBiDi (not a priority, BiDi in Lua is not
> >hard) and even FontConfig (when available) for searching system fonts.
> >But no much time unfortunately, and the fear that I wouldn't be able to
> >use it with ConTeXt is not that motivating. Someone is, however,
> >experimenting with such a thing:
> >http://www.readytext.co.uk/?p=3143
> 
> Personally I think that this will defeat the purpose we had in mind
> with luatex: small basic tex kernel and everything else in
> extensible lua, not too far off what classical tex had as purpose:
> long term stability. We already have xetex that uses libraries as
> alternative.
> (Although the fact that xetex changed libs is proof that libraries
> introduce a dependency and possible stability factor on the long
> run.) I also think that people who want to use all those libraries
> are better off with other tools than tex. We already have a
> dependency in xpdf which is a moving target too and has seen
> changes. The fontforge code was deliberately included to be
> independent. Okay, we have a few dependencies in luatex, like lfs,
> png, jpg, xpdf but that's somewhat limited. In the end we hope to
> have the backend at least properly isolated.

The problem is that OpenType is hard, you already know that. ConTeXt
will never be able to dedicate enough resources to catch up with
development, so it makes much sense to reuse the efforts of other free
software projects. HarfBuzz is used by much more software projects than
what XeTeX was using before (Android, Mozilla, Chrome, LibreOffice,
Pango, EFL, to name few), so it is here to stay. That being said, the
switch in XeTeX did not affect user documents that much (apart from
fixing bugs and supporting more OpenType feature, but so does ConTeXt
all the time). However, I’m not proposing that LuaTeX be dependant on
HarfBuzz or FreeType, but have an optional font loader and shaper that
need not even be managed by LuaTeX team.

Fonts change, font formats evolve, Knuth-style stability is not really
achievable, unless one freezes the source code and the fonts forever,
and you can do this with external librar

[NTG-context] Is there documentation for the memo module?

2013-10-12 Thread Michael Ash
The code is at
http://bay.uchicago.edu/tex-archive/macros/context/contrib/context-letter/tex/context/third/letter/base/t-memo.mkiv

Thank you very much.

Sincerely,
Michael
___
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
___

[NTG-context] bug or needs warning documentation

2013-10-12 Thread d.henman


I found what I consider a bug in startcombination processing.

context version used: version: 2013.09.03 16:23

Examples:  1.) Good compilable source and 2.) source that fails

The bad thing about this is that one, at least checks and checks syntax for 
errors and the error in fact is simply a blank line, which doesn't stand out as 
a syntax error in my mind, expecially when white space is supposed to be 
ignored by tex/context in usual modes. 

Has this been noticed before?

 The below works successfully
\starttext
\placefigure
[here,none]
[fig: reference tag] 
{citation text}
{ \startcombination[1*2]
 {\externalfigure[test-image.png][width=34mm]}{}

 {\externalfigure[test-image.png][width=34mm]}{}
\stopcombination 
}
\stoptext

  The below fails
\starttext
\placefigure
[here,none]
[fig: reference tag] 
{citation text}
{ \startcombination[1*2]
 {\externalfigure[test-image.png][width=34mm]}{}

 {\externalfigure[test-image.png][width=34mm]}{}
\stopcombination 
}
\stoptext
--this failure prints out the following in the log file.
system  > tex > error on line 8 in file /tmp/minexp.mkiv: Missing { 
inserted ...
system  > tex > error on line 1 in file /tmp/minexp.mkiv: You can't use 
` ...
system  > tex > error on line 2 in file /tmp/minexp.mkiv: Undefined 
control sequence ...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

))
! Emergency stop.

system  > tex > error on line 0 in file : Emergency stop ...

% END

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


Re: [NTG-context] Simplefonts

2013-10-12 Thread Zhichu Chen
Hi Wolfgang,

Good to know that, but I might have some questions.


On Fri, Oct 11, 2013 at 2:02 AM, Wolfgang Schuster <
wolfgang.schus...@gmail.com> wrote:

> Hi all,
>
> I’m happy to announce a new version of the simplefonts code. Thew new
> version of the code
> is a complete rewrite and brings many changes.
>
> 1. The module is now part of the core and no external module is needed
> anymore.
>
> 2. The commands to select a font have changed to commands which fit better
> to context normal syntax.
>
> 3. I removed the keys to enable font expansion and protrusion, when you
> need them use \definefontfeature.
>
>
> To use a font with the simplefonts code two ways are available. The first
> method is to create
> one or more typefaces and load it with \setupbodyfont. A complete example
> for this is:
>
> \definefontfamily [mainface] [serif] [DejaVu Serif]
> \definefontfamily [mainface] [sans]  [DejaVu Sans]
> \definefontfamily [mainface] [mono]  [DejaVu Sans Mono] [feature=none]
>
It seems the keyword here is "features"? Only the plural version works here
in my newest beta.

> \definefontfamily [mainface] [math]  [TeX Gyre Pagella Math]
>
> \setupbodyfont[mainface]
>
> \starttext
> \startlines
> \rm DejaVu Serif
> \ss DejaVu Sans
> \tt DejaVu Sans Mono
> \m{c^2 = a^2 + b^2}
> \stoplines
> \stoptext
>
>
> The second method is similar to the old commands of the simplefonts module
> (e.g. \setmainfont)
> where the font is enabled after it was set and no \setupbodyfont is
> necessary. Below is a example
> for this method but I recommend to avoid this method because it’s slow
> when you set font a font
> for each style in your document.
>
> \setupfontfamily [serif] [DejaVu Serif]
> \setupfontfamily [sans]  [DejaVu Sans]
> \setupfontfamily [mono]  [DejaVu Sans Mono] [feature=none]
> \setupfontfamily [math]  [TeX Gyre Pagella Math]
>
> \starttext
> \startlines
> \rm DejaVu Serif
> \ss DejaVu Sans
> \tt DejaVu Sans Mono
> \m{c^2 = a^2 + b^2}
> \stoplines
> \stoptext
>
>
> Another feature of simplefonts is the ability to set a fallback font when
> you need certain glyphs
> from a different font (e.g. for cyrillic ) which aren’t available in the
> mainfont of the document.
> To set such a fallback font the code provides the \definefallbackfamily
> command where you
> can set in the fourth argument the range for the replacement characters.
>
> \definefallbackfamily [mainface] [serif] [DejaVu Serif]
> [range=cyrillic,force=yes]
>
What if I want to use the CJK font? The code in  "font-sel.mkvi" hints I
could use range=chinese but it didn't work. I have to use interval
{0x00400-0x2FA1F} explicitly.

And how can I assign the boldfont, italicfont and bolditalicfont? I'm
currently using the Adobe Song Std as the regular font but it didn't come
with a bold version or else, hence I might need this feature.

> \definefontfamily [mainface] [serif] [TeX Gyre Pagella]
>
> \setupbodyfont[mainface]
>
> \starttext
>
> \input knuth
>
> Традиционная систематика лишайников оказывается во многом условна и
>
> \stoptext
>
>
> 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
>
> ___




-- 
Best Regards
Chen
___
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
___

[NTG-context] context mkiv output options

2013-10-12 Thread hwitloc


Can  MKIV ConTeXt output image files.  I need to create an image file from a 
document and would prefer use Context to output it directly if possible and not 
have to convert a pdf file to an image file such as png or tiff. 

Is there a command line option for this.  I looked at the outpuf from   $ 
context --help   , but cold find no answer there.  It did not even mention the  
--pdf option, which does exist.

Thanks
___
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
___


Re: [NTG-context] graphictext bug?

2013-10-12 Thread Thangalin
Hi,

> it works with pstoedit 3.62 and ghostscript 9.06 on linux 64 bit
> and windows.

I have Ubuntu 12.04.3 LTS. The 3.62 and 9.06 versions are only
available through the standard release (13.x). I've read that 13.x has
issues with Nvidia cards, so upgrading is not an option at this time.

Installing from source is also not really a viable option.

I am wary of downloading the RPM or DEB files to perform an upgrade.
The PPA does not seem to have a suitable version for this release of
Ubuntu.

Any other options?

The log does not contain any error messages. See attached.

Kindest regards.


t.log
Description: Binary data


error.log
Description: Binary data
___
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
___

Re: [NTG-context] Simplefonts

2013-10-12 Thread Wolfgang Schuster

Am 12.10.2013 um 15:04 schrieb Zhichu Chen :

> Hi Wolfgang,
> 
> Good to know that, but I might have some questions.
> 
> 
> On Fri, Oct 11, 2013 at 2:02 AM, Wolfgang Schuster 
>  wrote:
> Hi all,
> 
> I’m happy to announce a new version of the simplefonts code. Thew new version 
> of the code
> is a complete rewrite and brings many changes.
> 
> 1. The module is now part of the core and no external module is needed 
> anymore.
> 
> 2. The commands to select a font have changed to commands which fit better to 
> context normal syntax.
> 
> 3. I removed the keys to enable font expansion and protrusion, when you need 
> them use \definefontfeature.
> 
> 
> To use a font with the simplefonts code two ways are available. The first 
> method is to create
> one or more typefaces and load it with \setupbodyfont. A complete example for 
> this is:
> 
> \definefontfamily [mainface] [serif] [DejaVu Serif]
> \definefontfamily [mainface] [sans]  [DejaVu Sans]
> \definefontfamily [mainface] [mono]  [DejaVu Sans Mono] [feature=none]
> It seems the keyword here is "features"? Only the plural version works here 
> in my newest beta. 

Yes, the name of the key is “features”, the missing “s” was a typo.

> \definefontfamily [mainface] [math]  [TeX Gyre Pagella Math]
> 
> \setupbodyfont[mainface]
> 
> \starttext
> \startlines
> \rm DejaVu Serif
> \ss DejaVu Sans
> \tt DejaVu Sans Mono
> \m{c^2 = a^2 + b^2}
> \stoplines
> \stoptext
> 
> 
> The second method is similar to the old commands of the simplefonts module 
> (e.g. \setmainfont)
> where the font is enabled after it was set and no \setupbodyfont is 
> necessary. Below is a example
> for this method but I recommend to avoid this method because it’s slow when 
> you set font a font
> for each style in your document.
> 
> \setupfontfamily [serif] [DejaVu Serif]
> \setupfontfamily [sans]  [DejaVu Sans]
> \setupfontfamily [mono]  [DejaVu Sans Mono] [feature=none]
> \setupfontfamily [math]  [TeX Gyre Pagella Math]
> 
> \starttext
> \startlines
> \rm DejaVu Serif
> \ss DejaVu Sans
> \tt DejaVu Sans Mono
> \m{c^2 = a^2 + b^2}
> \stoplines
> \stoptext
> 
> 
> Another feature of simplefonts is the ability to set a fallback font when you 
> need certain glyphs
> from a different font (e.g. for cyrillic ) which aren’t available in the 
> mainfont of the document.
> To set such a fallback font the code provides the \definefallbackfamily 
> command where you
> can set in the fourth argument the range for the replacement characters.
> 
> \definefallbackfamily [mainface] [serif] [DejaVu Serif] 
> [range=cyrillic,force=yes]
> What if I want to use the CJK font? The code in  "font-sel.mkvi" hints I 
> could use range=chinese but it didn't work. I have to use interval 
> {0x00400-0x2FA1F} explicitly.

When you take a look into char-def.lua you can see names certain character 
ranges and “range=cyrillic”
used such a name.

For a chinese font you need 
“range={cjkunifiedideographs,cjkunifiedideographsextensiona,…}".
Because the list with names is very long you do this setup only once with the 
\definefontfamilypreset
command, e.g.

  
\definefontfamilypreset[chinese][range={cjkunifiedideographs,cjkunifiedideographsextensiona,…}]

and load this setup when you set the font with \definefontfamilyfallback, e.g.

  \definefontfamilyfallback[][

Re: [NTG-context] graphictext bug?

2013-10-12 Thread Marco Patzer
On 2013–10–12 Thangalin wrote:

> The log does not contain any error messages. See attached.

I didn't test it, but I vaguely have in mind that pstoedit errors do
not end up in the log file, only on the console.

Marco


signature.asc
Description: Digital signature
___
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
___

Re: [NTG-context] graphictext bug?

2013-10-12 Thread Thangalin
The error log was created using:

context t.tex > error.log 2>&1

Kindest regards.

On Sat, Oct 12, 2013 at 10:52 AM, Marco Patzer  wrote:
> On 2013–10–12 Thangalin wrote:
>
>> The log does not contain any error messages. See attached.
>
> I didn't test it, but I vaguely have in mind that pstoedit errors do
> not end up in the log file, only on the console.
>
> 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
> ___
___
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
___

Re: [NTG-context] context mkiv output options

2013-10-12 Thread Hans Hagen

On 10/12/2013 5:12 PM, hwit...@gmail.com wrote:



Can  MKIV ConTeXt output image files.  I need to create an image file from a 
document and would prefer use Context to output it directly if possible and not 
have to convert a pdf file to an image file such as png or tiff.


no


Is there a command line option for this.  I looked at the outpuf from   $ 
context --help   , but cold find no answer there.  It did not even mention the  
--pdf option, which does exist.


there's only pdf (currently)

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


Re: [NTG-context] Bug: Reloading Font

2013-10-12 Thread Hans Hagen

On 10/12/2013 12:19 PM, Khaled Hosny wrote:


The problem is that OpenType is hard, you already know that. ConTeXt
will never be able to dedicate enough resources to catch up with
development, so it makes much sense to reuse the efforts of other free
software projects. HarfBuzz is used by much more software projects than
what XeTeX was using before (Android, Mozilla, Chrome, LibreOffice,
Pango, EFL, to name few), so it is here to stay. That being said, the


I bet that previous libs and whatever also have that impression .. well, 
in the end I think that open type will fade away too into something else 
as its design is sort of a compromise. The dev cycles get smaller each 
year, the claims for 'being the final solution' get more, who can 
predict ...



switch in XeTeX did not affect user documents that much (apart from
fixing bugs and supporting more OpenType feature, but so does ConTeXt
all the time). However, I’m not proposing that LuaTeX be dependant on
HarfBuzz or FreeType, but have an optional font loader and shaper that
need not even be managed by LuaTeX team.


once we have a more or less standardized lib loader (the swiglib 
project) one can use such libraries, i.e. there is no need to have 
something more in the luatex core; after all, it all boils down to 
passing info around; anything hard plugged into to core (even options) 
will be hard to fight if one wants something else


at that point i can look into for instance freetype and see if a better 
loader can be made, who knows ... for me loading and shaping are 
different things



Fonts change, font formats evolve, Knuth-style stability is not really
achievable, unless one freezes the source code and the fonts forever,
and you can do this with external libraries, too; TeX Live is
self-contained, just take a snapshot and freeze it forever, and it
should be buildable as long as there are C(++) compilers.


well, practice ... one also needs to freeze the operating system then

but I'm not claiming that long term stability; there was a time that tex 
was a big system, but nowadays the tds tree is relatively small; unless 
something magic happens, i think that at some point the complexity of 
all these big things will explode (one can according to the evangelists 
get a ruby on rails app up and running in minutes ... but try to update 
one a few years later) ... with respect to tex: the source tree/build is 
not trivial (how many folks know all ins-and-outs?) and it makes me 
already feel quite dependent .. it's the instability of the whole eco 
system that bothers me


well, the formats don't evolve that much, at least not with respect to 
what we need in tex ... most features are rather generic, but tex user 
demands evolve and those will always influence matters; also, in the 
(context) machinery at some point i want to play with other approaches 
and then the only thing that matters is having data available (we 
already have some par optimizing code in place for instance)


(i'm more worried about inconsistencies and a mess in fonts than in the 
opentype standard ... many characters / scripts / languages have well 
properties, so in fact designers could do with predefined sets of 
features and rules ... sort of the reverse of making shapes and then the 
features: instead of for each font reinventing the wheel, choose a set 
of logic, make shapes etc ... positioning is probably most of the issue 
then; but that's another disucssion)



There are already few parts of OpenType that I’m not able to use in my
fonts for years because they break the fonts with LuaTeX horribly. I
understand the priorities of the team, that is why I think that
offloading font support is beneficial to everyone.


break in what sense? what features (just curious) ... anyway, there's 
always xetex as alternative -)


(unless you're referring to wanting to use the microsoft word math 
renderer trickery -)



One problem of moving to for instance freetype is that we then need
to get at least the same kind of data structures (ok, one could
interface compatible using lua, but then I'd end up in a rewrite
again, and it makes no sense to spend my live rewriting every few
years).


I think that is small price to pay for the gains of not having to worry
about every minute detail of OpenType support. Besides doing the
shaping with HarfBuzz means that many of the structures exposed by the
current font loader will not be even needed, which simplifies things
greatly.


it all depends on what one wants to do with fonts, what one wants to 
control, etc but as said, at some point one can consider (either or not 
as alternative to a lua based variant) to push node list data (in an 
already existing callback) to a library and get something back .. of 
course one then also need to take care of possible interferences 
(assuming that the backend can load the relevant graphic data from the 
font)



In the end I'd still need to construct and cache lua tables
in order to be able to do the sa

[NTG-context] XML export and font switches

2013-10-12 Thread Marco Patzer
Hi,

certain font switches fail when XML export is used. Example:

\setupbackend [export=foo.xml]

\definehighlight
  [emph]
  [style=\ita] %% \bfa works

\starttext
  \ita Foobar%% works
  Foo \emph{Bar} %% fails
\stoptext

LuaTeX error [string "\directlua "]:1: invalid escape sequence near '"'.

Marco


signature.asc
Description: Digital signature
___
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
___

Re: [NTG-context] bug or needs warning documentation

2013-10-12 Thread Marco Patzer
On 2013–10–12 d.henman wrote:

> I found what I consider a bug in startcombination processing.
> 
> […]
> 
>   The below fails
> \starttext
> \placefigure
> [here,none]
> [fig: reference tag] 
> {citation text}
> { \startcombination[1*2]
>{\externalfigure[test-image.png][width=34mm]}{}
> 
>{\externalfigure[test-image.png][width=34mm]}{}
> \stopcombination 
> }
> \stoptext

\unprotect

\def\pack_combinations_pickup
  {\dostarttagged\t!combinationpair\empty
   \dostarttagged\t!combinationcontent\empty
   \dogotopar\pack_combinations_pickup_content_indeed}

\def\pack_combinations_pickup_content_indeed
   {\dowithnextboxcs\pack_combinations_pickup_content\hbox}

\setvalue{\??combinationalternative\v!text}%
  {\dogotopar\pack_combinations_alternative_text_indeed}

\setvalue{\??combinationalternative\v!label}%
  {\dogotopar\pack_combinations_alternative_label_indeed}

\def\pack_combinations_alternative_text_indeed
  {\dowithnextboxcs\pack_combinations_pickup_caption\vtop\bgroup
 \afterassignment\pack_combinations_caption_first
 \let\nexttoken=}

\def\pack_combinations_alternative_label_indeed
  {\dowithnextboxcs\pack_combinations_pickup_caption\vtop\bgroup
 \hsize\wd\b_pack_combinations_content
 \ifx\p_align\empty\else\setupalign[\p_align]\fi
 \usecombinationstyleandcolor\c!style\c!color
 \begstrut
   
\normalexpanded{\strc_labels_command{\v!combination\ifx\currentcombination\empty\else:\currentcombination\fi}}%
 \endstrut
   \egroup}

\protect

\starttext

  \startcombination

{alpha}{foo}

{beta}{bar}

  \stopcombination

  \startcombination

\startcontent
  alpha
\stopcontent

\startcaption
  foo
\stopcaption

\startcontent
  beta
\stopcontent

\startcaption
  bar
\stopcaption

  \stopcombination

\stoptext

Marco


signature.asc
Description: Digital signature
___
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
___

[NTG-context] open quotation not working

2013-10-12 Thread Ciro A. Soto
When I use `` to open a quotation,  I don't get the character for open
quotation, instead, I get the two single quotation character. (The closing
quotation works fine)
Is there any command to fix this? (the problem occurs in english or spanish)
thank you

ciro


Books you should read:

[image: Lead, Follow & Suceed]   [image:
The Guitar Maker]   [image: La Vida, El
Amor, La Mujer] 
My social profile: [image:
Facebook] [image:
Twitter] 
___
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
___

Re: [NTG-context] open quotation not working

2013-10-12 Thread Ciro A. Soto
sorry, I just saw an old chain of messages about this question... I fixed
it with the translation module.
\usemodule[translate]
\translateinput[``][“]
\enableinputtranslation

thank you
Ciro


ciro


Books you should read:

[image: Lead, Follow & Suceed]   [image:
The Guitar Maker]   [image: La Vida, El
Amor, La Mujer] 
My social profile: [image:
Facebook] [image:
Twitter] 


On Sat, Oct 12, 2013 at 11:07 PM, Ciro A. Soto  wrote:

> When I use `` to open a quotation,  I don't get the character for open
> quotation, instead, I get the two single quotation character. (The closing
> quotation works fine)
> Is there any command to fix this? (the problem occurs in english or
> spanish)
> thank you
>
> ciro
>
>
> Books you should read:
>
> [image: Lead, Follow & Suceed]   [image:
> The Guitar Maker]   [image: La Vida, El
> Amor, La Mujer] 
> My social profile: [image: 
> Facebook] [image:
> Twitter] 
>
___
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
___