0

I want to use org-mode tables to input matrices in math environments in a beamer presentation. One solution I've come across is to use radio tables. However, as default the radio table gets inserted with zero indentation. This breaks the export if the matrix is inside a latex block at a non-zero list indentation level.

The code below does the job. However, I have to specify the indentation level myself via :lstart "<some number of spaces>" :lend "\\\\". Is there any way to have the translator instead respect the indentation of the % BEGIN RECEIVE block?

org-mode version 9.1.14, emacs version 25.1.1.

#+OPTIONS: H:1 toc:nil
#+LATEX_CLASS: beamer
#+BEAMER_THEME: default
#+BEAMER_HEADER: \usepackage{lmodern}

* Test matrix
- This is a test matrix
  \begin{align*}
    B & = 
    \begin{pmatrix}
    % BEGIN RECEIVE ORGTBL testmat
      1 & 2\\
    % END RECEIVE ORGTBL testmat
    \end{pmatrix}
  \end{align*}    

* Dummy
#+ORGTBL: SEND testmat orgtbl-to-latex :splice t :skip 0 :lstart "      " :lend "\\\\"
| 1 | 2 |

Without :lstart, etc., I get the result below which breaks the beamer export:

#+OPTIONS: H:1 toc:nil
#+LATEX_CLASS: beamer
#+BEAMER_THEME: default
#+BEAMER_HEADER: \usepackage{lmodern}

* Test matrix
- This is a test matrix
  \begin{align*}
    B & = 
    \begin{pmatrix}
    % BEGIN RECEIVE ORGTBL testmat
1 & 2\\
    % END RECEIVE ORGTBL testmat
    \end{pmatrix}
  \end{align*}    

* Dummy
#+ORGTBL: SEND testmat orgtbl-to-latex :splice t :skip 0
| 1 | 2 |

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.