Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert mathematical equations to TeX/MathJax format #15

Open
2 of 58 tasks
emcconville opened this issue Jul 22, 2015 · 2 comments
Open
2 of 58 tasks

Convert mathematical equations to TeX/MathJax format #15

emcconville opened this issue Jul 22, 2015 · 2 comments

Comments

@emcconville
Copy link
Member

Pandoc supports several options to render Tex math questions. Any usage docs demonstrating mathematical equations should be converted to MathJax TeX/LaTeX notation within the Markdown source files.

Inline math can be enclosed in single $ dollar signs

Where $X_i,Y_i$  is a source image

Where Xi,Yi is a source image

Block equations can be enclosed with double $$ dollar signs.

$$
\begin{array}{ccc}
X_1 & Y_1 & I_1 & J_1 \\
X_2 & Y_2 & I_2 & J_2 \\
X_3 & Y_3 & I_3 & J_3 \\
X_4 & Y_4 & I_4 & J_4 \\
.   & .   & .   & .
\end{array}
$$

$$
\frac{r}{X_i}
$$

output

## For Pandoc

Add the --mathml to parse & generate output

pandoc -f markdown -t html5 --mathml -o example.html example.md

Status

Current pages converted to MathJax notation.

  • advanced/index.md
  • anim_basics/index.md
  • anim_mods/index.md
  • anim_opt/index.md
  • annotating/index.md
  • antialiasing/index.md
  • api/index.md
  • backgrounds/index.md
  • basics/index.md
  • blur/index.md
  • bugs/animation_bgnd/index.md
  • bugs/blur_trans/index.md
  • bugs/composite_mask/index.md
  • bugs/displace/index.md
  • bugs/draw_percent/index.md
  • bugs/future/index.md
  • bugs/fuzz_distance/index.md
  • bugs/index.md
  • bugs/ordered-dither/index.md
  • bugs/quantization/index.md
  • bugs/resize_halo/index.md
  • bugs/testing/index.md
  • bugs/trans_bug/index.md
  • canvas/index.md
  • color_basics/index.md
  • color_mods/index.md
  • compare/index.md
  • compose/index.md
  • compose/tables/index.md
  • convolve/index.md
  • crop/index.md
  • distorts/affine/index.md
  • distorts/index.md
  • draw/index.md
  • files/index.md
  • filter/index.md
  • filter/nicolas/index.md
  • fonts/index.md
  • formats/index.md
  • fourier/fft_math/index.md
  • fourier/index.md
  • index.md
  • layers/index.md
  • lens/index.md
  • mapping/index.md
  • masking/index.md
  • misc/index.md
  • montage/index.md
  • morphology/index.md
  • photos/index.md
  • quantize/index.md
  • resize/index.md
  • text/index.md
  • thumbnails/index.md
  • transform/index.md
  • video/index.md
  • warping/index.md
  • windows/index.md
@emcconville emcconville changed the title Convert mathematical equations to LaTeX format Convert mathematical equations to TeX/MathJax format Jul 24, 2015
@MarkSetchell
Copy link
Contributor

The first example works fine for me, but the later two do not work. Do I need some special option to “pandoc” to tell it to accept double dollar-delimited equations? At the moment, I use this function to preview:

function preview {
input=${1:-'index.md'}
html="/tmp/preview.html"
pandoc -s --to html5 --from markdown --output "$html" --css http://imagemagick.org/css/bootstrap.min.css --css http://imagemagick.org/css/magick.css "$input"
open "$html”
}

On 22 Jul 2015, at 16:46, Eric McConville [email protected] wrote:

Pandoc supports several options to render Tex math questions. Any usage docs demonstrating mathematical equations should be converted to MathJax notation.

Inline math can be enclosed in single $ dollar signs

Where $X_i,Y_i$ is a source image

Where Xi,Yi is a source image

Block equations can be enclosed with double $$ dollar signs.

$$ \begin{array}{ccc} X_1 & Y_1 & I_1 & J_1 X_2 & Y_2 & I_2 & J_2 X_3 & Y_3 & I_3 & J_3 X_4 & Y_4 & I_4 & J_4 . & . & . & . \end{array} $$

$$
\frac{r}{X_i}
$$
Status

Current pages converted to MathJax notation.

• advanced/index.md
• anim_basics/index.md
• anim_mods/index.md
• anim_opt/index.md
• annotating/index.md
• antialiasing/index.md
• api/index.md
• backgrounds/index.md
• basics/index.md
• blur/index.md
• bugs/animation_bgnd/index.md
• bugs/blur_trans/index.md
• bugs/composite_mask/index.md
• bugs/displace/index.md
• bugs/draw_percent/index.md
• bugs/future/index.md
• bugs/fuzz_distance/index.md
• bugs/index.md
• bugs/ordered-dither/index.md
• bugs/quantization/index.md
• bugs/resize_halo/index.md
• bugs/testing/index.md
• bugs/trans_bug/index.md
• canvas/index.md
• color_basics/index.md
• color_mods/index.md
• compare/index.md
• compose/index.md
• compose/tables/index.md
• convolve/index.md
• crop/index.md
• distorts/affine/index.md
• distorts/index.md
• draw/index.md
• files/index.md
• filter/index.md
• filter/nicolas/index.md
• fonts/index.md
• formats/index.md
• fourier/fft_math/index.md
• fourier/index.md
• index.md
• layers/index.md
• lens/index.md
• mapping/index.md
• masking/index.md
• misc/index.md
• montage/index.md
• morphology/index.md
• photos/index.md
• quantize/index.md
• resize/index.md
• text/index.md
• thumbnails/index.md
• transform/index.md
• video/index.md
• warping/index.md
• windows/index.md

Reply to this email directly or view it on GitHub.

@emcconville
Copy link
Member Author

Yep. Add the --mathjax flag to pandoc.

pandoc -s --to html5 --from markdown --output "$html” --mathjax --css http://imagemagick.org/css/bootstrap.min.css <http://imagemagick.org/css/bootstrap.min.css> --css http://imagemagick.org/css/magick.css <http://imagemagick.org/css/magick.css> "$input"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants