LaTeX Troubleshooting LaTeX Code: \frac{1}{q_{2}} = \frac{A q_{1} + B}{C q_{1} + D}

AI Thread Summary
The discussion centers on troubleshooting LaTeX code formatting issues. A user initially encounters problems with displaying a fraction correctly in TeXnicCenter, where the output deviates from the expected format. The solution involved using \left. and \right. to create invisible boundaries around the fractions, which resolved the issue. Additionally, the user highlights the importance of switching to math mode for proper equation display, suggesting the use of \[ ... \] or $$ ... $$ for block equations and single $ ... $ for inline math. The conversation also briefly touches on displaying the Angstrom symbol, with the user confirming that using \mathring{A} effectively positions the A below the circle, resolving their query.
Doom of Doom
Messages
85
Reaction score
0
I'm having some trouble with LaTex.

Here is the LaTex code:

\frac{1}{q_{2}} = \frac{A q_{1} + B}{C q_{1} + D}

And it should produce this:

\frac{1}{q_{2}} = \frac{A q_{1} + B}{C q_{1} + D}

Here, it's produced just fine. But in TeXnicCenter, it produces this instead:

1\frac{}{q_{2} = \frac{A q_{1} + B}{C q_{1} + D}}


What am I doing wrong?
 
Physics news on Phys.org
Well, I figured it out, but I don't know why I should have to do this: I surrounded both fractions with \left. and \right. (the invisible boundaries) and it works fine now.

\left.\frac{1}{q_{2}\right.= \left.\frac{A q_{1} + B}{C q_{1} + D}\right.

\left.\frac{1}{q_{2}}\right.= \left.\frac{A q_{1} + B}{C q_{1} + D}\right.
 
When you want to display math you should switch to math mode by enclosing the equations like the following:

\[
\frac{1}{q_2} = \frac{A q_{1} + B}{C q_{1} + D}
\]

OR

$$
\frac{1}{q_2} = \frac{A q_{1} + B}{C q_{1} + D}
$$

If you want have have math within a block of text, ie. in-line, use single $ ... $.
 
Tagging on here, as it appears the above question has been answered (and it seemed excessive to start a new thread).

How does one correctly display the Angstrom symbol with the A correctly positioned below the circle?

The standard approach gives me this: \AA

I know there's a workaround that I've used before but can not recall.

Edit: Nevermind, got it: Mathring \mathring{A}
 
Last edited:
10^{-10}\text{m}= 1 \mathring{\text{A}}
 
Back
Top