Insert LaTeX Equation; Discussion post

Hi,

I am a student, I wish to insert LaTeX formatted Equations in my discussion posts.

Some of these commands do not work, even though it is included in the popup at: https://mylearning.suny.edu/d2l/lp/math/latex

I'm looking to insert 2 equations, on separate lines.

Desired Output Example:
y = mx+b
a^2 + b^2 = c^2

I've tried \newline but the preview shows them all on a single line;
y = mx+ba^2 + b^2 = c^2

Using \linebreak, the entire command is highlighted in red, as if it isn't a supported command.

I even appended double spaces to the lines, as in markdown; doesn't work.

I can force extra spaces by

\ \ \ \ \ \ \ \ 

Am I doing something incorrect? How can I circumvent this?

Much appreciated :)

Tagged:

Best Answer

  • A.L.44
    A.L.44 Posts: 3 🌱
    Answer ✓

    @Mohamed.F.137

    Update:

    So apparently, it is just the preview that is not displaying correctly. I clicked Insert, and it does give me the linebreak/newline as I wished.

    Using the \newline command instead of \\ is the same as well.

Answers

  • Hi you will need to have a double backwards slash where you want a line break

    y = mx+b\\a^2 + b^2 = c^2

    Tested this out and it gave me this result:

    y = mx+b

    a^2 + b^2 = c^2

  • A.L.44
    A.L.44 Posts: 3 🌱

    @Mohamed.F.137

    Hi, thanks for the response. I pasted your text but unfortunately, it does not work for me

  • Glad to hear! Yes it might be a bit misleading but until you click on insert you won't see the desired result.

    After clicking on insert it should be in the format you desire.

  • Michelle.R.955
    Michelle.R.955 Posts: 3 🔍

    For previous years I used \\ which is no longer supported so I tried \newline and "insert" and save and yet my html pages are still not doing line breaks :-(

    Here's my code:

    ( \frac{d}{dx}\left( \sin^{-1}(x) \right) = \frac{1}{\sqrt{1-x^2} } \newline
    \frac{d}{dx}\left( \tan^{-1}(x) \right) = \frac{1}{1+x^2} \newline
    \frac{d}{dx}\left( \sec^{-1}(x) \right) = \frac{1}{|x|\cdot \sqrt{x^2-1}} )

    But it displays all as one line!