## LaTeX forum ⇒ General ⇒ Can I have more control over my subscripts?

LaTeX specific issues not fitting into one of the other forums of this category.
viktiglemma
Posts: 5
Joined: Tue Apr 01, 2008 3:54 pm

### Can I have more control over my subscripts?

Hi,

I'm currently using a lot of subscripts in my work; however I see that the naive way of making them doesn't always turn out that well:
$$\left( \begin{array}{c} n'_1+1\\ \vdots\\ n'_{K-1} \end{array} \right)$$

With this code the last subscript seems too large. Any ideas on how I can make this look better?

Thanks

LaTeXguide.org • LaTeX-Cookbook.net

Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

### Re: Can I have more control over my subscripts?

If I correctly understand, the problem is the size of the K letter. You could replace K by {\scriptscriptstyle K}, in which case, the K letter looks too small compared with 1. So you could try {\scriptscriptstyle K-1} instead of K-1. But once again, you should change 1 by {\scriptscriptstyle 1} in the first array entry to get homogeneous sizes. In my opinion, it is better to keep things as they are now. Or change K by a letter looking better.

By the way, instead of, \left( \begin{array}{c}.... \end{array} \right), I would use
\left( \begin{array}{@{}c@{}}.... \end{array} \right) or even simpler \begin{pmatrix}... \end{pmatrix}. The pmatrix environment is defined in the amsmath package.

balf
Posts: 158
Joined: Sat Jan 12, 2008 1:11 am

### Re: Can I have more control over my subscripts?

The previous solution has the drawback of making the stroke width used for K thinner than that used for the rest of the index.
Another solution might be to use a small cap font, but this would require to define, say, a \mathsc command via a new math alphabet:
\DeclareMathAlphabet{\mathsc}{OT1}{cmr}{m}{sc}
(the encoding would be different if you want use the lm fonts, instead of the cm ones).

B.A.

viktiglemma
Posts: 5
Joined: Tue Apr 01, 2008 3:54 pm

### Re: Can I have more control over my subscripts?

Thanks for your replies, I think I'll be able to solve my problem now. Also thanks for the tip about pmatrix. I've been hoping to find something just like that for a while now.

curiouslearn
Posts: 105
Joined: Fri Nov 30, 2007 11:32 pm

### Can I have more control over my subscripts?

In response to the question about subscripts, balf suggested the following solution:

\DeclareMathAlphabet{\mathsc}{OT1}{cmr}{m}{sc}

Is there a way to make the small caps letters rendered by this solution also italics. If yes, can someone please suggest how to do that?

Also, Juanjo I used the \scriptscriptstyle to make 1s in my subscripts smaller. I could not think of another way to do it.

Thanks.

balf
Posts: 158
Joined: Sat Jan 12, 2008 1:11 am

### Re: Can I have more control over my subscripts?

You can use the lm fonts for your whole document, which have a slanted smallcap shape and write
\DeclareMathAlphabet{\mathsc}{T1}{lmr}{m}{scsl}

Another solution might come from the slantsc package; see the details in the doc, but as far as I recall, the cmr font does have slanted small caps, which are not declared by default in the .fd file.

B.A.

curiouslearn
Posts: 105
Joined: Fri Nov 30, 2007 11:32 pm

### Can I have more control over my subscripts?

Thanks very much Balf. I appreciate your help. I will try out this solution. For the text and math I am actually using the charter font with
\usepackage[charter]{mathdesign}

However, it seems charter does not have small caps either (I am not sure, but command \sc did not work with it). I will try out the lmr font. In case, you know of any other smallcaps that goes best with charter, please let me know.

Thanks.

balf
Posts: 158
Joined: Sat Jan 12, 2008 1:11 am

### Re: Can I have more control over my subscripts?

Unfortunately, I don't know any small caps font matching charter, except the commercial ones, of course. However, if you do not specifically need charter, but just want to change from the cm-lm-ec family, you might consider using Minion Pro, which has slanted, boldface ans slanted boldface small caps ; the Minion Pro package lets you use them with LaTeX (with some work, as they are in otf format; everything is well explained in the package doc). Also the Springer fonts (derived from Minion) can be used, with the sfonts package, from Walter Schmidt.

Regards,
B.A.

curiouslearn
Posts: 105
Joined: Fri Nov 30, 2007 11:32 pm

### Can I have more control over my subscripts?

Thanks Balf. Yes, MinionPro was on my list to try out. Though, I did not know that it had all those additional features. It looks nice and professional, but since it is a little work to use it, I will have to wait for a couple of weeks when I have the time to try it out.

I tried using the method you suggested yesterday. With that, unfortunately, when I have two letters in a subscript; such as
x_{\mathsc{IR}}
, the second letter is a little smaller than the first one. I wonder why. Hence, I went with Juanjo suggestion and used
x_{\scriptscriptstyle IR}
instead. That works pretty well for my case. Also, that way I can stick to the charter font.

ptoche
Posts: 49
Joined: Thu Apr 12, 2007 10:41 am

### Re: Can I have more control over my subscripts?

Great tip.

My contribution is absolutely trivial:

In preamble, define:
\newcommand{\ms}{\scriptscriptstyle}

In text, type:
{\ms TEXT}

where "ms" stands for "math small"

it's just less tedious to type {\ms TEXT} instead of {\scriptscriptstyle TEXT}