Jump to content

LaTeX problem


taeto

Recommended Posts

 Typing f(x) = 0 within the LaTeX brackets produces \( f(x) = 0\) whereas typing f(x) := 0 leads to \( f(x) := 0.\) Is that something fixable, or one just has to be aware of it? 

Edited by taeto
Link to comment
Share on other sites


math]f\left( x \right): = 0[/math]

I have  omitted the first [ bracket to show the code.

With the bracket  I get


[math]f\left( x \right): = 0[/math]

 

[math]f\left( x \right): = 0[/math]

But I find I have to increase the font size from 'default' to  say 24 to get something easily readable without a magnifying glass, especially for functions  that have fractions with powers.

 

 

Edited by studiot
Link to comment
Share on other sites

    Okay, then I try here: [math] f(x) := 0 [/math]. And with parentheses: \( f(x) := 0 \), which should be the same. I see. I cannot trust the \ ( shorthand in this particular case. If I do \ ( f(x) = 0 \ ) and omit the blanks between the backslashes and the brackets, I get \(f(x) = 0, \) which works fine. Curious.

Apparently the point is that I use \ ( and \ ) instead of math and /math. Is that deprecated?

Edited by taeto
Link to comment
Share on other sites

2 hours ago, taeto said:

Apparently the point is that I use \ ( and \ ) instead of math and /math. Is that deprecated?

It should render the same, at least on my browser. The config in the page source says math and backslash parenthesis can be used:

inlineMath: [ ["\[math\]","\[\/math\]"], ["\\(","\\)"], ["\[latex\]","\[\/latex\]"] ],

Does MathJax differ between browsers?

Edited by Ghideon
Link to comment
Share on other sites

Testing a cut and paste of code above :

\( f(x) := 0 \)

 

When I check the HTML the server sends me I get the following for @taeto's line in the previous post:

When you type in \( f(x) <span>:</span>= 0 \) does it render correctly with TeX?

And in my browser it looks like the screenshot above

My own line that i have in this edited post looks different, it is MathJax

<span class="MathJax" id="MathJax-Element-6-Frame" tabindex="0" style=""><nobr>
  <span class="math" id="MathJax-Span-44" style="width: 4.903em; display: inline-block;">
    <span style="display: inline-block; position: relative; width: 4.017em; height: 0px; font-size: 121%;">
      <span style="position: absolute; clip: rect(1.243em, 1003.958em, 2.6em, -999.997em); top: -2.181em; left: 0em;">
        <span class="mrow" id="MathJax-Span-45"><span class="mi" id="MathJax-Span-46" style="font-family: MathJax_Math-italic;">f
          <span style="display: inline-block; overflow: hidden; height: 1px; width: 0.062em;"></span>
          </span>
          <span class="mo" id="MathJax-Span-47" style="font-family: MathJax_Main;">(</span>
          <span class="mi" id="MathJax-Span-48" style="font-family: MathJax_Math-italic;">x</span>
          <span class="mo" id="MathJax-Span-49" style="font-family: MathJax_Main;">)</span><span class="mo" id="MathJax-Span-50" style="font-family: MathJax_Main; padding-left: 0.298em;">:<span style="font-family: MathJax_Main;">=</span>
          </span><span class="mn" id="MathJax-Span-51" style="font-family: MathJax_Main; padding-left: 0.298em;">0</span>
        </span>
        <span style="display: inline-block; width: 0px; height: 2.187em;"></span>
      </span>
    </span>
    <span style="display: inline-block; overflow: hidden; vertical-align: -0.354em; border-left-width: 0px; border-left-style: solid; width: 0px; height: 1.361em;"></span>
  </span>
  </nobr>
</span>

 

Test 2:

\( f(x) := 0 \)

Does the above line look wrong?

edit: @taeto I have managed to reproduce your isse in my brower by copy pasting your string as rich text instead of plain text. If I paste as text it renders as math symbols

 

Edited by Ghideon
Link to comment
Share on other sites

OK, I try two things now. 

I type \( x := 0 \) just like that.

Then I type \(  x := 0 \), but I edit it to become like in the line above by adding the ":".

Screenshot from 2020-03-14 22-12-40.png

Clearly the newly edited expression with added ":" character works differently than when the : is just typed in normally.

Edited by taeto
Link to comment
Share on other sites

Test 1: This is a copy paste from post above

\( x := 0 \) 

This is a paste as plain text

\( x := 0 \) 

This is typed into the post

\( x := 0 \)

This is a copy paste of the version after "Then I type" from above 

\(  x := 0 \)

edit: There seems to be something weird with the ":" char because it is sent in html surrounded by <span>

<p>
	Then I type \(&nbsp; x <span>:</span>= 0 \), but I edit it to become like in the line above by adding the ":".
</p>

 

Edited by Ghideon
Link to comment
Share on other sites

Very well:

"Then I type \(  x := 0 \), but I edit it to become like in the line above by adding the ":"."

and indeed it now renders correctly. But if I paste it once again, but I now delete the : and reinsert it I get

"Then I type \( x := 0 \), but I edit it to become like in the line above by adding the ":"."

When I copy/paste the previous line without any editing I get

"Then I type \( x := 0 \), but I edit it to become like in the line above by adding the ":"."

Interesting.

Edited by taeto
Link to comment
Share on other sites

When I paste there is a little box in my browser:

 image.png.8996f9c2d78e35027613d2fd0ca306df.png

If I paste one of your malfunctioning texts as rich text they are not displayed as math but as \( x := 0 \) .

If I paste and click "paste and plain text instead" i get math \( x := 0 \)

Edited by Ghideon
Link to comment
Share on other sites

6 minutes ago, Ghideon said:

When I paste there is a little box in my browser:

 image.png.8996f9c2d78e35027613d2fd0ca306df.png

If I paste one of your malfunctioning texts as rich text they are not displayed as math but as \( x := 0 \) .

If I paste and click "paste and plain text instead" i get math \( x := 0 \)

Anyway, when you are just typing in some math, you are not usually copy-pasting anyway, but you might likely be editing, and it is by editing from "=" to ":=" that this occurs.

Edited by taeto
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.