question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Markdown Supports] Maths, Python code etc..

See original GitHub issue

Hi,

Description

Thank you for providing us this great visualisation tool!! If possible, I’d like to make a Feature requrest regarding Markdown support on Tensorboard.

Currently, if you run the code below, you would get a super simple plot with a description next to the plot. But, unfortunatelly, Tensorboard doesn’t render the text(in the code, description) as I use other Markdown editors, e.g., Typora. So, I’d like to know your thoughts on this feature request.

Sample Code

import tensorflow as tf

tf.compat.v1.enable_eager_execution()
writer = tf.compat.v2.summary.create_file_writer("./tmp/")

description = """

```python
print("hello world")
```

## Table

---

| Tables   |      Are      |  Cool |
|----------|:-------------:|------:|
| col 1 is |  left-aligned | $1600 |
| col 2 is |    centered   |   $12 |
| col 3 is | right-aligned |    $1 |

`sh push.sh`

- asdf
- asd

1. asdf
2. asdf

This is an example of an inline MathJax expression: \\( 2 \times 2 = 4 \\)

$\theta$,

$$
\theta
$$

"""

with writer.as_default():
    with tf.contrib.summary.always_record_summaries():
        tf.compat.v2.summary.scalar(name="sample",
                                    data=tf.constant(1),
                                    step=0,
                                    description=description)


Env

  • OS: Ubuntu 18.04
  • Python: 3.7.4
  • TensorFlow: 1.14.0
  • TensorBoard: 1.14.0

Sorry, since Github tries to render even the text in the python code, it doesn’t look organised but I hope you’ll get my point…

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Ir1dcommented, Mar 8, 2020

Hi, is there any update on this feature request? I know these two plugins might help: Highlight for syntax highlight and Arithmatex for math parsing.

0reactions
nfeltcommented, Mar 10, 2020

No update in terms of implementation.

As some context, we’d ultimately prefer to do our markdown rendering client-side in javascript (to avoid preprocessing overhead for markdown that the user doesn’t actually ever see), but that’s been blocked on arriving at a good enough HTML sanitizer story. Given that, I think we’re unlikely to want to enable any Markdown extensions that only have a python implementation (especially those that involve extra pip package deps) since that wouldn’t be portable.

The fenced code blocks are pretty standard and included in the existing markdown package, so if someone wants to send a PR that enables that extension I think we’d be happy to turn it on.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Math support in Markdown | The GitHub Blog
We are pleased to announce that math expressions can now be rendered natively in Markdown on GitHub.
Read more >
Writing Mathematic Fomulars in Markdown - Archer Reilly
In this post, I am gonna show you how to write Mathematic symbols in markdown. since I am writing blog post that hosted...
Read more >
GitHub Now Has Markdown Math Support - MarkTechPost
MathJax is an open-source display engine built on JavaScript that supports several LaTex macros and accessibility extensions. MathJax scales ...
Read more >
Using Jupyter Notebook with Python, Markdown ... - YouTube
Using Jupyter Notebook with Python, Markdown, Latex to support maths learning · Key moments. View all · Key moments · Description · Key...
Read more >
python-markdown-math - PyPI
Math extension for Python-Markdown ; <script type="text/x-mathjax-config"> ; >>> md = markdown. ; <link rel="stylesheet" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found