Juan Manuel,
I am not against optional arguments. The idea is to make the feature
more flexible and convenient for domain-specific documents. I did not
use square brackets in my example to concentrate on the use case of
concise and clear markup.
On 29/02/2024 06:42, Juan Manuel Macías wrote:
Max Nikulin writes:
#+options: custom-object(:type la :latex_element foreignlanguage
:latex_pre "{latin}")
mmm, I see it as not very flexible and perhaps too complicated for the user.
Do not concentrate on \foreignlanguage. I am using it just because the
thread was started from markup suitable for mixed-language texts.
the user should expect something like &foo{...} to produce \foo{...} or
<span class=foo>...</span>, etc. The only difference is that there would
be an anonymous variant &_{...}.
I do not try to dispute \foo and class="foo" as default behavior. I
suggest to implement possibility to override default behavior of
&foo{text} to \bar{text} and <bar>text</bar>. The same is applicable for
anonymous objects
&_[:latex_command bar :html_element bar]{text}
class in HTML
HTML has a number of elements for semantic markup, e.g. <kbd>, <var>,
<abbr>, etc. I hope, they can be supported in addition to default <span>.