Re: [O] org export to latex tables, with hlines and |
Hello, Uwe Brauer writes: >> Hello, >> Uwe Brauer writes: > > >> IIUC you want to put a rule after every row in the table? If that's the >> case, the straightforward way to do it is to explicitly put the rule in >> your table: > >> |/|<>| >> | | | >> |-+--| > >> Otherwise you can use a filter, e.g., >> `org-export-filter-table-row-functions' and append "\\hine" there in >> LaTeX-related back-ends. > > I got this to work: > > > (defun my-latex-insert-hline-always (row backend info) >"Add a hline to every row when exporting to LaTeX." >(when (org-export-derived-backend-p backend 'latex) >(replace-regexp-in-string "" " hline" row))) > > (add-to-list 'org-export-filter-table-row-functions > 'my-latex-insert-hline-always) > > > Is this what you meant? Something like that, yes. Regards, -- Nicolas Goaziou
Re: [O] org export to latex tables, with hlines and |
> Hello, > Uwe Brauer writes: > IIUC you want to put a rule after every row in the table? If that's the > case, the straightforward way to do it is to explicitly put the rule in > your table: > |/|<>| > | | | > |-+--| > Otherwise you can use a filter, e.g., > `org-export-filter-table-row-functions' and append "\\hine" there in > LaTeX-related back-ends. I got this to work: (defun my-latex-insert-hline-always (row backend info) "Add a hline to every row when exporting to LaTeX." (when (org-export-derived-backend-p backend 'latex) (replace-regexp-in-string "" " hline" row))) (add-to-list 'org-export-filter-table-row-functions 'my-latex-insert-hline-always) Is this what you meant?
Re: [O] org export to latex tables, with hlines and |
> Hello, > Uwe Brauer writes: > IIUC you want to put a rule after every row in the table? If that's the > case, the straightforward way to do it is to explicitly put the rule in > your table: > |/|<>| > | | | > |-+--| > Otherwise you can use a filter, e.g., > `org-export-filter-table-row-functions' and append "\\hine" there in > LaTeX-related back-ends. Hm it seems that the following works for html support | <> | <> | | this | that | | | | #+ATTR_HTML: border="2" rules="all" frame="border" But unfortunately this | \ | <> | <> | <> | | | this | that || | | | || #+ATTR_LATEX: :environment tabular :lend " \\hline" Does not work. Uwe Brauer
Re: [O] org export to latex tables, with hlines and |
> Hello, > Uwe Brauer writes: > IIUC you want to put a rule after every row in the table? If that's the > case, the straightforward way to do it is to explicitly put the rule in > your table: > |/|<>| > | | | > |-+--| Thanks, right, but then I have to insert a hline for every line. > Otherwise you can use a filter, e.g., > `org-export-filter-table-row-functions' and append "\\hine" there in > LaTeX-related back-ends. That is more what I am looking for. But org-export-filter-table-row-functions is nil. So what do I have to set it to? BTW I just realized that I wanted a similar functionality for the HTML export, and in org version 7.8, this was controlled by '(org-export-html-table-tag "") But this variable does not exist any more so the same question arises how can I obtain that behavior for html export? Thanks Uwe Brauer
Re: [O] org export to latex tables, with hlines and |
Hello, Uwe Brauer writes: > When I use > orgtab radio tables in latex files with orgtbl minor mode enabled > the following template > > > > '(orgtbl-radio-table-templates >(quote > ((latex-mode "% BEGIN RECEIVE ORGTBL %n > % END RECEIVE ORGTBL %n > \\begin{comment} > #+ORGTBL: SEND %n orgtbl-to-latex :lend \" hline\" :environment > tabular > |/|<>| > | | | > \\end{comment} > ") > > > Does precisely what I want. Now I want the same behavior if I edit a > table in a org buffer and export it to latex. > > Which variable needs to be set and how? IIUC you want to put a rule after every row in the table? If that's the case, the straightforward way to do it is to explicitly put the rule in your table: |/|<>| | | | |-+--| Otherwise you can use a filter, e.g., `org-export-filter-table-row-functions' and append "\\hine" there in LaTeX-related back-ends. Regards, -- Nicolas Goaziou
[O] org export to latex tables, with hlines and |
Hi When I use orgtab radio tables in latex files with orgtbl minor mode enabled the following template '(orgtbl-radio-table-templates (quote ((latex-mode "% BEGIN RECEIVE ORGTBL %n % END RECEIVE ORGTBL %n \\begin{comment} #+ORGTBL: SEND %n orgtbl-to-latex :lend \" hline\" :environment tabular |/|<>| | | | \\end{comment} ") Does precisely what I want. Now I want the same behavior if I edit a table in a org buffer and export it to latex. Which variable needs to be set and how? thanks Uwe Brauer