TransWikia.com

Rational mathematical expression too long for overleaf?

TeX - LaTeX Asked on December 8, 2020

first of all, I don’t know why this isn’t going into LaTeX formatting.. I assumed on this stack exchange that would be easy to do. But yeah, I have this function, and it turns out it evaluates to a pretty nasty rational function of two variables, here t and v. When I put this on my overleaf document, it goes off the page. What can I do?? Can I make the text smaller somehow? How do I do that? Are there any other options? Thanks!!

$$W_{(2)}(t,v)=frac{t^{2-k},v^{k-2},left(t,v-1right),left(v-1right),
left(t-v+t^2,v^2+t^3,v^2+t^4,v^2-t^5,v^2-t,v-t^4,v-t^5,v-t^{3,k},
t^2-t^{3,k},t^4+t^2+t^3-t,t^{3,k},v^2+t^{3,k},t^2,v+t^{3,k},
t^3,v+t^{3,k},t^4,v-t^{3,k},t^3,v^2+t,t^{3,k},v-1right)}%
{{left(t-1right)}^4,{left(t+1right)}^2,left(t^4+t^3+2,t^2+t+1right)}$$

2 Answers

I suppose it's possible, though not really recommended, to line-break the very long numerator twice and to display W_{(2)}(t,v) as one big fraction.

You would do your readers a big favor if you display the numerator and denominator terms separately.

Either way, I'd get rid of the many , spacers, and I'd eliminate the many left and right directives as they don't actually do anything (except create code clutter).

enter image description here

documentclass{article}
usepackage{amsmath} % for 'align*' env.
begin{document}

[
W_{(2)}(t,v)=frac{left(
parbox{0.7textwidth}{raggedright
$t^{2-k} v^{k-2} (tv-1) (v-1) [t-v+t^2 v^2+t^3 
v^2+t^4 v^2-t^5 v^2-t v-t^4 v-t^5 v-t^{3k} t^2-t^{3k} 
t^4+t^2+t^3-t t^{3k} v^2+t^{3k} t^2 v+t^{3k} t^3 v+t^{3k} 
t^4 v-t^{3k} t^3 v^2+t t^{3k} v-1]$}right)}{%
(t-1)^4 (t+1)^2 (t^4+t^3+2 t^2+t+1)}
]

bigskip
noindent
$W_{(2)}(t,v)equiv A(t,v)/B(t)$, where 
begin{align*}
A(t,v) &= t^{2-k} v^{k-2} (tv-1) (v-1) [t-v+t^2 v^2+t^3 
v^2+t^4 v^2-t^5 v^2
&qquad -t v-t^4 v-t^5 v-t^{3k} t^2-t^{3k} 
t^4+t^2+t^3-t t^{3k} v^2
&qquad +t^{3k} t^2 v+t^{3k} t^3 v+t^{3k} 
t^4 v-t^{3k} t^3 v^2+t t^{3k} v-1]
end{align*}
and
$B(t)=(t-1)^4 (t+1)^2 (t^4+t^3+2 t^2+t+1)$.
end{document}

Correct answer by Mico on December 8, 2020

Ì propose this variant layout, with gather* and multlined:

documentclass{article}
usepackage{mathtools}

begin{document}

begin{gather*}
W_{(2)}(t,v) =frac{t^{2-k} v^{k-2} (tv-1) (v-1)A(t, v)}{(t-1)^4 (t+1)^2 (t^4+t^3+2 t^2+t+1)}, 
shortintertext{where}
begin{multlined}
A(t, v) = t-v+t^2 v^2+t^3v^2+t^4 v^2-t^5 v^2 -t v-t^4 v-t^5 v -t^{3k} t^2-t^{3k}t^4
+t^2+t^3-t, t^{3k} v^2+t^{3k} t^2 v+t^{3k} t^3 v+t^{3k}t^4 v-t^{3k} t^3 v^2+t, t^{3k} v-1.
end{multlined}
end{gather*}

end{document} 

enter image description here

Answered by Bernard on December 8, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP