mboratko / redmine_latex_mathjax

A plugin to enable mathjax on redmine
24 stars 29 forks source link

\begin{case} need \\\\ for line break instead of \\ #23

Closed dinya closed 8 years ago

dinya commented 8 years ago

I want to write cases (like here http://meta.math.stackexchange.com/a/5025) with

$  f(n) =
\begin{cases}
n/2,  & \text{if $n$ is even} \\
3n+1, & \text{if $n$ is odd}
\end{cases}
$

but for correct line break I must use \\\\ instead of \\.

Is it feature of plugin/platform or bug?

I use last plugin version from this repository.

mboratko commented 8 years ago

It's the nature of having server side processing for markdown. I don't think modifying this behavior would be possible without modifying the code for Redmine directly (I don't know if plugins can change the behavior of markdown).

Michael Boratko On Feb 2, 2016 11:07 PM, "Denis Sidorov" notifications@github.com wrote:

I want to write cases (like here http://metamathstackexchangecom/a/5025) with

$ f(n) = \begin{cases} n/2, & \text{if $n$ is even} \ 3n+1, & \text{if $n$ is odd} \end{cases} $

but for correct line break I must use \ instead of \

Is it feature of plugin/platform or bug?

I use last plugin version from this repository

— Reply to this email directly or view it on GitHub https://github.com/process91/redmine_latex_mathjax/issues/23.

vDorst commented 8 years ago

Today the plugin is a macro.

The advantage of the macro is that it bypassed the markup parser. So you have to update to the latest version and use it like

Sigleline expression

{{ mj( <single line expr.> ) }}

or in your case: Multiline:

{{ mj
f(n) =
\begin{cases}
n/2,  & \text{if $n$ is even} \\
3n+1, & \text{if $n$ is odd}
\end{cases}
}}
vDorst commented 8 years ago

mathjax_macro

mboratko commented 8 years ago

That's right, I forgot you had made that change. Closing this issue then.