Rudolf Adamkovič <salu...@me.com> writes: >> `org-export-with-latex' is a global setting. I do not think that >> texinfo equivalent should be global. It should only be declared inside >> ox-texinfo. > > That makes perfect sense. Please see the new patch attached to this > message. What do you think?
> - (:texinfo-compact-itemx nil "compact-itemx" org-texinfo-compact-itemx))) > + (:texinfo-compact-itemx nil "compact-itemx" org-texinfo-compact-itemx) > + ;; Redefine regular options. > + (:with-latex nil "tex" org-texinfo-with-latex))) Looks reasonable. >> As for the default value, it would be better if the option were set >> depending on the installed Texinfo version. If the installed Texinfo >> supports math, set it to t. Otherwise, nil. Of course, users will be >> able to override the default as they wish. > > I looked at both ox-texinfo.el and texinfo.el, and I found no function > or variable that would give the installed Texinfo version. > > Do we pull the version from "makeinfo --version" and then parse it? If > so, does that functionality belong to Org (ox-texinfo.el) or Emacs > (texinfo.el) instead? I also wonder how we could test it so that it > will not break. I would appreciate any ideas and/or pointers from you. First of all, checking version should probably be controlled by some customization. Especially when we export to .texi (which does not involve calling makeinfo), not to .info. This customization might be set to 'auto by default, making ox-texinfo check makeinfo version. Parsing version is probably the easiest way. Another alternative is trying to run makeinfo on a small test file with math environment and checking if it gets exported as expected. Best, Ihor