3

In the figure form, how to adjust the whole size of "text" and "math" format "as a combined figure" at once?

If this is a usual pdf figure, we can do \includegraphics[width=4.4in], such as below, the size is tuned by [width=4.4in]

\begin{figure}[htbp]
  \centering
  \includegraphics[width=4.4in]{.pdf}
  \caption{}\label{}
\end{figure}

Can we adjust the whole overall size of the figure (including the "text" and "math" format) at once by the similar function, like "size"?

I hope to have a 3-times-larger figure overall.

enter image description here

\documentclass{article}
\usepackage{mathtools,amssymb}
\begin{document}

\begin{figure}[!h]
\begin{center}
\begin{gather*}
\overbrace{\underbrace{A \times B}_E\times
           \underbrace{C\times {D}}_{EFG}}^{\text{ABCDEFG}} \\[-\normalbaselineskip]
\underbrace{\kern5em}_{\text{family}}
\end{gather*}
\end{center}
\caption{}
\end{figure}
\end{document}
3
\documentclass[fleqn]{article}
\usepackage{mathtools,amssymb,varwidth}
\usepackage{showframe}
\begin{document}

\begin{figure}[!htb]
\resizebox{\linewidth}{!}{%
  \begin{varwidth}{\linewidth}
  \mathindent=0pt
  \begin{gather*}
    \overbrace{\underbrace{A \times B}_E\times
               \underbrace{C\times {D}}_{EFG}}^{\text{ABCDEFG}}\\[-\normalbaselineskip]
    \underbrace{\hphantom{A\times B\times C\times D}}_{\text{family}}
    \end{gather*}
  \end{varwidth}}
  \caption{foo}
\end{figure}
\end{document}

enter image description here

Instead of \resizebox you can also use \scalebox:

[...]
\begin{figure}[!htb]
\centering
\scalebox{3}{%
  \begin{varwidth}{\linewidth}
[...]
| improve this answer | |
  • Thanks, may I make sure the complete code for your "\scalebox"? – wonderich Dec 28 '18 at 20:52
  • yes. By the way: If you do not need the environment gather* then it can be done in an easier way: \scalebox{3}{$\displaystyle\overbrace{\underbrace{A \times B}_E\times ...$} – user2478 Dec 28 '18 at 20:56
  • actually you taught me to use "gather*" - -what was that purpose in a previous post you answer? Thanks!!! – wonderich Dec 28 '18 at 21:00
  • It depends on what you want: Only one time an equation as big as possible or an equation as part of a document with other equations? In the first case it doesn't matter what you use ... – user2478 Dec 28 '18 at 21:06
  • 1
    Package graphicx is needed, but it is loaded already by mathtools. At least in my TeX distribution. – user2478 Dec 28 '18 at 21:13
3

If you want to resize content using a specific width/height, then you can use \resizebox{<width>}{<height>} (using ! to maintain the aspect ratio if you only specify one or the other). If you want to scale content using a number, you can use \scalebox{<num>}:

enter image description here

\documentclass{article}

\usepackage{graphicx,amsmath}

\begin{document}

\begin{figure}
  \centering
  \scalebox{3}{$\displaystyle % If needed...
    \underbrace{
      \overbrace{
        \underbrace{
          A \times B
        }_E \times \underbrace{
          C \times D
        }_{EFG}
      }^{\text{ABCDEFG}}
    }_{\text{family}}
  $}
  \caption{A caption}
\end{figure}

\end{document}

I've nested the family \underbrace as part of the bigger expression, so there's no need to manually place it based on the location. Also note the use of \centering rather than the center environment, and there's no need for using gather.

| improve this answer | |

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.