Jens Lechtenboerger <lech...@wi.uni-muenster.de> writes:

> I would expect this to be exported to HTML and LaTeX correctly:
> "A $k$-ary function has $k$ arguments"
> 
> In 12.5.1 LaTeX fragments, this use of a hyphen is documented:
> "To avoid conflicts with currency specifications, single ‘$’
> characters are only recognized as math delimiters if the enclosed text
> contains at most two line breaks, is directly attached to the ‘$’
> characters with no whitespace in between, and if the closing ‘$’ is
> followed by whitespace, punctuation or a dash."
>
> However, the HTML export result contains
> "A $k$-ary function has \(k\) arguments",
> which is not rendered correctly.  The first two dollar signs should
> be replaced as well.
>
> The LaTeX result contains "A \$k\$-ary ...", which produces literal
> dollar signs, not math mode.

This is expected. The manual is not accurate here (and has been fixed on
development version of Org mode).
See 
https://list.orgmode.org/orgmode/f0597d96-a287-2c48-7897-6b8737c95...@posteo.eu/

> In contrast, "A \(k\)-ary..." works.

This is also expected. Note that the latter syntax is preferred. We do
not recommend $k$ because it has edge cases like you encountered.

Canceled.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to