-
Notifications
You must be signed in to change notification settings - Fork 9
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
Feature request: add support for <..>
-arguments of environments
#16
Comments
That's a good idea. Could it be possible to propose a Pull request ? |
Yes, it could. The question is in the design. What I came with by experimenting is a bit more general solution (TBH, I impelemented it as a lua-script) and it is the following: we could support all types of the arguments in any order the user wishes, so that, say ``` {.env on=whatever}
...
``` translates to \begin{env}<whatever>
...
\end{env} and ``` {.env arg=whatever}
...
``` translates to \begin{env}{whatever}
...
\end{env} and ``` {.env opt=whatever}
...
``` translates to \begin{env}[whatever]
...
\end{env} But any longer combinations are also possible: ``` {.env arg=w1 arg=w2 on=w3 opt=w4}
...
``` translates to \begin{env}{w1}{w2}<w3>[w4]
...
\end{env} and etc. Are you okay with such design? |
I think I'm globally ok but it lacks some features:
should be translates to
This is already the case with the |
The issue is that I use panflute to parse the data and panflute considers attributes as a python dict (without duplicates). See http://scorreia.com/software/panflute/code.html#panflute.elements.Div. >>> from panflute import convert_text
>>> convert_text("""
... ::: {.env arg=a arg=b}
... :::
... """
... )
[Div(; classes=['env'], attributes={'arg': 'b'})]
>>> This supposes to use another way for parsing the JSON produced by pandoc:
---
pandoc-latex-environment:
test:
classes: [class1, class2]
args:
- name: title
convert: true
- name: subtitle
optional: true
- name: other
---
``` {#identifier .class1 .class2 other="**other**" title="**mytitle**" subtitle="*subtitle*" overlay="1-3"}
...
``` should be converted to:
|
When studying https://texdoc.org/serve/xparse/0, it seems that we should have a clear way to use these LaTeX3 new feature |
For example, to support generation of
The text was updated successfully, but these errors were encountered: