[XeTeX] genotype
Bruno Le Floch
blflatex at gmail.com
Sun Jan 1 23:26:03 CET 2012
On 1/1/12, Michael Sharpe <msharpe at ucsd.edu> wrote:
>
> On Jan 1, 2012, at 10:46 AM, Jean-Louis Cordonnier wrote:
>
>> In order to write genetics, I need something like $\frac{A}{a}$ but with
>> a double horizontal bar -- and left( and right)
>> I tried this, but there is too much white around it.
>>
>> \newcommand\gen[2]{ %genotype
>>
>> $
>>
>> \left(
>>
>> \begin{array}{c} #1 \\
>>
>> \hline \hline #2\\
>>
>> \end{array}
>>
>> \right)
>>
>> $
>>
>
> You can reduce the white space inside the parentheses using a negative
> mkern. Eg,
>
> \newcommand\gen[2]{ %genotype
> $
> \left(\mkern-4mu
> \begin{array}{c} #1 \\
> \hline \hline #2\\
> \end{array}
> \mkern-4mu\right)
> $}
>
> Michael
You can try amsmath's pmatrix environment.
\usepackage{amsmath}
\newcommand\gen[2]{ %genotype
$
\begin{pmatrix} #1 \\
\hline \hline #2\\
\end{pmatrix}
$}
Regards,
Bruno
More information about the XeTeX
mailing list