Having some difficulties getting array, and delarray to do what I want.
For example,
\documentclass[11pt]{article}
\usepackage{delarray}
\begin{document}
$
\begin{array}({cc})
a & b\\
c & d
\end{array}
$
\end{document}
compiles fine. But if I try square delimiters
\documentclass[11pt]{article}
\usepackage{delarray}
\begin{document}
$
\begin{array}[{cc}]
a & b\\
c & d
\end{array}
$
\end{document}
doesn't compile at all (despite the fact that this is the *same* example
as shown at the bottom of p. 105 of Kopka & Daly - 3rd edition). To get
square delimiters, I need to use
\documentclass[11pt]{article}
\usepackage{delarray}
\begin{document}
$
\left[
\begin{array}{cc}
a & b\\
c & d
\end{array}
\right]
$
\end{document}
OK, I suppose I can work with that (although it puzzle me why delarray
only seems to play nice with () delimiters -- if true, pretty limited,
no pun intended).
But, the \left \right approach doesn't seem to 'play nice' with the
tabular environment. Ultimately, I'm trying to generate something like
the following
\documentclass[11pt]{article}
\usepackage {delarray}
\begin{document}
\begin{tabular}{ c @{} c }
&\begin{tabular}{cc} A & B \end{tabular} \\
\begin{tabular} {c} A \\ B \end{tabular}
&
\begin{tabular} ({cc})
1 & 2 \\
3 & 4\\
\end{tabular}
\end{tabular}
\end{document}
but with square delimiters. If I try
\documentclass[11pt]{article}
\usepackage {delarray}
\begin{document}
$
\begin{tabular}{ c @{} c }
&\begin{tabular}{cc} A & B \end{tabular} \\
\begin{tabular} {c} A \\ B \end{tabular}
&
\left(
\begin{tabular} {cc}
1 & 2 \\
3 & 4\\
\end{tabular}
\right)
\end{tabular}
$
\end{document}
doesn't compile. Which means that
\documentclass[11pt]{article}
\usepackage {delarray}
\begin{document}
$
\begin{tabular}{ c @{} c }
&\begin{tabular}{cc} A & B \end{tabular} \\
\begin{tabular} {c} A \\ B \end{tabular}
&
\left[
\begin{tabular} {cc}
1 & 2 \\
3 & 4\\
\end{tabular}
\right]
\end{tabular}
$
\end{document}
won't compile either.
If only blkarray weren't broken. ;-)
Suggestions/solutions?
Thanks in advance...
|
|
0
|
|
|
|
Reply
|
cooch17
|
3/22/2011 3:18:04 PM |
|
cooch17@NOSPAMverizon.net wrote:
> Having some difficulties getting array, and delarray to do what I want.
> For example,
>
> \documentclass[11pt]{article}
> \usepackage{delarray}
>
> \begin{document}
>
> $
> \begin{array}({cc})
> a & b\\
> c & d
> \end{array}
> $
>
> \end{document}
>
> compiles fine. But if I try square delimiters
>
> \documentclass[11pt]{article}
> \usepackage{delarray}
>
> \begin{document}
>
> $
> \begin{array}[{cc}]
> a & b\\
> c & d
> \end{array}
> $
>
> \end{document}
>
> doesn't compile at all (despite the fact that this is the *same* example
> as shown at the bottom of p. 105 of Kopka & Daly - 3rd edition). To get
> square delimiters, I need to use
>
> \documentclass[11pt]{article}
> \usepackage{delarray}
>
> \begin{document}
>
> $
> \left[
> \begin{array}{cc}
> a & b\\
> c & d
> \end{array}
> \right]
> $
>
> \end{document}
>
> OK, I suppose I can work with that (although it puzzle me why delarray
> only seems to play nice with () delimiters -- if true, pretty limited,
> no pun intended).
>
> But, the \left \right approach doesn't seem to 'play nice' with the
> tabular environment. Ultimately, I'm trying to generate something like
> the following
>
> \documentclass[11pt]{article}
> \usepackage {delarray}
> \begin{document}
>
> \begin{tabular}{ c @{} c }
> &\begin{tabular}{cc} A & B \end{tabular} \\
> \begin{tabular} {c} A \\ B \end{tabular}
> &
> \begin{tabular} ({cc})
> 1 & 2 \\
> 3 & 4\\
> \end{tabular}
> \end{tabular}
>
> \end{document}
>
> but with square delimiters. If I try
>
> \documentclass[11pt]{article}
> \usepackage {delarray}
> \begin{document}
>
> $
> \begin{tabular}{ c @{} c }
> &\begin{tabular}{cc} A & B \end{tabular} \\
> \begin{tabular} {c} A \\ B \end{tabular}
> &
> \left(
> \begin{tabular} {cc}
> 1 & 2 \\
> 3 & 4\\
> \end{tabular}
> \right)
> \end{tabular}
> $
>
> \end{document}
>
> doesn't compile. Which means that
>
> \documentclass[11pt]{article}
> \usepackage {delarray}
> \begin{document}
>
> $
> \begin{tabular}{ c @{} c }
> &\begin{tabular}{cc} A & B \end{tabular} \\
> \begin{tabular} {c} A \\ B \end{tabular}
> &
> \left[
> \begin{tabular} {cc}
> 1 & 2 \\
> 3 & 4\\
> \end{tabular}
> \right]
> \end{tabular}
> $
>
> \end{document}
>
>
> won't compile either.
>
> If only blkarray weren't broken. ;-)
>
> Suggestions/solutions?
>
> Thanks in advance...
see 'texdoc delarray'
and you will see why [ does not work as expected, array is changed such
that
\begin{array}[t]({c})
is supported
have you tried blkarray instead? delarray is from 1994 (apparently)
--
/daleif (remove RTFSIGNATURE from email address)
Memoir and mh bundle maintainer
LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.minimalbeispiel.de/mini-en.html
|
|
0
|
|
|
|
Reply
|
Lars
|
3/22/2011 3:25:54 PM
|
|
Lars Madsen wrote:
> cooch17@NOSPAMverizon.net wrote:
>> Having some difficulties getting array, and delarray to do what I
>> want. For example,
>>
>> \documentclass[11pt]{article}
>> \usepackage{delarray}
>>
>> \begin{document}
>>
>> $
>> \begin{array}({cc})
>> a & b\\
>> c & d
>> \end{array}
>> $
>>
>> \end{document}
>>
>> compiles fine. But if I try square delimiters
>>
>> \documentclass[11pt]{article}
>> \usepackage{delarray}
>>
>> \begin{document}
>>
>> $
>> \begin{array}[{cc}]
>> a & b\\
>> c & d
>> \end{array}
>> $
>>
>> \end{document}
>>
>> doesn't compile at all (despite the fact that this is the *same*
>> example as shown at the bottom of p. 105 of Kopka & Daly - 3rd
>> edition). To get square delimiters, I need to use
>>
>> \documentclass[11pt]{article}
>> \usepackage{delarray}
>>
>> \begin{document}
>>
>> $
>> \left[
>> \begin{array}{cc}
>> a & b\\
>> c & d
>> \end{array}
>> \right]
>> $
>>
>> \end{document}
>>
>> OK, I suppose I can work with that (although it puzzle me why delarray
>> only seems to play nice with () delimiters -- if true, pretty limited,
>> no pun intended).
>>
>> But, the \left \right approach doesn't seem to 'play nice' with the
>> tabular environment. Ultimately, I'm trying to generate something like
>> the following
>>
>> \documentclass[11pt]{article}
>> \usepackage {delarray}
>> \begin{document}
>>
>> \begin{tabular}{ c @{} c }
>> &\begin{tabular}{cc} A & B \end{tabular} \\
>> \begin{tabular} {c} A \\ B \end{tabular}
>> &
>> \begin{tabular} ({cc})
>> 1 & 2 \\
>> 3 & 4\\
>> \end{tabular}
>> \end{tabular}
>>
>> \end{document}
>>
>> but with square delimiters. If I try
>>
>> \documentclass[11pt]{article}
>> \usepackage {delarray}
>> \begin{document}
>>
>> $
>> \begin{tabular}{ c @{} c }
>> &\begin{tabular}{cc} A & B \end{tabular} \\
>> \begin{tabular} {c} A \\ B \end{tabular}
>> &
>> \left(
>> \begin{tabular} {cc}
>> 1 & 2 \\
>> 3 & 4\\
>> \end{tabular}
>> \right)
>> \end{tabular}
>> $
>>
>> \end{document}
>>
>> doesn't compile. Which means that
>>
>> \documentclass[11pt]{article}
>> \usepackage {delarray}
>> \begin{document}
>>
>> $
>> \begin{tabular}{ c @{} c }
>> &\begin{tabular}{cc} A & B \end{tabular} \\
>> \begin{tabular} {c} A \\ B \end{tabular}
>> &
>> \left[
>> \begin{tabular} {cc}
>> 1 & 2 \\
>> 3 & 4\\
>> \end{tabular}
>> \right]
>> \end{tabular}
>> $
>>
>> \end{document}
>>
>>
>> won't compile either.
>>
>> If only blkarray weren't broken. ;-)
>>
>> Suggestions/solutions?
>>
>> Thanks in advance...
>
> see 'texdoc delarray'
>
> and you will see why [ does not work as expected, array is changed such
> that
>
> \begin{array}[t]({c})
>
> is supported
>
> have you tried blkarray instead? delarray is from 1994 (apparently)
>
>
sorry did't read all the text
--
/daleif (remove RTFSIGNATURE from email address)
Memoir and mh bundle maintainer
LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.minimalbeispiel.de/mini-en.html
|
|
0
|
|
|
|
Reply
|
Lars
|
3/22/2011 3:38:34 PM
|
|
Le 22/03/2011 16:18, cooch17@NOSPAMverizon.net a �crit :
> Having some difficulties getting array, and delarray to do what I want.
> For example,
>
> $
> \begin{array}({cc})
> compiles fine. But if I try square delimiters
>
> $
> \begin{array}[{cc}]
SYNTAX ? \begin{array} [ outer alignment ]
<delarray left> { preamble } <delarray right>
Well. So: \begin{array} [ => [{cc}] => outer alignment = {cc}
=> where is the preamble ????
$\begin{array} [c] [{cc}] ... \end{array}$
With tabu it's also possible to say:
$\begin{tabu} [] [{cc}] ... \end{tabu}$
then the default outer alignment is used... next release next ;-)
Regards.
|
|
0
|
|
|
|
Reply
|
GL
|
3/22/2011 3:48:43 PM
|
|
Le 22/03/2011 16:48, GL a �crit :
> Le 22/03/2011 16:18, cooch17@NOSPAMverizon.net a �crit :
>> Having some difficulties getting array, and delarray to do what I want.
>> For example,
>>
>> $
>> \begin{array}({cc})
>> compiles fine. But if I try square delimiters
>>
>> $
>> \begin{array}[{cc}]
>
> SYNTAX ? \begin{array} [ outer alignment ]
> <delarray left> { preamble } <delarray right>
>
> Well. So: \begin{array} [ => [{cc}] => outer alignment = {cc}
> => where is the preamble ????
>
>
> $\begin{array} [c] [{cc}] ... \end{array}$
>
> With tabu it's also possible to say:
>
> $\begin{tabu} [] [{cc}] ... \end{tabu}$
>
> then the default outer alignment is used... next release next ;-)
In fact, braces are mandatory around the tabular/array preamble, at
least when delarray.sty is loaded. For tabu they are always mandatory.
Then I will implement the test so that
$\begin{tabu} [{cc}] ...
will be possible !
Thanks.
>
> Regards.
|
|
0
|
|
|
|
Reply
|
GL
|
3/22/2011 3:53:22 PM
|
|
>
> see 'texdoc delarray'
>
> and you will see why [ does not work as expected, array is changed such
> that
>
> \begin{array}[t]({c})
>
> is supported
So, only () delimiters? Alas, then useless for me.
>
> have you tried blkarray instead? delarray is from 1994 (apparently)
>
>
blkarray is broken, and delarray is overly limited. So, for the moment,
there seems to be no way to take the following and put square brackets
around the matrix. I can hear my editor now ('Gee, you could do this
with MathType in Word in about 10 seconds...').
Free virtual beer for anyone who can figure out a solution. All I want
is to generate something like...(where the braces are contiguous on left
and right sides).
A B
A [1 2]
B [3 4]
\documentclass[11pt]{article}
\usepackage {delarray}
\begin{document}
$
\begin{tabular}{ c @{} c }
&\begin{tabular}{cc} A & B \end{tabular} \\
\begin{tabular} {c} A \\ B \end{tabular}
&
\begin{tabular} ({cc})
1 & 2 \\
3 & 4\\
\end{tabular}
\end{tabular}
$
\end{document}
|
|
0
|
|
|
|
Reply
|
cooch17
|
3/22/2011 4:00:19 PM
|
|
On 3/22/2011 11:48 AM, GL wrote:
> Le 22/03/2011 16:18, cooch17@NOSPAMverizon.net a �crit :
>> Having some difficulties getting array, and delarray to do what I want.
>> For example,
>>
>> $
>> \begin{array}({cc})
>> compiles fine. But if I try square delimiters
>>
>> $
>> \begin{array}[{cc}]
>
> SYNTAX ? \begin{array} [ outer alignment ]
> <delarray left> { preamble } <delarray right>
>
> Well. So: \begin{array} [ => [{cc}] => outer alignment = {cc}
> => where is the preamble ????
Why do I need one? Never needed one for any other tables I've generated.
I digress...
>
>
> $\begin{array} [c] [{cc}] ... \end{array}$
>
> With tabu it's also possible to say:
>
> $\begin{tabu} [] [{cc}] ... \end{tabu}$
>
> then the default outer alignment is used... next release next ;-)
>
> Regards.
So
$
\begin{array}[alignment][{cc}]
a & b\\
c & d
\end{array}
$
works. Thanks -- so apparently, alignment is needed only for non-()
delimiters? Strange...
|
|
0
|
|
|
|
Reply
|
cooch17
|
3/22/2011 4:09:28 PM
|
|
cooch17@NOSPAMverizon.net wrote:
>
>>
>> see 'texdoc delarray'
>>
>> and you will see why [ does not work as expected, array is changed such
>> that
>>
>> \begin{array}[t]({c})
>
>
>
>
>
>>
>> is supported
>
>
> So, only () delimiters? Alas, then useless for me.
>
>>
>> have you tried blkarray instead? delarray is from 1994 (apparently)
>>
>>
>
>
> blkarray is broken, and delarray is overly limited. So, for the moment,
> there seems to be no way to take the following and put square brackets
> around the matrix. I can hear my editor now ('Gee, you could do this
> with MathType in Word in about 10 seconds...').
>
> Free virtual beer for anyone who can figure out a solution. All I want
> is to generate something like...(where the braces are contiguous on left
> and right sides).
>
> A B
> A [1 2]
> B [3 4]
>
>
> \documentclass[11pt]{article}
> \usepackage {delarray}
> \begin{document}
>
> $
> \begin{tabular}{ c @{} c }
> &\begin{tabular}{cc} A & B \end{tabular} \\
> \begin{tabular} {c} A \\ B \end{tabular}
> &
> \begin{tabular} ({cc})
> 1 & 2 \\
> 3 & 4\\
> \end{tabular}
> \end{tabular}
> $
>
> \end{document}
I do not quite see the problem
\documentclass[11pt]{article}
\usepackage{blkarray}
\begin{document}
\[
\begin{blockarray}{ccc}
& A & B\\
\begin{block}{c[cc]}
A & 1 & 2 \\
B & 3 & 4\\
\end{block}
\end{blockarray}
\]
\end{document}
seem to give me what you asked for
--
/daleif (remove RTFSIGNATURE from email address)
Memoir and mh bundle maintainer
LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.minimalbeispiel.de/mini-en.html
|
|
0
|
|
|
|
Reply
|
Lars
|
3/22/2011 4:10:55 PM
|
|
cooch17@NOSPAMverizon.net wrote:
> On 3/22/2011 11:48 AM, GL wrote:
>> Le 22/03/2011 16:18, cooch17@NOSPAMverizon.net a �crit :
>>> Having some difficulties getting array, and delarray to do what I want.
>>> For example,
>>>
>>> $
>>> \begin{array}({cc})
>>> compiles fine. But if I try square delimiters
>>>
>>> $
>>> \begin{array}[{cc}]
>>
>> SYNTAX ? \begin{array} [ outer alignment ]
>> <delarray left> { preamble } <delarray right>
>>
>> Well. So: \begin{array} [ => [{cc}] => outer alignment = {cc}
>> => where is the preamble ????
>
>
> Why do I need one? Never needed one for any other tables I've generated.
> I digress...
>
>>
>>
>> $\begin{array} [c] [{cc}] ... \end{array}$
>>
>> With tabu it's also possible to say:
>>
>> $\begin{tabu} [] [{cc}] ... \end{tabu}$
>>
>> then the default outer alignment is used... next release next ;-)
>>
>> Regards.
>
>
> So
>
> $
> \begin{array}[alignment][{cc}]
> a & b\\
> c & d
> \end{array}
> $
>
> works. Thanks -- so apparently, alignment is needed only for non-()
> delimiters? Strange...
parsing issues
--
/daleif (remove RTFSIGNATURE from email address)
Memoir and mh bundle maintainer
LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.minimalbeispiel.de/mini-en.html
|
|
0
|
|
|
|
Reply
|
Lars
|
3/22/2011 4:11:30 PM
|
|
Le 22/03/2011 17:09, cooch17@NOSPAMverizon.net a �crit :
> On 3/22/2011 11:48 AM, GL wrote:
>> Le 22/03/2011 16:18, cooch17@NOSPAMverizon.net a �crit :
>
>
> So
>
> $
> \begin{array}[alignment][{cc}]
> a & b\\
> c & d
> \end{array}
> $
>
> works. Thanks -- so apparently, alignment is needed only for non-()
> delimiters? Strange...
The default *outer* alignment for array is centered [c]. Normal in
math mode ! The default for tabular is [c] as well while for tabu
it is [c] in math mode and [t] in text mode...
As Lars said: TeX reads: \begin{array} [
and then while it sees "the character [" it thinks "there is an outer
alignment specification". U Understand ?
So you need to give an *explicit* *outer* alignment spec only when
you use brackets delimiters [ and ].
Now I thank you because I improved tabu in order not to get into this
problem: TeX sees "the character [" and looks forward
then it sees "the character {" and thinks "it's not the outer
alignment but the preamble..."
As long as the outer alignment il always a single letter, the user
who writes [{c}] for a centered outer alignment is wrong...
Well that's all folks: with brackets, array and tabular require an
explicit outer alignement specification.
Best regards.
|
|
0
|
|
|
|
Reply
|
GL
|
3/22/2011 6:49:49 PM
|
|
cooch17@NOSPAMverizon.net writes:
>>
>> see 'texdoc delarray'
>>
>> and you will see why [ does not work as expected, array is changed such
>> that
>>
>> \begin{array}[t]({c})
>>
>> is supported
>
> So, only () delimiters? Alas, then useless for me.
no. the doc shows an example with \{\} delimiters, and
\begin{array}[t][{cc}]
works for me.
if you omit the optional argument, and then try for [] delimiters, the
environment will be confused enough to imagine that you're giving it an
optional argument. hence the structure of my example, with the optional
argument given even though not strictly (otherwise) needed.
--
Robin Fairbairns, Cambridge
my address is @cl.cam.ac.uk, regardless of the header. sorry about that.
|
|
0
|
|
|
|
Reply
|
Robin
|
3/22/2011 9:27:44 PM
|
|
<cooch17@NOSPAMverizon.net> wrote:
> So, only () delimiters? Alas, then useless for me.
You can use also
\begin{array}\lbrack{...}\rbrack
or any other pair of delimiters. Did you try the bmatrix
environment of amsmath?
Ciao
Enrico
|
|
0
|
|
|
|
Reply
|
Enrico
|
3/22/2011 9:37:50 PM
|
|
|
11 Replies
96 Views
(page loaded in 0.11 seconds)
Similiar Articles:7/24/2012 9:49:20 PM
|