io12 / org-fragtog

Automatically toggle Org mode LaTeX fragment previews as the cursor enters and exits them
MIT License
397 stars 14 forks source link

It accidentally try to render the escaped braces inside the link. #6

Closed kawabata closed 4 years ago

kawabata commented 4 years ago

According to the org-manual (https://orgmode.org/manual/Link-Format.html), bracket should be escaped by "\" inside the link.

However, org-fragtog attempts to render the latex fragments inside the link.

For example, with the link "[[\[link_dest\] test.txt][this is \[example\].]]", it attempts to render "link test" and "example" as a latex fragment, and it is not a favored behavior.

Regards,

io12 commented 4 years ago

It looks like org-mode exports escaped brackets \[\] in links as latex fragments. (e.g. with org-latex-export-to-pdf). So this is a behavior of org and not org-fragtog. See this StackExchange page for further info: https://emacs.stackexchange.com/questions/7792/can-i-make-links-in-org-mode-that-contain-brackets-or/7793#7793.