ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Typing environment on non-ASCII
@ 2016-05-21 14:09 Hans Åberg
  2016-05-21 16:31 ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Åberg @ 2016-05-21 14:09 UTC (permalink / raw)
  To: ConTeXt users

The typing environment does not seem to work on non-ASCII characters: below, ∀, ≔ and ∈ drop out. Perhaps not available in monospace, substituting nothing.

\setupbodyfont[xits,10pt]

\starttyping
∀(i, k) ∈ I×K: C(i, k) ≔ ∑_(j∈J) A(i, j)·B(j, k)
\stoptyping


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

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

* Re: Typing environment on non-ASCII
  2016-05-21 14:09 Typing environment on non-ASCII Hans Åberg
@ 2016-05-21 16:31 ` Wolfgang Schuster
  2016-05-21 17:06   ` Hans Åberg
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2016-05-21 16:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

> Hans Åberg <mailto:haberg-1@telia.com>
> 21. Mai 2016 um 16:09
> The typing environment does not seem to work on non-ASCII characters: 
> below, ∀, ≔ and ∈ drop out. Perhaps not available in monospace, 
> substituting nothing.
>
> \setupbodyfont[xits,10pt]
>
> \starttyping
> ∀(i, k) ∈ I×K: C(i, k) ≔ ∑_(j∈J) A(i, j)·B(j, k)
> \stoptyping
You need a font which has the necessary symbols or you take the missing 
one from another font but in this case you should look for one which has 
a similar style as the main font (which is not the case in my example).

\definefallbackfamily [moremath] [tt] [DejaVu Sans Mono] 
[range=mathematicaloperators]
\definefontfamily     [moremath] [tt] [Latin Modern Mono]
%\definefontfamily     [moremath] [mm] [Latin Modern Math]

\setupbodyfont[moremath,10pt]

\starttext

\starttyping
∀(i, k) ∈ I×K: C(i, k) ≔ ∑_(j∈J) A(i, j)·B(j, k)
\stoptyping

\stoptext

PS. Your example is missing the \starttext and \stoptext.

Wolfgang

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

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Typing environment on non-ASCII
  2016-05-21 16:31 ` Wolfgang Schuster
@ 2016-05-21 17:06   ` Hans Åberg
  2016-05-21 18:03     ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Åberg @ 2016-05-21 17:06 UTC (permalink / raw)
  To: ConTeXt users


> On 21 May 2016, at 18:31, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:

> You need a font which has the necessary symbols or you take the missing one from another font but in this case you should look for one which has a similar style as the main font (which is not the case in my example).
> 
> \definefallbackfamily [moremath] [tt] [DejaVu Sans Mono] [range=mathematicaloperators]
> \definefontfamily     [moremath] [tt] [Latin Modern Mono]
> %\definefontfamily     [moremath] [mm] [Latin Modern Math]

OK. There are two different issues involved: if one wants to use a monospace font, and if one wants it verbatim, without TeX translation. For me, the latter would suffice. The typing environment, it seems, combines the two, and the monospace part cannot be turned off.


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

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

* Re: Typing environment on non-ASCII
  2016-05-21 17:06   ` Hans Åberg
@ 2016-05-21 18:03     ` Wolfgang Schuster
  2016-05-21 18:39       ` Hans Åberg
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2016-05-21 18:03 UTC (permalink / raw)
  To: Hans Åberg; +Cc: ConTeXt users


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

> Hans Åberg <mailto:haberg-1@telia.com>
> 21. Mai 2016 um 19:06
>> On 21 May 2016, at 18:31, Wolfgang Schuster<schuster.wolfgang@gmail.com>  wrote:
>
>> You need a font which has the necessary symbols or you take the missing one from another font but in this case you should look for one which has a similar style as the main font (which is not the case in my example).
>>
>> \definefallbackfamily [moremath] [tt] [DejaVu Sans Mono] [range=mathematicaloperators]
>> \definefontfamily     [moremath] [tt] [Latin Modern Mono]
>> %\definefontfamily     [moremath] [mm] [Latin Modern Math]
>
> OK. There are two different issues involved: if one wants to use a monospace font, and if one wants it verbatim, without TeX translation. For me, the latter would suffice. The typing environment, it seems, combines the two, and the monospace part cannot be turned off.
>
The typing environment uses only a monospaced font as default style but 
you can also
use it with a serif or sans serif font, e.g. \setuptyping[style=sans].

Wolfgang



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

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Typing environment on non-ASCII
  2016-05-21 18:03     ` Wolfgang Schuster
@ 2016-05-21 18:39       ` Hans Åberg
  2016-05-22 13:15         ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Åberg @ 2016-05-21 18:39 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: ConTeXt users


> On 21 May 2016, at 20:03, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:

>> OK. There are two different issues involved: if one wants to use a monospace font, and if one wants it verbatim, without TeX translation. For me, the latter would suffice. The typing environment, it seems, combines the two, and the monospace part cannot be turned off.
>> 
> The typing environment uses only a monospaced font as default style but you can also
> use it with a serif or sans serif font, e.g. \setuptyping[style=sans].

The code below works. One can alternatively put it on the \starttyping command, admitting mixing with traditional monospace code at other places. The idea here is to display Unicode input files as is, so finding a monospace font for all those characters may be difficult. Just changing to sans did not work though.

\setupbodyfont[xits,10pt]
\setuptyping[style=normal]

\starttyping %[style=normal]
∀(i, k) ∈ I×K: C(i, k) ≔ ∑_(j∈J) A(i, j)·B(j, k)
\stoptyping


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

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

* Re: Typing environment on non-ASCII
  2016-05-21 18:39       ` Hans Åberg
@ 2016-05-22 13:15         ` Hans Hagen
  2016-05-22 14:00           ` Hans Åberg
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2016-05-22 13:15 UTC (permalink / raw)
  To: ntg-context

On 5/21/2016 8:39 PM, Hans Åberg wrote:
>
>> On 21 May 2016, at 20:03, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:
>
>>> OK. There are two different issues involved: if one wants to use a monospace font, and if one wants it verbatim, without TeX translation. For me, the latter would suffice. The typing environment, it seems, combines the two, and the monospace part cannot be turned off.
>>>
>> The typing environment uses only a monospaced font as default style but you can also
>> use it with a serif or sans serif font, e.g. \setuptyping[style=sans].
>
> The code below works. One can alternatively put it on the \starttyping command, admitting mixing with traditional monospace code at other places. The idea here is to display Unicode input files as is, so finding a monospace font for all those characters may be difficult. Just changing to sans did not work though.
>
> \setupbodyfont[xits,10pt]
> \setuptyping[style=normal]
>
> \starttyping %[style=normal]
> ∀(i, k) ∈ I×K: C(i, k) ≔ ∑_(j∈J) A(i, j)·B(j, k)
> \stoptyping

in the near future there will be a monospaced font with math for this 
purpose (the tex gyre project has it on it's agenda, but it all depends 
on funding and time)

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | 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
___________________________________________________________________________________

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

* Re: Typing environment on non-ASCII
  2016-05-22 13:15         ` Hans Hagen
@ 2016-05-22 14:00           ` Hans Åberg
  0 siblings, 0 replies; 7+ messages in thread
From: Hans Åberg @ 2016-05-22 14:00 UTC (permalink / raw)
  To: ConTeXt users; +Cc: Hans Hagen


> On 22 May 2016, at 15:15, Hans Hagen <pragma@wxs.nl> wrote:
> 
> On 5/21/2016 8:39 PM, Hans Åberg wrote:

>> The code below works. One can alternatively put it on the \starttyping command, admitting mixing with traditional monospace code at other places. The idea here is to display Unicode input files as is, so finding a monospace font for all those characters may be difficult. Just changing to sans did not work though.
>> 
>> \setupbodyfont[xits,10pt]
>> \setuptyping[style=normal]
>> 
>> \starttyping %[style=normal]
>> ∀(i, k) ∈ I×K: C(i, k) ≔ ∑_(j∈J) A(i, j)·B(j, k)
>> \stoptyping
> 
> in the near future there will be a monospaced font with math for this purpose (the tex gyre project has it on it's agenda, but it all depends on funding and time)

For me, the above without translation suffices, as one did not necessarily use monospace in the past, which worked fine: keywords might be in bold, and that and indentation was handled automatically in one Pascal editor (on MacOS 9).

One could think though of several different translations:

Monospace only on a range, like ASCII, or translate ASCII letters and numbers to the Math Alphanumeric range, with keywords optionally in bold. But then copy-paste from the PDF into a computer program will not work.


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

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

end of thread, other threads:[~2016-05-22 14:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-21 14:09 Typing environment on non-ASCII Hans Åberg
2016-05-21 16:31 ` Wolfgang Schuster
2016-05-21 17:06   ` Hans Åberg
2016-05-21 18:03     ` Wolfgang Schuster
2016-05-21 18:39       ` Hans Åberg
2016-05-22 13:15         ` Hans Hagen
2016-05-22 14:00           ` Hans Åberg

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).