Created
September 5, 2020 15:07
-
-
Save fonsp/769c9d2c1dce6df0ea7db1ac173c39c8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### A Pluto.jl notebook ### | |
# v0.11.12 | |
using Markdown | |
using InteractiveUtils | |
# ╔═╡ 3bd369a8-ef88-11ea-0ca4-5383bb96324c | |
begin | |
import Pkg | |
Pkg.activate(mktempdir()) | |
end | |
# ╔═╡ 525a05c6-ef88-11ea-1b25-1530bdb5432b | |
begin | |
Pkg.add("LaTeXStrings") | |
using LaTeXStrings | |
end | |
# ╔═╡ 6176f5e0-ef89-11ea-3b10-cd04a04cff11 | |
# ╔═╡ 843cd9ce-ef88-11ea-0591-6ff10269ef50 | |
function lstring_to_markdown(s::LaTeXString) | |
return Markdown.LaTeX("\\text{$s}") | |
end | |
# ╔═╡ 359b20e0-ef89-11ea-0d60-23aa73d419dc | |
function finish_markdown(m) | |
Markdown.MD([m]) | |
end | |
# ╔═╡ 5c62b9b4-ef88-11ea-0c2d-f78096714939 | |
tests = [ | |
L"I am $\sqrt{123}$ years old" | |
L"$\frac{1}{2}$ is my fav number" | |
L"\sqrt{1}" | |
L"$\sqrt{1}$" | |
] | |
# ╔═╡ 4a220e5c-ef89-11ea-0f69-a5ce3ed1b3ed | |
String.(tests) | |
# ╔═╡ 4a26d7c0-ef89-11ea-24ca-835a69eadb54 | |
finish_markdown.(lstring_to_markdown.(tests)) | |
# ╔═╡ Cell order: | |
# ╠═3bd369a8-ef88-11ea-0ca4-5383bb96324c | |
# ╠═525a05c6-ef88-11ea-1b25-1530bdb5432b | |
# ╟─6176f5e0-ef89-11ea-3b10-cd04a04cff11 | |
# ╠═843cd9ce-ef88-11ea-0591-6ff10269ef50 | |
# ╠═359b20e0-ef89-11ea-0d60-23aa73d419dc | |
# ╠═5c62b9b4-ef88-11ea-0c2d-f78096714939 | |
# ╠═4a220e5c-ef89-11ea-0f69-a5ce3ed1b3ed | |
# ╠═4a26d7c0-ef89-11ea-24ca-835a69eadb54 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment