Lua filter for admonition syntax to awesomebox package LaTeX conversion #9394
Replies: 2 comments
-
Interestingly this is basically the Bullet List semantics: - **Consider this**
Consider doing **this** and *this*, but not this.
```java
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
```
This paragraph continues here...
This is a separate paragraph. renders similarily: If I only could convert the custom block that starts with |
Beta Was this translation helpful? Give feedback.
0 replies
-
I've switched to Div syntax (::: note) instead of !!! note, so I dont need an answer here anymore. It would be nice to have an official syntax extension for admonitions, but there are several ways to create admonition blocks. Using Div syntax and a Lua filter creates the most versatile boxes with tcolorbox. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to write a Lua filter that uses this admonition syntax:
and transforms it into this LaTeX syntax. (
\usepackage{awesomebox}
is declared in a header file):If rendered correctly in LaTeX it would look like this:
I have written a basic Lua filter for this (please exucuse my bad Lua skills, also this needs refactoring):
This does it basically, but it only captures the heading and the first paragraph content. I cannot get the Java source code block and the next paragraph. These are identically indented with 4 spaces, i.e. the whole admonition block is indented with 4 spaces.
How to capture the following paragraphs and render it like above? Is this even possible in a Lua filter because I would need to check whether the following paragraphs are indented with 4 spaces?
Beta Was this translation helpful? Give feedback.
All reactions