# Write an article/web-document with mathematical formulas; Android/Windows

As I travel I sometimes like to jot down notes that maybe, one day will become an article or even a book. At least I can have that as a goal :)

I wish to write simple body text, include images and basic math/physics formulas.

Now I use my Android phone for "everything" and hardly use computers at all for extended periods. If this project develops well I will continue on a computer. While I work on it, it would be good if it was easily publishable on the web.

I am very familiar with HTML and would write the document without using an HTML-editor. But math formulas are not easily included in HTML, I think.

I have heard PDF is good for math formulas, but I know nothing about PDF. I downloaded the app PDF Max. I understood the basics how to make illustrations with text patched here and there. But I must say I didn't understand how plain body text was written, much less mathematical formulas.

PDF Max might be a good option for making the illustrations?

I always use plain text editors for making "documents" in my Android phone, so I may have missed out on the possibilities word processors for the phone may have.

I am not sure about the differences in result produced by word processors in general, compared to PDF-editors.

There is also the "infamous LaTeX that takes longer time to learn than to write the book" ;) I don't know LaTeX.

I don't know how math formulas are usually represented on the web and elsewhere. One way would be to include in-line images made by other software.

I would like to have recommendations for what software(s) to use for writing this document containing body-text + basic math/physics formulas + illustrations.

An extension of the question would be to include videos and other moving images (and hyperlinks). But that would be for web-version only, of course.

Thanks.

The trick that you can use is to edit your text on your phone in "plain text" using one of the mark up languages that includes support for mathematical mark-up examples include ReStructuredText and markdown, there are cheat sheets galore on the net for both. Saving them to a location that you can access from your computer and using a tool to generate the document in whatever format you need for the final "book" website, whatever.

This section of ReStructuredText:

.. math::

(a + b)^2 = a^2 + 2ab + b^2

(a - b)^2 = a^2 - 2ab + b^2

Euler's Identity
----------------

.. math:: e^{i\pi} + 1 = 0


Is quite readable as it stands but when run through the tool, in this case to pdf, you will get something like:

Obviously both markdown languages and most of their variants include the capability of adding annotations, links, embedded images, etc.

## Available tools:

There are a number of tools that you can use to convert between markdown/restructuredtext and various document formats, including pdf, and/or web sites. (BTW the most common formats for embedding maths in html documents are mathjax, mathjs or svg).

Personally I can recommend using Sphinx which:

• Is Free, Gratis & Open Source
• Uses ReStructuredText
• Has good maths support
• Can, with its builders associated tools, produce from a single set of source files:
• Various html formats
• Various help/man formats
• EPUB 2 or 3 expermimental eBooks
• LaTeX for printing
• pdf documents

Other considerations:

• Size when editing on mobile devices MD/reST is compact
• Suitable for version control & review - being plain text most VCSs work well
• Readable as source, __bold__ is in my opinion easier on the eye than <EM>bold</EM>

## Also Look At

It is also worth looking at: pandoc which is a command line utility for converting between various document formats works best from markdowns to other formats Jupyter - lets you create "notebooks" which mix Markdown, (including mathjax), Images, etc, with Python/R/Julia/etc. cells that are executed in place and the results included in the notebook - including any graphs, images, etc, produced by the code which can then be published as static web pages, etc., a great example of this is here:. While I cannot currently find a full implementation of Jupyter for running on mobiles the notebook files can be edited in a standard text editor with practice or you can, if online, have a Jupyter instance running on the internet that you can access via your phones web browser. See https://try.jupyter.org/ for a plethora of examples.

• Thanks. That sounds like a really good suggestion. It is late in my time zone now, but as soon as I can I will explore the options. This area is new to me. – ycc_swe Jun 6 '16 at 17:13
• Are there any mark-up languages that include illustrations? (Lines, boxes, circles, line width, fill, hatch, colors ... ...) I remember making scientific illustrations in the 80's using the HP-printer mark-up language. – ycc_swe Jun 6 '16 at 17:21
• There are a number of ways to go - sphinx has a graphviz dot extension which will let you construct diagrams with the dot language - providing you have graphvix installed. Since sphinx is python based there are a number of plotting and diagramming tools that can be used to construct graphs & diagrams and output them to svg format for embedding in the document. – Steve Barnes Jun 6 '16 at 17:26
• Thanks again. You definitely provide many possible solutions to my question. – ycc_swe Jun 6 '16 at 17:31
• You might also like to take a look at blockdiag.com/en – Steve Barnes Jun 6 '16 at 17:35