LaTex render or other math notation extension

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Scam Warning
User avatar
Ger
Registered User
Posts: 2120
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100

Re: LaTex render or other math notation extension

Post by Ger »

I'm on the phone right now, but it's specified in the latexrender class.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

Kinderpraktijk SensIQ

-Don't PM me for support-
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 4015
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Snay

Re: LaTex render or other math notation extension

Post by Kailey »

I took a simpler approach, but you got the ball rolling for me. Thank you!

Image
Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules
If you have any questions about the rules/customs of this website, feel free to send me a PM.

My little corner of the world | Administrator @ phpBB Modders
User avatar
nou nou
Registered User
Posts: 743
Joined: Sat Oct 29, 2016 8:08 pm

Re: LaTex render or other math notation extension

Post by nou nou »

Oh interesting! Same result as the one I've picked up above - which by the way I got to work in your KB extension, Kinerity (wasn't too hard) - how does your solution compare to that one?
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 4015
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Snay

Re: LaTex render or other math notation extension

Post by Kailey »

nou nou wrote: Sat Dec 02, 2017 4:04 am how does your solution compare to that one?
I used the official docs for MathJax and created a small extension (no options, just enable and add custom BBCode). It works with all pages of phpBB too (including my KB extension).
Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules
If you have any questions about the rules/customs of this website, feel free to send me a PM.

My little corner of the world | Administrator @ phpBB Modders
User avatar
Ger
Registered User
Posts: 2120
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100

Re: LaTex render or other math notation extension

Post by Ger »

Can you share your solution?
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

Kinderpraktijk SensIQ

-Don't PM me for support-
PhilDiscuss
Registered User
Posts: 155
Joined: Fri Aug 19, 2016 8:44 am

Re: LaTex render or other math notation extension

Post by PhilDiscuss »

Very helpful if this done.

Please share :)
Professionally develop phpBB Premium Style and Extension.

The Philippines Discussions Website
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 4015
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Snay

Re: LaTex render or other math notation extension

Post by Kailey »

I will share once I get it uploaded. I'm currently not home.
Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules
If you have any questions about the rules/customs of this website, feel free to send me a PM.

My little corner of the world | Administrator @ phpBB Modders
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 4015
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Snay

Re: LaTex render or other math notation extension

Post by Kailey »

Pushed to GitHub - https://github.com/kinerity/mathjax

You must add a BBCode or use the supported math delimiters before/after your LaTeX code. I have my BBCode setup as follows:

BBCode

Code: Select all

[latex]{TEXT}[/latex]
HTML

Code: Select all

<span style="font-weight: bold;">\({TEXT}\)</span>
Last edited by Kailey on Mon Dec 04, 2017 11:25 am, edited 2 times in total.
Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules
If you have any questions about the rules/customs of this website, feel free to send me a PM.

My little corner of the world | Administrator @ phpBB Modders
PhilDiscuss
Registered User
Posts: 155
Joined: Fri Aug 19, 2016 8:44 am

Re: LaTex render or other math notation extension

Post by PhilDiscuss »

Thank you. :)

Testingizer mode!
Professionally develop phpBB Premium Style and Extension.

The Philippines Discussions Website
User avatar
Ger
Registered User
Posts: 2120
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100

Re: LaTex render or other math notation extension

Post by Ger »

Thanks Kinerity. This looks promising!
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

Kinderpraktijk SensIQ

-Don't PM me for support-
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 4015
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Snay

Re: LaTex render or other math notation extension

Post by Kailey »

Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules
If you have any questions about the rules/customs of this website, feel free to send me a PM.

My little corner of the world | Administrator @ phpBB Modders
forex.reptile
Registered User
Posts: 57
Joined: Fri Dec 17, 2010 7:08 pm

Re: LaTex render or other math notation extension

Post by forex.reptile »

Is there any working LaTex solution for new PHPbb like 3.3?
https://www.phpbb.com/customise/db/exte ... 90#p889090

What is exactly two parts:
https://github.com/marcovo/phpbb_mathjax
https://github.com/sergio91pt/MathJax-phpBB-Integration

Both not affecting anyway for ext and automod to turn on/off ext.
User avatar
nou nou
Registered User
Posts: 743
Joined: Sat Oct 29, 2016 8:08 pm

Re: LaTex render or other math notation extension

Post by nou nou »

I'm using the marcovo one on 3.3.13 (soon 3.3.14 :))
forex.reptile
Registered User
Posts: 57
Joined: Fri Dec 17, 2010 7:08 pm

Re: LaTex render or other math notation extension

Post by forex.reptile »

For this I have:

When install:

Code: Select all

[phpBB Debug] PHP Warning: in file [ROOT]/ext/marcovo/mathjax/includes/bbcode.php on line 161: Trying to access array offset on false
[phpBB Debug] PHP Warning: in file [ROOT]/ext/marcovo/mathjax/includes/bbcode.php on line 161: Trying to access array offset on false
After turn on:

Code: Select all

The file "/usr/home/hosting/public_html/ext/marcovo/mathjax/config/services.yml" does not contain valid YAML: The reserved indicator "@" cannot start a plain scalar; you need to quote the scalar at line 5 (near "- @user").

#0 /usr/home/hosting/public_html/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php(117): Symfony\Component\DependencyInjection\Loader\YamlFileLoader->loadFile('/usr/home/hosting...')
#1 /usr/home/hosting/public_html/phpbb/extension/di/extension_base.php(99): Symfony\Component\DependencyInjection\Loader\YamlFileLoader->load('services.yml')
#2 /usr/home/hosting/public_html/phpbb/extension/di/extension_base.php(63): phpbb\extension\di\extension_base->load_services(Object(Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationContainerBuilder))
#3 /usr/home/hosting/public_html/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php(71): phpbb\extension\di\extension_base->load(Array, Object(Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationContainerBuilder))
#4 /usr/home/hosting/public_html/vendor/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php(39): Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass->process(Object(Symfony\Component\DependencyInjection\ContainerBuilder))
#5 /usr/home/hosting/public_html/vendor/symfony/dependency-injection/Compiler/Compiler.php(140): Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass->process(Object(Symfony\Component\DependencyInjection\ContainerBuilder))
#6 /usr/home/hosting/public_html/vendor/symfony/dependency-injection/ContainerBuilder.php(789): Symfony\Component\DependencyInjection\Compiler\Compiler->compile(Object(Symfony\Component\DependencyInjection\ContainerBuilder))
#7 /usr/home/hosting/public_html/phpbb/di/container_builder.php(223): Symfony\Component\DependencyInjection\ContainerBuilder->compile()
#8 /usr/home/hosting/public_html/common.php(125): phpbb\di\container_builder->get_container()
#9 /usr/home/hosting/public_html/adm/index.php(23): require('/usr/home/hosting...')
#10 {main}
Then turned off

Ok. Resolved.
Confirming that ext/kinerity/mathjax working
forex.reptile
Registered User
Posts: 57
Joined: Fri Dec 17, 2010 7:08 pm

Re: LaTex render or other math notation extension

Post by forex.reptile »

Anyway.. it's very limited.. the more advanced example not working as expected:
https://www.authorea.com/users/3/articl ... s-examples

Code: Select all

[latex]
\section{Equations}
\section{Simple equations}
A simple equation:
\[
f(x)=(x+a)(x+b)
\]
An equation with text:
\begin{equation}
50 \text{ apples} \times 100 \text{ apples} =
\textbf{lots of apples}
\end{equation}
One including subscripts and superscripts:
\[ k_{n+1} = n^2 + k_n^2 - k_{n-1} \]
\section{Greek Letters}
\[ \alpha, \beta, \gamma, \Gamma, \pi, \Pi, \phi, \varphi, \mu, \Phi, \xi, \zeta \]
\[ \cos(2\theta\phi) = \cos^2 \theta\phi - \sin^2 \theta\phi \]
\section{Delimiters}
There are many types of delimiters one can use:
\[ ( a ), [ b ], \{ c \}, | d |, \| e \|,
\langle f \rangle, \lfloor g \rfloor,
\lceil h \rceil, \ulcorner i \urcorner \]
See how the delimiters are of reasonable size in these examples
\[
\left(a+b\right)\left[1-\frac{b}{a+b}\right]=a\,,
\]
\[
\sqrt{|xy|}\leq\left|\frac{x+y}{2}\right|,
\]
even when there is no matching delimiter
\[
\int_a^bu\frac{d^2v}{dx^2}\,dx
=\left.u\frac{dv}{dx}\right|_a^b
-\int_a^b\frac{du}{dx}\frac{dv}{dx}\,dx.
\]
whereas vector problems often lead to statements such as
\[
u=\frac{-y}{x^2+y^2}\,,\quad
v=\frac{x}{x^2+y^2}\,,\quad\text{and}\quad
w=0\,.
\]
\section{Multiple Fractions}
Typesetting continued fractions is easy:
\[
x = a_0 + \frac{1}{a_1 + \frac{1}{a_2 + \frac{1}{a_3 + a_4}}}
\]
However, as the fractions continue, they get smaller. If you want to keep the size consistent, use the display style; e.g.
\[
x = a_0 + \frac{1}{\displaystyle a_1
+ \frac{1}{\displaystyle a_2
+ \frac{1}{\displaystyle a_3 + a_4}}}
\]
\section{Arrays}
Arrays of mathematics are typeset using one of the matrix environments as
in
\[
\begin{bmatrix}
1 & x & 0 \\
0 & 1 & -1
\end{bmatrix}\begin{bmatrix}
1 \\
y \\
1
\end{bmatrix}
=\begin{bmatrix}
1+xy \\
y-1
\end{bmatrix}.
\]
\[ \begin{pmatrix}
2 & 3 & 4\\
5 & 6 & 7\\
8 & 9 & 10 \end{pmatrix} v = 0 \]
Case statements use cases:
\[
|x|=\begin{cases}
x, & \text{if }x\geq 0\,, \\
-x, & \text{if }x< 0\,.
\end{cases}
\]
Many arrays have lots of dots all over the place as in
\[
\begin{matrix}
-2 & 1 & 0 & 0 & \cdots & 0 \\
1 & -2 & 1 & 0 & \cdots & 0 \\
0 & 1 & -2 & 1 & \cdots & 0 \\
0 & 0 & 1 & -2 & \ddots & \vdots \\
\vdots & \vdots & \vdots & \ddots & \ddots & 1 \\
0 & 0 & 0 & \cdots & 1 & -2
\end{matrix}
\]
\section{Greek Letters}
\[ \alpha, \beta, \gamma, \Gamma, \pi, \Pi, \phi, \varphi, \mu, \Phi, \xi, \zeta \]
\[ \cos(2\theta\phi) = \cos^2 \theta\phi - \sin^2 \theta\phi \]
\section{Delimiters}
\[ ( a ), [ b ], \{ c \}, | d |, \| e \|,
\langle f \rangle, \lfloor g \rfloor,
\lceil h \rceil, \ulcorner i \urcorner \]
\section{Accents}
Mathematical accents are performed by a short command with one
argument, such as
\[
\tilde f(\omega)=\frac{1}{2\pi}
\int_{-\infty}^\infty f(x)e^{-i\omega x}\,dx\,,
\]
or
\[
\dot{\vec \omega}=\vec r\times\vec I\,.
\]
\section{Multiline equations and aligned environments}
New lines (\\ ) do not work in equation environments. To achieve alignment of equations, use the aligned package to produce multiline aligned math, such as:
\newline
\begin{center}
\begin{aligned}
$F$ ={} & $\{F_{x} \in F_{c} : (|S| > |C|)$ \\
& $\cap (\mathrm{minPixels} < |S| < \mathrm{maxPixels})$ \\
& $\cap (|S_{\mathrm{conected}}| > |S| - \epsilon) $\}
\end{aligned}
\end{center}
\newline
and also:
\newline
\begin{center}
\begin{aligned}
$A_0$ & $= \frac{1}{(\alpha+t_x)^{r+s+x}}{}_2 F_1\left( r+s+x,x+1;r+s+x+1;\frac{\alpha-\beta}{\alpha + t_x} \right) $\\
& $\quad - \frac{1}{(\alpha+T)^{r+s+x}}{}_2 F_1\left( r+s+x,x+1;r+s+x+1;\frac{\alpha-\beta}{\alpha + T} \right),$
\end{aligned}
\end{center}
\newline
\textbf{Note}: the above multiline equations have math mode defined per line, not globally at the equation level.
\section{Theorems and sets}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{definition}[theorem]{Definition}
\begin{theorem}
For any nonnegative integer $n$, we have
$$(1+x)^n = \sum_{i=0}^n {n \choose i} x^i$$
\end{theorem}
The Taylor series expansion for the function $e^x$ is given by
\begin{equation}
e^x = 1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \cdots = \sum_{n\geq 0} \frac{x^n}{n!}
\end{equation}
\[ \forall x \in X, \quad \exists y \leq \epsilon \]
\[ \frac{n!}{k!(n-k)!} = \binom{n}{k} \]
\begin{theorem}
For any sets $A$, $B$ and $C$, we have
$$ (A\cup B)-(C-A) = A \cup (B-C)$$
\end{theorem}

[/latex]
Also ctr+c/v change rendered version

Code: Select all

e^x = 1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \cdots = \sum_{n\geq 0} \frac{x^n}{n!} 
to

Code: Select all

ex=1+x+2x2​+6x3​+⋯=n≥0∑​n!xn​
Bad case is that not exist option to have all as js on local server but remote js on cdnjs.cloudflare.com

Return to “Extension Requests”