Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I found the amsmath package's pmatrix environment have a bit difference with LaTeX's pmatrix command. You can see it from:

\documentclass{article}
% \usepackage{amsmath}
\linespread{1.3}
\begin{document}
$\pmatrix{A&B\cr C&D\cr}$
% $\begin{pmatrix}A&B\cr C&D\cr\end{pmatrix}$
\end{document}

and:

\documentclass{article}
\usepackage{amsmath}
\linespread{1.3}
\begin{document}
% $\pmatrix{A&B\cr C&D\cr}$
$\begin{pmatrix}A&B\cr C&D\cr\end{pmatrix}$
\end{document}

Is this a feature of amsmath?

share|improve this question
    
What version of amsmath are you using? Your first example gives me an error old form \pmatrix should be \begin{pmatrix}... So it looks like you are using a deprecated and no longer supported syntax. –  Matthew Leingang Mar 15 '11 at 9:01
    
@Matthew: But the first example doesn't use amsmath. –  Harald Hanche-Olsen Mar 15 '11 at 9:20
    
it is a feature of amsmath, it has some more environments for matrices, e.g. bmatrix –  Herbert Mar 15 '11 at 9:22
    
Other than noting that the two are implemented quite differently, I don't think it's easy to give a useful answer to this question. But I do find the extra vertical space taken by the amsmath array constructs to be (slightly) annoying. –  Harald Hanche-Olsen Mar 15 '11 at 9:31
    
@Harald: Ah, I get it now. Sorry to be thick. –  Matthew Leingang Mar 15 '11 at 10:22
add comment

2 Answers

I never use \linespread, and if you look at the very fine document mathmode.pdf I think it will be difficult to find how to use \linespread. If you make some investigations on the web, you can find \linespread{1.3} \selectfont. I think if you really need to get some space, \renewcommand\arraystretch{1.3} is a better idea!

\documentclass{article}
\usepackage{amsmath}

\begin{document} 

\linespread{1.3}% do nothing !!! without \selectfont   

$\begin{pmatrix}A&B\cr C&D\cr\end{pmatrix}$  

\linespread{1.3} \selectfont 

$\begin{pmatrix}A&B\cr C&D\cr\end{pmatrix}$  

\renewcommand\arraystretch{1.3}
$\begin{pmatrix}A&B\cr C&D\cr\end{pmatrix}$ 

\end{document}

enter image description here

share|improve this answer
    
You don't understand me. The \linespread command is not use to stretch the array, but to get suitable text (it's omitted by me) line spacing. And, I put the \linespread command before the \begin{document} to get a globally setting, that don't need followed by \selectfont. –  Rushavski Mar 16 '11 at 0:05
add comment

This seems to be due to the \linespread{1.3}. I'm not sure if this is a feature of amsmath or a bug. Depends on your point of view, I suppose. Feel like a bug. Especially if you use an absurd \linespread factor (e.g., 5).

share|improve this answer
    
even so, there is few people concern... –  Rushavski Mar 16 '11 at 0:08
    
@Rushavski: I don't know what you mean. Are you saying that only a few people care about the bug? It could be that the AMS doesn't know about the bug or they think it is a bug. It might be best to file a bug report with them. I don't have the URL handy, but I know it has been mentioned on tex.SX before, for what that's worth. –  TH. Mar 16 '11 at 0:13
    
sorry for my rude behavior. Thanks for your explanation. –  Rushavski Mar 16 '11 at 0:21
    
@Rushavski: Nothing seemed rude, I just didn't understand is all. –  TH. Mar 16 '11 at 1:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.