Editorial Workflows

AsciiMath Preview

public workflow

Install Workflow...

This workflow contains at least one Python script. Only use it if you trust the person who shared this with you, and if you know exactly what it does.

I understand, install the workflow!

This is a workflow for Editorial, a Markdown and plain text editor for iOS. To download it, you need to view this page on a device that has the app installed.

Description: This workflow enables Editorial to preview documents written in Markdown and AsciiMath.

AsciiMath text can be enclosed in "#" or "`" characters.
(Example:”#3/2#” )

If some text is selected prior to running the workflow, only that portion of the page will be displayed (useful when writing long articles)

The AsciiMath text is rendered via the MathJax javascript library, so an internet connection is required at the moment for the workflow to work properly.

Edit 1: replaced markdown converter function, is now code-friendly
(It doesn't break with '_')

Shared by: http://accascina.me

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Selected Text ?
Entire Line(s)
Empty Selection Output
  • No Output
  • All Text
  • Closest Word
Folded Text
  • Include
  • Replace with:
Run Python Script ?
Source Code
#coding: utf-8
import workflow, markdown2

action_in = workflow.get_input()

#TODO: Generate the output...
action_out = markdown2.markdown(action_in, extras=['code-friendly'])

Show HTML ?
<!DOCTYPE html> <html> <head> <title>Math preview</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"> <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=AM_HTMLorMML-full"></script> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ asciimath2jax: { delimiters: [['#','#'],] }, }); </script> <style> #content{ margin-left:15px; } </style> </head> <body> <div id="content"> Input </div> </body> </html>
Math preview
Base URL