1

When I use 'align environment' to write equations, the displayed equations (eq 1.5 & 1.6) look smaller in font size compared to other equations (eq 1.7 & 1.8). For reference I attached screenshot of the compiled document. How to make sure all equations are of same font size?

\begin{align}
\pd{f}{x} &= \pd{f}{z} \cdot \pd{z}{x} = \pd{f}{z} \cdot 1 \\
\pd{f}{y} &= \pd{f}{z} \cdot \pd{z}{y} = \pd{f}{z} \cdot i
\end{align}

since $f(x) = u(x,y) + iv(x,y)$ by \autoref{eq:complexfunction}, we also have

\begin{equation}
\pd{f}{x} = \pd{u}{x} + i \pd{v}{x} \quad \text{and} \quad \pd{f}{y} = \pd{u}{y} + i \pd{v}{y}
\end{equation}
Combining above equations, we have

\begin{equation}
\pd{f}{x} = \pd{f}{z} = \pd{u}{x} + i \pd{v}{x} \quad \text{and} \quad \pd{f}{x} = \pd{f}{z} = \pd{u}{x} + i \pd{v}{x}
\end{equation}

preamble (if required)

\documentclass[a4paper]{article}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{jheppub}
\usepackage{amsthm}
\usepackage{tcolorbox}
\usepackage{commath}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\tcbuselibrary{theorems}
\newtcbtheorem
  []% init options
  {theorem}% name
  {Theorem}% title
  {%
    colback=green!5,
    colframe=green!35!black,
    fonttitle=\bfseries,
  }% options
  {thm}% prefix

\newtcbtheorem
  []% init options
  {definition}% name
  {Definition}% title
  {%
    colback=red!5,
    colframe=red!50!black,
    fonttitle=\bfseries,
  }% options
  {def}% prefix

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\reals}{\mathbb{R}}
\renewcommand{\qedsymbol}{$\blacksquare$}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subheader{Notes}
\title{Some Title}
\author{Some Author}
\affiliation{Greatest University}
\emailAdd{[email protected]}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
\maketitle
\flushbottom
\newpage
3
  • it is much easier for people to test if you post a single document that produces the output shown, rather than fragments that we have to join together, the test file needs to not use packages that are not available (jheppub) unless the problem does not occur without them, in which case a link to the package would help Commented Dec 10, 2019 at 18:10
  • possibly unrelated but I would not use commath Commented Dec 10, 2019 at 18:13
  • oh this is commath, is based around a misunderstanding of the \ifinner test, it is not really usable and accounts for the issue that you show. Commented Dec 10, 2019 at 18:15

1 Answer 1

3

A more reasonable test document is

enter image description here

\documentclass{article}

\usepackage{amsmath}
\usepackage{commath}
\begin{document}

align
\begin{align}
\pd{f}{x} &= \pd{f}{z} \cdot \pd{z}{x} = \pd{f}{z} \cdot 1 \\
\pd{f}{y} &= \pd{f}{z} \cdot \pd{z}{y} = \pd{f}{z} \cdot i
\end{align}

equation
\begin{equation}
\pd{f}{x} = \pd{u}{x} + i \pd{v}{x} \quad \text{and} \quad \pd{f}{y} = \pd{u}{y} + i \pd{v}{y}
\end{equation}
\end{document}

The commath package is based on a misunderstanding of \ifinner and is forcing a text style setting in align The package really can not be recommended, use a simple \frac rather than commath version of \pd.

enter image description here

\documentclass{article}

\usepackage{amsmath}
%\usepackage{commath}
\newcommand\pd[2]{\frac{\partial#1}{\partial#2}}
\begin{document}

align
\begin{align}
\pd{f}{x} &= \pd{f}{z} \cdot \pd{z}{x} = \pd{f}{z} \cdot 1 \\
\pd{f}{y} &= \pd{f}{z} \cdot \pd{z}{y} = \pd{f}{z} \cdot i
\end{align}

equation
\begin{equation}
\pd{f}{x} = \pd{u}{x} + i \pd{v}{x} \quad \text{and} \quad \pd{f}{y} = \pd{u}{y} + i \pd{v}{y}
\end{equation}
\end{document}
2
  • 1
    thank you, may I know if it's worth using 'physics' package or does it have problems like 'commath'?
    – 147875
    Commented Dec 10, 2019 at 18:36
  • I can't say I've used either really (not my area) @147875 Commented Dec 10, 2019 at 19:16

You must log in to answer this question.

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