Author Topic: LaTex for EEVBlog  (Read 20652 times)

0 Members and 1 Guest are viewing this topic.

Offline MorgorothTopic starter

  • Regular Contributor
  • *
  • Posts: 123
  • Country: cl
LaTex for EEVBlog
« on: February 09, 2016, 04:44:17 pm »
there is a chance to enable LaTex support for the EEVBlog ?, I have a small blog and I'm using mathjax, is very very easy to use, only have to edit a template on blogger and that's it, probably more complicated here, but could be very handy and worth the effort.
----------------------------------------------------------
If works, doesn't means it is right.
 

Online Andy Watson

  • Super Contributor
  • ***
  • Posts: 2124
Re: LaTex for EEVBlog
« Reply #1 on: February 09, 2016, 04:52:54 pm »
+1

Although, I think this particular subject has been raised before and the response was lukewarm. :(

 

Offline Maxlor

  • Frequent Contributor
  • **
  • Posts: 565
  • Country: ch
Re: LaTex for EEVBlog
« Reply #2 on: February 10, 2016, 12:04:51 am »
LaTeX? Hell, just having unicode would be nice, so you could actually use a micro or ohm symbol. That hasn't happened either, though, so don't hold your breath for mathjax :(
 

Offline HAL-42b

  • Frequent Contributor
  • **
  • Posts: 423
Re: LaTex for EEVBlog
« Reply #3 on: February 10, 2016, 12:08:00 am »
+1 for LaTeX support.
 

Offline nuno

  • Frequent Contributor
  • **
  • Posts: 606
  • Country: pt
Re: LaTex for EEVBlog
« Reply #4 on: February 10, 2016, 12:23:40 am »
I'd rather have a canvas. Some years ago I searched such thing for a site I have, but only found a plugin that would let you either write or have the canvas, but not both. Don't know what exists today.
« Last Edit: February 10, 2016, 12:25:59 am by nuno »
 

Online EEVblog

  • Administrator
  • *****
  • Posts: 38715
  • Country: au
    • EEVblog
Re: LaTex for EEVBlog
« Reply #5 on: February 10, 2016, 09:55:05 am »
I can't install it:
http://custom.simplemachines.org/mods/index.php?mod=1111
I get an error and ti warns me not to install. It's a 6 years old mod.
 

Offline MorgorothTopic starter

  • Regular Contributor
  • *
  • Posts: 123
  • Country: cl
Re: LaTex for EEVBlog
« Reply #6 on: February 10, 2016, 01:59:28 pm »
seems to be another approach for this:

http://www.simplemachines.org/community/index.php?topic=535624.msg3805548#msg3805548

only you have to edit a template files and that's it, no mod at all, refer to attached images for reference, one from simplemachines forum, another from mathjax documentation, and finally how I did it to enable LaTeX.


« Last Edit: February 10, 2016, 02:02:52 pm by Morgoroth »
----------------------------------------------------------
If works, doesn't means it is right.
 

Offline MatthewEveritt

  • Supporter
  • ****
  • Posts: 136
  • Country: gb
Re: LaTex for EEVBlog
« Reply #7 on: February 10, 2016, 05:02:22 pm »
 
I can't install it:
http://custom.simplemachines.org/mods/index.php?mod=1111
I get an error and ti warns me not to install. It's a 6 years old mod.

A pity, the reason for the error seems to simply be a pretty minor formatting issue. Just different enough to not work.
If you're going to go to the bother of manually fixing things it doesn't really seem worth it for something six years out of date.

seems to be another approach for this:

http://www.simplemachines.org/community/index.php?topic=535624.msg3805548#msg3805548

only you have to edit a template files and that's it, no mod at all, refer to attached images for reference, one from simplemachines forum, another from mathjax documentation, and finally how I did it to enable LaTeX.

This seems to work really well. It does seem to require manually including the script, but I would be surprised if there was a mod available to make that easy.
I'd  recommend using
Code: [Select]
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({tex2jax: {inlineMath: [['\\$','\\$'], ['\\(','\\)']]}});
</script>

<script type="text/javascript"
  src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>

so \$math\$ is inline as well as the default \(math\). This is just a personal preference, but it seems the most like native LaTeX that doesn't wreak havoc when single $ signs are used.
« Last Edit: February 10, 2016, 05:11:50 pm by MatthewEveritt »
 

Offline MorgorothTopic starter

  • Regular Contributor
  • *
  • Posts: 123
  • Country: cl
Re: LaTex for EEVBlog
« Reply #8 on: February 10, 2016, 05:38:38 pm »
I bet you had problems with the 'async' attribute, if it was, you can solve it in this way:

Code: [Select]
<script type="text/x-mathjax-config">
    MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
    </script>
    <script type="text/javascript" async="async"
      src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_CHTML">
    </script>
----------------------------------------------------------
If works, doesn't means it is right.
 

Offline MatthewEveritt

  • Supporter
  • ****
  • Posts: 136
  • Country: gb
Re: LaTex for EEVBlog
« Reply #9 on: February 10, 2016, 05:57:36 pm »
I didn't have problems, I was just using a trivial file to play with the script. I agree that async might be a sensible addition.

I'd advice against using inlineMath: [['$','$']] as sentences like " $10 each, or three for $25", or whatever, will become unreadable.

 

Offline MorgorothTopic starter

  • Regular Contributor
  • *
  • Posts: 123
  • Country: cl
Re: LaTex for EEVBlog
« Reply #10 on: February 10, 2016, 06:15:30 pm »
you're right about the inline delimiter, the problem is I have to change all the LaTeX references in the blog |O, so, work for night late.

thanks for the tip.
----------------------------------------------------------
If works, doesn't means it is right.
 

Offline MatthewEveritt

  • Supporter
  • ****
  • Posts: 136
  • Country: gb
Re: LaTex for EEVBlog
« Reply #11 on: February 10, 2016, 09:36:23 pm »
Dave, on the off-chance that we can persuade you :

Looks like there is a mod that makes this really easy :  http://custom.simplemachines.org/mods/index.php?mod=2686.

Once it's installed you get a new option under "Admin->Configuration->Modification settings->Custom </head> and </body> Scripts".  Just past
Code: [Select]
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({tex2jax: {inlineMath: [['\\$','\\$'], ['\\(','\\)']]}});
</script>

<script type="text/javascript" async="async"
  src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
Hit save and it should be done.

 I just tested it on SMF 2.0.11 (clean install just for this) and it works like a charm. Obviously there's always a chance that it'll conflict with some other mod you have installed, but it doesn't seem likely.
 

Offline MorgorothTopic starter

  • Regular Contributor
  • *
  • Posts: 123
  • Country: cl
Re: LaTex for EEVBlog
« Reply #12 on: February 10, 2016, 11:43:44 pm »
please....

----------------------------------------------------------
If works, doesn't means it is right.
 

Offline bitwelder

  • Frequent Contributor
  • **
  • Posts: 972
  • Country: fi
Re: LaTex for EEVBlog
« Reply #13 on: February 11, 2016, 11:04:05 pm »
please....

Picture of a cat is not the best image to move Dave, I think...
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: LaTex for EEVBlog
« Reply #14 on: February 11, 2016, 11:22:48 pm »
Pleeeeeeease?

No longer active here - try the IRC channel if you just can't be without me :)
 

Online EEVblog

  • Administrator
  • *****
  • Posts: 38715
  • Country: au
    • EEVblog
Re: LaTex for EEVBlog
« Reply #15 on: February 12, 2016, 12:53:19 am »
Dave, on the off-chance that we can persuade you :

Looks like there is a mod that makes this really easy :  http://custom.simplemachines.org/mods/index.php?mod=2686.

Once it's installed you get a new option under "Admin->Configuration->Modification settings->Custom </head> and </body> Scripts".  Just past
Code: [Select]
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({tex2jax: {inlineMath: [['\\$','\\$'], ['\\(','\\)']]}});
</script>

<script type="text/javascript" async="async"
  src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
Hit save and it should be done.

 I just tested it on SMF 2.0.11 (clean install just for this) and it works like a charm. Obviously there's always a chance that it'll conflict with some other mod you have installed, but it doesn't seem likely.

Done.
I have no idea how to test it.
 

Offline MorgorothTopic starter

  • Regular Contributor
  • *
  • Posts: 123
  • Country: cl
Re: LaTex for EEVBlog
« Reply #16 on: February 12, 2016, 01:13:52 am »
test

\$V_{o}=A \cdot ( V_{+}-V_{-} ) \$

nice !!!, it don't show on preview, but is a minor problem...

THANK YOU VM !!!
« Last Edit: February 12, 2016, 01:17:49 am by Morgoroth »
----------------------------------------------------------
If works, doesn't means it is right.
 

Offline MatthewEveritt

  • Supporter
  • ****
  • Posts: 136
  • Country: gb
Re: LaTex for EEVBlog
« Reply #17 on: February 12, 2016, 01:15:13 am »
Awesome, thank you. It seems to work just fine.

A slightly more complex test: \[\chi=<{m}>+<{m}>^2\left(\frac{\tau_c^2}{2T^2}\left[exp\left( \frac{-2T}{\tau_c}\right)-1+\frac{2T}{\tau_c}\right]\right)\]
 

Offline liquibyte

  • Frequent Contributor
  • **
  • Posts: 475
  • Country: us
Re: LaTex for EEVBlog
« Reply #18 on: February 12, 2016, 01:15:35 am »
I was working on it too to see what got supported.


Tex
The quadratic formula is $$-b \pm \sqrt{b^2 - 4ac} \over 2a$$ \bye

Latex
E &= \frac{mc^2}{\sqrt{1-\frac{v^2}{c^2}}}

AsciiMath
sum_(i=1)^n i^3=((n(n+1))/2)^2

 

Offline MatthewEveritt

  • Supporter
  • ****
  • Posts: 136
  • Country: gb
Re: LaTex for EEVBlog
« Reply #19 on: February 12, 2016, 01:30:32 am »
A couple of simple examples to show how to use \$\LaTeX\$ in forum posts.

Code: [Select]
In line math \$R=123\mu\Omega\$ is done with dollar signsIn line math \$R=123\mu\Omega\$ is done with dollar signs


Code: [Select]
Display math \[P=\frac{V^2}{R}\] is done with square brackets.  Display math \[P=\frac{V^2}{R}\] is done with square brackets.
« Last Edit: February 12, 2016, 01:50:37 am by MatthewEveritt »
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: LaTex for EEVBlog
« Reply #20 on: February 12, 2016, 01:44:17 am »
\[w^{o^{o^{o^o}}}\]

 :-+
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4195
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: LaTex for EEVBlog
« Reply #21 on: February 12, 2016, 05:17:01 am »
It does not work on the mobile version of the forum.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13130
Re: LaTex for EEVBlog
« Reply #22 on: February 12, 2016, 05:34:17 am »
N.B. Anyone running a javascript blocker like NoScript, will need to add an exception for cdn.mathjax.org
 

Offline HAL-42b

  • Frequent Contributor
  • **
  • Posts: 423
Re: LaTex for EEVBlog
« Reply #23 on: February 12, 2016, 03:03:44 pm »
$${\LaTeX}$$

$$ \newcommand\T{\Rule{0pt}{1em}{.3em}}
\begin{array}{|c|c|}
\hline X & P(X = i) \T \\\hline
  1 \T & 1/6 \\\hline
  2 \T & 1/6 \\\hline
  3 \T & 1/6 \\\hline
  4 \T & 1/6 \\\hline
  5 \T & 1/6 \\\hline
  6 \T & 1/6 \\\hline
\end{array}$$

MathJax doesn't implement tabular, because it is really a text-mode environment. You can use the array environment as a replacement. Source
« Last Edit: February 12, 2016, 03:20:43 pm by HAL-42b »
 

Offline calli

  • Regular Contributor
  • *
  • Posts: 100
  • Country: de
  • 3D Blender and Maker
    • Blender Buch
Re: LaTex for EEVBlog
« Reply #24 on: March 15, 2016, 01:36:11 pm »
Hey, thats a nice addition!

However it is so long ago that I used it... 1989 my Diploma Thesis and 1999-2009  for writing my book the first three editions (then we switched to "Word" and Indesign....gnaaaa.). In case you wonder: http://blenderbuch.de/ (be warned, pesky german).

Cheers,
Carsten
Carsten Wartmann: Make Magazin DE - Autor - Dozent - 3D - Grafik - Maker
http://blenderbuch.de/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf