emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* table format during html export
@ 2022-02-15 20:48 Leo Butler
  2022-02-15 22:16 ` Juan Manuel Macías
  0 siblings, 1 reply; 3+ messages in thread
From: Leo Butler @ 2022-02-15 20:48 UTC (permalink / raw)
  To: Org Mode Mailing List

Hello,

I have some tables like

| a | b |
| c | d |

I would like to have this export (in html) to something like

| a  b |
| c  d |

i.e., add a vertical bar on the extreme left and right.

I have searched the org manual and online and I can't find a
solution.

TIA,
Leo


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: table format during html export
  2022-02-15 20:48 table format during html export Leo Butler
@ 2022-02-15 22:16 ` Juan Manuel Macías
  2022-02-16 15:57   ` Leo Butler
  0 siblings, 1 reply; 3+ messages in thread
From: Juan Manuel Macías @ 2022-02-15 22:16 UTC (permalink / raw)
  To: Leo Butler; +Cc: orgmode

Hi Leo,

Leo Butler writes:

> Hello,
>
> I have some tables like
>
> | a | b |
> | c | d |
>
> I would like to have this export (in html) to something like
>
> | a  b |
> | c  d |
>
> i.e., add a vertical bar on the extreme left and right.
>
> I have searched the org manual and online and I can't find a
> solution.
>
> TIA,
> Leo
>

You can modify the attributes for a certain table, for example like this:

#+ATTR_HTML: :border 2 :cellspacing 0 :cellpadding 6 :rules none :frame vsides
| a | b |
| c | d |

For all tables, you can apply a value to
`org-html-table-default-attributes', locally or globally:

#+begin_src emacs-lisp
(setq org-html-table-default-attributes
  '(:border "2" :cellspacing "0" :cellpadding "6" :rules "none" :frame "vsides"))
#+end_src

Best regards,

Juan Manuel 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: table format during html export
  2022-02-15 22:16 ` Juan Manuel Macías
@ 2022-02-16 15:57   ` Leo Butler
  0 siblings, 0 replies; 3+ messages in thread
From: Leo Butler @ 2022-02-16 15:57 UTC (permalink / raw)
  To: Juan Manuel Macías; +Cc: orgmode

Juan Manuel Macías <maciaschain@posteo.net> writes:

> Hi Leo,
>
> Leo Butler writes:
>
>> Hello,
>>
>> I have some tables like
>>
>> | a | b |
>> | c | d |
>>
>> I would like to have this export (in html) to something like
>>
>> | a  b |
>> | c  d |
>>
>> i.e., add a vertical bar on the extreme left and right.
>>
>> I have searched the org manual and online and I can't find a
>> solution.
>>
>> TIA,
>> Leo
>>
>
> You can modify the attributes for a certain table, for example like this:
>
> #+ATTR_HTML: :border 2 :cellspacing 0 :cellpadding 6 :rules none :frame vsides
> | a | b |
> | c | d |
>
> For all tables, you can apply a value to
> `org-html-table-default-attributes', locally or globally:
>
> #+begin_src emacs-lisp
> (setq org-html-table-default-attributes
>   '(:border "2" :cellspacing "0" :cellpadding "6" :rules "none" :frame "vsides"))
> #+end_src

Thank you! That did exactly what I wanted.

Leo


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-16 15:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-15 20:48 table format during html export Leo Butler
2022-02-15 22:16 ` Juan Manuel Macías
2022-02-16 15:57   ` Leo Butler

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).