Menu

#40 Using on Texmaths the font on the text on LibreOffice.

open
nobody
5
2019-11-16
2019-11-10
No

To generate my docs I'm using two templates on preamble.
This like principal:
\usepackage[brazil]
\usepackage{dsfont}
\usepackage{fouriernc}
\usepackage{amsmath}
\usepackage{cases}
\usepackage[T1]
\usepackage{amssymb}
\usepackage[utf8]
\usepackage{mathrsfs}
\usepackage[normalem]
\usepackage{graphicx}
\usepackage{xcolor}
\definecolor{navy}{HTML}{000080}
\definecolor{mogg}{HTML}{000066}
\definecolor{plug}{HTML}{800000}
\usepackage[usenames]

% Uncomment this line for sans-serif font
%\everymath{\mathsf{\xdef\mysf{\mathgroup\the\mathgroup\relax}}\mysf}

% Uncomment these lines for colored equations
% Caution! Background color breaks transparency!
%\definecolor{fgcolor}{RGB}{0,0,255}
%\definecolor{bgcolor}{RGB}{255,0,0}
%\pagecolor{bgcolor}\color{fgcolor}

With it, I can work with texts using serif fonts and have equations with a font more similar to that of text.

And I use this other:
\usepackage[brazil]
\usepackage{amsmath}
\usepackage{sfmath}
\usepackage{DejaVu Sans Condensed}
\renewcommand*\familydefault{\sfdefault}
\usepackage{cases}
\usepackage[T1]
\usepackage{amssymb}
\usepackage{mathastext}
\usepackage[utf8]
\usepackage{sansmathaccent}
\usepackage{mathrsfs}
\usepackage[normalem]
\usepackage{graphicx}
\usepackage{xcolor}
\definecolor{navy}{HTML}{000080}
\definecolor{mogg}{HTML}{000066}
\definecolor{plug}{HTML}{800000}
\usepackage[usenames]

% Uncomment this line for sans-serif font
\everymath{\mathsf{\xdef\mysf{\mathgroup\the\mathgroup\relax}}\mysf}

% Uncomment these lines for colored equations
% Caution! Background color breaks transparency!
\definecolor{fgcolor}{RGB}{0,0,102}
\definecolor{bgcolor}{RGB}{255,255,255}
\pagecolor{bgcolor}\color{fgcolor}

This one I use for texts with sans serif fonts. In this specific case, I use the dejaVu Sans Condensed font. Would it be possible to use another font? What happens is that when I change the font in the fourth line of the preamble texmaths shows an error message stating that the font is not part of my system. Is it my mistake? Why does only DejaVu Sans Condensed font work?

What I would like is to have the option of using any font in my system for texmaths equation text like "mathtype", for example. It's possible?

Thanks!

Discussion

  • Roland Baudin

    Roland Baudin - 2019-11-16

    TexMaths is just a program that calls the LaTeX engine. So you should check the LaTeX documentation about the feature you wants (I'm not an expert).

    However, TexMaths can also use the XeLaTeX engine (use the TexMaths configuration button for that option), and the latter has more possibilities to deal with sans serif fonts.

    But, I'm pretty sure it is not possible to use any font in LaTeX or XeLaTeX...

     
  • JONES SANTOS DA SILVA

    Really. I have studied about. It's not possible. Just some fonts. Thanks!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.