New answers tagged superscripts
4
One of the reasons why I always use (square) brackets for delimiting matrices is that the larger the matrices are, the fatter the parentheses become.
Compare the two results, one with pmatrix, the other with bmatrix:
The parentheses don't add to clarity, only to the required space.
One might argue that the "T" is too far also in the second case, but I ...
4
You can get both behaviors with the same command, just using a *-variant:
\documentclass{article}
\usepackage{xparse}
\ExplSyntaxOn
\NewDocumentCommand{\tensorkor}{ s m O{} }
{
\IfBooleanTF{#1}
{ \gabriel_nonstacked:nn { #2 } { #3 } }
{ \gabriel_stacked:nn { #2 } { #3 } }
}
\cs_new_protected:Npn \gabriel_stacked:nn #1 #2
{
\mathsf{#1}%
...
3
Just change the definitions of \enoteformat:
\documentclass[12pt]{book}
\usepackage{endnotes,chngcntr}
\counterwithin*{endnote}{chapter} % Reset endnote numbering every new chapter
\makeatletter
\renewcommand\enoteformat{%
\parindent=1.8em
\noindent\@theenmark.\ }
\makeatother
<the rest is the same>
3
The scalerel package can do this. I made the scriptscript prime equal to .6 the size of the script prime. One invokes it as \ssp{base} to get base'
\documentclass{article}
\usepackage{scalerel}
\newcommand\scale[2]{\vstretch{#1}{\hstretch{#1}{#2}}}
\newcommand\ssp[1]{#1^{\scale{.6}{\scriptstyle\prime}}}
\begin{document}
\[
a {\scriptstyle a} ...
6
Without using xparse. (Edited to provide) two versions, depending on whether the user actually wanted subscripts of subscripts (\recursa) or not (\recursb):
\documentclass{article}
\usepackage{readarray}
\makeatletter
\newcounter{index}
\newcommand\recursa[1]{%
\def\theresult{}%
\getargsC{#1}%
\setcounter{index}{0}%
\whiledo{\value{index} < ...
7
\documentclass{article}
\usepackage{xparse}
\NewDocumentCommand{\tensorkor}{m >{\SplitList{,}}O{}}
{\begingroup
\mathsf{#1}%
\newcommand\object{\vphantom{\mathsf{#1}}}%
\ProcessList{#2}{\dotensorkor}%
\endgroup}
\NewDocumentCommand{\dotensorkor}{m}
{%
\object#1%
}
\begin{document}
$\tensorkor{T}[^a,_b,_c,^r,^f]$
\end{document}
Top 50 recent answers are included