Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

When digit fractions align environment, this goes with a size \displaystyle. But I want the size is like the one shown in a paragraph. I tried with \scriptstyle but I get letters too small and the \small command not working under align environment. What I can do? Here I put a screenshot, lines down, to further clarify this idea and my question. Thanks in advance.

\documentclass{article}
\usepackage{showframe}
\usepackage{mathtools,amsmath}
\usepackage{amsthm}
\begin{document}

\begin{align*}
\rightarrow \quad &x=3,\frac{10}{3},\frac{11}{3}.   \tag{1}\\
\end{align*}
This is a text in paragraph: $\textrm{C.S}=\{3,\frac{10}{3},\frac{11}{3}.\}$

\end{document} 

my screenshot

share|improve this question
1  
Yes, use \textstyle within the align environment. –  Peter Grill Jan 23 at 7:57
    
Thank you, thank you very much. \textstyle works. –  mathsalomon Jan 23 at 8:01
1  
amsmath also provides the tfrac command, which sets a fraction in textstyle independent of the environment (conversely, dfrac always uses displaystyle). –  Christian Clason Jan 23 at 8:08

2 Answers 2

up vote 1 down vote accepted

There is another solution if you find there figures in textstyle too small: the \mfrac command,defined in the nccmath package:

\documentclass[12pt, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{mathtools, nccmath, textcomp} 

\begin{document}

Here’s an align environment typeset first with \verb+\mfrac+, then  \verb+\tfrac+ 
and finally\verb+\mfrac+: 
   \begin{align*}
   \rightarrow \quad &x=3, \frac{10}{3},\frac{11}{3}.  \\
   \rightarrow \quad &x=3, \tfrac{10}{3},\tfrac{11}{3}. \\
   \rightarrow \quad &x=3, \mfrac{10}{3},\mfrac{11}{3}. \\
   \end{align*}

This is a text in paragraph typeset with \verb+\tfrac+: $\textrm{C.S}=\{3,\frac{10}{3},\frac{11}{3}\}$.  

This is a text in another paragraph typeset with \verb+\mfrac+: $\textrm{C.S}=\bigl \{3,\mfrac{10}{3},\mfrac{11}{3}\bigr\}$. 
\end{document}

Comparison between the 3 types of fractions

share|improve this answer
    
Many thanks. But with \mfrac the numerator is located relatively high in the line of division of the fraction. You can control the vertical space between the numerator and the division line of the fraction on mfrac? –  mathsalomon Jan 24 at 8:30
    
No more no less as with \dfrac: roughly, it is a \dfrac in a (general) fontsize reduced by 20%. But I haven't really studied the code. –  Bernard Jan 24 at 9:00
    
@mathsalomon: FYI, When I started out, I made use of the nccmath package, but ran into numerous problem and since then have changed all my code to not use it. See Is there a replacement for nccmath? and the other linked questions there. –  Peter Grill Jan 25 at 0:06
    
@Peter Grill I didn't know about these problems between minipage and nccmath. That said, I very rarely use minipage since it is unbreakable across pages. I mainly use the ‘medium size’ math possibilities of ncc math. Do you know if loading the package is enough to have problems, or if it is only the use of certain commands/environments that results in problems? –  Bernard Jan 25 at 1:26
    
I thought I could configure that. Well I think it is not of much importance. It is a very small defect because \mfrac works OK with algebraic fractions, in this case they the fractions are perfectly distributed. Thanks guys for the comments . –  mathsalomon Jan 25 at 6:31

You can use textstyle to ensure that the math is typeset as it would have been within a paragraph:

enter image description here

Code:

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

\begin{align*} 
 \rightarrow \quad &x=3, \textstyle\frac{10}{3},\frac{11}{3}.   \tag{1}\\
\end{align*}
This is a text in paragraph: $\textrm{C.S}=\{3,\frac{10}{3},\frac{11}{3}.\}$

\end{document} 
share|improve this answer
    
Yeah, that's just what I wanted. –  mathsalomon Jan 23 at 8:09
1  
\tfrac{..}{...} also works since amsmath is being used. (it used \textstyle internally.) –  barbara beeton Jan 23 at 14:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.