In TeX, is math mode somehow different from the others?












4















I'm learning TeX, and in the output of showlists on a file with a bunch of equations, I don't see math mode at all. I don't see "mathop" or "mathrel" or "overline" or anything, all I see are stuff like "hbox" and "kern" -- the stuff you see in horizontal mode.



I do see the equations I've typeset -- they're just written seemingly as if I had written them in horizontal mode (oodles of kerns and glue and font changes and stuff).



Can someone please help me understand this? Is math mode somehow... artifical, in some sense? Is it just syntactic sugar for what would be very annoying to type in horizontal or vertical mode?



Here is the hbox containing one of my equations: (with showboxbreadth and showboxdepth equal to 1000):



hbox(14.5001+9.50012)x340.38124, shifted 64.68687, display
.hbox(14.26508+8.3595)x95.86403
..hbox(14.26508+8.3595)x95.86403
...hbox(0.0+0.0)x1.2, shifted -2.5
...vbox(14.26508+8.3595)x93.46404
....hbox(7.5+2.5)x93.46404
.....tenrm (
.....teni n
.....hbox(4.51111+0.0)x4.48613, shifted 1.49998
......sevenrm 1
.....glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
.....tenrm +
.....glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
.....teni n










share|improve this question























  • Try issuing the showlists command within math mode, as in $n_1+n showlists$.

    – GuM
    3 hours ago
















4















I'm learning TeX, and in the output of showlists on a file with a bunch of equations, I don't see math mode at all. I don't see "mathop" or "mathrel" or "overline" or anything, all I see are stuff like "hbox" and "kern" -- the stuff you see in horizontal mode.



I do see the equations I've typeset -- they're just written seemingly as if I had written them in horizontal mode (oodles of kerns and glue and font changes and stuff).



Can someone please help me understand this? Is math mode somehow... artifical, in some sense? Is it just syntactic sugar for what would be very annoying to type in horizontal or vertical mode?



Here is the hbox containing one of my equations: (with showboxbreadth and showboxdepth equal to 1000):



hbox(14.5001+9.50012)x340.38124, shifted 64.68687, display
.hbox(14.26508+8.3595)x95.86403
..hbox(14.26508+8.3595)x95.86403
...hbox(0.0+0.0)x1.2, shifted -2.5
...vbox(14.26508+8.3595)x93.46404
....hbox(7.5+2.5)x93.46404
.....tenrm (
.....teni n
.....hbox(4.51111+0.0)x4.48613, shifted 1.49998
......sevenrm 1
.....glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
.....tenrm +
.....glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
.....teni n










share|improve this question























  • Try issuing the showlists command within math mode, as in $n_1+n showlists$.

    – GuM
    3 hours ago














4












4








4








I'm learning TeX, and in the output of showlists on a file with a bunch of equations, I don't see math mode at all. I don't see "mathop" or "mathrel" or "overline" or anything, all I see are stuff like "hbox" and "kern" -- the stuff you see in horizontal mode.



I do see the equations I've typeset -- they're just written seemingly as if I had written them in horizontal mode (oodles of kerns and glue and font changes and stuff).



Can someone please help me understand this? Is math mode somehow... artifical, in some sense? Is it just syntactic sugar for what would be very annoying to type in horizontal or vertical mode?



Here is the hbox containing one of my equations: (with showboxbreadth and showboxdepth equal to 1000):



hbox(14.5001+9.50012)x340.38124, shifted 64.68687, display
.hbox(14.26508+8.3595)x95.86403
..hbox(14.26508+8.3595)x95.86403
...hbox(0.0+0.0)x1.2, shifted -2.5
...vbox(14.26508+8.3595)x93.46404
....hbox(7.5+2.5)x93.46404
.....tenrm (
.....teni n
.....hbox(4.51111+0.0)x4.48613, shifted 1.49998
......sevenrm 1
.....glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
.....tenrm +
.....glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
.....teni n










share|improve this question














I'm learning TeX, and in the output of showlists on a file with a bunch of equations, I don't see math mode at all. I don't see "mathop" or "mathrel" or "overline" or anything, all I see are stuff like "hbox" and "kern" -- the stuff you see in horizontal mode.



I do see the equations I've typeset -- they're just written seemingly as if I had written them in horizontal mode (oodles of kerns and glue and font changes and stuff).



Can someone please help me understand this? Is math mode somehow... artifical, in some sense? Is it just syntactic sugar for what would be very annoying to type in horizontal or vertical mode?



Here is the hbox containing one of my equations: (with showboxbreadth and showboxdepth equal to 1000):



hbox(14.5001+9.50012)x340.38124, shifted 64.68687, display
.hbox(14.26508+8.3595)x95.86403
..hbox(14.26508+8.3595)x95.86403
...hbox(0.0+0.0)x1.2, shifted -2.5
...vbox(14.26508+8.3595)x93.46404
....hbox(7.5+2.5)x93.46404
.....tenrm (
.....teni n
.....hbox(4.51111+0.0)x4.48613, shifted 1.49998
......sevenrm 1
.....glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
.....tenrm +
.....glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
.....teni n







math-mode






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 5 hours ago









extremeaxe5extremeaxe5

2044




2044













  • Try issuing the showlists command within math mode, as in $n_1+n showlists$.

    – GuM
    3 hours ago



















  • Try issuing the showlists command within math mode, as in $n_1+n showlists$.

    – GuM
    3 hours ago

















Try issuing the showlists command within math mode, as in $n_1+n showlists$.

– GuM
3 hours ago





Try issuing the showlists command within math mode, as in $n_1+n showlists$.

– GuM
3 hours ago










1 Answer
1






active

oldest

votes


















5














When math mode is started, with either $ or $$ (I'm talking at the primitive level), a math list is started. The matching $ or $$ will end building the list and start a further processing step: transforming the math list into a horizontal list made by boxes, glue, kerns, penalties (and a few other possible items).



This step is completely described in Appendix G of the TeXbook, “Generating boxes from formulas”.



If you test



showboxbreadth=maxdimen
showboxdepth=maxdimen
tracingonline=1

$n_1+nshowlists$showlists

bye


you get the following diagnostic information:



### math mode entered at line 5
mathord
.fam1 n
_fam0 1
mathbin
.fam0 +
mathord
.fam1 n
### horizontal mode entered at line 5
hbox(0.0+0.0)x20.0
spacefactor 1000
### vertical mode entered at line 0
prevdepth ignored

! OK.
l.5 $n_1+nshowlists
$showlists
?

### horizontal mode entered at line 5
hbox(0.0+0.0)x20.0
mathon
teni n
hbox(4.51111+0.0)x4.48613, shifted 1.49998
.sevenrm 1
glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
tenrm +
penalty 700
glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
teni n
mathoff
spacefactor 1000
### vertical mode entered at line 0
prevdepth ignored

! OK.
l.5 $n_1+nshowlists$showlists


A more complex formula such as



showboxbreadth=maxdimen
showboxdepth=maxdimen
tracingonline=1

$$sqrt{1+sqrt{5}over n_{x+y}}showlists$$showlists

bye


will produce



### display math mode entered at line 5
radical"270370
.fraction, thickness = default
.\mathord
..fam0 1
.\mathbin
..fam0 +
.\radical"270370
..fam0 5
./mathord
./.fam1 n
./_mathord
./_.fam1 x
./_mathbin
./_.fam0 +
./_mathord
./_.fam1 y
### vertical mode entered at line 0
### current page:
glue(topskip) 10.0
hbox(0.0+0.0)x469.75499, glue set 449.75499fil
.hbox(0.0+0.0)x20.0
.penalty 10000
.glue(parfillskip) 0.0 plus 1.0fil
.glue(rightskip) 0.0
total height 10.0
goal height 643.20255
prevdepth 0.0, prevgraf 1 line

! OK.
l.5 $$sqrt{1+sqrt{5}over n_{x+y}}showlists
$$showlists
?

### horizontal mode entered at line 5
spacefactor 1000
### vertical mode entered at line 0
### current page:
glue(topskip) 10.0
hbox(0.0+0.0)x469.75499, glue set 449.75499fil
.hbox(0.0+0.0)x20.0
.penalty 10000
.glue(parfillskip) 0.0 plus 1.0fil
.glue(rightskip) 0.0
penalty 10000
glue(abovedisplayshortskip) 0.0 plus 3.0
glue(lineskip) 1.0
hbox(19.39662+11.00365)x42.95554, shifted 213.39973
.hbox(19.39662+11.00365)x42.95554
..hbox(0.39998+29.60031)x10.00002, shifted -18.59666
...tenex s
..vbox(19.39662+9.7206)x32.95552
...kern0.39998
...rule(0.39998+0.0)x*
...kern2.75941
...hbox(15.83725+9.7206)x32.95552
....hbox(0.0+0.0)x1.2, shifted -2.5
....vbox(15.83725+9.7206)x30.55553
.....hbox(9.07217+1.32779)x30.55553
......tenrm 1
......glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
......tenrm +
......glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
......hbox(9.07217+1.32779)x13.33337
.......hbox(0.39998+9.6)x8.33336, shifted -8.27222
........tensy p
.......vbox(9.07217+0.0)x5.00002
........kern0.39998
........rule(0.39998+0.0)x*
........kern1.82777
........hbox(6.44444+0.0)x5.00002
.........tenrm 5
.....kern2.73729
.....rule(0.39998+0.0)x*
.....kern4.85397
.....hbox(4.30554+2.86108)x30.55553, glue set 4.53639fil
......glue 0.0 plus 1.0fil minus 1.0fil
......teni n
......hbox(4.33334+1.3611)x15.4804, shifted 1.49998
.......seveni x
.......sevenrm +
.......seveni y
.......kern0.25116
......glue 0.0 plus 1.0fil minus 1.0fil
....hbox(0.0+0.0)x1.2, shifted -2.5
penalty 0
glue(belowdisplayshortskip) 7.0 plus 3.0 minus 4.0
total height 48.40027 plus 6.0 minus 4.0
goal height 643.20255
prevdepth 11.00365, prevgraf 4 lines

! OK.
<recently read> showlists

l.5 ...sqrt{5}over n_{x+y}}showlists$$showlists


where you see much more detailed information: the items in the numerator of the fraction are marked ., those in the denominator ./, for instance. The result of the conversion from the math list to a horizontal list is displayed by the outer showlist.






share|improve this answer
























  • @extremeaxe5: So, as you can see, the short answer to your question is: Yes, math mode is indeed somehow different from the others. :-)

    – GuM
    3 hours ago











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',
autoActivateHeartbeat: false,
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%2f470925%2fin-tex-is-math-mode-somehow-different-from-the-others%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









5














When math mode is started, with either $ or $$ (I'm talking at the primitive level), a math list is started. The matching $ or $$ will end building the list and start a further processing step: transforming the math list into a horizontal list made by boxes, glue, kerns, penalties (and a few other possible items).



This step is completely described in Appendix G of the TeXbook, “Generating boxes from formulas”.



If you test



showboxbreadth=maxdimen
showboxdepth=maxdimen
tracingonline=1

$n_1+nshowlists$showlists

bye


you get the following diagnostic information:



### math mode entered at line 5
mathord
.fam1 n
_fam0 1
mathbin
.fam0 +
mathord
.fam1 n
### horizontal mode entered at line 5
hbox(0.0+0.0)x20.0
spacefactor 1000
### vertical mode entered at line 0
prevdepth ignored

! OK.
l.5 $n_1+nshowlists
$showlists
?

### horizontal mode entered at line 5
hbox(0.0+0.0)x20.0
mathon
teni n
hbox(4.51111+0.0)x4.48613, shifted 1.49998
.sevenrm 1
glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
tenrm +
penalty 700
glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
teni n
mathoff
spacefactor 1000
### vertical mode entered at line 0
prevdepth ignored

! OK.
l.5 $n_1+nshowlists$showlists


A more complex formula such as



showboxbreadth=maxdimen
showboxdepth=maxdimen
tracingonline=1

$$sqrt{1+sqrt{5}over n_{x+y}}showlists$$showlists

bye


will produce



### display math mode entered at line 5
radical"270370
.fraction, thickness = default
.\mathord
..fam0 1
.\mathbin
..fam0 +
.\radical"270370
..fam0 5
./mathord
./.fam1 n
./_mathord
./_.fam1 x
./_mathbin
./_.fam0 +
./_mathord
./_.fam1 y
### vertical mode entered at line 0
### current page:
glue(topskip) 10.0
hbox(0.0+0.0)x469.75499, glue set 449.75499fil
.hbox(0.0+0.0)x20.0
.penalty 10000
.glue(parfillskip) 0.0 plus 1.0fil
.glue(rightskip) 0.0
total height 10.0
goal height 643.20255
prevdepth 0.0, prevgraf 1 line

! OK.
l.5 $$sqrt{1+sqrt{5}over n_{x+y}}showlists
$$showlists
?

### horizontal mode entered at line 5
spacefactor 1000
### vertical mode entered at line 0
### current page:
glue(topskip) 10.0
hbox(0.0+0.0)x469.75499, glue set 449.75499fil
.hbox(0.0+0.0)x20.0
.penalty 10000
.glue(parfillskip) 0.0 plus 1.0fil
.glue(rightskip) 0.0
penalty 10000
glue(abovedisplayshortskip) 0.0 plus 3.0
glue(lineskip) 1.0
hbox(19.39662+11.00365)x42.95554, shifted 213.39973
.hbox(19.39662+11.00365)x42.95554
..hbox(0.39998+29.60031)x10.00002, shifted -18.59666
...tenex s
..vbox(19.39662+9.7206)x32.95552
...kern0.39998
...rule(0.39998+0.0)x*
...kern2.75941
...hbox(15.83725+9.7206)x32.95552
....hbox(0.0+0.0)x1.2, shifted -2.5
....vbox(15.83725+9.7206)x30.55553
.....hbox(9.07217+1.32779)x30.55553
......tenrm 1
......glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
......tenrm +
......glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
......hbox(9.07217+1.32779)x13.33337
.......hbox(0.39998+9.6)x8.33336, shifted -8.27222
........tensy p
.......vbox(9.07217+0.0)x5.00002
........kern0.39998
........rule(0.39998+0.0)x*
........kern1.82777
........hbox(6.44444+0.0)x5.00002
.........tenrm 5
.....kern2.73729
.....rule(0.39998+0.0)x*
.....kern4.85397
.....hbox(4.30554+2.86108)x30.55553, glue set 4.53639fil
......glue 0.0 plus 1.0fil minus 1.0fil
......teni n
......hbox(4.33334+1.3611)x15.4804, shifted 1.49998
.......seveni x
.......sevenrm +
.......seveni y
.......kern0.25116
......glue 0.0 plus 1.0fil minus 1.0fil
....hbox(0.0+0.0)x1.2, shifted -2.5
penalty 0
glue(belowdisplayshortskip) 7.0 plus 3.0 minus 4.0
total height 48.40027 plus 6.0 minus 4.0
goal height 643.20255
prevdepth 11.00365, prevgraf 4 lines

! OK.
<recently read> showlists

l.5 ...sqrt{5}over n_{x+y}}showlists$$showlists


where you see much more detailed information: the items in the numerator of the fraction are marked ., those in the denominator ./, for instance. The result of the conversion from the math list to a horizontal list is displayed by the outer showlist.






share|improve this answer
























  • @extremeaxe5: So, as you can see, the short answer to your question is: Yes, math mode is indeed somehow different from the others. :-)

    – GuM
    3 hours ago
















5














When math mode is started, with either $ or $$ (I'm talking at the primitive level), a math list is started. The matching $ or $$ will end building the list and start a further processing step: transforming the math list into a horizontal list made by boxes, glue, kerns, penalties (and a few other possible items).



This step is completely described in Appendix G of the TeXbook, “Generating boxes from formulas”.



If you test



showboxbreadth=maxdimen
showboxdepth=maxdimen
tracingonline=1

$n_1+nshowlists$showlists

bye


you get the following diagnostic information:



### math mode entered at line 5
mathord
.fam1 n
_fam0 1
mathbin
.fam0 +
mathord
.fam1 n
### horizontal mode entered at line 5
hbox(0.0+0.0)x20.0
spacefactor 1000
### vertical mode entered at line 0
prevdepth ignored

! OK.
l.5 $n_1+nshowlists
$showlists
?

### horizontal mode entered at line 5
hbox(0.0+0.0)x20.0
mathon
teni n
hbox(4.51111+0.0)x4.48613, shifted 1.49998
.sevenrm 1
glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
tenrm +
penalty 700
glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
teni n
mathoff
spacefactor 1000
### vertical mode entered at line 0
prevdepth ignored

! OK.
l.5 $n_1+nshowlists$showlists


A more complex formula such as



showboxbreadth=maxdimen
showboxdepth=maxdimen
tracingonline=1

$$sqrt{1+sqrt{5}over n_{x+y}}showlists$$showlists

bye


will produce



### display math mode entered at line 5
radical"270370
.fraction, thickness = default
.\mathord
..fam0 1
.\mathbin
..fam0 +
.\radical"270370
..fam0 5
./mathord
./.fam1 n
./_mathord
./_.fam1 x
./_mathbin
./_.fam0 +
./_mathord
./_.fam1 y
### vertical mode entered at line 0
### current page:
glue(topskip) 10.0
hbox(0.0+0.0)x469.75499, glue set 449.75499fil
.hbox(0.0+0.0)x20.0
.penalty 10000
.glue(parfillskip) 0.0 plus 1.0fil
.glue(rightskip) 0.0
total height 10.0
goal height 643.20255
prevdepth 0.0, prevgraf 1 line

! OK.
l.5 $$sqrt{1+sqrt{5}over n_{x+y}}showlists
$$showlists
?

### horizontal mode entered at line 5
spacefactor 1000
### vertical mode entered at line 0
### current page:
glue(topskip) 10.0
hbox(0.0+0.0)x469.75499, glue set 449.75499fil
.hbox(0.0+0.0)x20.0
.penalty 10000
.glue(parfillskip) 0.0 plus 1.0fil
.glue(rightskip) 0.0
penalty 10000
glue(abovedisplayshortskip) 0.0 plus 3.0
glue(lineskip) 1.0
hbox(19.39662+11.00365)x42.95554, shifted 213.39973
.hbox(19.39662+11.00365)x42.95554
..hbox(0.39998+29.60031)x10.00002, shifted -18.59666
...tenex s
..vbox(19.39662+9.7206)x32.95552
...kern0.39998
...rule(0.39998+0.0)x*
...kern2.75941
...hbox(15.83725+9.7206)x32.95552
....hbox(0.0+0.0)x1.2, shifted -2.5
....vbox(15.83725+9.7206)x30.55553
.....hbox(9.07217+1.32779)x30.55553
......tenrm 1
......glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
......tenrm +
......glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
......hbox(9.07217+1.32779)x13.33337
.......hbox(0.39998+9.6)x8.33336, shifted -8.27222
........tensy p
.......vbox(9.07217+0.0)x5.00002
........kern0.39998
........rule(0.39998+0.0)x*
........kern1.82777
........hbox(6.44444+0.0)x5.00002
.........tenrm 5
.....kern2.73729
.....rule(0.39998+0.0)x*
.....kern4.85397
.....hbox(4.30554+2.86108)x30.55553, glue set 4.53639fil
......glue 0.0 plus 1.0fil minus 1.0fil
......teni n
......hbox(4.33334+1.3611)x15.4804, shifted 1.49998
.......seveni x
.......sevenrm +
.......seveni y
.......kern0.25116
......glue 0.0 plus 1.0fil minus 1.0fil
....hbox(0.0+0.0)x1.2, shifted -2.5
penalty 0
glue(belowdisplayshortskip) 7.0 plus 3.0 minus 4.0
total height 48.40027 plus 6.0 minus 4.0
goal height 643.20255
prevdepth 11.00365, prevgraf 4 lines

! OK.
<recently read> showlists

l.5 ...sqrt{5}over n_{x+y}}showlists$$showlists


where you see much more detailed information: the items in the numerator of the fraction are marked ., those in the denominator ./, for instance. The result of the conversion from the math list to a horizontal list is displayed by the outer showlist.






share|improve this answer
























  • @extremeaxe5: So, as you can see, the short answer to your question is: Yes, math mode is indeed somehow different from the others. :-)

    – GuM
    3 hours ago














5












5








5







When math mode is started, with either $ or $$ (I'm talking at the primitive level), a math list is started. The matching $ or $$ will end building the list and start a further processing step: transforming the math list into a horizontal list made by boxes, glue, kerns, penalties (and a few other possible items).



This step is completely described in Appendix G of the TeXbook, “Generating boxes from formulas”.



If you test



showboxbreadth=maxdimen
showboxdepth=maxdimen
tracingonline=1

$n_1+nshowlists$showlists

bye


you get the following diagnostic information:



### math mode entered at line 5
mathord
.fam1 n
_fam0 1
mathbin
.fam0 +
mathord
.fam1 n
### horizontal mode entered at line 5
hbox(0.0+0.0)x20.0
spacefactor 1000
### vertical mode entered at line 0
prevdepth ignored

! OK.
l.5 $n_1+nshowlists
$showlists
?

### horizontal mode entered at line 5
hbox(0.0+0.0)x20.0
mathon
teni n
hbox(4.51111+0.0)x4.48613, shifted 1.49998
.sevenrm 1
glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
tenrm +
penalty 700
glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
teni n
mathoff
spacefactor 1000
### vertical mode entered at line 0
prevdepth ignored

! OK.
l.5 $n_1+nshowlists$showlists


A more complex formula such as



showboxbreadth=maxdimen
showboxdepth=maxdimen
tracingonline=1

$$sqrt{1+sqrt{5}over n_{x+y}}showlists$$showlists

bye


will produce



### display math mode entered at line 5
radical"270370
.fraction, thickness = default
.\mathord
..fam0 1
.\mathbin
..fam0 +
.\radical"270370
..fam0 5
./mathord
./.fam1 n
./_mathord
./_.fam1 x
./_mathbin
./_.fam0 +
./_mathord
./_.fam1 y
### vertical mode entered at line 0
### current page:
glue(topskip) 10.0
hbox(0.0+0.0)x469.75499, glue set 449.75499fil
.hbox(0.0+0.0)x20.0
.penalty 10000
.glue(parfillskip) 0.0 plus 1.0fil
.glue(rightskip) 0.0
total height 10.0
goal height 643.20255
prevdepth 0.0, prevgraf 1 line

! OK.
l.5 $$sqrt{1+sqrt{5}over n_{x+y}}showlists
$$showlists
?

### horizontal mode entered at line 5
spacefactor 1000
### vertical mode entered at line 0
### current page:
glue(topskip) 10.0
hbox(0.0+0.0)x469.75499, glue set 449.75499fil
.hbox(0.0+0.0)x20.0
.penalty 10000
.glue(parfillskip) 0.0 plus 1.0fil
.glue(rightskip) 0.0
penalty 10000
glue(abovedisplayshortskip) 0.0 plus 3.0
glue(lineskip) 1.0
hbox(19.39662+11.00365)x42.95554, shifted 213.39973
.hbox(19.39662+11.00365)x42.95554
..hbox(0.39998+29.60031)x10.00002, shifted -18.59666
...tenex s
..vbox(19.39662+9.7206)x32.95552
...kern0.39998
...rule(0.39998+0.0)x*
...kern2.75941
...hbox(15.83725+9.7206)x32.95552
....hbox(0.0+0.0)x1.2, shifted -2.5
....vbox(15.83725+9.7206)x30.55553
.....hbox(9.07217+1.32779)x30.55553
......tenrm 1
......glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
......tenrm +
......glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
......hbox(9.07217+1.32779)x13.33337
.......hbox(0.39998+9.6)x8.33336, shifted -8.27222
........tensy p
.......vbox(9.07217+0.0)x5.00002
........kern0.39998
........rule(0.39998+0.0)x*
........kern1.82777
........hbox(6.44444+0.0)x5.00002
.........tenrm 5
.....kern2.73729
.....rule(0.39998+0.0)x*
.....kern4.85397
.....hbox(4.30554+2.86108)x30.55553, glue set 4.53639fil
......glue 0.0 plus 1.0fil minus 1.0fil
......teni n
......hbox(4.33334+1.3611)x15.4804, shifted 1.49998
.......seveni x
.......sevenrm +
.......seveni y
.......kern0.25116
......glue 0.0 plus 1.0fil minus 1.0fil
....hbox(0.0+0.0)x1.2, shifted -2.5
penalty 0
glue(belowdisplayshortskip) 7.0 plus 3.0 minus 4.0
total height 48.40027 plus 6.0 minus 4.0
goal height 643.20255
prevdepth 11.00365, prevgraf 4 lines

! OK.
<recently read> showlists

l.5 ...sqrt{5}over n_{x+y}}showlists$$showlists


where you see much more detailed information: the items in the numerator of the fraction are marked ., those in the denominator ./, for instance. The result of the conversion from the math list to a horizontal list is displayed by the outer showlist.






share|improve this answer













When math mode is started, with either $ or $$ (I'm talking at the primitive level), a math list is started. The matching $ or $$ will end building the list and start a further processing step: transforming the math list into a horizontal list made by boxes, glue, kerns, penalties (and a few other possible items).



This step is completely described in Appendix G of the TeXbook, “Generating boxes from formulas”.



If you test



showboxbreadth=maxdimen
showboxdepth=maxdimen
tracingonline=1

$n_1+nshowlists$showlists

bye


you get the following diagnostic information:



### math mode entered at line 5
mathord
.fam1 n
_fam0 1
mathbin
.fam0 +
mathord
.fam1 n
### horizontal mode entered at line 5
hbox(0.0+0.0)x20.0
spacefactor 1000
### vertical mode entered at line 0
prevdepth ignored

! OK.
l.5 $n_1+nshowlists
$showlists
?

### horizontal mode entered at line 5
hbox(0.0+0.0)x20.0
mathon
teni n
hbox(4.51111+0.0)x4.48613, shifted 1.49998
.sevenrm 1
glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
tenrm +
penalty 700
glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
teni n
mathoff
spacefactor 1000
### vertical mode entered at line 0
prevdepth ignored

! OK.
l.5 $n_1+nshowlists$showlists


A more complex formula such as



showboxbreadth=maxdimen
showboxdepth=maxdimen
tracingonline=1

$$sqrt{1+sqrt{5}over n_{x+y}}showlists$$showlists

bye


will produce



### display math mode entered at line 5
radical"270370
.fraction, thickness = default
.\mathord
..fam0 1
.\mathbin
..fam0 +
.\radical"270370
..fam0 5
./mathord
./.fam1 n
./_mathord
./_.fam1 x
./_mathbin
./_.fam0 +
./_mathord
./_.fam1 y
### vertical mode entered at line 0
### current page:
glue(topskip) 10.0
hbox(0.0+0.0)x469.75499, glue set 449.75499fil
.hbox(0.0+0.0)x20.0
.penalty 10000
.glue(parfillskip) 0.0 plus 1.0fil
.glue(rightskip) 0.0
total height 10.0
goal height 643.20255
prevdepth 0.0, prevgraf 1 line

! OK.
l.5 $$sqrt{1+sqrt{5}over n_{x+y}}showlists
$$showlists
?

### horizontal mode entered at line 5
spacefactor 1000
### vertical mode entered at line 0
### current page:
glue(topskip) 10.0
hbox(0.0+0.0)x469.75499, glue set 449.75499fil
.hbox(0.0+0.0)x20.0
.penalty 10000
.glue(parfillskip) 0.0 plus 1.0fil
.glue(rightskip) 0.0
penalty 10000
glue(abovedisplayshortskip) 0.0 plus 3.0
glue(lineskip) 1.0
hbox(19.39662+11.00365)x42.95554, shifted 213.39973
.hbox(19.39662+11.00365)x42.95554
..hbox(0.39998+29.60031)x10.00002, shifted -18.59666
...tenex s
..vbox(19.39662+9.7206)x32.95552
...kern0.39998
...rule(0.39998+0.0)x*
...kern2.75941
...hbox(15.83725+9.7206)x32.95552
....hbox(0.0+0.0)x1.2, shifted -2.5
....vbox(15.83725+9.7206)x30.55553
.....hbox(9.07217+1.32779)x30.55553
......tenrm 1
......glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
......tenrm +
......glue(medmuskip) 2.22217 plus 1.11108 minus 2.22217
......hbox(9.07217+1.32779)x13.33337
.......hbox(0.39998+9.6)x8.33336, shifted -8.27222
........tensy p
.......vbox(9.07217+0.0)x5.00002
........kern0.39998
........rule(0.39998+0.0)x*
........kern1.82777
........hbox(6.44444+0.0)x5.00002
.........tenrm 5
.....kern2.73729
.....rule(0.39998+0.0)x*
.....kern4.85397
.....hbox(4.30554+2.86108)x30.55553, glue set 4.53639fil
......glue 0.0 plus 1.0fil minus 1.0fil
......teni n
......hbox(4.33334+1.3611)x15.4804, shifted 1.49998
.......seveni x
.......sevenrm +
.......seveni y
.......kern0.25116
......glue 0.0 plus 1.0fil minus 1.0fil
....hbox(0.0+0.0)x1.2, shifted -2.5
penalty 0
glue(belowdisplayshortskip) 7.0 plus 3.0 minus 4.0
total height 48.40027 plus 6.0 minus 4.0
goal height 643.20255
prevdepth 11.00365, prevgraf 4 lines

! OK.
<recently read> showlists

l.5 ...sqrt{5}over n_{x+y}}showlists$$showlists


where you see much more detailed information: the items in the numerator of the fraction are marked ., those in the denominator ./, for instance. The result of the conversion from the math list to a horizontal list is displayed by the outer showlist.







share|improve this answer












share|improve this answer



share|improve this answer










answered 3 hours ago









egregegreg

713k8618953184




713k8618953184













  • @extremeaxe5: So, as you can see, the short answer to your question is: Yes, math mode is indeed somehow different from the others. :-)

    – GuM
    3 hours ago



















  • @extremeaxe5: So, as you can see, the short answer to your question is: Yes, math mode is indeed somehow different from the others. :-)

    – GuM
    3 hours ago

















@extremeaxe5: So, as you can see, the short answer to your question is: Yes, math mode is indeed somehow different from the others. :-)

– GuM
3 hours ago





@extremeaxe5: So, as you can see, the short answer to your question is: Yes, math mode is indeed somehow different from the others. :-)

– GuM
3 hours ago


















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f470925%2fin-tex-is-math-mode-somehow-different-from-the-others%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

Ponta tanko

Tantalo (mitologio)

Erzsébet Schaár