1

I'm not much of a LaTeX jockey, but I use it to typeset equations via LaTeXIt. I'm noticing that LaTeXIt will cut off the typeset image if it exceeds a certain width - I've looked for a document width property but can't find one. I'd prefer to not split the equation across lines, but I'd like the image to capture the full width of the typeset equation. Is there a trick to remove this constraint?

I don't think I've modified the standard preamble, which I think LaTeXIt says is:

\documentclass[10pt]{article}
\usepackage{color} %used for font color
\usepackage{amssymb} %maths
\usepackage{amsmath} %maths
\usepackage{esdiff}
\usepackage[utf8]{inputenc} %useful to type directly diacritic characters

An example of a silly long equation that gets cut off is:

\operatorname{I_{{Load}}}{\left (t \right )} = \frac{C_{1}}{2 L} \left(- R_{{load}} - \frac{1}{\sqrt{C_{{L}}} \sqrt{C_{{R}}}} \sqrt{C_{{L}} C_{{R}} R_{{load}}^{2} - 4 C_{{L}} L - 4 C_{{R}} L}\right) e^{\frac{t}{2 L} \left(- R_{{load}} - \frac{1}{\sqrt{C_{{L}}} \sqrt{C_{{R}}}} \sqrt{C_{{L}} C_{{R}} R_{{load}}^{2} - 4 C_{{L}} L - 4 C_{{R}} L}\right)} + \frac{C_{2}}{2 L} \left(- R_{{load}} + \frac{1}{\sqrt{C_{{L}}} \sqrt{C_{{R}}}} \sqrt{C_{{L}} C_{{R}} R_{{load}}^{2} - 4 C_{{L}} L - 4 C_{{R}} L}\right) e^{\frac{t}{2 L} \left(- R_{{load}} + \frac{1}{\sqrt{C_{{L}}} \sqrt{C_{{R}}}} \sqrt{C_{{L}} C_{{R}} R_{{load}}^{2} - 4 C_{{L}} L - 4 C_{{R}} L}\right)}

In this case it is not well formatted because it is machine generated. The result I'm seeing is:

truncated equation

Omegaman
  • 111
  • Welcome to TeX.SX!! It is better to post a full minimal working example that starts with a \documentclass command, has a minimal preamble and then \begin{document}...\end{document}. his makes it much easier for people to help you --- and much ore likely that they will! At a minimum, you should give us an example that causes your problem for LaTeXlt. –  Feb 12 '16 at 06:46
  • If you want to write your equation on two or more lines you can use the split environment inside your equation – BambOo Mar 24 '18 at 16:54
  • Parts between \left...\right can't be broken across lines. – Andrew Swann May 15 '18 at 19:41
  • I appreciate people still looking at this question and offering suggestions. I've added a clarification to the question that I'm trying to avoid splitting the equation, but want to widen the image instead. – Omegaman May 17 '18 at 03:55

2 Answers2

3

One of the many possibilities to make your code more elegantly.

enter image description here

\documentclass{article}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage[margin=1in]{geometry} 
\begin{document}


\begin{align*}
I_{\text{load}}(t) &=  \frac{C_{1}}{2 L} \left(- R_{\text{load}} - \frac{1}{\sqrt{C_{{L}}} \sqrt{C_{{R}}}} \sqrt{C_{{L}} C_{{R}} R_{\text{load}}^{2} - 4 C_{{L}} L - 4 C_{{R}} L}\right)\, e^\mu
\end{align*}

where $\mu$ is

\[
\begin{split}
\mu &= \frac{t}{2 L} \left(- R_{\text{load}} - \frac{1}{\sqrt{C_{{L}}} \sqrt{C_{{R}}}} \sqrt{C_{{L}} C_{{R}} R_{\text{load}}^{2} - 4 C_{{L}} L - 4 C_{{R}} L}\right)\\
&+\frac{C_{2}}{2 L} \left(- R_{\text{load}} + \frac{1}{\sqrt{C_{{L}}} \sqrt{C_{{R}}}} \sqrt{C_{{L}} C_{{R}} R_{\text{load}}^{2} - 4 C_{{L}} L - 4 C_{{R}} L}\right) \\
&\cdot e^{{\frac{t}{2L}}\left(-R_{\text{load}} +\frac{1}{\sqrt{C_{L}}\sqrt{C_R}}\sqrt{ R_{\text{load}}^2 -4 C_{L} L-4 C_{R} L}\right)}
\end{split}
\]
\end{document}
Sebastiano
  • 54,118
0

One way is to edit the preamble in Preferences > Templates > Preambles to include \usepackage{fullpage} or \usepackage[cm]{fullpage}. For example, you could use the default plus fullpage:

\documentclass[10pt]{article}
\usepackage[usenames]{color} %used for font color
\usepackage{amssymb} %maths
\usepackage{amsmath} %maths
\usepackage[utf8]{inputenc} %useful to type directly diacritic characters
\usepackage[cm]{fullpage}

This will make a wider text block and should fit more text/math symbols per line.

  • The suggestion above will be useful in some situations, but the original equation still gets cut. Instead of the fullpage package, you can try "\usepackage[papersize={40in,5in},margin=0.5in]{geometry}" – Ethan Duckworth Jul 07 '22 at 19:34