added 6 characters in body
Source Link
Mico
  • 420.4k
  • 47
  • 603
  • 1114

You ask:

Why is & special outside of tabular environments?

I think the question is not well-posed. I would say that & is special everywhere, not just outside tabular environments. The character & has category code 4 -- "alignment tab" -- in all TeX and LaTeX formats I've ever encountered. This catcode setting allows it to be used as the alignment tab character not only in tabular-like environments (e.g., tabular*, tabularx, longtable, etc), but also array environments, the deprecated eqnarray environment, some of the display math environments of the amsmath package, the IEEEeqnarray environment of the IEEEtrantools package, and probably quite a few additional environments.

The virtue of givingassigning catcode 4 to & catcode 4 by default is that all package writers can (and, frankly, should ) write their code assuming that & has catcode 4. Without this default, you'd have some package writers choosing & as the alignment tab character, whereas others might choose @ or who knows what else. Such an outcome would be distinctly inferior for most users, since they'd have to memorize which character, or characters, serve as the alignment tab function in which environments.

Conversely, if one does not want & to be special -- and doesn't want to modify its catcode -- one must input it as \&.

You ask:

Why is & special outside of tabular environments?

I think the question is not well-posed. I would say that & is special everywhere, not just outside tabular environments. The character & has category code 4 -- "alignment tab" -- in all TeX and LaTeX formats I've ever encountered. This catcode setting allows it to be used as the alignment tab character not only in tabular-like environments (e.g., tabular*, tabularx, longtable, etc), but also array environments, the deprecated eqnarray environment, some of the display math environments of the amsmath package, the IEEEeqnarray environment of the IEEEtrantools package, and probably quite a few additional environments.

The virtue of giving & catcode 4 by default is that all package writers can (and, frankly, should ) write their code assuming that & has catcode 4. Without this default, you'd have some package writers choosing & as the alignment tab character, whereas others might choose @ or who knows what else. Such an outcome would be distinctly inferior for most users, since they'd have to memorize which character, or characters, serve as the alignment tab function in which environments.

Conversely, if one does not want & to be special -- and doesn't want to modify its catcode -- one must input it as \&.

You ask:

Why is & special outside of tabular environments?

I think the question is not well-posed. I would say that & is special everywhere, not just outside tabular environments. The character & has category code 4 -- "alignment tab" -- in all TeX and LaTeX formats I've ever encountered. This catcode setting allows it to be used as the alignment tab character not only in tabular-like environments (e.g., tabular*, tabularx, longtable, etc), but also array environments, the deprecated eqnarray environment, some of the display math environments of the amsmath package, the IEEEeqnarray environment of the IEEEtrantools package, and probably quite a few additional environments.

The virtue of assigning catcode 4 to & by default is that all package writers can (and, frankly, should ) write their code assuming that & has catcode 4. Without this default, you'd have some package writers choosing & as the alignment tab character, whereas others might choose @ or who knows what else. Such an outcome would be distinctly inferior for most users, since they'd have to memorize which character, or characters, serve as the alignment tab function in which environments.

Conversely, if one does not want & to be special -- and doesn't want to modify its catcode -- one must input it as \&.

added 492 characters in body, typo fix
Source Link
Mico
  • 420.4k
  • 47
  • 603
  • 1114

You ask:

Why is & special outside of tabular environments?

I think the question is not well-posed. I would say that & is special everywhere, not just outside tabular environments. The character & has category code 4 -- "alignment tab" -- in all TeX and LaTeX formats I've ever encountered. This catcode setting allows it to be used as the alignment tab character not only in tabular-like environments (e.g., tabular*, tabularx, longtable, etc), but also array environments, the deprecated eqnarray environment, some of the display math environments of the amsmath package, the IEEEeqnarray environment of the IEEEtrantools package, and probably quite a few additional environments.

The virtue of giving & catcode 4 by default is that all package writers can (and, frankly, should ) write their code assuming that & has catcode 4. Without this default, you'd have some package writers choosing & as the alignment tab character, whereas others might choose @ or who knows what else. Such an outcome would be distinctly inferior for most users, since they'd have to memorize which character, or characters, serve as the alignment tab function in which environments.

Conversely, if one does not want & to be special -- and doesn't want to modify its catcode -- one must input it as \&.

You ask:

Why is & special outside of tabular environments?

I think the question is not well-posed. I would say that & is special everywhere, not just outside tabular environments. The character & has category code 4 -- "alignment tab" -- in all TeX and LaTeX formats I've ever encountered. This catcode setting allows it to be used as the alignment tab character not only in tabular-like environments (e.g., tabular*, tabularx, longtable, etc), but also array environments, the deprecated eqnarray environment, some of the display math environments of the amsmath package, the IEEEeqnarray environment of the IEEEtrantools package, and probably quite a few additional environments.

Conversely, if one does not want & to be special -- and doesn't want to modify its catcode -- one must input it as \&.

You ask:

Why is & special outside of tabular environments?

I think the question is not well-posed. I would say that & is special everywhere, not just outside tabular environments. The character & has category code 4 -- "alignment tab" -- in all TeX and LaTeX formats I've ever encountered. This catcode setting allows it to be used as the alignment tab character not only in tabular-like environments (e.g., tabular*, tabularx, longtable, etc), but also array environments, the deprecated eqnarray environment, some of the display math environments of the amsmath package, the IEEEeqnarray environment of the IEEEtrantools package, and probably quite a few additional environments.

The virtue of giving & catcode 4 by default is that all package writers can (and, frankly, should ) write their code assuming that & has catcode 4. Without this default, you'd have some package writers choosing & as the alignment tab character, whereas others might choose @ or who knows what else. Such an outcome would be distinctly inferior for most users, since they'd have to memorize which character, or characters, serve as the alignment tab function in which environments.

Conversely, if one does not want & to be special -- and doesn't want to modify its catcode -- one must input it as \&.

Source Link
Mico
  • 420.4k
  • 47
  • 603
  • 1114

You ask:

Why is & special outside of tabular environments?

I think the question is not well-posed. I would say that & is special everywhere, not just outside tabular environments. The character & has category code 4 -- "alignment tab" -- in all TeX and LaTeX formats I've ever encountered. This catcode setting allows it to be used as the alignment tab character not only in tabular-like environments (e.g., tabular*, tabularx, longtable, etc), but also array environments, the deprecated eqnarray environment, some of the display math environments of the amsmath package, the IEEEeqnarray environment of the IEEEtrantools package, and probably quite a few additional environments.

Conversely, if one does not want & to be special -- and doesn't want to modify its catcode -- one must input it as \&.