-
-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Markdown in @description()
decorators
#512
Comments
I only thought about improving the online documentation but forgot about I know that there are some markdown viewers for the terminal. Maybe the easiest way forward would be to use one of these (as a library)? For example, they might be able to show markdown links using ANSI hyperlinks? The problem is that they would need to support Latex formulas as well, but maybe there are some?
If nothing else, we should definitely do that... if it will still be recognized by mdbook and its mathjax support.
If we don't get this from an external library, we could certainly attempt to do that. But I'm yet not sure if I want a custom markdown parser just for that(?). |
Yes, if there is a library that can display markdown including math blocks in the terminal this would certainly be the easiest and probably also best way. I had a brief look around but could unfortunately not find a terminal markdown viewer library that can display LaTeX formulas in a satisfactory way.
No, I wouldn't suggest that either, however I think math and code blocks are the most important markdown features for the use case in numbat and detecting those should not be too hard. |
Another option would be to have two fields (@doc and @info or similar). But the duplication would be a real shame. On the other hand, we would only have to do that for the functions with formulas in the descriptions. For the others, one of them could fall back to the other. The LaTeX we're using so far is extremely basic. Maybe we can indeed write a small parser ourselves? And turns things like |
#469 added the option to use (some) markdown in
@description()
decorators which I think is very neat for the online documentation and helps to make it more readable, however it also makes the description a bit inconvenient to read in the cli using theinfo
command.Possibly we could directly use Unicode characters instead of LaTeX commands in formulas (e.g.
$Γ(x)$
instead of$\Gamma(x)$
) and use colors to highlight code and math blocks to make descriptions more easily readable in the cli.The text was updated successfully, but these errors were encountered: