ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Fonts and equations
@ 2018-05-17 11:19 Lance Larsen
  2018-05-18  6:55 ` Henri Menke
  2018-05-18 20:01 ` Ulrike Fischer
  0 siblings, 2 replies; 6+ messages in thread
From: Lance Larsen @ 2018-05-17 11:19 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1401 bytes --]

I have a context document with several equations. One really nice feature
with equations is that by default you can search for variable names in
equation in a PDF reader like acrobat. However, I needed to configure the
document to use arial for the text. Once I do this, the equations are no
longer searchable. I assume something happened to the mathematics font. How
to I change the font for the document text, but keep the math equations
searchable? Is there a way to change the document font, but not affect the
math font? Here is a sample of how I configured the font. The equations are
no longer searchable.

% Load the Arial font values for regular, italics, bold, etc.
\starttypescript [serif] [arial]
  \definefontsynonym [Serif]               [name:arial]
  \definefontsynonym [SerifBold]           [name:arialbold]
  \definefontsynonym [SerifItalic]         [name:arialitalic]
  \definefontsynonym [SerifSlanted]        [name:arialitalic]
  \definefontsynonym [SerifBoldItalic]     [name:arialbolditalic]
  \definefontsynonym [SerifBoldSlanted]    [name:arialbolditalic]
  \definefontsynonym [SerifCaps]           [name:arial]
\stoptypescript

% Now we define the 'arial' font as an available option
\definetypeface [arial]    [rm] [serif] [arial]

% Set 'arial' 10pt as the default font for the document
\setupbodyfont [arial,rm,10pt]

\starttext

$z_1 = x_1 + y_1$

$a = b + c$

\stoptext

[-- Attachment #1.2: Type: text/html, Size: 1792 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fonts and equations
  2018-05-17 11:19 Fonts and equations Lance Larsen
@ 2018-05-18  6:55 ` Henri Menke
  2018-05-18 20:01 ` Ulrike Fischer
  1 sibling, 0 replies; 6+ messages in thread
From: Henri Menke @ 2018-05-18  6:55 UTC (permalink / raw)
  To: ntg-context



On 17/05/18 23:19, Lance Larsen wrote:
> I have a context document with several equations. One really nice 
> feature with equations is that by default you can search for variable 
> names in equation in a PDF reader like acrobat. However, I needed to 
> configure the document to use arial for the text. Once I do this, the 
> equations are no longer searchable. I assume something happened to the 
> mathematics font. How to I change the font for the document text, but 
> keep the math equations searchable? Is there a way to change the 
> document font, but not affect the math font? Here is a sample of how I 
> configured the font. The equations are no longer searchable.
> 
> % Load the Arial font values for regular, italics, bold, etc.
> \starttypescript [serif] [arial]
>    \definefontsynonym [Serif]               [name:arial]
>    \definefontsynonym [SerifBold]           [name:arialbold]
>    \definefontsynonym [SerifItalic]         [name:arialitalic]
>    \definefontsynonym [SerifSlanted]        [name:arialitalic]
>    \definefontsynonym [SerifBoldItalic]     [name:arialbolditalic]
>    \definefontsynonym [SerifBoldSlanted]    [name:arialbolditalic]
>    \definefontsynonym [SerifCaps]           [name:arial]
> \stoptypescript
> 
> % Now we define the 'arial' font as an available option
> \definetypeface [arial]    [rm] [serif] [arial]

The typeface "arial" you defined has no math font (and no sans and no 
mono font).  Add those and you should be fine:

\definetypeface [arial] [rm] [serif] [arial]
\definetypeface [arial] [ss] [sans]  [modern]
\definetypeface [arial] [tt] [mono]  [modern]
\definetypeface [arial] [mm] [math]  [modern]

> 
> % Set 'arial' 10pt as the default font for the document
> \setupbodyfont [arial,rm,10pt]
> 
> \starttext
> 
> $z_1 = x_1 + y_1$
> 
> $a = b + c$
> 
> \stoptext
> 
> 
> 
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
> 
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fonts and equations
  2018-05-17 11:19 Fonts and equations Lance Larsen
  2018-05-18  6:55 ` Henri Menke
@ 2018-05-18 20:01 ` Ulrike Fischer
  2018-05-18 22:06   ` Henri Menke
  1 sibling, 1 reply; 6+ messages in thread
From: Ulrike Fischer @ 2018-05-18 20:01 UTC (permalink / raw)
  To: ntg-context

Am Thu, 17 May 2018 05:19:05 -0600 schrieb Lance Larsen:

> One really nice feature with equations is that by default you can
> search for variable names in equation in a PDF reader like
> acrobat.

I can't search for e.g. the a or z if I compile

\starttext

$z_1 = x_1 + y_1$

$a = b + c$

\stoptext


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fonts and equations
  2018-05-18 20:01 ` Ulrike Fischer
@ 2018-05-18 22:06   ` Henri Menke
  2018-05-19 15:53     ` Ulrike Fischer
  0 siblings, 1 reply; 6+ messages in thread
From: Henri Menke @ 2018-05-18 22:06 UTC (permalink / raw)
  To: ntg-context

On 05/19/2018 08:01 AM, Ulrike Fischer wrote:
> Am Thu, 17 May 2018 05:19:05 -0600 schrieb Lance Larsen:
> 
>> One really nice feature with equations is that by default you can
>> search for variable names in equation in a PDF reader like
>> acrobat.
> 
> I can't search for e.g. the a or z if I compile

You probably have to search for 𝑎 (U+1D44E) and 𝑧 (U+1D467).

> 
> \starttext
> 
> $z_1 = x_1 + y_1$
> 
> $a = b + c$
> 
> \stoptext
> 
> 

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fonts and equations
  2018-05-18 22:06   ` Henri Menke
@ 2018-05-19 15:53     ` Ulrike Fischer
  0 siblings, 0 replies; 6+ messages in thread
From: Ulrike Fischer @ 2018-05-19 15:53 UTC (permalink / raw)
  To: ntg-context

Am Sat, 19 May 2018 10:06:01 +1200 schrieb Henri Menke:

>> I can't search for e.g. the a or z if I compile
> 
> You probably have to search for 𝑎 (U+1D44E) and 𝑧 (U+1D467).

Well yes, but I have some doubts that Lance meant this.


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fonts and equations
@ 2018-05-18 19:27 Lance Larsen
  0 siblings, 0 replies; 6+ messages in thread
From: Lance Larsen @ 2018-05-18 19:27 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 2762 bytes --]

Henri,

Thanks for the suggestion. I tried to add the additional fonts, but this
did not seem to make a difference. The math equations render fine, but a
search performed for terms in an equation still does not work when I
specify the font. When I remove the font specification, it works fine.
There must be some difference in the font that is used even if I don't
specify a math font. Any other thoughts about why the math font changes or
how to get a math font that is searchable, or get back to the default math
font?

-Lance


------------------------------
>
> Message: 4
> Date: Fri, 18 May 2018 18:55:14 +1200
> From: Henri Menke <henrimenke@gmail.com>
> To: ntg-context@ntg.nl
> Subject: Re: [NTG-context] Fonts and equations
> Message-ID: <12743277-ebd0-67c7-2393-fe33e97bfaac@gmail.com>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
>
>
> On 17/05/18 23:19, Lance Larsen wrote:
> > I have a context document with several equations. One really nice
> > feature with equations is that by default you can search for variable
> > names in equation in a PDF reader like acrobat. However, I needed to
> > configure the document to use arial for the text. Once I do this, the
> > equations are no longer searchable. I assume something happened to the
> > mathematics font. How to I change the font for the document text, but
> > keep the math equations searchable? Is there a way to change the
> > document font, but not affect the math font? Here is a sample of how I
> > configured the font. The equations are no longer searchable.
> >
> > % Load the Arial font values for regular, italics, bold, etc.
> > \starttypescript [serif] [arial]
> >    \definefontsynonym [Serif]               [name:arial]
> >    \definefontsynonym [SerifBold]           [name:arialbold]
> >    \definefontsynonym [SerifItalic]         [name:arialitalic]
> >    \definefontsynonym [SerifSlanted]        [name:arialitalic]
> >    \definefontsynonym [SerifBoldItalic]     [name:arialbolditalic]
> >    \definefontsynonym [SerifBoldSlanted]    [name:arialbolditalic]
> >    \definefontsynonym [SerifCaps]           [name:arial]
> > \stoptypescript
> >
> > % Now we define the 'arial' font as an available option
> > \definetypeface [arial]    [rm] [serif] [arial]
>
> The typeface "arial" you defined has no math font (and no sans and no
> mono font).  Add those and you should be fine:
>
> \definetypeface [arial] [rm] [serif] [arial]
> \definetypeface [arial] [ss] [sans]  [modern]
> \definetypeface [arial] [tt] [mono]  [modern]
> \definetypeface [arial] [mm] [math]  [modern]
>
> >
> > % Set 'arial' 10pt as the default font for the document
> > \setupbodyfont [arial,rm,10pt]
> >
> > \starttext
> >
> > $z_1 = x_1 + y_1$
> >
> > $a = b + c$
> >
> > \stoptext
> >
>

[-- Attachment #1.2: Type: text/html, Size: 3575 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-05-19 15:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-17 11:19 Fonts and equations Lance Larsen
2018-05-18  6:55 ` Henri Menke
2018-05-18 20:01 ` Ulrike Fischer
2018-05-18 22:06   ` Henri Menke
2018-05-19 15:53     ` Ulrike Fischer
2018-05-18 19:27 Lance Larsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).