0

My tags are as follows:

\documentclass{book}
\RequirePackage[T1]{fontenc}%
\RequirePackage{stix}%

\begin{document}

This is for test \textit{test}
\[
\int+\alpha=a+b
\]

\end{document}

enter image description here

Output generated, in text italic font name shows as STIXGeneral-Italic and inside math italic font for text shows as STIXMath-Italic, but I expect this also should shows as STIXGeneral-Italic, is it possible? Please advise

3
  • Why should it be General-Italic, since it is used in math?
    – egreg
    Commented Oct 22, 2018 at 6:54
  • @egreg; sorry, its one of a publisher's requirement...
    – MadyYuvi
    Commented Oct 22, 2018 at 7:24
  • Please do not create arbitrary tags that are of no use to others. Tags should be a category for multiple questions and not a description only suiting a single post.
    – TeXnician
    Commented Oct 22, 2018 at 9:43

1 Answer 1

2

I'm not sure why the publisher wants a lower quality PDF. As far as I can see, the glyphs in STIXMath-Italic are the same as in STIXGeneral-Italic, but the math fonts has a suitable packaging for math.

Anyway, you can do as follows, changing the math codes of the letters to use STIXGeneral-Italic.

\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage{stix}

\makeatletter
\DeclareSymbolFont{itletters}{OT1}{stix}{m}{it}
\SetSymbolFont{itletters}{bold}{OT1}{stix}{b}{it}
\DeclareSymbolFontAlphabet{\mathit}  {itletters}
\stix@MathSymbol{A}     {\mathalpha}{itletters}  {`A}
\stix@MathSymbol{B}     {\mathalpha}{itletters}  {`B}
\stix@MathSymbol{C}     {\mathalpha}{itletters}  {`C}
\stix@MathSymbol{D}     {\mathalpha}{itletters}  {`D}
\stix@MathSymbol{E}     {\mathalpha}{itletters}  {`E}
\stix@MathSymbol{F}     {\mathalpha}{itletters}  {`F}
\stix@MathSymbol{G}     {\mathalpha}{itletters}  {`G}
\stix@MathSymbol{H}     {\mathalpha}{itletters}  {`H}
\stix@MathSymbol{I}     {\mathalpha}{itletters}  {`I}
\stix@MathSymbol{J}     {\mathalpha}{itletters}  {`J}
\stix@MathSymbol{K}     {\mathalpha}{itletters}  {`K}
\stix@MathSymbol{L}     {\mathalpha}{itletters}  {`L}
\stix@MathSymbol{M}     {\mathalpha}{itletters}  {`M}
\stix@MathSymbol{N}     {\mathalpha}{itletters}  {`N}
\stix@MathSymbol{O}     {\mathalpha}{itletters}  {`O}
\stix@MathSymbol{P}     {\mathalpha}{itletters}  {`P}
\stix@MathSymbol{Q}     {\mathalpha}{itletters}  {`Q}
\stix@MathSymbol{R}     {\mathalpha}{itletters}  {`R}
\stix@MathSymbol{S}     {\mathalpha}{itletters}  {`S}
\stix@MathSymbol{T}     {\mathalpha}{itletters}  {`T}
\stix@MathSymbol{U}     {\mathalpha}{itletters}  {`U}
\stix@MathSymbol{V}     {\mathalpha}{itletters}  {`V}
\stix@MathSymbol{W}     {\mathalpha}{itletters}  {`W}
\stix@MathSymbol{X}     {\mathalpha}{itletters}  {`X}
\stix@MathSymbol{Y}     {\mathalpha}{itletters}  {`Y}
\stix@MathSymbol{Z}     {\mathalpha}{itletters}  {`Z}
\stix@MathSymbol{a}     {\mathalpha}{itletters}  {`a}
\stix@MathSymbol{b}     {\mathalpha}{itletters}  {`b}
\stix@MathSymbol{c}     {\mathalpha}{itletters}  {`c}
\stix@MathSymbol{d}     {\mathalpha}{itletters}  {`d}
\stix@MathSymbol{e}     {\mathalpha}{itletters}  {`e}
\stix@MathSymbol{f}     {\mathalpha}{itletters}  {`f}
\stix@MathSymbol{g}     {\mathalpha}{itletters}  {`g}
\stix@MathSymbol{h}     {\mathalpha}{itletters}  {`h}
\stix@MathSymbol{i}     {\mathalpha}{itletters}  {`i}
\stix@MathSymbol{j}     {\mathalpha}{itletters}  {`j}
\stix@MathSymbol{k}     {\mathalpha}{itletters}  {`k}
\stix@MathSymbol{l}     {\mathalpha}{itletters}  {`l}
\stix@MathSymbol{m}     {\mathalpha}{itletters}  {`m}
\stix@MathSymbol{n}     {\mathalpha}{itletters}  {`n}
\stix@MathSymbol{o}     {\mathalpha}{itletters}  {`o}
\stix@MathSymbol{p}     {\mathalpha}{itletters}  {`p}
\stix@MathSymbol{q}     {\mathalpha}{itletters}  {`q}
\stix@MathSymbol{r}     {\mathalpha}{itletters}  {`r}
\stix@MathSymbol{s}     {\mathalpha}{itletters}  {`s}
\stix@MathSymbol{t}     {\mathalpha}{itletters}  {`t}
\stix@MathSymbol{u}     {\mathalpha}{itletters}  {`u}
\stix@MathSymbol{v}     {\mathalpha}{itletters}  {`v}
\stix@MathSymbol{w}     {\mathalpha}{itletters}  {`w}
\stix@MathSymbol{x}     {\mathalpha}{itletters}  {`x}
\stix@MathSymbol{y}     {\mathalpha}{itletters}  {`y}
\stix@MathSymbol{z}     {\mathalpha}{itletters}  {`z}
\makeatother

\begin{document}

This is for test \textit{test}
\[
abcABC
\]

\end{document}

The output of pdffonts is

name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
LHJDKK+STIXGeneral-Regular           Type 1            yes yes no       4  0
GQLIBX+STIXGeneral-Italic            Type 1            yes yes no       5  0
GQLIBX+STIXGeneral-Italic            Type 1            yes yes no       6  0

Without the changes the output would be

name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
LHJDKK+STIXGeneral-Regular           Type 1            yes yes no       4  0
EUZLLL+STIXGeneral-Italic            Type 1            yes yes no       5  0
URGOEX+STIXMath-Italic               Type 1            yes yes no       6  0

However, you should be aware that the output is definitely worse. For instance, a ligature would be applied in $fl$; the spacing between the italic letters in math formulas is wrong.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .