We use cookies to personalise content and advertisements and to analyse access to our website. Furthermore, our partners for online advertising receive pseudonymised information about your use of our website. cookie policy and privacy policy.
 
+0  
 
+1
252
9
avatar+6045 

Is there a way of embedding LaTex into posts w/o using the LaTex button and dialogue?

 

Other boards have $$, [tex][/tex], [math][/math]

 

sorts of tags/delimiters.  Does this board have anything like that?

 Aug 9, 2019
 #1
avatar+1808 
+4

(Updated and corrected post)

Yes, there is a delimited code sequence to activate LaTeX for inline presentations.

The sequence is “\(” (backslash -open parenthesis –no quotes) to start the LaTex  and  “\)”  (backslash -close parenthesis –no quotes) to terminate and return to ascii mode.

 

There is one additional requirement to confirm the rendering the LaTeX:

Somewhere (anywhere) in the post must be this (compiler) command:

 

<span class="math-tex">\({}\) span>  

Or

Open a LaTeX box and type  {} < --- this is the easy way.

 

Note that these commands are functionally equivalent. They use a null character, becoming (and remaining) invisible after the first preview when returning to edit mode. 

Additional Notes:

 If the post already contains one or more standard LaTeX boxes then this is not necessary.  Without this command, the display will not render the LaTeX code. With this command, it always works, if the system is functioning normally.   

 

 

Here are three examples of inline LaTeX presented unrendered, in ASCII format:

 

Standard writing in ascii followed by LaTeX equation:  \(4*(\frac{1}{2}x)+x=432 \); followed by more ascii text.

 

Standard writing in ascii followed by LaTeX equation (inside parentheses) in LaTeX:  \((4*(\frac{1}{2}x)+x=432)\);  followed by more ascii text.

 

Standard writing in ascii followed by LaTeX equation (inside parentheses) with text in LaTeX:  \((4*(\frac{1}{2}x)+x=432) \text { text in LaTeX }\);  followed by more ascii text.

 

----------------

The examples coded in this post have hidden modifications to prevent rendering the LaTeX. The examples show just the ascii code for the LaTeX.  The post below does not have these modifications, so it will render the LaTeX in inline mode.

 

--------------------------

 Edits: Error correction, improved readability and coherency, and modified the examples to display the exact LaTeX code instead of rendering.

 

GA

 Aug 9, 2019
edited by GingerAle  Aug 9, 2019
edited by GingerAle  Aug 10, 2019
 #2
avatar+1808 
+4

Here are the three examples of inline LaTeX: Rendered

\({}\)

Standard writing in ascii followed by LaTeX equation:  \(4*(\frac{1}{2}x)+x=432\); followed by more ascii text.

Standard writing in ascii followed by LaTeX equation (inside parentheses) in LaTeX:  \((4*(\frac{1}{2}x)+x=432)\);  followed by more ascii text.

Standard writing in ascii followed by LaTeX equation (inside parentheses) with text in LaTeX:  \((4*(\frac{1}{2}x)+x=432) \text { text in LaTeX}\);  followed by more ascii text.

 

One more example where the rendered LaTeX is offset and centered.

 

Test for inline use of LaTeX \[\text {Quadratic Formula } x = {-b \pm \sqrt{b^2-4ac} \over 2a}\] End of test.

 

To do this, use \[ \] (squared brackets in place of the parentheses) 

 

-----------------

Edited added additional example, improved appearance.  

 

GA

GingerAle  Aug 9, 2019
edited by GingerAle  Aug 9, 2019
edited by GingerAle  Aug 10, 2019
 #3
avatar+6045 
+1

doesn't seem to be working for me

 Aug 10, 2019
edited by Rom  Aug 10, 2019
edited by Rom  Aug 10, 2019
edited by Rom  Aug 10, 2019
 #4
avatar+105683 
+1

I always use the box.  

I agree it would be nicer if it was not necessary. Ginger seems to have found a way.  I have not tried it, sounds a bit convoluted.

 

Thanks though Ginger. :)

Melody  Aug 10, 2019
 #5
avatar+1808 
+2

Sorry Rom, I posted the wrong termination sequence. It’s \) not /).

I edited the above posts with these corrections and improved the readability.   

 

GA

GingerAle  Aug 10, 2019
 #6
avatar+1808 
+2

...  I have not tried it, sounds a bit convoluted.

 

It’s not convoluted at all. Just begin the LaTeX with “\(”and end it with “\)” and place a single instance of {} anywhere in the post (or thread) using the LeTeX box. I am not aware any functional limitations, but there may be some.

 

The MathJax version of LaTeX is well suited for the inline form that is mainly used on math forums.  Though on this forum, it’s the version is MathJax heII because it’s usually pasted in code form with $$ by the unenlightened, lazy, and desperate students, many of whom have been shoved into an online math class well beyond their skill level.  

 

The main difference is the inline LaTeX is shown in code form while in edit mode, requiring a preview to see how it displays.  For complex presentations, there would be an advantage for using the box to preview while entering the code.

 

I’ve noted in recent years at the university level, that math, physics, and engineering majors tend to use full LaTeX, while the other science majors mainly use the inline form. A few secondary schools teach and require the use of LaTeX for online homework. It’s usually inline LaTeX rather than the full monty that is taught.

 

GA

GingerAle  Aug 10, 2019
 #7
avatar+105683 
+1

Thanks Ginger,

I am going to add this thread to the Latex thread in the Sticky Topics   laugh

Melody  Aug 11, 2019
 #8
avatar+6045 
+2

 span> 

 

\(\text{This is a test $x^2 + y^2 = r^2$} \)

 

wooo!

 

Except the editor chews on the enable line and leaves span> there.

Rom  Aug 11, 2019
 #9
avatar+1808 
+2

Your script code is incorrect.  Probably because my sample code above is incorrect. Despite checking it several times after refreshes, one of the sub-compilers eventually assimilated part of it.  Communicating the correct compiler code is a “Catch 22” That is, when I post the code script the compiler encodes (or partly encodes) it and it disappears from view. Modifying it so it presents normally and does not compile in whole or part is tricky.

 

All of the this presentation should remain visible indefinitely.I blŏŏdy hope so, anyway

<span class="math-tex">\({}\)</span>

 

Despite being modified so it presents and does not compile, this can be copied and pasted and it will work as it is supposed to (unless it buggers up again).   You can always use the LaTeX box with {}, which is what this command does anyway.

 

 

GA

GingerAle  Aug 11, 2019
edited by GingerAle  Aug 11, 2019

21 Online Users