Show inline math as if it were display math











up vote
126
down vote

favorite
61












I'm very familiar with how symbols display differently in inline mode (with $) vs. how display math shows them (with [ or $$). Two examples would be with limits



$lim_{nrigharrow infty}f(x)$


vs.



[lim_{nrigharrow infty}f(x)]


and with sums



$sum_{n=1}^{x} n^2$


vs.



[sum_{n=1}^{x} n^2]


My Question is:




How do you display these things in inline mode (with all the nice inline formatting) as though they were in display mode ?











share|improve this question




















  • 3




    For reference on the use of [...] or $$...$$, see: tex.stackexchange.com/questions/503/why-is-preferable-to
    – Werner
    Oct 26 '11 at 20:58








  • 2




    If the effect you want is only to have the limits look like displaystyle (but not the larger size) you might want to rephrase the question...in that case you might want to look at limits.
    – Yossi Farjoun
    Oct 26 '11 at 21:00












  • Related question: Sums in math mode: how to display index under the sigma sign?
    – Werner
    Oct 26 '11 at 21:03















up vote
126
down vote

favorite
61












I'm very familiar with how symbols display differently in inline mode (with $) vs. how display math shows them (with [ or $$). Two examples would be with limits



$lim_{nrigharrow infty}f(x)$


vs.



[lim_{nrigharrow infty}f(x)]


and with sums



$sum_{n=1}^{x} n^2$


vs.



[sum_{n=1}^{x} n^2]


My Question is:




How do you display these things in inline mode (with all the nice inline formatting) as though they were in display mode ?











share|improve this question




















  • 3




    For reference on the use of [...] or $$...$$, see: tex.stackexchange.com/questions/503/why-is-preferable-to
    – Werner
    Oct 26 '11 at 20:58








  • 2




    If the effect you want is only to have the limits look like displaystyle (but not the larger size) you might want to rephrase the question...in that case you might want to look at limits.
    – Yossi Farjoun
    Oct 26 '11 at 21:00












  • Related question: Sums in math mode: how to display index under the sigma sign?
    – Werner
    Oct 26 '11 at 21:03













up vote
126
down vote

favorite
61









up vote
126
down vote

favorite
61






61





I'm very familiar with how symbols display differently in inline mode (with $) vs. how display math shows them (with [ or $$). Two examples would be with limits



$lim_{nrigharrow infty}f(x)$


vs.



[lim_{nrigharrow infty}f(x)]


and with sums



$sum_{n=1}^{x} n^2$


vs.



[sum_{n=1}^{x} n^2]


My Question is:




How do you display these things in inline mode (with all the nice inline formatting) as though they were in display mode ?











share|improve this question















I'm very familiar with how symbols display differently in inline mode (with $) vs. how display math shows them (with [ or $$). Two examples would be with limits



$lim_{nrigharrow infty}f(x)$


vs.



[lim_{nrigharrow infty}f(x)]


and with sums



$sum_{n=1}^{x} n^2$


vs.



[sum_{n=1}^{x} n^2]


My Question is:




How do you display these things in inline mode (with all the nice inline formatting) as though they were in display mode ?








math-mode






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 27 '11 at 7:56









Neil G

7,536135292




7,536135292










asked Oct 26 '11 at 20:51









akdom

8852710




8852710








  • 3




    For reference on the use of [...] or $$...$$, see: tex.stackexchange.com/questions/503/why-is-preferable-to
    – Werner
    Oct 26 '11 at 20:58








  • 2




    If the effect you want is only to have the limits look like displaystyle (but not the larger size) you might want to rephrase the question...in that case you might want to look at limits.
    – Yossi Farjoun
    Oct 26 '11 at 21:00












  • Related question: Sums in math mode: how to display index under the sigma sign?
    – Werner
    Oct 26 '11 at 21:03














  • 3




    For reference on the use of [...] or $$...$$, see: tex.stackexchange.com/questions/503/why-is-preferable-to
    – Werner
    Oct 26 '11 at 20:58








  • 2




    If the effect you want is only to have the limits look like displaystyle (but not the larger size) you might want to rephrase the question...in that case you might want to look at limits.
    – Yossi Farjoun
    Oct 26 '11 at 21:00












  • Related question: Sums in math mode: how to display index under the sigma sign?
    – Werner
    Oct 26 '11 at 21:03








3




3




For reference on the use of [...] or $$...$$, see: tex.stackexchange.com/questions/503/why-is-preferable-to
– Werner
Oct 26 '11 at 20:58






For reference on the use of [...] or $$...$$, see: tex.stackexchange.com/questions/503/why-is-preferable-to
– Werner
Oct 26 '11 at 20:58






2




2




If the effect you want is only to have the limits look like displaystyle (but not the larger size) you might want to rephrase the question...in that case you might want to look at limits.
– Yossi Farjoun
Oct 26 '11 at 21:00






If the effect you want is only to have the limits look like displaystyle (but not the larger size) you might want to rephrase the question...in that case you might want to look at limits.
– Yossi Farjoun
Oct 26 '11 at 21:00














Related question: Sums in math mode: how to display index under the sigma sign?
– Werner
Oct 26 '11 at 21:03




Related question: Sums in math mode: how to display index under the sigma sign?
– Werner
Oct 26 '11 at 21:03










4 Answers
4






active

oldest

votes

















up vote
200
down vote



accepted










I think there are two separate aspects to your question:




  • How does one control the size of integral, sum and product symbols?


  • How does one control the placement of the limits of integration, summation, and multiplication: side-set vs. below/above?



These two aspects can be addressed separately.




  • To control the size of the operators explicitly, one writes either textstyle for small symbols or displaystyle for large symbols, before the command that generates the symbol.


    • Side remark, inspired by an observation by @HaraldHancheOlsen: In addition to influencing the size of the operators created by the commands sum, prod, etc, the declarations textstyle and displaystyle may also affect the behavior of other subsequent commands in the current math-mode environment.



  • To control the placement of the limits, one writes either nolimits (for side-set limits) or limits (for limits set below&above the symbol) after the command that generates the symbol.


The possibilities are illustrated in the table below.



The default settings in LaTeX are (I'm assuming the amsmath package is loaded too):




  • Inline math: Small operator symbols;


    • Limits side-set for all operators;

    • Note: Setting the options sumlimits and intlimits when loading the amsmath package does not affect the placement of limits when in inline math.



  • Display math: Large operator symbols;



    • sum, prod, coprod, etc: Limits set above and below operator, unless amsmath was loaded with the option nosumlimits.


      • Note: The sumlimits and nosumlimits options (and the commands limits and nolimits) affect not only the appearance of summation symbols in display math mode, but also that of prod,coprod, bigcup and bigcap, etc. See Tables 57 to 65 of the Comprehensive LaTeX Symbol List for the names of these "large" -- more precisely, "variable-sized" -- math operators. The only group of variable-sized operators that's treated differently is the set of integral symbols (presumably because they're generally already quite a bit taller than the other "large" operators).




    • int: Limits are set to the side of integral symbol unless amsmath was loaded with the option intlimits.




enter image description here



Here's the code for the preceding table:



documentclass[letterpaper]{standalone}
usepackage{array,amsmath,booktabs}
begin{document}
Huge
begin{tabular}{l
>{$textstyle}l<{$} % first math column: text style
>{$displaystyle}l<{$}} % second math column: display style
toprule
Placement of limits & multicolumn{2}{c}{Size of operators} \
cmidrule{2-3}
& multicolumn{1}{l}{small:}
& multicolumn{1}{l}{large:}\
& multicolumn{1}{l}{texttt{textbackslash textstyle}}
& multicolumn{1}{l}{texttt{textbackslash displaystyle}}\
cmidrule[lightrulewidth]{2-3}
Next to symbol: & multicolumn{1}{l}{phantom{texttt{textbackslash displaystyle }}}\
texttt{textbackslash nolimits}
& sumnolimits_{i=1}^N a_i
& sumnolimits_{i=1}^N a_i \[2ex]
& prodnolimits_{j=0}^J k_j
& prodnolimits_{j=0}^J k_j \[2.5ex]
& intnolimits_{-infty}^infty f(x),mathrm{d}x
& intnolimits_{-infty}^infty f(x),mathrm{d}x \[5ex]
Below & above symbol:\[-1ex]
texttt{textbackslash limits}
& sumlimits_{i=1}^N a_i
& sumlimits_{i=1}^N a_i \[3.5ex]
& prodlimits_{j=0}^J k_j
& prodlimits_{j=0}^J k_j \[4ex]
& intlimits_{-infty}^infty f(x),mathrm{d}x
& intlimits_{-infty}^infty f(x),mathrm{d}x \
bottomrule
end{tabular}
end{document}


Finally, some personal views on the (ab)uses of the limits and displaystyle commands when in inline math mode:




  • It's generally not a good idea to use the limits command when in inline math mode. Otherwise, one is virtually assured of wrecking the appearance of the paragraph where the formula appears.

  • It's frequently not even necessary to indicate the full set of limits of a summation or multiplication when in inline math mode. Expressions such as sum_i or prod_j are usually just fine. You may even be able to get away with omitting the subscripts i and j!

  • Using the displaystyle command (to force the creation of large symbols) while in inline math mode is an even worse idea than using limits.






share|improve this answer



















  • 11




    Informative & educative!
    – Werner
    Oct 26 '11 at 23:07






  • 4




    Minor nit: You might have made it more clear that displaystyle and textstyle do not affect only the following symbol. They are declarations whose effects last until the end of the formula (or group) or until overridden.
    – Harald Hanche-Olsen
    Oct 27 '11 at 16:20






  • 12




    I have found that displaystyle in inline math is useful when preparing beamer presentations. In an itemized list, sometimes there is a short text (like two words) preceding a formula, and I don't want to waste valuable vertical space on a displayed formula but do want large symbols. Then displaystyle is appropriate, since the items in a list are visually similar to displays.
    – Ryan Reich
    Feb 14 '12 at 19:47






  • 1




    @RyanReich: Good point about Beamer presentations' material often having different requirements than that of "ordinary" inline material. Thus, bullet point stuff can behave very much like display math material -- and hence may need to invoke displaystyle and/or limits.
    – Mico
    Feb 14 '12 at 23:12


















up vote
44
down vote













Good typography relies on the balance of all aspects of black and white on the page. Uniformly spaced lines for the ordinary text make for good legibility. That's why some symbols, that in display are rendered with limits above and below, are set with limits on the side when used in in-line formulas.



I too, when I began to use TeX, tried to set limits for sums above and below also in in-line formulas, but I soon realized that it's wrong: two white bands separated that line from the next ones.



For that very reason the symbols for summation and integral are set in two different sizes: a smaller one for in-line formulas, a larger one for displayed formulas that don't have spacing constraints.



Displayed formulas are set using (automatically) displaystyle, so



$displaystylesum_{n=1}^{x} n^2$


would produce the same symbol used in displayed formulas and set limits above and below. But this will damage the balance of the page beyond repair. A less invasive construction



$sumlimits_{n=1}^{x} n^2$


and its sibling



$limlimits_{ntoinfty}f(x)$


will do less damage to the page, but will nevertheless spoil it.



Such constructions have their use, for examples in tables where TeX would use in-line math mode. But I will never suggest to use them in normal text.






share|improve this answer



















  • 2




    While true, your answer reads a little patronizing. I think we can treat users of this site as adults. if somebody asks how to do something, we should not assume that they do not know what they are talking about, or at-least should not let our answer show that... :-)
    – Yossi Farjoun
    Oct 26 '11 at 21:32






  • 21




    @YossiFarjoun, while egreg's response is a bit sharp, I don't think it is always a bad idea to question someone's purpose for wanting to achieve a certain look with TeX. As someone who started using LaTeX not too long ago, I must credit my still-improving sense for good typesetting to people who told me that I didn't actually want to do what I said I wanted to do. I would be a poorer TeXer were it not for them. In general, it seems to be a feature of well-designed systems that learning them requires shifting one's approach to problems.
    – JohnJamesSmith
    Oct 26 '11 at 22:08






  • 2




    That's a fantastic new version egreg. Definitely a more complete answer to the question.
    – akdom
    Oct 27 '11 at 23:37






  • 1




    @dh87 That's simply wrong, particularly in exponents.
    – egreg
    May 1 '16 at 15:36






  • 1




    @dh87 Sorry: do as he likes. But be still thinking it's wrong. ;-)
    – egreg
    May 1 '16 at 15:53




















up vote
43
down vote













The other answers are excellent, and normally I would not try to change the behavior of inline functions. However, there is one case where I wish inline functions to behave just like displayed functions. That is when I write exams. I am willing to compromise on typesetting for readability. If you put



everymath{displaystyle}


in your preamble, every equation will be typeset in that manner, and you don't have to put displaystyle in every equation. Of course, if you are looking to change just a few equations, then displaystyle is easy to use.






share|improve this answer



















  • 1




    the only answer that actually solves this problem
    – Håkon
    Aug 20 '15 at 4:23






  • 4




    @IllegalImmigrant Unfortunately, it's the wrong answer. It has several upvotes, probably because of simplicity; but this simplicity is at the expense of good typography. No, doing everymath{displaystyle} is generally a bad idea.
    – egreg
    Oct 15 '15 at 12:20




















up vote
11
down vote













The solution you seek is to use the displaystyle command within the inline environment as such.



$displaystylesum_{n=1}^{x} n^2$


This will give the nice effect of the starting term being underneath the sigma and the maximum value above while keeping the symbols inline.






share|improve this answer



















  • 13




    Interesting how the presentation is done in the 3rd person.
    – Werner
    Oct 26 '11 at 20:55










  • I figured that it would be the most immediately accessible for people quickly looking for an answer :) .
    – akdom
    Oct 26 '11 at 20:58










  • Well, it a wrong answer.
    – egreg
    Oct 26 '11 at 21:00






  • 1




    @egreg: The answer isn't wrong....it answers the question exactly. I think that the question is wrong...but that's what down-voting the question is for...
    – Yossi Farjoun
    Oct 26 '11 at 21:33






  • 17




    I have to admit that I don't like the way that the answer is phrased (irrespective of whether or not it is correct). Answering ones own question is absolutely fine, but do it honestly not pretending that you aren't the person who asked the question.
    – Loop Space
    Oct 27 '11 at 6:36











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f32824%2fshow-inline-math-as-if-it-were-display-math%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























4 Answers
4






active

oldest

votes








4 Answers
4






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
200
down vote



accepted










I think there are two separate aspects to your question:




  • How does one control the size of integral, sum and product symbols?


  • How does one control the placement of the limits of integration, summation, and multiplication: side-set vs. below/above?



These two aspects can be addressed separately.




  • To control the size of the operators explicitly, one writes either textstyle for small symbols or displaystyle for large symbols, before the command that generates the symbol.


    • Side remark, inspired by an observation by @HaraldHancheOlsen: In addition to influencing the size of the operators created by the commands sum, prod, etc, the declarations textstyle and displaystyle may also affect the behavior of other subsequent commands in the current math-mode environment.



  • To control the placement of the limits, one writes either nolimits (for side-set limits) or limits (for limits set below&above the symbol) after the command that generates the symbol.


The possibilities are illustrated in the table below.



The default settings in LaTeX are (I'm assuming the amsmath package is loaded too):




  • Inline math: Small operator symbols;


    • Limits side-set for all operators;

    • Note: Setting the options sumlimits and intlimits when loading the amsmath package does not affect the placement of limits when in inline math.



  • Display math: Large operator symbols;



    • sum, prod, coprod, etc: Limits set above and below operator, unless amsmath was loaded with the option nosumlimits.


      • Note: The sumlimits and nosumlimits options (and the commands limits and nolimits) affect not only the appearance of summation symbols in display math mode, but also that of prod,coprod, bigcup and bigcap, etc. See Tables 57 to 65 of the Comprehensive LaTeX Symbol List for the names of these "large" -- more precisely, "variable-sized" -- math operators. The only group of variable-sized operators that's treated differently is the set of integral symbols (presumably because they're generally already quite a bit taller than the other "large" operators).




    • int: Limits are set to the side of integral symbol unless amsmath was loaded with the option intlimits.




enter image description here



Here's the code for the preceding table:



documentclass[letterpaper]{standalone}
usepackage{array,amsmath,booktabs}
begin{document}
Huge
begin{tabular}{l
>{$textstyle}l<{$} % first math column: text style
>{$displaystyle}l<{$}} % second math column: display style
toprule
Placement of limits & multicolumn{2}{c}{Size of operators} \
cmidrule{2-3}
& multicolumn{1}{l}{small:}
& multicolumn{1}{l}{large:}\
& multicolumn{1}{l}{texttt{textbackslash textstyle}}
& multicolumn{1}{l}{texttt{textbackslash displaystyle}}\
cmidrule[lightrulewidth]{2-3}
Next to symbol: & multicolumn{1}{l}{phantom{texttt{textbackslash displaystyle }}}\
texttt{textbackslash nolimits}
& sumnolimits_{i=1}^N a_i
& sumnolimits_{i=1}^N a_i \[2ex]
& prodnolimits_{j=0}^J k_j
& prodnolimits_{j=0}^J k_j \[2.5ex]
& intnolimits_{-infty}^infty f(x),mathrm{d}x
& intnolimits_{-infty}^infty f(x),mathrm{d}x \[5ex]
Below & above symbol:\[-1ex]
texttt{textbackslash limits}
& sumlimits_{i=1}^N a_i
& sumlimits_{i=1}^N a_i \[3.5ex]
& prodlimits_{j=0}^J k_j
& prodlimits_{j=0}^J k_j \[4ex]
& intlimits_{-infty}^infty f(x),mathrm{d}x
& intlimits_{-infty}^infty f(x),mathrm{d}x \
bottomrule
end{tabular}
end{document}


Finally, some personal views on the (ab)uses of the limits and displaystyle commands when in inline math mode:




  • It's generally not a good idea to use the limits command when in inline math mode. Otherwise, one is virtually assured of wrecking the appearance of the paragraph where the formula appears.

  • It's frequently not even necessary to indicate the full set of limits of a summation or multiplication when in inline math mode. Expressions such as sum_i or prod_j are usually just fine. You may even be able to get away with omitting the subscripts i and j!

  • Using the displaystyle command (to force the creation of large symbols) while in inline math mode is an even worse idea than using limits.






share|improve this answer



















  • 11




    Informative & educative!
    – Werner
    Oct 26 '11 at 23:07






  • 4




    Minor nit: You might have made it more clear that displaystyle and textstyle do not affect only the following symbol. They are declarations whose effects last until the end of the formula (or group) or until overridden.
    – Harald Hanche-Olsen
    Oct 27 '11 at 16:20






  • 12




    I have found that displaystyle in inline math is useful when preparing beamer presentations. In an itemized list, sometimes there is a short text (like two words) preceding a formula, and I don't want to waste valuable vertical space on a displayed formula but do want large symbols. Then displaystyle is appropriate, since the items in a list are visually similar to displays.
    – Ryan Reich
    Feb 14 '12 at 19:47






  • 1




    @RyanReich: Good point about Beamer presentations' material often having different requirements than that of "ordinary" inline material. Thus, bullet point stuff can behave very much like display math material -- and hence may need to invoke displaystyle and/or limits.
    – Mico
    Feb 14 '12 at 23:12















up vote
200
down vote



accepted










I think there are two separate aspects to your question:




  • How does one control the size of integral, sum and product symbols?


  • How does one control the placement of the limits of integration, summation, and multiplication: side-set vs. below/above?



These two aspects can be addressed separately.




  • To control the size of the operators explicitly, one writes either textstyle for small symbols or displaystyle for large symbols, before the command that generates the symbol.


    • Side remark, inspired by an observation by @HaraldHancheOlsen: In addition to influencing the size of the operators created by the commands sum, prod, etc, the declarations textstyle and displaystyle may also affect the behavior of other subsequent commands in the current math-mode environment.



  • To control the placement of the limits, one writes either nolimits (for side-set limits) or limits (for limits set below&above the symbol) after the command that generates the symbol.


The possibilities are illustrated in the table below.



The default settings in LaTeX are (I'm assuming the amsmath package is loaded too):




  • Inline math: Small operator symbols;


    • Limits side-set for all operators;

    • Note: Setting the options sumlimits and intlimits when loading the amsmath package does not affect the placement of limits when in inline math.



  • Display math: Large operator symbols;



    • sum, prod, coprod, etc: Limits set above and below operator, unless amsmath was loaded with the option nosumlimits.


      • Note: The sumlimits and nosumlimits options (and the commands limits and nolimits) affect not only the appearance of summation symbols in display math mode, but also that of prod,coprod, bigcup and bigcap, etc. See Tables 57 to 65 of the Comprehensive LaTeX Symbol List for the names of these "large" -- more precisely, "variable-sized" -- math operators. The only group of variable-sized operators that's treated differently is the set of integral symbols (presumably because they're generally already quite a bit taller than the other "large" operators).




    • int: Limits are set to the side of integral symbol unless amsmath was loaded with the option intlimits.




enter image description here



Here's the code for the preceding table:



documentclass[letterpaper]{standalone}
usepackage{array,amsmath,booktabs}
begin{document}
Huge
begin{tabular}{l
>{$textstyle}l<{$} % first math column: text style
>{$displaystyle}l<{$}} % second math column: display style
toprule
Placement of limits & multicolumn{2}{c}{Size of operators} \
cmidrule{2-3}
& multicolumn{1}{l}{small:}
& multicolumn{1}{l}{large:}\
& multicolumn{1}{l}{texttt{textbackslash textstyle}}
& multicolumn{1}{l}{texttt{textbackslash displaystyle}}\
cmidrule[lightrulewidth]{2-3}
Next to symbol: & multicolumn{1}{l}{phantom{texttt{textbackslash displaystyle }}}\
texttt{textbackslash nolimits}
& sumnolimits_{i=1}^N a_i
& sumnolimits_{i=1}^N a_i \[2ex]
& prodnolimits_{j=0}^J k_j
& prodnolimits_{j=0}^J k_j \[2.5ex]
& intnolimits_{-infty}^infty f(x),mathrm{d}x
& intnolimits_{-infty}^infty f(x),mathrm{d}x \[5ex]
Below & above symbol:\[-1ex]
texttt{textbackslash limits}
& sumlimits_{i=1}^N a_i
& sumlimits_{i=1}^N a_i \[3.5ex]
& prodlimits_{j=0}^J k_j
& prodlimits_{j=0}^J k_j \[4ex]
& intlimits_{-infty}^infty f(x),mathrm{d}x
& intlimits_{-infty}^infty f(x),mathrm{d}x \
bottomrule
end{tabular}
end{document}


Finally, some personal views on the (ab)uses of the limits and displaystyle commands when in inline math mode:




  • It's generally not a good idea to use the limits command when in inline math mode. Otherwise, one is virtually assured of wrecking the appearance of the paragraph where the formula appears.

  • It's frequently not even necessary to indicate the full set of limits of a summation or multiplication when in inline math mode. Expressions such as sum_i or prod_j are usually just fine. You may even be able to get away with omitting the subscripts i and j!

  • Using the displaystyle command (to force the creation of large symbols) while in inline math mode is an even worse idea than using limits.






share|improve this answer



















  • 11




    Informative & educative!
    – Werner
    Oct 26 '11 at 23:07






  • 4




    Minor nit: You might have made it more clear that displaystyle and textstyle do not affect only the following symbol. They are declarations whose effects last until the end of the formula (or group) or until overridden.
    – Harald Hanche-Olsen
    Oct 27 '11 at 16:20






  • 12




    I have found that displaystyle in inline math is useful when preparing beamer presentations. In an itemized list, sometimes there is a short text (like two words) preceding a formula, and I don't want to waste valuable vertical space on a displayed formula but do want large symbols. Then displaystyle is appropriate, since the items in a list are visually similar to displays.
    – Ryan Reich
    Feb 14 '12 at 19:47






  • 1




    @RyanReich: Good point about Beamer presentations' material often having different requirements than that of "ordinary" inline material. Thus, bullet point stuff can behave very much like display math material -- and hence may need to invoke displaystyle and/or limits.
    – Mico
    Feb 14 '12 at 23:12













up vote
200
down vote



accepted







up vote
200
down vote



accepted






I think there are two separate aspects to your question:




  • How does one control the size of integral, sum and product symbols?


  • How does one control the placement of the limits of integration, summation, and multiplication: side-set vs. below/above?



These two aspects can be addressed separately.




  • To control the size of the operators explicitly, one writes either textstyle for small symbols or displaystyle for large symbols, before the command that generates the symbol.


    • Side remark, inspired by an observation by @HaraldHancheOlsen: In addition to influencing the size of the operators created by the commands sum, prod, etc, the declarations textstyle and displaystyle may also affect the behavior of other subsequent commands in the current math-mode environment.



  • To control the placement of the limits, one writes either nolimits (for side-set limits) or limits (for limits set below&above the symbol) after the command that generates the symbol.


The possibilities are illustrated in the table below.



The default settings in LaTeX are (I'm assuming the amsmath package is loaded too):




  • Inline math: Small operator symbols;


    • Limits side-set for all operators;

    • Note: Setting the options sumlimits and intlimits when loading the amsmath package does not affect the placement of limits when in inline math.



  • Display math: Large operator symbols;



    • sum, prod, coprod, etc: Limits set above and below operator, unless amsmath was loaded with the option nosumlimits.


      • Note: The sumlimits and nosumlimits options (and the commands limits and nolimits) affect not only the appearance of summation symbols in display math mode, but also that of prod,coprod, bigcup and bigcap, etc. See Tables 57 to 65 of the Comprehensive LaTeX Symbol List for the names of these "large" -- more precisely, "variable-sized" -- math operators. The only group of variable-sized operators that's treated differently is the set of integral symbols (presumably because they're generally already quite a bit taller than the other "large" operators).




    • int: Limits are set to the side of integral symbol unless amsmath was loaded with the option intlimits.




enter image description here



Here's the code for the preceding table:



documentclass[letterpaper]{standalone}
usepackage{array,amsmath,booktabs}
begin{document}
Huge
begin{tabular}{l
>{$textstyle}l<{$} % first math column: text style
>{$displaystyle}l<{$}} % second math column: display style
toprule
Placement of limits & multicolumn{2}{c}{Size of operators} \
cmidrule{2-3}
& multicolumn{1}{l}{small:}
& multicolumn{1}{l}{large:}\
& multicolumn{1}{l}{texttt{textbackslash textstyle}}
& multicolumn{1}{l}{texttt{textbackslash displaystyle}}\
cmidrule[lightrulewidth]{2-3}
Next to symbol: & multicolumn{1}{l}{phantom{texttt{textbackslash displaystyle }}}\
texttt{textbackslash nolimits}
& sumnolimits_{i=1}^N a_i
& sumnolimits_{i=1}^N a_i \[2ex]
& prodnolimits_{j=0}^J k_j
& prodnolimits_{j=0}^J k_j \[2.5ex]
& intnolimits_{-infty}^infty f(x),mathrm{d}x
& intnolimits_{-infty}^infty f(x),mathrm{d}x \[5ex]
Below & above symbol:\[-1ex]
texttt{textbackslash limits}
& sumlimits_{i=1}^N a_i
& sumlimits_{i=1}^N a_i \[3.5ex]
& prodlimits_{j=0}^J k_j
& prodlimits_{j=0}^J k_j \[4ex]
& intlimits_{-infty}^infty f(x),mathrm{d}x
& intlimits_{-infty}^infty f(x),mathrm{d}x \
bottomrule
end{tabular}
end{document}


Finally, some personal views on the (ab)uses of the limits and displaystyle commands when in inline math mode:




  • It's generally not a good idea to use the limits command when in inline math mode. Otherwise, one is virtually assured of wrecking the appearance of the paragraph where the formula appears.

  • It's frequently not even necessary to indicate the full set of limits of a summation or multiplication when in inline math mode. Expressions such as sum_i or prod_j are usually just fine. You may even be able to get away with omitting the subscripts i and j!

  • Using the displaystyle command (to force the creation of large symbols) while in inline math mode is an even worse idea than using limits.






share|improve this answer














I think there are two separate aspects to your question:




  • How does one control the size of integral, sum and product symbols?


  • How does one control the placement of the limits of integration, summation, and multiplication: side-set vs. below/above?



These two aspects can be addressed separately.




  • To control the size of the operators explicitly, one writes either textstyle for small symbols or displaystyle for large symbols, before the command that generates the symbol.


    • Side remark, inspired by an observation by @HaraldHancheOlsen: In addition to influencing the size of the operators created by the commands sum, prod, etc, the declarations textstyle and displaystyle may also affect the behavior of other subsequent commands in the current math-mode environment.



  • To control the placement of the limits, one writes either nolimits (for side-set limits) or limits (for limits set below&above the symbol) after the command that generates the symbol.


The possibilities are illustrated in the table below.



The default settings in LaTeX are (I'm assuming the amsmath package is loaded too):




  • Inline math: Small operator symbols;


    • Limits side-set for all operators;

    • Note: Setting the options sumlimits and intlimits when loading the amsmath package does not affect the placement of limits when in inline math.



  • Display math: Large operator symbols;



    • sum, prod, coprod, etc: Limits set above and below operator, unless amsmath was loaded with the option nosumlimits.


      • Note: The sumlimits and nosumlimits options (and the commands limits and nolimits) affect not only the appearance of summation symbols in display math mode, but also that of prod,coprod, bigcup and bigcap, etc. See Tables 57 to 65 of the Comprehensive LaTeX Symbol List for the names of these "large" -- more precisely, "variable-sized" -- math operators. The only group of variable-sized operators that's treated differently is the set of integral symbols (presumably because they're generally already quite a bit taller than the other "large" operators).




    • int: Limits are set to the side of integral symbol unless amsmath was loaded with the option intlimits.




enter image description here



Here's the code for the preceding table:



documentclass[letterpaper]{standalone}
usepackage{array,amsmath,booktabs}
begin{document}
Huge
begin{tabular}{l
>{$textstyle}l<{$} % first math column: text style
>{$displaystyle}l<{$}} % second math column: display style
toprule
Placement of limits & multicolumn{2}{c}{Size of operators} \
cmidrule{2-3}
& multicolumn{1}{l}{small:}
& multicolumn{1}{l}{large:}\
& multicolumn{1}{l}{texttt{textbackslash textstyle}}
& multicolumn{1}{l}{texttt{textbackslash displaystyle}}\
cmidrule[lightrulewidth]{2-3}
Next to symbol: & multicolumn{1}{l}{phantom{texttt{textbackslash displaystyle }}}\
texttt{textbackslash nolimits}
& sumnolimits_{i=1}^N a_i
& sumnolimits_{i=1}^N a_i \[2ex]
& prodnolimits_{j=0}^J k_j
& prodnolimits_{j=0}^J k_j \[2.5ex]
& intnolimits_{-infty}^infty f(x),mathrm{d}x
& intnolimits_{-infty}^infty f(x),mathrm{d}x \[5ex]
Below & above symbol:\[-1ex]
texttt{textbackslash limits}
& sumlimits_{i=1}^N a_i
& sumlimits_{i=1}^N a_i \[3.5ex]
& prodlimits_{j=0}^J k_j
& prodlimits_{j=0}^J k_j \[4ex]
& intlimits_{-infty}^infty f(x),mathrm{d}x
& intlimits_{-infty}^infty f(x),mathrm{d}x \
bottomrule
end{tabular}
end{document}


Finally, some personal views on the (ab)uses of the limits and displaystyle commands when in inline math mode:




  • It's generally not a good idea to use the limits command when in inline math mode. Otherwise, one is virtually assured of wrecking the appearance of the paragraph where the formula appears.

  • It's frequently not even necessary to indicate the full set of limits of a summation or multiplication when in inline math mode. Expressions such as sum_i or prod_j are usually just fine. You may even be able to get away with omitting the subscripts i and j!

  • Using the displaystyle command (to force the creation of large symbols) while in inline math mode is an even worse idea than using limits.







share|improve this answer














share|improve this answer



share|improve this answer








edited May 28 '17 at 14:19

























answered Oct 26 '11 at 21:53









Mico

270k30367751




270k30367751








  • 11




    Informative & educative!
    – Werner
    Oct 26 '11 at 23:07






  • 4




    Minor nit: You might have made it more clear that displaystyle and textstyle do not affect only the following symbol. They are declarations whose effects last until the end of the formula (or group) or until overridden.
    – Harald Hanche-Olsen
    Oct 27 '11 at 16:20






  • 12




    I have found that displaystyle in inline math is useful when preparing beamer presentations. In an itemized list, sometimes there is a short text (like two words) preceding a formula, and I don't want to waste valuable vertical space on a displayed formula but do want large symbols. Then displaystyle is appropriate, since the items in a list are visually similar to displays.
    – Ryan Reich
    Feb 14 '12 at 19:47






  • 1




    @RyanReich: Good point about Beamer presentations' material often having different requirements than that of "ordinary" inline material. Thus, bullet point stuff can behave very much like display math material -- and hence may need to invoke displaystyle and/or limits.
    – Mico
    Feb 14 '12 at 23:12














  • 11




    Informative & educative!
    – Werner
    Oct 26 '11 at 23:07






  • 4




    Minor nit: You might have made it more clear that displaystyle and textstyle do not affect only the following symbol. They are declarations whose effects last until the end of the formula (or group) or until overridden.
    – Harald Hanche-Olsen
    Oct 27 '11 at 16:20






  • 12




    I have found that displaystyle in inline math is useful when preparing beamer presentations. In an itemized list, sometimes there is a short text (like two words) preceding a formula, and I don't want to waste valuable vertical space on a displayed formula but do want large symbols. Then displaystyle is appropriate, since the items in a list are visually similar to displays.
    – Ryan Reich
    Feb 14 '12 at 19:47






  • 1




    @RyanReich: Good point about Beamer presentations' material often having different requirements than that of "ordinary" inline material. Thus, bullet point stuff can behave very much like display math material -- and hence may need to invoke displaystyle and/or limits.
    – Mico
    Feb 14 '12 at 23:12








11




11




Informative & educative!
– Werner
Oct 26 '11 at 23:07




Informative & educative!
– Werner
Oct 26 '11 at 23:07




4




4




Minor nit: You might have made it more clear that displaystyle and textstyle do not affect only the following symbol. They are declarations whose effects last until the end of the formula (or group) or until overridden.
– Harald Hanche-Olsen
Oct 27 '11 at 16:20




Minor nit: You might have made it more clear that displaystyle and textstyle do not affect only the following symbol. They are declarations whose effects last until the end of the formula (or group) or until overridden.
– Harald Hanche-Olsen
Oct 27 '11 at 16:20




12




12




I have found that displaystyle in inline math is useful when preparing beamer presentations. In an itemized list, sometimes there is a short text (like two words) preceding a formula, and I don't want to waste valuable vertical space on a displayed formula but do want large symbols. Then displaystyle is appropriate, since the items in a list are visually similar to displays.
– Ryan Reich
Feb 14 '12 at 19:47




I have found that displaystyle in inline math is useful when preparing beamer presentations. In an itemized list, sometimes there is a short text (like two words) preceding a formula, and I don't want to waste valuable vertical space on a displayed formula but do want large symbols. Then displaystyle is appropriate, since the items in a list are visually similar to displays.
– Ryan Reich
Feb 14 '12 at 19:47




1




1




@RyanReich: Good point about Beamer presentations' material often having different requirements than that of "ordinary" inline material. Thus, bullet point stuff can behave very much like display math material -- and hence may need to invoke displaystyle and/or limits.
– Mico
Feb 14 '12 at 23:12




@RyanReich: Good point about Beamer presentations' material often having different requirements than that of "ordinary" inline material. Thus, bullet point stuff can behave very much like display math material -- and hence may need to invoke displaystyle and/or limits.
– Mico
Feb 14 '12 at 23:12










up vote
44
down vote













Good typography relies on the balance of all aspects of black and white on the page. Uniformly spaced lines for the ordinary text make for good legibility. That's why some symbols, that in display are rendered with limits above and below, are set with limits on the side when used in in-line formulas.



I too, when I began to use TeX, tried to set limits for sums above and below also in in-line formulas, but I soon realized that it's wrong: two white bands separated that line from the next ones.



For that very reason the symbols for summation and integral are set in two different sizes: a smaller one for in-line formulas, a larger one for displayed formulas that don't have spacing constraints.



Displayed formulas are set using (automatically) displaystyle, so



$displaystylesum_{n=1}^{x} n^2$


would produce the same symbol used in displayed formulas and set limits above and below. But this will damage the balance of the page beyond repair. A less invasive construction



$sumlimits_{n=1}^{x} n^2$


and its sibling



$limlimits_{ntoinfty}f(x)$


will do less damage to the page, but will nevertheless spoil it.



Such constructions have their use, for examples in tables where TeX would use in-line math mode. But I will never suggest to use them in normal text.






share|improve this answer



















  • 2




    While true, your answer reads a little patronizing. I think we can treat users of this site as adults. if somebody asks how to do something, we should not assume that they do not know what they are talking about, or at-least should not let our answer show that... :-)
    – Yossi Farjoun
    Oct 26 '11 at 21:32






  • 21




    @YossiFarjoun, while egreg's response is a bit sharp, I don't think it is always a bad idea to question someone's purpose for wanting to achieve a certain look with TeX. As someone who started using LaTeX not too long ago, I must credit my still-improving sense for good typesetting to people who told me that I didn't actually want to do what I said I wanted to do. I would be a poorer TeXer were it not for them. In general, it seems to be a feature of well-designed systems that learning them requires shifting one's approach to problems.
    – JohnJamesSmith
    Oct 26 '11 at 22:08






  • 2




    That's a fantastic new version egreg. Definitely a more complete answer to the question.
    – akdom
    Oct 27 '11 at 23:37






  • 1




    @dh87 That's simply wrong, particularly in exponents.
    – egreg
    May 1 '16 at 15:36






  • 1




    @dh87 Sorry: do as he likes. But be still thinking it's wrong. ;-)
    – egreg
    May 1 '16 at 15:53

















up vote
44
down vote













Good typography relies on the balance of all aspects of black and white on the page. Uniformly spaced lines for the ordinary text make for good legibility. That's why some symbols, that in display are rendered with limits above and below, are set with limits on the side when used in in-line formulas.



I too, when I began to use TeX, tried to set limits for sums above and below also in in-line formulas, but I soon realized that it's wrong: two white bands separated that line from the next ones.



For that very reason the symbols for summation and integral are set in two different sizes: a smaller one for in-line formulas, a larger one for displayed formulas that don't have spacing constraints.



Displayed formulas are set using (automatically) displaystyle, so



$displaystylesum_{n=1}^{x} n^2$


would produce the same symbol used in displayed formulas and set limits above and below. But this will damage the balance of the page beyond repair. A less invasive construction



$sumlimits_{n=1}^{x} n^2$


and its sibling



$limlimits_{ntoinfty}f(x)$


will do less damage to the page, but will nevertheless spoil it.



Such constructions have their use, for examples in tables where TeX would use in-line math mode. But I will never suggest to use them in normal text.






share|improve this answer



















  • 2




    While true, your answer reads a little patronizing. I think we can treat users of this site as adults. if somebody asks how to do something, we should not assume that they do not know what they are talking about, or at-least should not let our answer show that... :-)
    – Yossi Farjoun
    Oct 26 '11 at 21:32






  • 21




    @YossiFarjoun, while egreg's response is a bit sharp, I don't think it is always a bad idea to question someone's purpose for wanting to achieve a certain look with TeX. As someone who started using LaTeX not too long ago, I must credit my still-improving sense for good typesetting to people who told me that I didn't actually want to do what I said I wanted to do. I would be a poorer TeXer were it not for them. In general, it seems to be a feature of well-designed systems that learning them requires shifting one's approach to problems.
    – JohnJamesSmith
    Oct 26 '11 at 22:08






  • 2




    That's a fantastic new version egreg. Definitely a more complete answer to the question.
    – akdom
    Oct 27 '11 at 23:37






  • 1




    @dh87 That's simply wrong, particularly in exponents.
    – egreg
    May 1 '16 at 15:36






  • 1




    @dh87 Sorry: do as he likes. But be still thinking it's wrong. ;-)
    – egreg
    May 1 '16 at 15:53















up vote
44
down vote










up vote
44
down vote









Good typography relies on the balance of all aspects of black and white on the page. Uniformly spaced lines for the ordinary text make for good legibility. That's why some symbols, that in display are rendered with limits above and below, are set with limits on the side when used in in-line formulas.



I too, when I began to use TeX, tried to set limits for sums above and below also in in-line formulas, but I soon realized that it's wrong: two white bands separated that line from the next ones.



For that very reason the symbols for summation and integral are set in two different sizes: a smaller one for in-line formulas, a larger one for displayed formulas that don't have spacing constraints.



Displayed formulas are set using (automatically) displaystyle, so



$displaystylesum_{n=1}^{x} n^2$


would produce the same symbol used in displayed formulas and set limits above and below. But this will damage the balance of the page beyond repair. A less invasive construction



$sumlimits_{n=1}^{x} n^2$


and its sibling



$limlimits_{ntoinfty}f(x)$


will do less damage to the page, but will nevertheless spoil it.



Such constructions have their use, for examples in tables where TeX would use in-line math mode. But I will never suggest to use them in normal text.






share|improve this answer














Good typography relies on the balance of all aspects of black and white on the page. Uniformly spaced lines for the ordinary text make for good legibility. That's why some symbols, that in display are rendered with limits above and below, are set with limits on the side when used in in-line formulas.



I too, when I began to use TeX, tried to set limits for sums above and below also in in-line formulas, but I soon realized that it's wrong: two white bands separated that line from the next ones.



For that very reason the symbols for summation and integral are set in two different sizes: a smaller one for in-line formulas, a larger one for displayed formulas that don't have spacing constraints.



Displayed formulas are set using (automatically) displaystyle, so



$displaystylesum_{n=1}^{x} n^2$


would produce the same symbol used in displayed formulas and set limits above and below. But this will damage the balance of the page beyond repair. A less invasive construction



$sumlimits_{n=1}^{x} n^2$


and its sibling



$limlimits_{ntoinfty}f(x)$


will do less damage to the page, but will nevertheless spoil it.



Such constructions have their use, for examples in tables where TeX would use in-line math mode. But I will never suggest to use them in normal text.







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 15 '17 at 6:48

























answered Oct 26 '11 at 21:00









egreg

699k8518613132




699k8518613132








  • 2




    While true, your answer reads a little patronizing. I think we can treat users of this site as adults. if somebody asks how to do something, we should not assume that they do not know what they are talking about, or at-least should not let our answer show that... :-)
    – Yossi Farjoun
    Oct 26 '11 at 21:32






  • 21




    @YossiFarjoun, while egreg's response is a bit sharp, I don't think it is always a bad idea to question someone's purpose for wanting to achieve a certain look with TeX. As someone who started using LaTeX not too long ago, I must credit my still-improving sense for good typesetting to people who told me that I didn't actually want to do what I said I wanted to do. I would be a poorer TeXer were it not for them. In general, it seems to be a feature of well-designed systems that learning them requires shifting one's approach to problems.
    – JohnJamesSmith
    Oct 26 '11 at 22:08






  • 2




    That's a fantastic new version egreg. Definitely a more complete answer to the question.
    – akdom
    Oct 27 '11 at 23:37






  • 1




    @dh87 That's simply wrong, particularly in exponents.
    – egreg
    May 1 '16 at 15:36






  • 1




    @dh87 Sorry: do as he likes. But be still thinking it's wrong. ;-)
    – egreg
    May 1 '16 at 15:53
















  • 2




    While true, your answer reads a little patronizing. I think we can treat users of this site as adults. if somebody asks how to do something, we should not assume that they do not know what they are talking about, or at-least should not let our answer show that... :-)
    – Yossi Farjoun
    Oct 26 '11 at 21:32






  • 21




    @YossiFarjoun, while egreg's response is a bit sharp, I don't think it is always a bad idea to question someone's purpose for wanting to achieve a certain look with TeX. As someone who started using LaTeX not too long ago, I must credit my still-improving sense for good typesetting to people who told me that I didn't actually want to do what I said I wanted to do. I would be a poorer TeXer were it not for them. In general, it seems to be a feature of well-designed systems that learning them requires shifting one's approach to problems.
    – JohnJamesSmith
    Oct 26 '11 at 22:08






  • 2




    That's a fantastic new version egreg. Definitely a more complete answer to the question.
    – akdom
    Oct 27 '11 at 23:37






  • 1




    @dh87 That's simply wrong, particularly in exponents.
    – egreg
    May 1 '16 at 15:36






  • 1




    @dh87 Sorry: do as he likes. But be still thinking it's wrong. ;-)
    – egreg
    May 1 '16 at 15:53










2




2




While true, your answer reads a little patronizing. I think we can treat users of this site as adults. if somebody asks how to do something, we should not assume that they do not know what they are talking about, or at-least should not let our answer show that... :-)
– Yossi Farjoun
Oct 26 '11 at 21:32




While true, your answer reads a little patronizing. I think we can treat users of this site as adults. if somebody asks how to do something, we should not assume that they do not know what they are talking about, or at-least should not let our answer show that... :-)
– Yossi Farjoun
Oct 26 '11 at 21:32




21




21




@YossiFarjoun, while egreg's response is a bit sharp, I don't think it is always a bad idea to question someone's purpose for wanting to achieve a certain look with TeX. As someone who started using LaTeX not too long ago, I must credit my still-improving sense for good typesetting to people who told me that I didn't actually want to do what I said I wanted to do. I would be a poorer TeXer were it not for them. In general, it seems to be a feature of well-designed systems that learning them requires shifting one's approach to problems.
– JohnJamesSmith
Oct 26 '11 at 22:08




@YossiFarjoun, while egreg's response is a bit sharp, I don't think it is always a bad idea to question someone's purpose for wanting to achieve a certain look with TeX. As someone who started using LaTeX not too long ago, I must credit my still-improving sense for good typesetting to people who told me that I didn't actually want to do what I said I wanted to do. I would be a poorer TeXer were it not for them. In general, it seems to be a feature of well-designed systems that learning them requires shifting one's approach to problems.
– JohnJamesSmith
Oct 26 '11 at 22:08




2




2




That's a fantastic new version egreg. Definitely a more complete answer to the question.
– akdom
Oct 27 '11 at 23:37




That's a fantastic new version egreg. Definitely a more complete answer to the question.
– akdom
Oct 27 '11 at 23:37




1




1




@dh87 That's simply wrong, particularly in exponents.
– egreg
May 1 '16 at 15:36




@dh87 That's simply wrong, particularly in exponents.
– egreg
May 1 '16 at 15:36




1




1




@dh87 Sorry: do as he likes. But be still thinking it's wrong. ;-)
– egreg
May 1 '16 at 15:53






@dh87 Sorry: do as he likes. But be still thinking it's wrong. ;-)
– egreg
May 1 '16 at 15:53












up vote
43
down vote













The other answers are excellent, and normally I would not try to change the behavior of inline functions. However, there is one case where I wish inline functions to behave just like displayed functions. That is when I write exams. I am willing to compromise on typesetting for readability. If you put



everymath{displaystyle}


in your preamble, every equation will be typeset in that manner, and you don't have to put displaystyle in every equation. Of course, if you are looking to change just a few equations, then displaystyle is easy to use.






share|improve this answer



















  • 1




    the only answer that actually solves this problem
    – Håkon
    Aug 20 '15 at 4:23






  • 4




    @IllegalImmigrant Unfortunately, it's the wrong answer. It has several upvotes, probably because of simplicity; but this simplicity is at the expense of good typography. No, doing everymath{displaystyle} is generally a bad idea.
    – egreg
    Oct 15 '15 at 12:20

















up vote
43
down vote













The other answers are excellent, and normally I would not try to change the behavior of inline functions. However, there is one case where I wish inline functions to behave just like displayed functions. That is when I write exams. I am willing to compromise on typesetting for readability. If you put



everymath{displaystyle}


in your preamble, every equation will be typeset in that manner, and you don't have to put displaystyle in every equation. Of course, if you are looking to change just a few equations, then displaystyle is easy to use.






share|improve this answer



















  • 1




    the only answer that actually solves this problem
    – Håkon
    Aug 20 '15 at 4:23






  • 4




    @IllegalImmigrant Unfortunately, it's the wrong answer. It has several upvotes, probably because of simplicity; but this simplicity is at the expense of good typography. No, doing everymath{displaystyle} is generally a bad idea.
    – egreg
    Oct 15 '15 at 12:20















up vote
43
down vote










up vote
43
down vote









The other answers are excellent, and normally I would not try to change the behavior of inline functions. However, there is one case where I wish inline functions to behave just like displayed functions. That is when I write exams. I am willing to compromise on typesetting for readability. If you put



everymath{displaystyle}


in your preamble, every equation will be typeset in that manner, and you don't have to put displaystyle in every equation. Of course, if you are looking to change just a few equations, then displaystyle is easy to use.






share|improve this answer














The other answers are excellent, and normally I would not try to change the behavior of inline functions. However, there is one case where I wish inline functions to behave just like displayed functions. That is when I write exams. I am willing to compromise on typesetting for readability. If you put



everymath{displaystyle}


in your preamble, every equation will be typeset in that manner, and you don't have to put displaystyle in every equation. Of course, if you are looking to change just a few equations, then displaystyle is easy to use.







share|improve this answer














share|improve this answer



share|improve this answer








edited Oct 27 '11 at 4:32









Werner

431k599501629




431k599501629










answered Oct 27 '11 at 4:25









S. McKay

62144




62144








  • 1




    the only answer that actually solves this problem
    – Håkon
    Aug 20 '15 at 4:23






  • 4




    @IllegalImmigrant Unfortunately, it's the wrong answer. It has several upvotes, probably because of simplicity; but this simplicity is at the expense of good typography. No, doing everymath{displaystyle} is generally a bad idea.
    – egreg
    Oct 15 '15 at 12:20
















  • 1




    the only answer that actually solves this problem
    – Håkon
    Aug 20 '15 at 4:23






  • 4




    @IllegalImmigrant Unfortunately, it's the wrong answer. It has several upvotes, probably because of simplicity; but this simplicity is at the expense of good typography. No, doing everymath{displaystyle} is generally a bad idea.
    – egreg
    Oct 15 '15 at 12:20










1




1




the only answer that actually solves this problem
– Håkon
Aug 20 '15 at 4:23




the only answer that actually solves this problem
– Håkon
Aug 20 '15 at 4:23




4




4




@IllegalImmigrant Unfortunately, it's the wrong answer. It has several upvotes, probably because of simplicity; but this simplicity is at the expense of good typography. No, doing everymath{displaystyle} is generally a bad idea.
– egreg
Oct 15 '15 at 12:20






@IllegalImmigrant Unfortunately, it's the wrong answer. It has several upvotes, probably because of simplicity; but this simplicity is at the expense of good typography. No, doing everymath{displaystyle} is generally a bad idea.
– egreg
Oct 15 '15 at 12:20












up vote
11
down vote













The solution you seek is to use the displaystyle command within the inline environment as such.



$displaystylesum_{n=1}^{x} n^2$


This will give the nice effect of the starting term being underneath the sigma and the maximum value above while keeping the symbols inline.






share|improve this answer



















  • 13




    Interesting how the presentation is done in the 3rd person.
    – Werner
    Oct 26 '11 at 20:55










  • I figured that it would be the most immediately accessible for people quickly looking for an answer :) .
    – akdom
    Oct 26 '11 at 20:58










  • Well, it a wrong answer.
    – egreg
    Oct 26 '11 at 21:00






  • 1




    @egreg: The answer isn't wrong....it answers the question exactly. I think that the question is wrong...but that's what down-voting the question is for...
    – Yossi Farjoun
    Oct 26 '11 at 21:33






  • 17




    I have to admit that I don't like the way that the answer is phrased (irrespective of whether or not it is correct). Answering ones own question is absolutely fine, but do it honestly not pretending that you aren't the person who asked the question.
    – Loop Space
    Oct 27 '11 at 6:36















up vote
11
down vote













The solution you seek is to use the displaystyle command within the inline environment as such.



$displaystylesum_{n=1}^{x} n^2$


This will give the nice effect of the starting term being underneath the sigma and the maximum value above while keeping the symbols inline.






share|improve this answer



















  • 13




    Interesting how the presentation is done in the 3rd person.
    – Werner
    Oct 26 '11 at 20:55










  • I figured that it would be the most immediately accessible for people quickly looking for an answer :) .
    – akdom
    Oct 26 '11 at 20:58










  • Well, it a wrong answer.
    – egreg
    Oct 26 '11 at 21:00






  • 1




    @egreg: The answer isn't wrong....it answers the question exactly. I think that the question is wrong...but that's what down-voting the question is for...
    – Yossi Farjoun
    Oct 26 '11 at 21:33






  • 17




    I have to admit that I don't like the way that the answer is phrased (irrespective of whether or not it is correct). Answering ones own question is absolutely fine, but do it honestly not pretending that you aren't the person who asked the question.
    – Loop Space
    Oct 27 '11 at 6:36













up vote
11
down vote










up vote
11
down vote









The solution you seek is to use the displaystyle command within the inline environment as such.



$displaystylesum_{n=1}^{x} n^2$


This will give the nice effect of the starting term being underneath the sigma and the maximum value above while keeping the symbols inline.






share|improve this answer














The solution you seek is to use the displaystyle command within the inline environment as such.



$displaystylesum_{n=1}^{x} n^2$


This will give the nice effect of the starting term being underneath the sigma and the maximum value above while keeping the symbols inline.







share|improve this answer














share|improve this answer



share|improve this answer








edited 12 mins ago









BalinKingOfMoria

1033




1033










answered Oct 26 '11 at 20:51









akdom

8852710




8852710








  • 13




    Interesting how the presentation is done in the 3rd person.
    – Werner
    Oct 26 '11 at 20:55










  • I figured that it would be the most immediately accessible for people quickly looking for an answer :) .
    – akdom
    Oct 26 '11 at 20:58










  • Well, it a wrong answer.
    – egreg
    Oct 26 '11 at 21:00






  • 1




    @egreg: The answer isn't wrong....it answers the question exactly. I think that the question is wrong...but that's what down-voting the question is for...
    – Yossi Farjoun
    Oct 26 '11 at 21:33






  • 17




    I have to admit that I don't like the way that the answer is phrased (irrespective of whether or not it is correct). Answering ones own question is absolutely fine, but do it honestly not pretending that you aren't the person who asked the question.
    – Loop Space
    Oct 27 '11 at 6:36














  • 13




    Interesting how the presentation is done in the 3rd person.
    – Werner
    Oct 26 '11 at 20:55










  • I figured that it would be the most immediately accessible for people quickly looking for an answer :) .
    – akdom
    Oct 26 '11 at 20:58










  • Well, it a wrong answer.
    – egreg
    Oct 26 '11 at 21:00






  • 1




    @egreg: The answer isn't wrong....it answers the question exactly. I think that the question is wrong...but that's what down-voting the question is for...
    – Yossi Farjoun
    Oct 26 '11 at 21:33






  • 17




    I have to admit that I don't like the way that the answer is phrased (irrespective of whether or not it is correct). Answering ones own question is absolutely fine, but do it honestly not pretending that you aren't the person who asked the question.
    – Loop Space
    Oct 27 '11 at 6:36








13




13




Interesting how the presentation is done in the 3rd person.
– Werner
Oct 26 '11 at 20:55




Interesting how the presentation is done in the 3rd person.
– Werner
Oct 26 '11 at 20:55












I figured that it would be the most immediately accessible for people quickly looking for an answer :) .
– akdom
Oct 26 '11 at 20:58




I figured that it would be the most immediately accessible for people quickly looking for an answer :) .
– akdom
Oct 26 '11 at 20:58












Well, it a wrong answer.
– egreg
Oct 26 '11 at 21:00




Well, it a wrong answer.
– egreg
Oct 26 '11 at 21:00




1




1




@egreg: The answer isn't wrong....it answers the question exactly. I think that the question is wrong...but that's what down-voting the question is for...
– Yossi Farjoun
Oct 26 '11 at 21:33




@egreg: The answer isn't wrong....it answers the question exactly. I think that the question is wrong...but that's what down-voting the question is for...
– Yossi Farjoun
Oct 26 '11 at 21:33




17




17




I have to admit that I don't like the way that the answer is phrased (irrespective of whether or not it is correct). Answering ones own question is absolutely fine, but do it honestly not pretending that you aren't the person who asked the question.
– Loop Space
Oct 27 '11 at 6:36




I have to admit that I don't like the way that the answer is phrased (irrespective of whether or not it is correct). Answering ones own question is absolutely fine, but do it honestly not pretending that you aren't the person who asked the question.
– Loop Space
Oct 27 '11 at 6:36


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f32824%2fshow-inline-math-as-if-it-were-display-math%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

Calculate evaluation metrics using cross_val_predict sklearn

Insert data from modal to MySQL (multiple modal on website)