Skip to content
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

Code blocks without a blank line after the end are rendered as a separate paragraph rather than in-line #1713

Open
dellaert opened this issue Jan 2, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@dellaert
Copy link

dellaert commented Jan 2, 2025

Description

Code blocks have similar whitespace issues as display equations. We are trying to render a notebook to both the web (via jupyter-book) and latex using mystmd, but for small "inline" code examples the latex version starts a new (indented) paragraph.

Myst Version

myst --version
v1.3.19

Reproducible Example

Here is a minimal markdown example:

As with any GTSAM class, you can type
```python
help(gtsam.DiscreteDistribution)
```
to get documentation on its constructors and methods. 

This renders fine on the web, without an indent, but unfortunately in latex extra newlines are added (as was the case for display equations before that was fixed), as shown below:

As with any GTSAM class, you can type

\begin{minted}[breaklines]{python}
help(gtsam.DiscreteDistribution)
\end{minted}

to get documentation on its constructors and methods. 

Proposed Solution

I imagine a very similar fix as with display equations can be used.

@dellaert dellaert added the bug Something isn't working label Jan 2, 2025
@dellaert
Copy link
Author

dellaert commented Jan 2, 2025

See also #1704

@choldgraf choldgraf changed the title Code blocks whitespace Code blocks without a blank line after the end are rendered as a separate paragraph rather than in-line Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant