1. Apr 26, 2017

mech-eng

"You must put special delimiters at the beginning and end of your LaTeX code, in order for MathJax to recognize it and process it. If you want the equation to appear inline with the surrounding text, put # # before and after it. If you want the equation to stand alone in a separate "paragraph", centered horizontally on the screen as in most textbooks, put  before and after it.

Here's an example, first with the delimiters disabled so you can see the raw code:

A quadratic equation is of the form $ax^2 + bx + c = 0$. To solve for x, use the quadratic
formula $$x = \frac {-b \pm \sqrt{b^2 -4ac}} {2a},$$ substituting the values of the coefficients a, b and c"

In the above I cannot understand what these delimiters are. It says "delimiters disabled" how is it understood?

https://www.physicsforums.com/help/latexhelp/

Thank you.

Last edited by a moderator: Apr 26, 2017
2. Apr 26, 2017

Staff: Mentor

I think the # # and  you listed before your equations put mathjax in a bad state.

3. Apr 26, 2017

mech-eng

Question is about delimiters. I try to understand the explanation.

Thank you.

4. Apr 26, 2017

Staff: Mentor

In the page you were looking at, they put code tags around the # delimiters. This causes the delimiters to no be interpreted by the browser.
Another way to do this is to change the color of one # character at each end, like this:
$ax^2 + bx + c = 0$
Usually, when I do this, I change the color to black, so you can't tell that I changed the color. This time, I have used red, so that my changes can be seen.
<code>$ax^2 + bx + c = 0$</code>

Last edited: May 2, 2017
5. Apr 26, 2017

Staff: Mentor

Nice use of color, we had a programmer do something like that in his design document where he'd either code his notes transliterated to symbol or greek font to make them initially unreadable and later he'd use white to color them so they'd only appear when you selected the text via mouse.

I was looking for an escape character and decided to use the spacing trick but color is so much nicer.

6. May 1, 2017

mech-eng

Would you please re-explain the underlined part. You did not change to color to black, it seems you changed (black) # to pink in the front, and orange in the end. And what do you mean by "you can't tell that ..."?

Thank you.

7. May 1, 2017

Staff: Mentor

What I meant was "when I usually do this, I change the color to black." For the example, I used red so that you could see what I did. If you change the color of black text to black, it doesn't appear that you've done anything, but if you look at the actual BBCode text, you'll see that there are color tags present.

8. May 2, 2017

mech-eng

I am confused because I am not familiar with coding but here:
1. it is clear that code tags are <code> xxx </code>. In a most simple way would you please explain or give good link about what a code tag is?

2. Are these symbols in programing called greater than, >, and smaller than, <, like in mathematics?

3. Is this, <code> xxx </code>, called a code tag because code is writen inside the symbols of < >?

4. What is the main function of <code> xxx </code> and why do they spoil delimeters.

5. Do they only spoild delimiters $or all delimiters? Thank you. 9. May 2, 2017 Mark44 Staff: Mentor No, those aren't code tags. Code tags are most often used to delimit programming code in Fortran, C, Java, or any of several other languages. Here is how the browser renders an example in the C programming language: Code (C): printf("a + b = %d", a + b); What I actually typed looks like this: [code=c]printf("a + b = %d", a + b);[/code] Here's a link to all of the BBCode tags that this forum supports. The tags https://www.physicsforums.com/help/bb-codes Some of the BBCode tags we support can be used for bold, italic, superscript (for exponents), subscripts, and for other purposes. The actual code tags are about halfway down the page. I used <code> and </code> to represent the LaTeX delimiters,$ and , which I see now was confusing. What you asked about in this thread were the LaTeX tags we use here, which are described on this page, https://www.physicsforums.com/help/latexhelp/, the same link you have in post #1.
Yes, but they aren't used in BBCode tags.
No, <code> and </code> aren't code tags. See my example with the printf statement above.
The purpose of code tags, as in my C code example above, is to format the programming code and preserve whatever indentation was used. They also display keywords and strings in color automatically.