Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
remusmp
Posts: 25 Joined: Sat Oct 17, 2009 8:37 pm
Post
by remusmp » Sat Nov 14, 2009 4:35 pm
Hej,
I've made a matrix with lots of fractions inside. The problem is that the font size differs. Is there a nice way (some environment) that keeps the same font size? (I did it with \displaystyle but I don't want to type it every time I need it)
Code: Select all
\begin{equation}
A=\left[
\begin{array}{lcr}
-\frac{\displaystyle k_vA_v}{\displaystyle 2A_t\sqrt{h_0}}&0&0\\
-\frac{\displaystyle C_v}{\displaystyle A_th_0^2}\left[u_{1_0}\left(T_k-T_{u_0}\right)+u_{2_0}\left(T_v-T_{u_0}\right)\right]&-\frac{C_v}{A_th_0}\left(u_{1_0}+u_{2_0}\right)&0\\
0&\frac{1}{\tau_m}&-\frac{1}{\tau_m}
\end{array}
\right]
\end{equation}
Thanks.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide : 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook : 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ : the first book about TikZ for perfect drawings in your LaTeX thesis
localghost
Site Moderator
Posts: 9202 Joined: Fri Feb 02, 2007 12:06 pm
Post
by localghost » Sat Nov 14, 2009 4:50 pm
Include the
array package and specify
\displaystyle for every single column as shown below.
Code: Select all
\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[includeheadfoot,margin=3cm]{geometry}
\usepackage{array}
\begin{document}
\begin{equation}
A=\left[
\begin{array}{>{\displaystyle}l>{\displaystyle}c>{\displaystyle}r}
-\frac{k_vA_v}{2A_t\sqrt{h_0}} & 0 & 0 \\
-\frac{C_v}{A_th_0^2}\left[u_{1_0}\left(T_k-T_{u_0}\right)+u_{2_0}\left(T_v-T_{u_0}\right)\right] & -\frac{C_v}{A_th_0}\left(u_{1_0}+u_{2_0}\right) & 0 \\
0 & \frac{1}{\tau_m} & -\frac{1}{\tau_m}
\end{array}
\right]
\end{equation}
\end{document}
Best regards
Thorsten
remusmp
Posts: 25 Joined: Sat Oct 17, 2009 8:37 pm
Post
by remusmp » Sat Nov 14, 2009 4:54 pm
Thanks a lot. It works.