pillar icon indicating copy to clipboard operation
pillar copied to clipboard

Support for math

Open olekscode opened this issue 6 years ago • 2 comments

I understand that this is a very tricky topic and handling math in Pillar is not easy (especially because we don't know how to compile it to HTML). And I know that we don't have enough manpower (or womanpower) to do everything. But in the last two weeks I did a lot of work writing math-booklet in Pillar, so I just want to share some thoughts.

I don't know how this should be implemented, but I think that we need better support for math. Here is an example of Pillar code that I write:

Given some ''minimum support'' {{{$ s_{min} \in \mathbb{N} $}}}, an itemset {{{$I$}}}
is called ''frequent'' if its support {{{$s_T(I)$}}} is greater than or equal to the
minimum support. We can define a set of all itemsets that are frequent in a set of
transactions {{{$T$}}}:

{{{
\[ F_T(s_{min}) = \{ I \subseteq B | s_T(I) \geq s_{min} \} \]
}}}

The goal of frequent itemset mining is to find the set of all frequent itemsets
{{{$F_T(s_{min})$}}} given a set of transactions {{{$T$}}} and a minimum support
{{{$s_{min}$}}}.

I see several problems here:

  1. It's really annoying to write {{{$expression$}}}, {{{$expression$}}} all the time. And if inlining LaTeX is done as @jecisc has suggested on Discord, we would write {{{latex:$expression$}}}, {{{latex:$expression$}}} every time. So I think that having a shortcut for math such as $expression$, $expression$ or [[expresion]], [[expression]] would be really nice.

  2. \mathbb and \subseteq, as well as math environments such as \begin{align} or \begin{align*} require using libraries such as amsmath and amssymb. These lines have to be added to _support/latex/common.tex:

\usepackage{amsmath}
\usepackage{amssymb}

I think that it would be cool to do this in pillar.conf instead. Something like enable: math.

olekscode avatar Nov 12 '19 13:11 olekscode

I'm pretty sure there was MathJax support (maybe just planned) at some point.

cdlm avatar Nov 12 '19 13:11 cdlm

for the math environment with the latex version of pillar we should be able to add that simply. Now changing the syntax is heavy and I have no time for that.

For the MathJax support yes we planned it but resource problem.

Ducasse avatar Nov 12 '19 16:11 Ducasse