Re: [NTG-context] The requested font has no files for the 'tf' alternative

2017-03-14 Thread Marco Patzer
On Tue, 14 Mar 2017 21:39:34 +0100
Wolfgang Schuster  wrote:

> [...]

Thanks for the explanation, Wolfgang.

> Each font of your collection has its individual name, e.g. the
> regular style has the name “Caecilia LT Std Roman” but all styles use
> the same name for the family (i.e. “Caecilia LT Std”) which is used
> by \definefontfamily.

That makes sense.

> When you now used a individual name instead of the family name for 
> \definefontfamily you should get a message in log for the correct
> name, e.g. the following example
> 
>  \definefontfamily[mainface][rm][TeX Gyre Pagella Regular]
> 
>  \setupbodyfont[mainface]
> 
>  \starttext
>  Font test!
>  \stoptext
> 
> shows this in the log
> 
>  selectfont > The name 'texgyrepagellaregular' is not a proper 
> family name, use 'texgyrepagella' instead.
>  selectfont > The requested font 'TeX Gyre Pagella Regular' has
> no files for the 'tf' alternative, Latin Modern is used instead.
> 
> which tells you to use “texgyrepagella” for the \definefontfamily
> command.

Your example works for me. But it's still unclear what I'm doing
wrong. According to your explanation this should work:

  \definefontfamily
[mainface]
[rm]
[Caecilia LT Std]
[tf=Caecilia LT Std Roman]

However, it shows:

  selectfont > The requested font 'Caecilia LT Std' has no files for the 'tf' 
alternative, Latin Modern is used instead.

It appears that ConTeXt somehow can't find the font.

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] The requested font has no files for the 'tf' alternative

2017-03-14 Thread Wolfgang Schuster

Hi Marco,

there is a differenece between the family name of a font (which is used 
by \definefontfamily) and the individual name of a font. The differences 
between both names can be explained with a with a (kind of) real family.


For my example I use the main cast of the Simpsons.


Surname : Simpson

Grandfather : Abraham Simpson
Grandmother : Mona Simpson
Father  : Homer Simpson
Mother  : Marge Simpson
Son : Bart Simpson
Daughter: Lisa Simpson


All members of the family use the same surname but each of them has also 
its individual name, the same system can be applied to your font collection.



Family: Caecilia LT Std

Light   : Caecilia LT Std Light
Lightitalic : Caecilia LT Std Light Italic
Regular : Caecilia LT Std Roman
Italic  : Caecilia LT Std Italic
Bold: Caecilia LT Std Bold
Bolditalic  : Caecilia LT Std Bold Italic
Heavy   : Caecilia LT Std Heavy
Heavyitalic : Caecilia LT Std Heavy Italic


Each font of your collection has its individual name, e.g. the regular 
style has the name “Caecilia LT Std Roman” but all styles use the same 
name for the family (i.e. “Caecilia LT Std”) which is used by 
\definefontfamily.



When you now used a individual name instead of the family name for 
\definefontfamily you should get a message in log for the correct name, 
e.g. the following example


\definefontfamily[mainface][rm][TeX Gyre Pagella Regular]

\setupbodyfont[mainface]

\starttext
Font test!
\stoptext

shows this in the log

selectfont > The name 'texgyrepagellaregular' is not a proper 
family name, use 'texgyrepagella' instead.
selectfont > The requested font 'TeX Gyre Pagella Regular' has no 
files for the 'tf' alternative, Latin Modern is used instead.


which tells you to use “texgyrepagella” for the \definefontfamily command.


Wolfgang

Marco Patzer 
9. März 2017 um 10:33via Postbox 


Hi!

I run into a problem using some fonts. Latin Modern is used instead
and ConTeXt displays:

selectfont > The requested font 'Caecilia LT Std Roman' has no files 
for the 'tf' alternative, Latin Modern is used instead.


Example:

\definefontfamily
[mainface]
[rm]
[Caecilia LT Std Roman]
%% doesn't work, either
%% [tf=file:CaeciliaLTStd-Roman.otf]

\setupbodyfont [mainface]

\starttext
%% \definedfont [name:CaeciliaLTStd-Roman] %% this works
\input knuth
\stoptext

The font is in the database:

mtxrun -script fonts -list -all caecilia

This happens with other fonts too, not only Caecilia. Some fonts
work, others don't. Couldn't find anything on the list, so I might
be doing something wrong here. What's the issue here?

context: 2017.03.02 22:23

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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


--
Sent from Postbox 

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] bug in filling fields and Acrobat Reader XI?

2017-03-14 Thread Pablo Rodriguez
On 03/14/2017 07:06 PM, Henning Hraban Ramm wrote:
> Am 2017-03-14 um 18:44 schrieb Pablo Rodriguez:
> 
>> Text is red and border is blue. These are the defaults set in
>> http://source.contextgarden.net/tex/context/modules/mkiv/m-fields.mkiv.
>>
>> There you have the validation script, but I’m afraid this is Greek to me.
> 
> But guessing from your homepage you understand Greek ;).

Na ja, auf Spanisch sagte ich auch »das kommt mir Spanisch vor«. Es
klang sehr komisch (ich bin selber Spanier), aber genau diese ist die
unverstándliche Sprache auf Deutsch ;-).

> Am 2017-03-14 um 18:57 schrieb Pablo Rodriguez:
> 
>> Does it make any sense to have a module that doesn’t retain the content
>> of the fill-in fields?
> 
> No ;)

Maybe it would make sense to implement it with no default validation.

Does it make sense to you, Hans? It would help a lot to newbies, since
the wiki has \fillinfield as a simple way to add these fields.

>> How should I define the new \fillinfield command?
>> Would it work removing validation from the command? I’m sorry, I’m not
>> running Windows and I have no way of testing it. Besides the fact that
>> JavaScript is beyond my knowledge.
> [...]
> Yes, that works. You can leave out most of the parameters.

Many thanks for testing it.

I have another issue with the width, but I have to find the conde first.

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] closesymbol on same line as displayed formula

2017-03-14 Thread Mikael P. Sundqvist
Hi,

I'm bringing up an old question on placing the qedsymbol, or
closesymbol as it is also called. This was previously discussed in
https://mailman.ntg.nl/pipermail/ntg-context/2014/079807.html and the
purpose of this post is to ask if there is any solution to the problem
now. Looking at the file below (output is attached), when the proof
ends with a displayed formula, the closesymbol is located one row
down. I want it to be (flushright) on the same line as the displayed
formula.

If I use \placeclosesymbol the closesymbol is indeed put on the
correct line, but not flushright.

Any ideas? I'm willing to use some command like \placeclosesymbol in
the occations when the proof ends with a displayed formula.

/Mikael

\defineenumeration[proof][
number=no,
text=Proof,
headstyle={\it},
alternative=serried,
width=fit,
closesymbol={$\square$},
]

\starttext

\startproof
This is a short proof.
\stopproof

\startproof
This is another short proof, ending with the formula
\startformula
1+1=2.
\stopformula
\stopproof

\startproof
This is another short proof, ending with the formula
\startformula
1+1=2.\placeclosesymbol
\stopformula
\stopproof



\startproof
This is a rather advanced proof, ending with formulas
\startformula
\startalign
\NC 1+1 \NC = 2,\NR
\NC 2+2 \NC = 4.\NR
\stopalign
\stopformula
\stopproof

\startproof
This is a rather advanced proof, ending with formulas
\startformula
\startalign
\NC 1+1 \NC = 2,\NR
\NC 2+2 \NC = 4.\placeclosesymbol\NR
\stopalign
\stopformula
\stopproof

\stoptext


ctx-listexample25.pdf
Description: Adobe PDF document
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] bug in filling fields and Acrobat Reader XI?

2017-03-14 Thread Henning Hraban Ramm
Am 2017-03-14 um 18:44 schrieb Pablo Rodriguez :

> Text is red and border is blue. These are the defaults set in
> http://source.contextgarden.net/tex/context/modules/mkiv/m-fields.mkiv.
> 
> There you have the validation script, but I’m afraid this is Greek to me.

But guessing from your homepage you understand Greek ;)


Am 2017-03-14 um 18:57 schrieb Pablo Rodriguez :

> Does it make any sense to have a module that doesn’t retain the content
> of the fill-in fields?

No ;)

> How should I define the new \fillinfield command?
> Would it work removing validation from the command? I’m sorry, I’m not
> running Windows and I have no way of testing it. Besides the fact that
> JavaScript is beyond my knowledge.

\setupinteraction[state=start]
>\usemodule[fields]
>\definefieldcategory
>  [fillinfield]
>  [n=1024,
>   height=\strutht,
>   depth=\strutdp,
>   align=middle,
>   color=red,
>   fieldframecolor=blue,
>   fieldbackgroundcolor=white,
>   validate=]
>\setupinteraction[state=start]
>\starttext
>This is a \fillinfield[name]{text that defines field length}.
>\stoptext

Yes, that works. You can leave out most of the parameters.

> It works fine with evince (it retains the contents of the fill-in
> field). But I need to know whether this works in Windows.

It works with evince because that probably doesn’t run JavaScript functions 
from PDFs.


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] bug in filling fields and Acrobat Reader XI?

2017-03-14 Thread Pablo Rodriguez
On 03/14/2017 06:36 PM, Henning Hraban Ramm wrote:
> [...]
>  I was wrong. The validation script is stored as document level
> script, because it’s within JSpreamble. And it sets the value to "",
> regardless of the content. See
> http://source.contextgarden.net/tex/context/modules/mkiv/m-fields.mkiv?search=CheckFillInField
>
>  Better don’t use this module, it’s just an example.
> 
> If you need exactly this functionality, copy the code.

I need it, because it is the simplest way to create a fill-in field. I
have two questions:

Does it make any sense to have a module that doesn’t retain the content
of the fill-in fields?

How should I define the new \fillinfield command?

Would it work removing validation from the command? I’m sorry, I’m not
running Windows and I have no way of testing it. Besides the fact that
JavaScript is beyond my knowledge.

\usemodule[fields]
\definefieldcategory
  [fillinfield]
  [n=1024,
   height=\strutht,
   depth=\strutdp,
   align=middle,
   color=red,
   fieldframecolor=blue,
   fieldbackgroundcolor=white,
   validate=]
\setupinteraction[state=start]
\starttext
This is a \fillinfield[name]{text that defines field length}.
\stoptext

It works fine with evince (it retains the contents of the fill-in
field). But I need to know whether this works in Windows.

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] bug in filling fields and Acrobat Reader XI?

2017-03-14 Thread Pablo Rodriguez
On 03/14/2017 06:22 PM, Henning Hraban Ramm wrote:
> Am 2017-03-14 um 18:05 schrieb Pablo Rodriguez:
>> [...]
>> I’m afraid that Adobe Reader XI (in Windows 10) isn’t able to keep the
>> text in the field after the pointer moves outside the field.
>>
>> Could anyone confirm the bug or explain me what I’m doing wrong?
> 
> Your example is missing \setupinteraction[state=start],
> but I can confirm the problem with latest beta and Acrobat Pro 9 on OSX.

Sorry, I checked it at work and I couldn’t copy the code from my usb memory.

> The problem is that the field is setup with a validation script
> 'CheckFillInField("name")', and that doesn’t exist. I also don’t know
> why the text is red.

Text is red and border is blue. These are the defaults set in
http://source.contextgarden.net/tex/context/modules/mkiv/m-fields.mkiv.

There you have the validation script, but I’m afraid this is Greek to me.

I’m experiencing another issue, but I need to check it in the code first.

Pablo
-- 
http://www.ousia.tk
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] bug in filling fields and Acrobat Reader XI?

2017-03-14 Thread Henning Hraban Ramm
Am 2017-03-14 um 18:22 schrieb Henning Hraban Ramm :

> Am 2017-03-14 um 18:05 schrieb Pablo Rodriguez :
> 
>> Dear list,
>> 
>> I have the following sample:
>> 
>>   \usemodule[fields]
>>   \starttext
>>   This is a \fillinfield[name]{text that defines field length}.
>>   \stoptext
>> 
>> I’m afraid that Adobe Reader XI (in Windows 10) isn’t able to keep the
>> text in the field after the pointer moves outside the field.
>> 
>> Could anyone confirm the bug or explain me what I’m doing wrong?
> 
> Your example is missing \setupinteraction[state=start],
> but I can confirm the problem with latest beta and Acrobat Pro 9 on OSX.
> 
> The problem is that the field is setup with a validation script 
> 'CheckFillInField("name")', and that doesn’t exist.
> I also don’t know why the text is red.

I was wrong. The validation script is stored as document level script, because 
it’s within JSpreamble. And it sets the value to "", regardless of the content.
See 
http://source.contextgarden.net/tex/context/modules/mkiv/m-fields.mkiv?search=CheckFillInField

Better don’t use this module, it’s just an example.

If you need exactly this functionality, copy the code.

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD


___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] bug in filling fields and Acrobat Reader XI?

2017-03-14 Thread Henning Hraban Ramm
Am 2017-03-14 um 18:05 schrieb Pablo Rodriguez :

> Dear list,
> 
> I have the following sample:
> 
>\usemodule[fields]
>\starttext
>This is a \fillinfield[name]{text that defines field length}.
>\stoptext
> 
> I’m afraid that Adobe Reader XI (in Windows 10) isn’t able to keep the
> text in the field after the pointer moves outside the field.
> 
> Could anyone confirm the bug or explain me what I’m doing wrong?

Your example is missing \setupinteraction[state=start],
but I can confirm the problem with latest beta and Acrobat Pro 9 on OSX.

The problem is that the field is setup with a validation script 
'CheckFillInField("name")', and that doesn’t exist.
I also don’t know why the text is red.

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] bug in filling fields and Acrobat Reader XI?

2017-03-14 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\usemodule[fields]
\starttext
This is a \fillinfield[name]{text that defines field length}.
\stoptext

I’m afraid that Adobe Reader XI (in Windows 10) isn’t able to keep the
text in the field after the pointer moves outside the field.

Could anyone confirm the bug or explain me what I’m doing wrong?

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] The requested font has no files for the 'tf' alternative

2017-03-14 Thread Marco Patzer
On Mon, 13 Mar 2017 22:10:56 +0100
Pablo Rodriguez  wrote:

> On 03/13/2017 09:55 PM, Marco Patzer wrote:
> > On Fri, 10 Mar 2017 17:12:36 +0100 Pablo Rodriguez wrote:  
> >> [...]
> >>   \definefontfamily[mainface][rm][Caecilia LT Std-Roman]  
> > 
> > This also shows:
> > 
> > selectfont > The requested font 'Caecilia LT Std-Roman' has no files
> > for the 'tf' alternative, Latin Modern is used instead.
> >   
> >> What it works is a different font name. And I guess that Roman
> >> isn’t part of the font name, but this is the style.  
> > 
> > otfinfo -i CaeciliaLTStd-Roman.otf | grep name
> > Full name:   CaeciliaLTStd-Roman
> > PostScript name: CaeciliaLTStd-Roman
> > Mac font menu name:  Caecilia LT Std Roman  
> 
> \definefontfamily[mainface][rm][CaeciliaLTStd-Roman]
> 
> I guess the full name should work. But I’m only guessing.

Sadly it does not.

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___