Text FormattingControl for Size of Braces under Parts of Equations

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
pemfir
Posts: 23
Joined: Sun Aug 12, 2012 11:30 pm

Control for Size of Braces under Parts of Equations

Post by pemfir »

The need braces under parts of equations as shown in the code below, but the size of braces are too big. For example the braces with (4) or (5) under are taking too much space. Is there anyway I can reduce the size of \underbrace or replace it with another suitable alternative?

Code: Select all

    
\documentclass{article}
\begin{document}
\[\begin{array}{l} {P(t)=F_{x} u(t)} \\ {=(\underbrace{W\sin (\theta (t))}_{(1)} +\underbrace{fW\cos (\theta (t))}_{(2)} +\underbrace{m{\rm \; }a(t)}_{(3)} +\underbrace{C_{I} }_{(4)} )u(t)+\underbrace{b}_{\tiny(5)} +\varepsilon (t)} \end{array}\] 
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Control for Size of Braces under Parts of Equations

Post by Stefan Kottwitz »

Very good that you posted a small compilable example! I intended to check and to answer every question which comes with such a minimal example for testing. So, here we go.

The standard braces are pretty big. You could load MnSymbol, which changes those braces so that they can be smaller. Perhaps insert \strut, \vphantom, or any invisible vertical rule to get equal vertical alignment of the braces.

Code: Select all

\documentclass{article}
\usepackage{MnSymbol}
\begin{document}
\[
  \begin{array}{l} {P(t)=F_{x} u(t)} \\
    {=(\underbrace{\strut W\sin (\theta (t))}_{(1)} +
       \underbrace{\strut fW\cos (\theta (t))}_{(2)} +
       \underbrace{\strut m{\rm \; }a(t)}_{(3)} +
       \underbrace{\strut C_{I} }_{(4)} )u(t) +
       \underbrace{\strut b}_{\tiny(5)} +\varepsilon (t)}
  \end{array}
\]
\end{document}

Before:
braces-1.png
braces-1.png (4.54 KiB) Viewed 10041 times
After:
braces-2.png
braces-2.png (4.21 KiB) Viewed 10041 times
Stefan
LaTeX.org admin
pemfir
Posts: 23
Joined: Sun Aug 12, 2012 11:30 pm

Re: Control for Size of Braces under Parts of Equations

Post by pemfir »

Thanks a lot for your answer, could you also tell me how you inserted those latex outputs/photos in your response ?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Control for Size of Braces under Parts of Equations

Post by Stefan Kottwitz »

It's quickly done:
  • Compile, scale the pdf reader so that the image is not so big
  • Make a screenshot (ALT+PRINTSCREEN key)
  • Copy/Insert into a graphic program (I used Paint.NET or GIMP)
  • Crop it, save it
  • In the forum, click on "Upload attachment", browse and upload it
  • To insert inbetween text, click the button "Place inline" after uploading
It's a matter of some seconds or one minute, and it's a great valuable addition for a forum post, as you can show a problem or a solution, which can be understood immediately for every reader without need to compile first.

Stefan
LaTeX.org admin
Post Reply