All Projects → susam → Mathbin

susam / Mathbin

Math pastebin with LaTeX and Markdown support

Projects that are alternatives of or similar to Mathbin

Texme
Self-rendering Markdown + LaTeX documents
Stars: ✭ 1,970 (+2273.49%)
Mutual labels:  markdown, latex, math
Remark Math
remark and rehype plugins to support math
Stars: ✭ 129 (+55.42%)
Mutual labels:  markdown, latex, math
Mdmath
LaTeX Math for Markdown inside of Visual Studio Code.
Stars: ✭ 675 (+713.25%)
Mutual labels:  markdown, latex, math
Jekyll Spaceship
🚀 A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, mermaid, emoji, video, audio, youtube, vimeo, dailymotion, soundcloud, spotify, etc.
Stars: ✭ 196 (+136.14%)
Mutual labels:  markdown, latex, math
Mathdown
Collaborative markdown with math
Stars: ✭ 410 (+393.98%)
Mutual labels:  markdown, math
Fiduswriter
Fidus Writer is an online collaborative editor for academics.
Stars: ✭ 405 (+387.95%)
Mutual labels:  latex, math
Pandoc Starter
📄 My pandoc markdown templates and makefiles
Stars: ✭ 443 (+433.73%)
Mutual labels:  markdown, latex
Readme2tex
Renders TeXy Math for Github Readmes
Stars: ✭ 826 (+895.18%)
Mutual labels:  markdown, latex
Marktext
📝A simple and elegant markdown editor, available for Linux, macOS and Windows.
Stars: ✭ 22,894 (+27483.13%)
Mutual labels:  markdown, latex
Redpen
RedPen is an open source proofreading tool to check if your technical documents meet the writing standard. RedPen supports various markup text formats (Markdown, Textile, AsciiDoc, Re:VIEW, reStructuredText and LaTeX).
Stars: ✭ 466 (+461.45%)
Mutual labels:  markdown, latex
Cocalc
CoCalc: Collaborative Calculation in the Cloud
Stars: ✭ 888 (+969.88%)
Mutual labels:  markdown, latex
Crowbook
Converts books written in Markdown to HTML, LaTeX/PDF and EPUB
Stars: ✭ 399 (+380.72%)
Mutual labels:  markdown, latex
Multimarkdown 6
Lightweight markup processor to produce HTML, LaTeX, and more.
Stars: ✭ 394 (+374.7%)
Mutual labels:  markdown, latex
Pytablewriter
pytablewriter is a Python library to write a table in various formats: CSV / Elasticsearch / HTML / JavaScript / JSON / LaTeX / LDJSON / LTSV / Markdown / MediaWiki / NumPy / Excel / Pandas / Python / reStructuredText / SQLite / TOML / TSV.
Stars: ✭ 422 (+408.43%)
Mutual labels:  markdown, latex
Mark Mind
MarkMind — a mind map and outliner editor for Windows, Mac, Linux, andriod and ios ,it support markdown in node.
Stars: ✭ 385 (+363.86%)
Mutual labels:  markdown, latex
Markdown Latex
A markdown parser for converting markdown to LaTeX written in PHP.
Stars: ✭ 40 (-51.81%)
Mutual labels:  markdown, latex
Richtextview
iOS Text View (UIView) that Properly Displays LaTeX, HTML, Markdown, and YouTube/Vimeo Links
Stars: ✭ 953 (+1048.19%)
Mutual labels:  markdown, latex
Pandoc Plantuml Filter
Pandoc filter for PlantUML code blocks
Stars: ✭ 51 (-38.55%)
Mutual labels:  markdown, latex
Foliant
Comprehensive markdown-based documentation toolkit
Stars: ✭ 74 (-10.84%)
Mutual labels:  markdown, latex
Mistletoe
A fast, extensible and spec-compliant Markdown parser in pure Python.
Stars: ✭ 368 (+343.37%)
Mutual labels:  markdown, latex

MathB

MathB is a web application that runs MathB.in. It is a pastebin for mathematics. One can share snippets of mathematical text using this application. The snippets can be written in LaTeX, Markdown as well as HTML.

Features

The following features are supported by this application.

  1. Input can be provided as a free mix of LaTeX, Markdown and HTML code
  2. Math is rendered with HTML and CSS on browsers that have JavaScript enabled
  3. Math is rendered as PNG image on browsers that have JavaScript disabled
  4. Live preview if JavaScript is enabled
  5. Static preview if JavaScript is disabled
  6. Secret posts with secret URLs

To try out these features, visit http://mathb.in, a pastebin for math powered by this project.

Source code setup

MathB depends on third-party JavaScript and PHP libraries to convert users's input specified in LaTeX and Markdown into HTML that can be rendered in the output. These third-party JavaScript libraries are:

  1. PHP-Markdown
  2. Pagedown
  3. MathJax

These libraries are not included in the source code. They should be downloaded separately and placed in the following two directories relative to this project's top level directory, i.e. the directory that contains the favicon.ico file.

  1. thirdparty/php-markdown
  2. thirdparty/pagedown
  3. thirdparty/MathJax

There is shell script called setup.sh which can be executed to automatically clone these third-party projects from their original source code repositories to the directories specified in the list above. To execute this script, first change your current working directory to this project's top level directory, i.e. the current working directory must be the directory that contains the main.php file. Then execute this command:

sh tools/setup.sh

This script requires the git and hg commands to be present. If they are absent, install Git and Mercurial before running the script.

Static preview setup

This application normally requires JavaScript to be enabled in the user's browser to display the output rendered from the input code. When JavaScript is disabled in the user's browser, the application displays a notice indicating that JavaScript needs to be enabled in the browser.

It is possible to configure the application to display the output using PNG images when JavaScript is disabled. This is called a static preview. It is static because the user cannot see a live preview of the output as the input is typed. Instead, a preview button needs to be pressed whenever the user wants to see a preview of the post. This is an optional feature that is disabled by default and enabled if required. When static preview is enabled, the notice indicating that JavaScript needs to be enabled is no longer displayed when JavaScript is disabled in the browser. Instead a static preview of the post rendered as a PNG image is displayed in the output sheet.

Note that when static preview is enabled, it makes no difference to the behaviour of the application when JavaScript is enabled in the user's browser. Enabling this feature helps only those users who have JavaScript disabled in their browser.

The static preview is provided by converting the input code to a PNG with the help of pandoc and convert commands, and displaying this PNG to the browser. The following packages need to be installed:

  1. pandoc
  2. texlive,
  3. texlive-latex-extra
  4. imagemagick.

On Debian, or a Debian based Linux system, these packages can be installed by running the following command:

aptitude install pandoc texlive texlive-latex-extra imagemagick

Once these packages have been installed, the implementation script needs to pass a configuration object to MathB class that has static preview enabled. An example of how to do this can be found in mathbin.php. Here is a minimal example of such a script.

require __DIR__ . '/thirdparty/php-markdown/Michelf/Markdown.php';
set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ . '/lib');
spl_autoload_register();

use MathB\MathB;
use MathB\Configuration;

$conf = new Configuration();
$conf->enableStaticPreview();
$mathb = new MathB($conf);
$mathb->run();

To test if static preview is working fine, perform the following steps in the application.

  1. Disable JavaScript in the browser.

  2. Visit the home page and type the following input:

    $$ e^{i \pi} + 1 $$

  3. Click the preview button.

  4. See if the output is rendered correctly using a PNG image in the output sheet.

License

This is free software. You are permitted to redistribute and use it in source and binary forms, with or without modification, under the terms of the Simplified BSD License. See the LICENSE.md file for the complete license.

This software is provided WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LICENSE.md file for the complete disclaimer.

If you do not have a copy of the LICENSE.md file, please visit http://mathb.in/5 to obtain a copy of the license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].