Copy a math formula from Word DocX to CkEditor - math

Basically I have to copy many math formulas from a docx document in CKEditor.
I tried in so many ways but I can not find a solution.
Using Word 2013 I can to copy the formula as a linear text getting a result like this
z_(i,j)=100-((x_(i,j)-ยต_j ))/s_j 10
Starting from this math formula
In CKEditor I use the mathjax plugin to insert laTeX formulas.
How can I do this???
Thanks!

From the mathjax documentation on their website:
MathJax allows you to include mathematics in your web pages, either
using LaTeX, MathML, or AsciiMath notation, and the mathematics will
be processed using javascript to produce HTML, SVG or MathML equations
for viewing in any modern browser.
The format of the math formula you provided is AsciiMath. You should probably read the documentation on it:
http://docs.mathjax.org/en/latest/asciimath.html
According to the plugin for ckeditor website however (http://ckeditor.com/addon/mathjax), it only says it supports TeX formulas, there is no mention of AsciiMath, so you might have to actually modify the plugin or just convert your equations to TeX format, it's a pretty easy syntax.
The syntax can be found here:
https://en.wikibooks.org/wiki/LaTeX/Mathematics

Related

r - Disabling code chunk highlighting in Bookdown (RMarkdown) theorem environments

So I'm using RMarkdown with the Bookdown extension to take notes in math classes. Bookdown has several pre-defined math environments to include and auto-number theorems, definitions, proofs, etc.
These are implemented as special code chunks in RMarkdown; for example, this chunk with the {theorem} header renders the text as a theorem in the output
```{theorem}
Here is my theorem.
``\`
The issue I'm facing is that RMarkdown seems to be treating the text inside the body as code, and as a result, several convenient features of the RMarkdown editor do not work here. For instance, one cannot click on inline math to get a preview pop-up, and inserting a ' (like in variable names such as x') highlights the rest of the body in green (presumably because the editor thinks its the beginning of a string).
Is there a way to get the editor to treat the Bookdown math environments as regular text instead of code? Alternatively, is there a way to create special headers for math environments (like maybe # (thm) Pythagorean theorem)?
Any help will be appreciated.

Doxygen auto number formulas

I would like to enter several formulas into my Doxygen documentation. Is there any way to create a label of some type that automatically numbers each formula? Ideally, the automatic numbering will work both in HTML generated output and within Latex generated output from Doxygen. I am looking for something similar to the Caption feature in MS Word.
Example:
You can see the results of my example in Equation 1.1 below.
{Some Formula}
Equation 1.1
{Some other formula}
Equation 1.2
In the example above, the number after "Equation" gets automatically generated. And then I can reference it in the text.
The \anchor feature in Doxygen would allow me to link to the locations. But I don't think that it would generate the auto-numbering correctly.
The option I thought of was to modify my CSS that I use for Doxygen. Currently I already modified it to automatically number my headings. And Latex automatically numbers headings 1-4 already. I could change my CSS to format Heading 4 so that it looks like a right-justified equation label. But I don't know how I can get Latex to use the same formatting.
Any helpful suggestions?
Thanks.
From what I learned, this can not be done in Doxygen. I am now considering two authoring systems to do this:
Doxygen to document the code.
Open Office / Libre Office to document user manuals, which is where the bulk of the equations are.
Both authoring apps will write HTML output. And then I will combine the output with Qt Help Project system.

Create an ePub file from markdown with math

I've spent a considerable about of time trying to figure out how I can take a markdown file, which contains TeX math and convert it into an ePub file where the math is rendered properly.
For example:
This is a markdown file. Here is a [link](www.example.com).
Here is some inline math: $\sigma_{i=1}^n \frac{\mu}{100}$
Here is an equation:
$$ y = mx + b $$
How can I convert a markdown file with the above text into an ePub file?
I've experimented with different methods of conversion using Pandoc; however, I still can not find a solution which renders the math even 50% correct.
Can anyone provide any help as to how I can do this?
I've tried this solution as well as other Pandoc option without success. Thanks in advance for the help.
Pandoc has an EPUB3 writer. It renders latex math into MathML, which EPUB3 readers are supposed to support (but unfortunately still few do). Use pandoc -t epub3 to force EPUB3 output, as opposed to EPUB2 which is the default.
Of course, this isn't much help if you want EPUB2 output or target readers that don't support MathML. Then you could try using the --webtex option, which will use a web service to convert the TeX to an image.

Annotating Adobe Reader PDFs with math symbols

Many of the math textbooks and other literature I read is in PDF format, so I frequently find myself annotating these with the Adobe Reader comments tool.
I did find a helpful guide here, but sometimes I'd like the option of inserting math symbols, too. Has anyone found a reliable way to insert math symbols, TeX, or other arbitrary formatting into the annotations?
So far, the best I've come up with is to enter the unicode prefixed by "0x" and hit alt+X after it. Maybe with the Adobe javascript SDK you could write a script to shortcut this.
I don't think any of the current commercial editors make this easy, which is too bad. I am sure the vendors monitor this site, so there is hope.
In the meantime, here is a manual workaround.
Use tikz to create your comment boxes. Here are the two examples I found to be most relevant: Boxes and Positioning. Play around with the options to get both the shape and the placement you want. Generate a pdf file from the latex source that contains your comments.
IMPORTANT: if your comments end before the last page of the original document, insert:
\pagebreak{} % create empty page
\thispagestyle{empty} % get rid of page numbers et al
~ % put a space so the page gets generated
before your \end{document}, to get an empty last page. The following command will reuse the last page of your comments document on all subsequent pages of the original document.
Use a recent version of pdftk with the multistamp command to overlay your equations file with your original file like so:
pdftk original.pdf multistamp comments.pdf output out.pdf
Also see this question.
The free (as speech) PDF tool, Okular, supports this functionality by putting latex formula directly between $$...$$.

Where to find mapping of Latex \sum commands to actual Sigma symbol in ttf?

If this is OT, please tell me where to repost it.
I need to render some math equations, in real time. Where can I find a mapping of the LaTeX "english" names (like \sum ) to symbol XYZ of ABC.ttf ? I can read + render ttf's fine; I just don't know where to get the ttfs that have the math symbols and how they're indexed.
Thanks!
I did not find such a list. But I compiled a similar list by hand.
Look at my supersuer question where the AHK script provides a very partial map
I've taken a look at the LaTeX mappings from symbol names to fonts and it's scary. LaTeX's fonts are more complicated than TTF to begin with, and the math fonts are the most complicated of the bunch. For starters, there are separate variants for the glyph depending on context: a big "\sum" in a formula is one character, but if you type "\sum" in inline math you get a different character optimized for inline formulas.
You might be better off using a Unicode database. You can download the Unicode database (as text files) from unicode.org, and there are also some libraries (IBM's LibICU?) which let you look up symbols by name. Most of the symbols you're looking for start at code point U+2200. This stuff doesn't give you nice looking formulas, just the symbols.
You might also be looking for a MathML renderer instead. This will give you the nice looking formulas (not as good as LaTeX), and has an XML interface which should be easy enough to work with.
I would look at Xetex. It allows unicode input, and allows one to use TTF fonts, so they must be doing exactly what you want to do. Or maybe you can even replace Latex with Xetex in whatever you're doing: then you wouldn't need to know the hairy details.

Resources