Wiris demo for generating eps file with mathml - mathml

As given in the example I was able to run the get the eps file but when I try to pass my own MathML formula to generate the eps I always get a 500 error, Here is my MathML
<math xmlns=¨http://www.w3.org/1998/Math/MathML¨><mi>§#949;</mi><mi>§#966;</mi><mstyle displaystyle=¨false¨><munderover><mo>§#8721;</mo><mn>1</mn><mn>2</mn></munderover></mstyle></math>
But when I try to send this MathML to the eps generate it gives me an error can someone help me if I got something wrong.

I got it to work by URL encoding the entire MathML string and passing it to the mml parameter.

Related

Web3.js and Ether.js help me

Im learning web3, and while examining the source code of a page, I saw that the abi file was written in a strange way, what is it? how can i decode?
I assumed it was hexcode and tried to convert it..
http://ddecode.com/hexdecoder/
it didn't work
ABIs are JSON files. JSON stands for JavaScript Object Notation, and is a commonly-used data transfer format. Here's an introduction to JSON: https://www.w3schools.com/whatis/whatis_json.asp
Here's a quick description of ABIs: https://ethereum.stackexchange.com/a/235/97038
EDIT: It appears that the file you're looking at is obfuscated: https://blog.jscrambler.com/javascript-obfuscation-the-definitive-guide

Reading diacritics in R

I have imported several .txt files (texts written in Spanish) to RStudio using the following code:
content = readLines(paste("my_texts", "text1",sep = "/"))
However, when I read the texts in RStudio, they contain codes instead of diacritics. For example, I see the code <97> instead of an "ó" or the code <96> instead of an "ñ".
I have realized also that if the .txt file was originally written using a computer configured in Spanish, I don't see the codes but the actual diacritics. And if the texts were written using a a computer configured in English, then I do get the codes (even though when opening the .txt file on TextEdit I see the diacritics).
I don't know why R displays those symbols and what I can do to retain the diacritics I see in the original .txt files.
I read I could possibly solve this by changing the encoding to UTF-8, so I tried this:
content = readLines(paste("my_texts", "text1",sep = "/"), encoding = "UTF-8")
But that didn't work. Any ideas what those codes are and how to keep my diacritics?
As you figured out, you need to set the correct encoding. Unfortunately the text file was written using a legacy encoding rather than UTF-8 — namely, MacRoman. Ideally the application producing the file would not use this encoding, and Apple products by default no longer produce it.
But since this is what you’ve got, we have to deal with it, and we can. But unfortunately we need to go a detour because the encoding argument of readLines is a bit useless. Instead, we need to manually open a file connection:
con = file(file.path("my_texts", "text1"), encoding = "macintosh")
on.exit(close(con)) # Always make sure to close connections!
contents = readLines(con)
Do note that the encoding name “macintosh” is strictly speaking not portable, so this might not work on all platforms.

Problems with saving to pdf file in Julia

Good evening,
I have a problem with formatting in pdf file after converting it from .jl (Julia file).
For example, $ I_{1}, I_{2}, I_{3} $ illustration the error is not shown
like a normal text. It is shown as the set of symbols, including $, _ , { , }. The headers are also shifted in pdf but in jl (Julia file) they are shown correctly.
How to fix this?
Kind regards,
Ilya

download.file returns error, when using special letters

I'm trying to download several zip files from a webpage. The problem is when, I try to use the download.file function it returns the following error message cannot open URL if I include the special danish letters æ, ø or å. I have the following piece of code
link <- "http://web.econ.ku.dk/polit/studerende/eksamen/opgrv/filer/rv%20Øk%20B%20X2015S_takehome_answers.zip"
download.file(link, getwd())
Can someone explain to me, how I can use the download.files() with special letters.

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.

Resources