ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Math using sans serif font and problems with the alignment
@ 2016-06-10 14:18 Freddy Omar López Quintero
  0 siblings, 0 replies; only message in thread
From: Freddy Omar López Quintero @ 2016-06-10 14:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hello!

Some days ago, I asked about how to use sans serifed font in all math
document. My approach, given those answers, was create a little function to
use the serif fonts in math (using \definestartstop) but, when there is
some align involved, it produces an error :-\ .

An example is the following:


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\definefontfamily     [mainface] [ss] [Latin Modern Sans]

\definefallbackfamily [mainface] [mm] [Latin Modern Sans]
[preset=math:digitsnormal]
\definefallbackfamily [mainface] [mm] [Latin Modern Sans]
[preset=math:digitsbold]

\definefallbackfamily [mainface] [mm] [Latin Modern Sans]
[preset=math:uppercasenormal]
\definefallbackfamily [mainface] [mm] [Latin Modern Sans]
[preset=math:uppercaseitalic]
\definefallbackfamily [mainface] [mm] [Latin Modern Sans]
[preset=math:uppercasebold]
\definefallbackfamily [mainface] [mm] [Latin Modern Sans]
[preset=math:uppercasebolditalic]

\definefallbackfamily [mainface] [mm] [Latin Modern Sans]
[preset=math:lowercasenormal]
\definefallbackfamily [mainface] [mm] [Latin Modern Sans]
[preset=math:lowercaseitalic]
\definefallbackfamily [mainface] [mm] [Latin Modern Sans]
[preset=math:lowercasebold]
\definefallbackfamily [mainface] [mm] [Latin Modern Sans]
[preset=math:lowercasebolditalic]

\definefontfamily     [mainface] [mm] [Latin Modern Math]


\definestartstop
[formulass]
[
before={\startformula
\setupbodyfont[mainface]},
after=\stopformula
]


\starttext

    abcdefg ABCDEFG 123456 i

    \startformula
        {\tf abcdefg\,ABCDEFG} \quad abcdefg\,ABCDEFG \quad 123456 \quad
{\bf 123456}
    \stopformula

% it works:
\startformula
Y=X\beta+\varepsilon
\stopformula

% it works:
\startformulass
Y=X\beta+\varepsilon
\stopformulass

% it doesn't work:
\startformulass
\startalign[n=4]
\NC  Y_t \NC = \beta_0 \NC + \beta_1  x_t \NC + \varepsilon_t \NR
\NC  Y_t \NC = \beta_0 \NC + \beta_1  x_t \NC + \varepsilon_t \NR
\stopalign
\stopformulass


\stoptext
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


Could you please give me some advices?

Thanks in advance!


-- 
«...my role is to be on the bottom of things.»

Donald Knuth

[-- Attachment #1.2: Type: text/html, Size: 9797 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] only message in thread

only message in thread, other threads:[~2016-06-10 14:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-10 14:18 Math using sans serif font and problems with the alignment Freddy Omar López Quintero

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