1

I've been trying to set a separate font for text contents and equations. However, both the math and text fonts remain the same. Below is the typesetting I am using in my own doc.style. Can anyone help how can I restore the beautiful fonts for only the equations ? Thanks.

Blockquote

\usepackage[b5paper, top=2.5cm, bottom=2.5cm, left=2.75cm, right=2.75cm]{geometry} % paper \size B5 (18.2 x 25.7 cm)
%\geometry{showframe=true}
\geometry{headheight=0cm, headsep=0cm, marginparwidth=0cm, marginparsep=0cm}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{latexsym}
\usepackage{rotating}
\usepackage{mathrsfs} 
\usepackage{amsfonts,amsmath,amssymb,amsthm}
\usepackage{natbib}
\usepackage[titles]{tocloft}



%\RequirePackage{hfont}

% Try uncommenting the following line if fonts don't
% display correctly in the PDF file.
%\usepackage{pslatex} 

% To use times roman font, uncomment the following line.
%\usepackage{helvet}
\usepackage{newtxtext,newtxmath}
% For other fonts, see http://www.tug.org/fonts/

\usepackage{fix-cm} % overrides the original latex font restrictions 
\usepackage{calc}
\usepackage{url}
\usepackage{anyfontsize}
\usepackage{chngcntr}
\usepackage{tocloft}
\usepackage{indentfirst}
% If you refer name of something instead of number, such as section, subsection
\usepackage{nameref}

% Make abbreviations list by uncomment last three following lines
% run this code after compling file .tex to convert .nlo into .nls
%C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\makeindex.exe -s nomencl.ist file_name.nlo -o file_name.nls
\usepackage{nomencl}
%\makenomenclatureme}{\normalfont\fontsize{13pt}{15.6pt}\selectfont\bfseries Abbreviations}


\makeatletter
    \renewcommand*\@makechapterhead[1]{%
      {\parindent \z@ \raggedright \normalfont
        \ifnum \c@secnumdepth >\m@ne
        \fi
        \normalfont
        %\fontsize{15pt}{18pt}\selectfont \bfseries \@chapapp \thechapter \space \space #1\par\nobreak
        \fontsize{15pt}{18pt}\selectfont \bfseries\thechapter. \space \space #1\par\nobreak
      }}
      
    \renewcommand*\@makeschapterhead[1]{%
      {\parindent \z@ \raggedright
        \normalfont
        \fontsize{15pt}{18pt}\selectfont \bfseries  #1\par\nobreak
        }}
    \renewcommand\section{\@startsection{section}{1}{\z@}%
                                      {-3.5ex \@plus -1ex \@minus -.2ex}%
                                      {2.3ex \@plus.2ex}%
                                      {\normalfont\fontsize{13pt}{15.6pt}\selectfont\bfseries}}
    \renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                         {-3.25ex\@plus -1ex \@minus -.2ex}%
                                         {1.5ex \@plus .2ex}%
                                         {\normalfont\fontsize{12pt}{14.4pt}\selectfont\bfseries}}
    \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                         {-3.25ex\@plus -1ex \@minus -.2ex}%
                                         {1.5ex \@plus .2ex}%
                                         {\normalfont\fontsize{11pt}{13.2pt}\selectfont\bfseries}}
    \makeatother
    %
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    % Remove space between chapters in toc, lof, lot and add '.' after number,, table of content , list of figures and list of tables 
    \makeatletter
    \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
                             \refstepcounter{chapter}%
                             \typeout{\@chapapp\space\thechapter.}%
                             \addcontentsline{toc}{chapter}%
                                       {\protect\numberline{\thechapter.}#1}%
                        \else
                          \addcontentsline{toc}{chapter}{#1}%
                        \fi
                        \chaptermark{#1}%
                        \addtocontents{toc}{\protect\addvspace{15\p@}}% NEW
                        \addtocontents{lof}{\protect\addvspace{10\p@}}%
                        \addtocontents{lot}{\protect\addvspace{10\p@}}%
                        \if@twocolumn
                          \@topnewpage[\@makechapterhead{#2}]%
                        \else
                          \@makechapterhead{#2}%
                          \@afterheading
                        \fi}
    \makeatother
    %
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    % Change type of description for hanging indent
    \makeatletter
    \newcommand{\DESCRIPTION@original@item}{}
    \let\DESCRIPTION@original@item\item
    \newcommand*{\DESCRIPTION@envir}{DESCRIPTION}
    \newlength{\DESCRIPTION@totalleftmargin}
    \newlength{\DESCRIPTION@linewidth}
    \newcommand{\DESCRIPTION@makelabel}[1]{\llap{#1}}%
    \newcommand{\DESCRIPTION@item}[1][]{%
      \setlength{\@totalleftmargin}%
           {\DESCRIPTION@totalleftmargin+\widthof{\textbf{#1 }}-\leftmargin}%
      \setlength{\linewidth}
           {\DESCRIPTION@linewidth-\widthof{\textbf{#1 }}+\leftmargin}%
      \par\parshape \@ne \@totalleftmargin \linewidth
      \DESCRIPTION@original@item[\textbf{#1}]%
    }
    \newenvironment{DESCRIPTION}
      {\list{}{\setlength{\labelwidth}{0cm}%
               \let\makelabel\DESCRIPTION@makelabel}%
       \setlength{\DESCRIPTION@totalleftmargin}{\@totalleftmargin}%
       \setlength{\DESCRIPTION@linewidth}{\linewidth}%
       \renewcommand{\item}{\ifx\@currenvir\DESCRIPTION@envir
                               \expandafter\DESCRIPTION@item
                            \else
                               \expandafter\DESCRIPTION@original@item
                            \fi}}
      {\endlist}
    \makeatother
makeatletter

\makeatother

\documentclass[11pt]{report}
\usepackage[T1]{fontenc}
\usepackage{thesis}
\usepackage{kotex}
\usepackage{graphicx}
\usepackage{helvet}
\usepackage{nomencl}
\makenomenclature
\usepackage{bm} 
\usepackage[colorlinks]{hyperref}
\hypersetup{citecolor=blue, linkcolor=blue, urlcolor=blue}
\usepackage[capitalise]{cleveref}
\usepackage{natbib}
\usepackage{chngcntr}
\usepackage[shortlabels]{enumitem} 
\usepackage{multirow}
\usepackage{subcaption}
\usepackage{lineno}
\usepackage{tikz}
\usepackage{xparse}
\usepackage{tikz}
\usepackage{pst-node}
\usetikzlibrary{matrix,backgrounds}
\pgfdeclarelayer{myback}
\pgfsetlayers{myback,background,main}

\tikzset{mycolor/.style = {line width=1bp,color=#1}}%
\tikzset{myfillcolor/.style = {draw,fill=#1}}%

\NewDocumentCommand{\highlight}{O{blue!40} m m}{%
    \draw[mycolor=#1] (#2.north west)rectangle (#3.south east);
}

\NewDocumentCommand{\fhighlight}{O{blue!40} m m}{%
    \draw[myfillcolor=#1] (#2.north west)rectangle (#3.south east);
}

\theoremstyle{plain}
\newtheorem{assumption}{Assumption}
\let\origtheassumption\theassumption
\renewcommand\thesubfigure{(\alph{subfigure})}
\captionsetup[subfigure]{labelformat=simple}



%%%%



\begin{document}
\include{cover}
\pagenumbering{roman}
\setcounter{page}{2}
\include{abstract}
\include{abstractkr}
\include{contents}
\include{figures}
\include{tables}
\include{abbr}
\pagenumbering{arabic}
\setcounter{page}{1}
\setlength{\parindent}{1cm}
\include{chap1}
\include{chap2}
\include{chap3}
\include{chap4}
\include{chap5}
\include{chap6}
\include{chap7}
\include{chap8}
\include{chap9}
\appendix
\counterwithin{figure}{section}
\include{apdxa}
\include{apdxb}
\include{bib}
\include{ack}

\end{document}
3
  • 2
    Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem.
    – DG'
    Mar 20 at 14:28
  • 1
    Since your code does not appear to contain any math material, it's not possible to tell what may be going on. As @DG' has noted, it's essential that you provide some fully compilable code that actually generates the issue you wish to fix. For sure, if I prefix \documentclass{report} and affix \begin{document} Hello World. $E=mc^2$ \end{document} to your code in order to make it compilable and produce some output, both the text font and the math font are fine (viz., the default, Computer Modern). In short, don't expect us to be able to simply guess what it is that you're doing.
    – Mico
    Mar 20 at 14:30
  • Thank you, coded included in the main question. Mar 20 at 15:09
0

Try this :

\documentclass{standalone}
\usepackage[paper=A4]{}
\usepackage{mathrsfs,amssymb}
\usepackage[intlimits]{empheq}
\begin{document}
normal text
\begin{math} a^2 + b^2 = c^2 \end{math}
more text
\end{document}

enter image description here

1
  • Thank you but it didn't work for me. I've included the packages used in the style file in case if you can look at it again. Thanks Mar 21 at 6:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.