tensind spacing

Is there anyway to switch on and off the index space formatting implemented in the tensind package?

I would like to be able to switch it on and off on a whole document; for example, if I had a tensor

\documentclass{article}
\usepackage{tensind}
\tensordelimiter{?}
\tensorformat{}

\begin{document}
$?R_a^b_c^d?$
\end{document}


Is there a setting I could implement to stack the indices without gaps. By default they have gaps, and I want to see what my document would look like without having to change the whole thing.

In comparison, the tensor package has a feature that allows you to switch on and off space formatting in its tensor environment. For example:

\documentclass{article}
\usepackage{tensor}
\begin{document}
$\tensor{M}{^{i_1}_{m_1}^{i_2}_{m_2}^{i_3}_{m_3}^{i_4}_{m_4‌​}}$
$\tensor*{M}{*^{i_1}_{m_1}^{i_2}_{m_2}^{i_3}_{m_3}^{i_4}_{m_‌​4}}$
\end{document}


I was hoping to find something similar with the tensind package

Thanks!

• I added \documentclass{article} but got ! Missing $inserted. <inserted text>$ please fix the example to allow people to see the output. – David Carlisle Mar 23 '17 at 22:42
• but I don't see any gaps other than the width of the letters, surely the whole point of the tensor notation relies on keeping the relative order of the scripts? – David Carlisle Mar 23 '17 at 22:45
• That's precisely it's function. With the tensor package you are able to collapse the extra spacing by a slight redefinition in the command. Something like – MKF Mar 23 '17 at 22:46
• The gaps are significant; $R_{ac}^{bd}$ cannot be interpreted correctly as a tensor. – egreg Mar 23 '17 at 22:48
• I have elaborated above – MKF Mar 23 '17 at 22:59

seems a bit strange use of the notation but...

\documentclass{article}
\usepackage{tensind}
\tensordelimiter{?}

\tensorformat{}
\makeatletter
\def\tsi@phantom#1{}%

\begin{document}
$?R_a^b_c^d?$
\end{document}

• You are awesome - thank you so much! I understand it looks weird, but I need to see how this affects some tensors compared to others – MKF Mar 23 '17 at 23:11
• Is there a way to perform this individually on one tensor without performing it on every tensor in the whole tex document? and perhaps adjust the average spacing between indices? This would also be a great feature – MKF Mar 23 '17 at 23:13
• @MKF yes you can make that definition anywhere and it has local scope – David Carlisle Mar 23 '17 at 23:20
• That is amazing - I really appreciate your effort and your help @David Carlisle, thanks once again! – MKF Mar 23 '17 at 23:23