TeX - LaTeX Asked on September 29, 2021
For the following two approaches or sets of equations, I would like to
1- (in the first set) make the first for
align with the two for
s below
2- (in the second set) keep the font and interspaces the same as the first set
documentclass{article}
usepackage{mathtools,nccmath}
begin{document}
begin{fleqn}
begin{gather}
t_k = left{
begin{alignedat}{2}
&{frac{k}{N}}^nu & quad &text{for } nu > 1
&left{begin{alignedat}{2}
&t_0 left( frac{k}{N_0} right)^nu & quad &text{for } 0 leq k leq N_0
%
&t_0 + frac{k-N_0}{N-N_0} left(t - t_0right) & &text{for} enspace N_0 < k leq N, t_0 < t
end{alignedat}right.
end{alignedat}right.[baselineskip]
%%
% https://tex.stackexchange.com/a/84072/2288
t_k =
{left{begin{array}{@{}l@{quad}l@{}}
{frac{k}{N}}^nu & text{for } nu > 1
left{begin{array}{@{}l@{}}
t_0 left( frac{k}{N_0} right)^nu
t_0 + frac{k-N_0}{N-N_0} left(t - t_0right)
end{array}right.kern-nulldelimiterspace
& begin{array}{@{}l@{}}
text{for } 0 leq k leq N_0
text{for } N_0 < k leq N, t_0 < t
end{array}
end{array}right.}
end{gather}
end{fleqn}
end{document}
Here's a solution to your second question. AFAICT, the solution answers also your first question implicitly.
Some comments:
I added a left( ... right)
"wrapper" around the first fraction term, as otherwise it's not obvious whether the nu
exponent term pertains to the entire fraction or to just the numerator.
The solution also inserts typographic struts in the second "inner" array
to assure that the rows' heights are the same as in the first "inner" array
.
Finally, addlinespace
directives (provided by the booktabs
package) are inserted to increase the vertical separation between rows.
That said, I don't believe that this layout is all that clear. For instance, shouldn't there be an indication somewhere that rows 2 and 3 pertain to the case $nu le 1
?
documentclass{article}
usepackage{nccmath} % for 'fleqn' env.
usepackage{array} % for newcolumntype macro
usepackage{booktabs} % for addlinespace macrdo
newcolumntype{L}{>{displaystyle}l}
% Define two (typographical) struts (to be used in math mode only):
newcommandstrutA{vphantom{%
displaystyleleft( frac{k}{N_0} right)^{nu}}}
newcommandstrutB{vphantom{%
displaystylefrac{k-N_0}{N-N_0}}}
begin{document}
begin{fleqn}
begin{equation}
t_k =
left{
begin{array}{@{} L @{quad} L @{}}
left(frac{k}{N}right)^{!nu}
& text{for $nu > 1$}
addlinespace
left{
begin{array}{@{} L @{}}
t_0 left(frac{k}{N_0}right)^{!nu}
addlinespace
t_0 + frac{k-N_0}{N-N_0} (t - t_0)
end{array}
right.kern-nulldelimiterspace
&
begin{array}{@{} L @{}}
text{for $0 leq k leq N_0$}strutA
addlinespace
text{for $N_0 < k leq N$, $t_0 < t$}strutB
end{array}
end{array}
right.
end{equation}
end{fleqn}
end{document}
Correct answer by Mico on September 29, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP