GeneralMath formatting help

LaTeX specific issues not fitting into one of the other forums of this category.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Math formatting help

Post by localghost »

Font size in math environments is set with other commands. Taking your example it would look like the following.

Code: Select all

\[
  {QA}_{j}(s,t_{j})=\frac{P_d (s,t_j)}{P_f (s,t_{j})}\rho_{j}(s,t_{j})}       % standard font
\]

\[
  \scriptstyle\widehat{S}_{f}(s,t_{j-1})=\frac{S_f (s)}{P_f (s,t_{j-1})}      % smaller font
\]
Some basics about that are given in lshort. Further reading about typesetting math expressions is available with "Math mode".


Best regards and welcome to the board
Thorsten¹

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

daleif
Posts: 199
Joined: Wed Nov 19, 2008 12:46 am

Re: Math formatting help

Post by daleif »

and besides as you can see from the .log-file \tiny and friends cannot be used in math-mode (which should be hint enough)

I would display the equation differently instead of decreasing the fontsize
gozzi84
Posts: 15
Joined: Tue Nov 25, 2008 3:25 pm

Re: Math formatting help

Post by gozzi84 »

How can I do then?

Sorry but I'm a novice in LateX...
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Math formatting help

Post by Juanjo »

Math formulas inherit the font size of the surrounding text. If, say, a \small declaration is in effect at some point of the document, that will be the font size for a formula included there. So, in your case, I would write something like:

Code: Select all

\tiny
\[
  \widehat{S}_{f}(s,t_{j-1})=\frac{S_f (s)}{P_f (s,t_{j-1})} %smaller font
\]
\normalsize
The \normalsize command just restores the "normal" size which was presumably in effect before the formula. You can try \small and \footnotesize instead of \tiny.
IMHO, \scriptstyle, as well as its companions \scriptscriptstyle and \textstyle, should not be used for globally change the font size in a formula. Spacing around the equal sign is not correct, the numerator and denominator are too cluttered.
gozzi84 wrote:How can I do then? .
That depends on the reasons which moved you to decrease the fontsize. For example, is there not enough room in the frame?
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
gozzi84
Posts: 15
Joined: Tue Nov 25, 2008 3:25 pm

Re: Math formatting help

Post by gozzi84 »

I'm preparing in LateX the slides for my discussion.

I have to insert both maths and text... in the parts where I haev only text how can I justify the text for both the richht and the left margin (as office word for example does).

thank you for your help.
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Math formatting help

Post by Juanjo »

See this thread.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
gozzi84
Posts: 15
Joined: Tue Nov 25, 2008 3:25 pm

Re: Math formatting help

Post by gozzi84 »

How can we justify a math equation to the left margin?

Doing this it doesn't work...


\begin{flushleft}

\[\mathnormal{
\boldsymbol{V_{\tiny{HCESC}}(s)}=\frac{S_f (s)}{S_f (t_0)}QA_{1}(s,t_{1})-\big(1+\tau L_{d}(t_{0},t_{0},t_{1})P_{d}(s,t_{1 })\big)...}\]

\end{flushleft}

Thanks
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Math formatting help

Post by Stefan Kottwitz »

Hi,
gozzi84 wrote:How can we justify a math equation to the left margin?
use the fleqn option to your documentclass at the very beginning of your document to force all equations to be left aligned, or use the flalign environment for just this equation, concerning flalign see amsmath user's guide.

Stefan
LaTeX.org admin
Post Reply