Eric S Fraga <e.fr...@ucl.ac.uk> writes: > attached is a small patch to give tables their own default placement in > LaTeX export. Up to now, tables have used the default placement for > figures but figures and tables are very different creatures so it does > not make sense to have just one default for both.
Thanks for the patch, and sorry for the late reply. This looks like a useful addition. > This patch unfortunately could break documents (if people have changed > the default for figures, expecting that change to apply to tables as > well) but I see no way to avoid this. So maybe not worth incorporating > but I leave that decision to others. There is a way to avoid this. See the comments below. > Subject: [PATCH] lisp/ox-latex.el: give tables their own placement default > > * ox-latex.el (org-latex--org-table): define and use a new variable, > org-latex-default-table-position, for setting the default placement > option for the export of tables. Please start sentences from capital letter and quote `symbols'. > +*** Tables now have separate default placement option for LaTeX export > + > +Tables and figures now have separate settings for the default > +placement in LaTeX export. Please mention the new variable name. > +(defcustom org-latex-default-table-position "htbp" You can use (defcustom org-latex-default-table-position nil as the default value. Then, you can fallback for figure position in the code when the value is nil. Need to update docstring accordingly. > + "Default position for LaTeX tables." > + :group 'org-export-latex > + :type 'string > + :version "26.1" :version is not needed. > + :package-version '(Org . "9.0") 9.6 > (or (plist-get attributes :placement) > - (format "[%s]" (plist-get info :latex-default-figure-position)))) > + (format "[%s]" (plist-get info :latex-default-table-position)))) Can use (or (plist-get info :latex-default-table-position) (plist-get info :latex-default-figure-position)) -- 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>