So now we can get mathy in here? - Page 1
Forum section: electronics / general

author: TheAmmoniacal
author_rank: Unknown
timestamp: February 12, 2016, 05:25:26 am
content: Apparently he installed LaTeX, was that the reason for the downtime?For inline:Code:\( code here \)\( e^{i \pi} = cos(\theta) + i \sin(\theta) \)Code:$$ usual math mode $$$$ e^{i \pi} = cos(\theta) + i \sin(\theta)$$$$ \oint_C {E \cdot d\ell = - \frac{d}{{dt}}} \int_S {B_n dA} $$Woo!

author: EEVblog
author_rank: Unknown
timestamp: February 12, 2016, 05:26:31 am
content: Quote from: TheAmmoniacal on February 12, 2016, 05:25:26 amNo it was not.I installed a header script that point to some Latex server thingo. I do not know the details. Someone posted it in another thread so I added it and it supposedly works. I know nothing about LaTex.

author: cdev
author_rank: Super Contributor
timestamp: February 12, 2016, 05:53:33 am
content: Its MathJax..Both it and MathML display beautifully on my machine.You just need to have fonts that contain the right glyphs, no longer do they need to render small parts in bitmaps. Firefox and variants have supported MathML for well over a decade.LaTeX used to have to be rendered by various kludges like the amazingly complicated latex2html.Which churned equations into a mix of html and small gifs..what

author: Zero999
author_rank: Super Contributor
timestamp: February 12, 2016, 08:49:10 am
content: I can't see any formulae, just code.

author: AlfBaz
author_rank: Super Contributor
timestamp: February 12, 2016, 08:55:02 am
content: I'm seeing properly rendered formulae on my tablet with the bog standard android browser

author: German_EE
author_rank: Super Contributor
timestamp: February 12, 2016, 09:34:56 am
content: I'm missing something. I hit the 'Insert Code' button on the top (the hash button) then place my LaTeX code between the start and end commands. However, when I preview all I see is the code rather than the formula, what am I doing wrong?

author: AlfBaz
author_rank: Super Contributor
timestamp: February 12, 2016, 09:47:15 am
content: Quote from: German_EE on February 12, 2016, 09:34:56 amDon't use that. Quote Ammoniacal's first post to see what you need to use as quoting it will reveal the formatting.Preview doesn't seem to work on windows IE but if I hit post the rendered text appears$$ \sqrt{\frac {C_{2}R_{2}-R_{1}\left (2C_{1}+C_{2}\right)}{4C_{1}^{2}C_{2}\pi^{2}\left (R_{1}^{3}+R_{1}^{2}R_{2}\right )}} $$

author: AlfBaz
author_rank: Super Contributor
timestamp: February 12, 2016, 09:49:18 am
content: I suspect "Preview" rendering may need patching also

author: tggzzz
author_rank: Super Contributor
timestamp: February 12, 2016, 10:10:27 am
content: Quote from: German_EE on February 12, 2016, 09:34:56 amIf your browser surpresses JavaScript (e.g. NoScript plugin), you may need to enable JavaScript from mathjax.org.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 12, 2016, 10:26:29 am
content: \( x = \frac{-b}{2a} \pm \sqrt{b^2 - 4ac} \)Thanks Dave!Tim

author: Brumby
author_rank: Unknown
timestamp: February 12, 2016, 10:34:47 am
content: Quote from: T3sl4co1l on February 12, 2016, 10:26:29 am\( x = \frac{{-b} \pm \sqrt{b^2 - 4ac}} {2a}\)Ah - that's how it works.

author: Brumby
author_rank: Unknown
timestamp: February 12, 2016, 10:36:23 am
content: Quote from: German_EE on February 12, 2016, 09:34:56 amThe 'Insert Code' button allows you to have source code displayedwithoutbeing interpreted and translated.... exactly the OPPOSITE of what you wanted!

author: Dave
author_rank: Super Contributor
timestamp: February 12, 2016, 10:56:38 am
content: I have a feeling this will come in handy.\( D=e^{ins}\cdot p \)

author: BravoV
author_rank: Super Contributor
timestamp: February 12, 2016, 11:45:46 am
content: Works here, rendered properly at :- Desktop & laptop -> Windoze -> Waterfox browser (x64 Firefox)- Mobile -> Android -> CM Browser (CM = Cheetah Mobile)

author: AlxDroidDev
author_rank: Frequent Contributor
timestamp: February 12, 2016, 12:01:38 pm
content: I am using Chrome v48.0 on Windows 7 and everything appears as it should.Let me give it a try:\( y=\sqrt{\frac{x^2}{x+1}}\qquad \)BTW: This is a nice site to write and test the equations, then just copy and paste the equation code here using the proper opening and closing tags:http://www.sciweavers.org/free-online-latex-equation-editor

author: EEVblog
author_rank: Unknown
timestamp: February 12, 2016, 01:34:08 pm
content: Someone mentioned on twitter that Latex is a potential server security threat?

author: MatthewEveritt
author_rank: Unknown
timestamp: February 12, 2016, 01:39:58 pm
content: No idea what they're on about. All the rendering is done in the browser, not the server - all the server sees is some text strings that mean nothing to it just like any other comment.There is another way of doing this where the server actively parses the comments looking for \$\LaTeX\$, compiles them itself and inserts the resultant image, which could be a security nightmare if done wrong. Which is why nobody does that now the browser based renders can do it.Edit: If it's the comment I'm thinking of, about being an easy target, perhaps he's just referring to the fact that you installed something you didn't understand?

author: edy
author_rank: Super Contributor
timestamp: February 12, 2016, 01:42:38 pm
content: I see formulas on my BlackBerry Z10.

author: Macbeth
author_rank: Super Contributor
timestamp: February 12, 2016, 02:12:35 pm
content: Ooh. Lets give this a go...\(f = \frac{1} {2\pi \sqrt{LC}}\)...shame it doesn't work in previewI wonder if this will break itCode:[glow=grey,1,10]\(I = \frac{V}{R}\)\(I = \frac{V}{R}\)Edit: I like AlxDroidDev's  trick!

author: nctnico
author_rank: Super Contributor
timestamp: February 12, 2016, 02:24:43 pm
content: If you right-click on the equations in Firefox you can also set the scaling and other settings!

author: Morgoroth
author_rank: Regular Contributor
timestamp: February 12, 2016, 02:30:21 pm
content: preview issue is easy to fix, only need to add mathjax code in template for 'post replay'/'preview'.\$\mathfrak{F}(f) = \int_{-\infty}^\infty f(t) e^{-j2\pi ft} dt\$

author: Macbeth
author_rank: Super Contributor
timestamp: February 12, 2016, 02:32:46 pm
content: Quote from: nctnico on February 12, 2016, 02:24:43 pmSame with Chrome. I have a little MathJax menu...

author: rrinker
author_rank: Super Contributor
timestamp: February 12, 2016, 02:54:46 pm
content: IE as well, right click context menu and you can zoom, see the LaTeX code, whatever.

author: HAL-42b
author_rank: Frequent Contributor
timestamp: February 12, 2016, 03:33:15 pm
content: Quote from: EEVblog on February 12, 2016, 01:34:08 pmEven if so the Mathjax code on your site is rendered at cdn.mathjax.org so it shouldn't be an issue. In any case let's keep an eye out for any vulnerabilities.

author: nctnico
author_rank: Super Contributor
timestamp: February 12, 2016, 03:35:53 pm
content: @Macbeth: I don't like the shading effect though; it makes the formulas difficult too read.All in all I think this is a very cool and useful extension of the forum!

author: Zero999
author_rank: Super Contributor
timestamp: February 12, 2016, 07:26:19 pm
content: Quote from: Hero999 on February 12, 2016, 08:49:10 amIt works for me now I'm at home.When at work the firewall probably blocks it. This shouldn't be relied on to work for everyone.

author: tooki
author_rank: Super Contributor
timestamp: February 12, 2016, 09:39:25 pm
content: Quote from: TheAmmoniacal on February 12, 2016, 05:25:26 amNow if only the forum server were configured to support Unicode correctly…

author: edy
author_rank: Super Contributor
timestamp: February 13, 2016, 01:14:53 am
content: What is interesting is on my BlackBerry Z10 I see the codes as text first, then a split second later it is replaced with the formulas rendered normally.It is as if the page is post-processed by the browser to recognize Latex and substitute it in after.

author: zapta
author_rank: Super Contributor
timestamp: February 13, 2016, 01:39:13 am
content: Quote from: wilfred on February 12, 2016, 05:51:45 amOn Tapatalk here it looks like Gibberish.

author: Dave
author_rank: Super Contributor
timestamp: February 13, 2016, 01:58:21 am
content: Quote from: zapta on February 13, 2016, 01:39:13 amPretty much everything looks awful on Tapatalk.Want to view a shematic? It either throws a nasty compressed image at you or just a randomly zoomed and cropped one.Random smileys thrown into the text all the time, no way of disabling them.Want to check out a link? Here, use Tapatalk's site as a redirect. Site not working and throwing you a 502? That's too bad, bro, I guess you won't be seeing that link after all.

author: crispy_tofu
author_rank: Super Contributor
timestamp: February 13, 2016, 10:33:54 am
content: I believe this is due to the LaTeX thing, but I might be wrong - is anyone else seeing theCode:\( \renewcommand{\renewcommand}{} \)at the top left of the page for a moment when it loads?It happens whenever I open/refresh a page and disappears after a second or so.Just wondering.Tested working on Chrome OS 49 beta, Firefox 44 Android (on full site mode), Chrome 47 64-bit WindowsDoesn't work on IE9 (eek)

author: tggzzz
author_rank: Super Contributor
timestamp: February 13, 2016, 10:53:55 am
content: Quote from: crispy_tofu on February 13, 2016, 10:33:54 amI use the NoScript plugin, which disables JavaScript from all domains except those which I have authorised. It speeds some sites up significantly, as well as letting me see who is trying to track meI now see that "renewcommand" at the top ofeverypage, and also that "mathjax.org" is waiting to be loaded. When I enable mathjax.org's JavaScript, the "renewcommand" disappears.Conclusion: yes, it is a Latex/mathjax/JavaScript thing.

author: crispy_tofu
author_rank: Super Contributor
timestamp: February 13, 2016, 11:15:03 am
content: Okay, thanks.

author: Maxlor
author_rank: Frequent Contributor
timestamp: February 13, 2016, 12:02:37 pm
content: What happens if we mix regular text and LaTeX to express something like a \(\mu\)V? Ah, kinda works. Lets try 20\(\Omega\). I guess it might look funny on some mobile displays. And then there's the jumping around at page load...

author: MarkDennehy
author_rank: Contributor
timestamp: February 13, 2016, 02:47:20 pm
content: Quote from: EEVblog on February 12, 2016, 05:26:31 amI'm actually kindof impressed nobody made the 12-year-old's jokes with that magnificent setup line...

author: MarkDennehy
author_rank: Contributor
timestamp: February 13, 2016, 02:48:26 pm
content: Quote from: EEVblog on February 12, 2016, 01:34:08 pmDid they also say not to sit too close to the telly in case the radiation damaged your eyes?

author: HAL-42b
author_rank: Frequent Contributor
timestamp: February 13, 2016, 05:01:36 pm
content: Quote from: tggzzz on February 13, 2016, 10:53:55 amThis is because Mathlax is rendered on another site. It is possible to install it locally so reliance on another service is eliminated. I doubt Dave would manage it, but it is child's play for a Linux elf.

author: AlxDroidDev
author_rank: Frequent Contributor
timestamp: February 14, 2016, 01:12:42 am
content: Quote from: Maxlor on February 13, 2016, 12:02:37 pmIt looks funny on my desktop display. I have all my formulas scaled 200% automatically, and in your previous text I have a tiny "20" and then a huge "omega". I just wish the forums would accept it like this: ?or using &#937;

author: Ian.M
author_rank: Super Contributor
timestamp: February 14, 2016, 03:51:09 pm
content: Just checking something. Hopefully this is blocked.$$E \href{javascript:alert("Einstein says so!")}{=} mc^2$$Whoops. it isn't. Clicking the = runs arbitrary javascript!

author: SeanB
author_rank: Super Contributor
timestamp: February 14, 2016, 04:02:14 pm
content: So, probably best to disable the plugin, as you then have the ability to run arbitrary code on any page.

author: Ian.M
author_rank: Super Contributor
timestamp: February 14, 2016, 04:09:05 pm
content: Dave *URGENTLY* needs to reconfigure it for mathjax safe mode.http://docs.mathjax.org/en/latest/options/Safe.htmlMeanwhile I'd advise blocking cdn.mathjax.org

author: SeanB
author_rank: Super Contributor
timestamp: February 14, 2016, 06:31:08 pm
content: Interesting exploit that uses the "Safe" Javascript to execute any arbitrary code, which just looks like some rubbish, but which is interpreted by the Javascript as valid commands.QuoteFrom Twit.....https://www.grc.com/sn/sn-546.htmAround half way down, simplest is to search for the quote.

author: Ian.M
author_rank: Super Contributor
timestamp: April 11, 2016, 05:06:53 am
content: Dave's enabled safe mode to block Javascript in mathjax markup.https://www.eevblog.com/forum/suggestions/latex-for-eevblog/msg916266/#msg916266