3

I would like to know how to scale the size of the text on the integral limits and also the powers in the code given below:

enter image description here

I used the command \DeclareMathSizes{10.95}{10}{7}{7} given here but there was no change to the fonts. Thanks for your help!

Code

\documentclass{article}
\usepackage[landscape]{geometry}
\usepackage{url}
\usepackage{multicol}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{esint}
\usepackage{amsfonts}
\usepackage{blox}
\usepackage{tikz}
\usetikzlibrary{quotes, decorations.pathmorphing, shapes, arrows.meta}

\usepackage{colortbl}
\usepackage{xcolor}
\usepackage{mathtools}
\usepackage{enumitem}

\makeatletter
\newcommand*\bigcdot{\mathpalette\bigcdot@{.5}}
\newcommand*\bigcdot@[2]{\mathbin{\vcenter{\hbox{\scalebox{#2}{$\m@th#1\bullet$}}}}}
\makeatother

%======================================================================================
%   FONTS
%======================================================================================

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%       Font
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
% For source code
\setmonofont{Source Code Pro Light}[
BoldFont=Source Code Pro,
]
% Normal font
\setsansfont{Fira Sans Light}[
Numbers=OldStyle,
BoldFont=Fira Sans Medium,
ItalicFont=Fira Sans Light Italic,
BoldItalicFont=Fira Sans Medium Italic
]
% Normal font
\setmainfont{Fira Sans Light}[
Numbers=OldStyle,
BoldFont=Fira Sans Medium,
ItalicFont=Fira Sans Light Italic,
BoldItalicFont=Fira Sans Medium Italic
]

\advance\topmargin-1in
\advance\textheight3in
\advance\textwidth3in
\advance\oddsidemargin-1.5in
\advance\evensidemargin-1.5in
\parindent0pt
\parskip2pt
\newcommand{\hr}{\centerline{\rule{3.5in}{1pt}}}
%\colorbox[HTML]{e4e4e4}{\makebox[\textwidth-2\fboxsep][l]{texto}
\begin{document}

{\textbf{Communications Systems}}\\
Z23367851
\begin{multicols*}{3}

\tikzstyle{mybox} = [draw=black, fill=white, very thick, font=\tiny,
    rectangle, rounded corners, inner sep=10pt, inner ysep=10pt]
\tikzstyle{fancytitle} =[fill=black, text=white, font=\scriptsize\bfseries]

%------------ Bandwidth and Noise ---------------
\begin{tikzpicture}
\node [mybox] (box){%
    \begin{minipage}{0.3\textwidth}
    A band limited signal cannot be time limited and a time-limited signal cannot be band limited.\\
    \end{minipage}
};
%------------ Bandwidth and Noise Header ---------------------
\node[fancytitle, right=10pt] at (box.north west) {Bandwidth and Noise};
\end{tikzpicture}

%------------ Energy ---------------
\begin{tikzpicture}
\node [mybox] (box){%
    \begin{minipage}{0.3\textwidth}
        Energy $E = \int\limits_{\infty}^{-\infty}|x(t)|^{2}dt$ if $E$ is finite\\
        Power $P=\lim\limits_{T \to \infty}\frac{1}{T}\int\limits_{T/2}^{-T/2}|x(t)|^{2}dt$
    \end{minipage}
};
%------------ Energy Header ---------------------
\node[fancytitle, right=10pt] at (box.north west) {Energy};
\end{tikzpicture}
\end{multicols*}
\end{document}
  • 2
    I believe the main issue is that you're setting the option font=\tiny when setting up \tikzstyle. The text mode command \tiny corresponds to the math mode command \scriptscriptstyle -- that's the smallest there is. Hence, the superscript- and subscript-position symbols can't be made any smaller. Question: What's the purpose of the font=\tiny option? – Mico Jul 9 '18 at 17:23
  • 2
    As @Mico pointed out, the Computer Modern math font has reached its minimum designed size after \tiny is issued under the default class option 10pt. Maybe you could try \DeclareMathSizes{5}{5}{4}{3}, provided that the math font is scalable, but this will no doubt make the text/math unreadable. – Ruixi Zhang Jul 9 '18 at 17:27
4

Don't use font=\tiny, as it won't let you typeset subscript and superscript material satisfactorily. At most, use font=\scriptsize; this recommendation is based on the fact that your code contains only first-level subscript and superscript material. If it contained second-order subscript and superscript material, I'd omit the font=... option entirely.

Using \int\limits in inline text mode surely is a typographic abomination. Use \int without \limits, please.

It's a common mistake to load the colortbl and xcolor packages independently. Don't do it; write \usepackage[table]{xcolor} instead.

About some of the other packages: the amsfonts package is loaded automatically if amssymb is loaded, and the amsmath package is loaded automatically if mathtools is loaded. Hence, no need to load either amsmath or amsfonts explicitly. Likewise, fontspec is loaded automatically by the unicode-math package.

The Latin Modern Math font family, which is the default math font, doesn't harmonize all that well with Fira Sans. Give Asana Math a try.

I can't figure out what employing a multicols* environment is supposed to achieve; the following code makes do without this environment.

enter image description here

\documentclass{article}
\usepackage[landscape]{geometry}
\usepackage{url}
%%\usepackage{multicol} % doesn't seem to be needed
\usepackage{mathtools,amssymb,amsthm}
%%\usepackage{esint}  % is this needed?
\usepackage[table]{xcolor} % load 'colortbl' in way that maximizes compatibility with 'xcolor'

\usepackage{blox}
\usepackage{tikz}
\usetikzlibrary{quotes, decorations.pathmorphing, shapes, arrows.meta}
\usepackage{enumitem}

\makeatletter
\newcommand*\bigcdot{\mathpalette\bigcdot@{.5}}
\newcommand*\bigcdot@[2]{\mathbin{\vcenter{\hbox{\scalebox{#2}{$\m@th#1\bullet$}}}}}
\makeatother

%=====================================
%   FONTS
%=====================================

\usepackage{unicode-math}  % loads 'fontspec' automatically
%\defaultfontfeatures{Ligatures=TeX} % 'Ligatures=TeX' is the default 
% Normal font
\setmainfont{Fira Sans Light}[
     Numbers       = OldStyle,
     BoldFont      = Fira Sans Medium,
     ItalicFont    = Fira Sans Light Italic,
     BoldItalicFont= Fira Sans Medium Italic]
\setsansfont{Fira Sans Light}[
     Numbers       = OldStyle,
     BoldFont      = Fira Sans Medium,
     ItalicFont    = Fira Sans Light Italic,
     BoldItalicFont= Fira Sans Medium Italic]
% For source code
\setmonofont{Source Code Pro Light}[
     BoldFont=Source Code Pro]

%% Math font
\setmathfont{Asana Math} % or some other suitable font

\advance\topmargin-1in
\advance\textheight3in
\advance\textwidth3in
\advance\oddsidemargin-1.5in
\advance\evensidemargin-1.5in
\parindent0pt
\parskip2pt
\newcommand{\hr}{\centerline{\rule{3.5in}{1pt}}}
%\colorbox[HTML]{e4e4e4}{\makebox[\textwidth-2\fboxsep][l]{texto}

\tikzstyle{mybox} = [draw=black, fill=white, very thick, font=\scriptsize,
    rectangle, rounded corners, inner sep=10pt, inner ysep=10pt]
\tikzstyle{fancytitle} =[fill=black, text=white, font=\scriptsize\bfseries]

\begin{document}
\textbf{Communications Systems}\\
Z23367851

%%\begin{multicols*}{3} %% What's the purpose of this instruction?

\bigskip
%------- Bandwidth and Noise ---------------
\begin{tikzpicture}
\node [mybox] (box){%
\begin{minipage}{0.3\textwidth}
A band limited signal cannot be time limited and 
a time limited signal cannot be band limited.
\end{minipage}
};
%------- Bandwidth and Noise Header ----------
\node[fancytitle, right=10pt] at (box.north west) {Bandwidth and Noise};
\end{tikzpicture}

%------- Energy ------------------------------
\begin{tikzpicture}
\node [mybox] (box){%
\begin{minipage}{0.3\textwidth}
Energy $E = \int_{\infty}^{-\infty}|x(t)|^{2}dt$ if $E$ is finite

Power $P=\lim\limits_{T \to \infty}\frac{1}{T}
   \int_{T/2}^{-T/2}\lvert x(t)\rvert^{2}dt$
\end{minipage}
};
%--------- Energy Header --------------------
\node[fancytitle, right=10pt] at (box.north west) {Energy};
\end{tikzpicture}

%%\end{multicols*}
\end{document}
  • 1
    The _{\infty}^{-\infty} and _{T/2}^{-T/2} though… Perhaps add a sentence explaining why amsfonts is removed would be helpful to new comers. Also, I doubt the use of esint when other math font is used as it provides integral signs based on Computer Modern/Latin Modern. – Ruixi Zhang Jul 9 '18 at 18:25
  • 1
    @RuixiZhang - Thanks for these suggestions. I've added a paragraph with additional package-related observations. – Mico Jul 9 '18 at 19:20
  • 1
    @RuixiZhang - I noticed the inverted order of the lower and upper limits of integration as well. I have no idea what the OP is trying to achieve with inverting the order, but I decided not to bring it up as the issue doesn't affect typographic matters. – Mico Jul 9 '18 at 19:31
  • I'd additionally mention that unicode-math already includes every symbol and math alphabet in amssymb and amsfonts. You generally will not want to combine the old NFSS symbol fonts with unicode-math anyway. – Davislor Jul 9 '18 at 20:07
  • @Davislor - I already mention that it's not necessary to load amsfonts explicitly if amssymb is loaded. About unicode-math: it may provide code for all symbols defined by amssymb/amsfonts, but whether or not the symbols are actually available also depends on the Unicode math font. A somewhat limited math font such as Neo Euler does not provide all symbols natively; supplementing that font's limited list of symbols with the offerings of amssymb/amsfonts may still be required. – Mico Jul 9 '18 at 20:16
2

Your default math font is not correctly scaled to your main document font. Since you are loading fontspec anyway, just load unicode-math, load a math font with Scale=MatchUppercase after you \setmainfont, and you're good to go.

The larger problem (no pun intended) is that LaTeX will not scale superscripts and subscripts down to 1.25 points. I raised the font size of the minipages to \footnotesize and their width to match.

I've taken some liberties with your source here, including replacing the math letters with your text fonts. Comment out the lines indicated if you do not want that. You might instead try raising the font size in the package options. I also added back in \textstyle for use inside an amsmath environment, and changed around some of the fractions. The absolute-value bars are now left and right delimiters that stretch, and the d in dt is properly upright and spaced.

\documentclass[varwidth, preview, 10pt]{standalone}

\usepackage{mathtools}    % includes amsmath
\usepackage{xfrac}        % for \sfrac
\usepackage{unicode-math} % includes fontspec, all symbols in Unicode
\usepackage[cols, HTML, hyperref, svgnames]{xcolor}
\usepackage{tikz}
\usetikzlibrary{quotes, decorations.pathmorphing, shapes, arrows.meta}

% Normal font
  \setmainfont{Fira Sans Light}[
  Numbers=OldStyle,
  BoldFont=Fira Sans Medium,
  ItalicFont=Fira Sans Light Italic,
  BoldItalicFont=Fira Sans Medium Italic,
  Ligatures={Common, Rare, TeX}
]

\defaultfontfeatures{Scale=MatchUppercase}

% Normal font
\setsansfont{Fira Sans Light}[
  Numbers=OldStyle,
  BoldFont=Fira Sans Medium,
  ItalicFont=Fira Sans Light Italic,
  BoldItalicFont=Fira Sans Medium Italic,
  Ligatures={Common, Rare, TeX}
]

% For source code
\setmonofont{Source Code Pro Light}[
  BoldFont=Source Code Pro,
  Ligatures=TeX
]

% The correctly-scaled math font
\setmathfont{Latin Modern Math}

% Comment out if you want to keep the Latin Modern math letters.
% Alternatively, there's a Fira Math project that's a work in progress.
\setmathfont{Fira Sans Light}[range={up,\infty}]
\setmathfont{Fira Sans Medium}[range=bfup]
\setmathfont{Fira Sans Light Italic}[range=it]
\setmathfont{Fira Sans Medium Italic}[range=bfit]

\setoperatorfont{\normalfont}

% Convenience macros:
\DeclarePairedDelimiter\abs{\lvert}{\rvert}
\newcommand\dx[1]{\,\symup{d}{#1}}

\begin{document}

{\textbf{Communications Systems}}\\
Z23367851

\tikzstyle{mybox} = [draw=black, fill=white, very thick,
    rectangle, rounded corners, inner sep=10pt, inner ysep=10pt,
    font=\footnotesize]
\tikzstyle{fancytitle} =[fill=black, text=white,font=\bfseries]

%------------ Bandwidth and Noise ---------------
\begin{tikzpicture}
\node [mybox] (box){%
    \begin{minipage}{0.4\textwidth}
    A band-limited signal cannot be time-limited and a time-limited signal cannot be band-limited.
    \end{minipage}
};
%------------ Bandwidth and Noise Header ---------------------
\node[fancytitle, right=10pt] at (box.north west) {Bandwidth and Noise};
\end{tikzpicture}

%------------ Energy ---------------
\begin{tikzpicture}
\node [mybox] (box){%
    \begin{minipage}{0.4\textwidth}
    \begin{align*}
      \text{Energy } E &=
        \textstyle\int\limits_{\infty}^{-\infty} \abs{x(t)}^{2}\dx{t}
        \text{ if \(E\) is finite}\\
      \text{Power } P &=
        \lim\limits_{T \to \infty}\frac{1}{T}
        \textstyle\int\limits_{\sfrac{T}{2}}^{ \sfrac{-T}{2}} 
        \abs{x(t)}t^{2}\dx{t}
    \end{align*}
    \end{minipage}
};
%------------ Energy Header ---------------------
\node[fancytitle, right=10pt] at (box.north west) {Energy};
\end{tikzpicture}
\end{document}

enter image description here

There is a Fira Math font under development as well, if you're interested. If you still want to tweak the settings of the superscripts and subscripts, you can add script-features= and sscript-features= settings to the options of \setmathfont, including Scale=.

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.