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

Click For Summary

Discussion Overview

The discussion revolves around troubleshooting LaTeX code, specifically regarding the formatting of fractions and the display of mathematical symbols. Participants explore issues related to rendering equations correctly in different LaTeX environments.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Homework-related

Main Points Raised

  • One participant reports an issue with LaTeX code not rendering correctly in TeXnicCenter, where the expected output differs from what is produced.
  • Another participant suggests using \left. and \right. to create invisible boundaries around fractions, which resolves the rendering issue.
  • A third participant explains the importance of switching to math mode for displaying equations, providing examples of how to do so using different delimiters.
  • A later post introduces a question about displaying the Angstrom symbol correctly, indicating a need for clarification on formatting symbols in LaTeX.
  • Another participant provides a solution for displaying the Angstrom symbol using \mathring{A} after initially struggling to recall the method.

Areas of Agreement / Disagreement

Participants generally agree on the need for proper formatting in LaTeX, but there are varying approaches suggested for achieving the desired output. The discussion regarding the Angstrom symbol also reflects a lack of consensus on the best method until a solution is found.

Contextual Notes

Some limitations include potential dependencies on specific LaTeX environments and the need for clarity on the use of math mode and symbol formatting.

Who May Find This Useful

This discussion may be useful for individuals learning LaTeX, particularly those encountering issues with mathematical formatting and symbol display.

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:

[tex]\frac{1}{q_{2}} = \frac{A q_{1} + B}{C q_{1} + D}[/tex]

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

[tex]1\frac{}{q_{2} = \frac{A q_{1} + B}{C q_{1} + D}}[/tex]


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.

[tex]\left.\frac{1}{q_{2}}\right.= \left.\frac{A q_{1} + B}{C q_{1} + D}\right.[/tex]
 
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: [tex]\AA[/tex]

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

Edit: Nevermind, got it: Mathring [tex]\mathring{A}[/tex]
 
Last edited:
[tex]10^{-10}\text{m}= 1 \mathring{\text{A}}[/tex]
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
4
Views
3K
Replies
1
Views
905
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K