emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* feature proposal, add prefix and suffix to orgtbl matrix
@ 2017-03-09 11:38 Uwe Brauer
  2017-03-10 17:19 ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Brauer @ 2017-03-09 11:38 UTC (permalink / raw)
  To: emacs-orgmode

Hi

Around two weeks Rasmus suggested to use



    #+ATTR_LATEX: :mode math :environment pmatrix :math-suffix \times :math-prefix \mathbf{y}=
    | a | b |
    | c | d |
    #+ATTR_LATEX: :mode math :environment pmatrix
    | 1 | 2 |
    | 3 | 4 |

In order to obtain two matrix clued in the same environment when
exporting to latex. And it works nicely.

Couldn't orgtbl have a  similar feature in order to use it directly in
a latex buffer together with orgtbl mode?

Thanks

Uwe Brauer 

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

* Re: feature proposal, add prefix and suffix to orgtbl matrix
  2017-03-09 11:38 feature proposal, add prefix and suffix to orgtbl matrix Uwe Brauer
@ 2017-03-10 17:19 ` Nicolas Goaziou
  2017-03-10 17:40   ` Uwe Brauer
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2017-03-10 17:19 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

Uwe Brauer <oub@mat.ucm.es> writes:

> Around two weeks Rasmus suggested to use
>
>
>
>     #+ATTR_LATEX: :mode math :environment pmatrix :math-suffix \times :math-prefix \mathbf{y}=
>     | a | b |
>     | c | d |
>     #+ATTR_LATEX: :mode math :environment pmatrix
>     | 1 | 2 |
>     | 3 | 4 |
>
> In order to obtain two matrix clued in the same environment when
> exporting to latex. And it works nicely.
>
> Couldn't orgtbl have a  similar feature in order to use it directly in
> a latex buffer together with orgtbl mode?

Is it really needed? You could send both tables within the same
environment, couldn't you?

Regards,

-- 
Nicolas Goaziou

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

* Re: feature proposal, add prefix and suffix to orgtbl matrix
  2017-03-10 17:19 ` Nicolas Goaziou
@ 2017-03-10 17:40   ` Uwe Brauer
  2017-03-10 18:39     ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Brauer @ 2017-03-10 17:40 UTC (permalink / raw)
  To: emacs-orgmode


   > Hello,
   > Uwe Brauer <oub@mat.ucm.es> writes:


   > Is it really needed? You could send both tables within the same
   > environment, couldn't you?

No I can't

Look at this


% BEGIN RECEIVE ORGTBL test
\[
\begin{pmatrix}
6 & 7 \\
 &  \\
8 &  \\
9 &  \\
\end{pmatrix}
\]
% END RECEIVE ORGTBL test
\begin{comment}
#+ORGTBL: SEND test orgtbl-to-latex-matrix :splice nil :skip 0
| 6 | 7 |
|   |   |

| 8 |   |
| 9 |   |
\end{comment}


Does not work, if I connect the table I obtain 1 matrix but I want two,
besides I cannot have the following result

% BEGIN RECEIVE ORGTBL test
\[
A=
\begin{pmatrix}
6 & 7 \\
 &  \\
8 &  \\
9 &  \\
\end{pmatrix}
\]

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

* Re: feature proposal, add prefix and suffix to orgtbl matrix
  2017-03-10 17:40   ` Uwe Brauer
@ 2017-03-10 18:39     ` Nicolas Goaziou
  2017-03-10 19:18       ` Uwe Brauer
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2017-03-10 18:39 UTC (permalink / raw)
  To: emacs-orgmode

Uwe Brauer <oub@mat.ucm.es> writes:

> Look at this
>
>
> % BEGIN RECEIVE ORGTBL test
> \[
> \begin{pmatrix}
> 6 & 7 \\
>  &  \\
> 8 &  \\
> 9 &  \\
> \end{pmatrix}
> \]
> % END RECEIVE ORGTBL test
> \begin{comment}
>
> #+ORGTBL: SEND test orgtbl-to-latex-matrix :splice nil :skip 0
> | 6 | 7 |
>
> |   |   |
>
> | 8 |   |
> | 9 |   |
> \end{comment}
>
>
> Does not work, if I connect the table I obtain 1 matrix but I want
> two,

Then you need two placeholders, one for each matrix.

> besides I cannot have the following result
>
> % BEGIN RECEIVE ORGTBL test
> \[
> A=
> \begin{pmatrix}
> 6 & 7 \\
>  &  \\
> 8 &  \\
> 9 &  \\
> \end{pmatrix}
> \]

You can:

  \[
    A=
  % BEGIN RECEIVE ORGTBL test
  \begin{pmatrix}
   6 & 7 \\
    &  \\
   8 &  \\
   9 &  \\
  \end{pmatrix}
  % END RECEIVE ORGTBL test
  \]

  \begin{comment}

  #+ORGTBL: SEND test orgtbl-to-latex :latex-default-table-mode math :environment pmatrix
  | 6 | 7 |
  |   |   |
  | 8 |   |
  | 9 |   |
  \end{comment}

Regards,

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

* Re: feature proposal, add prefix and suffix to orgtbl matrix
  2017-03-10 18:39     ` Nicolas Goaziou
@ 2017-03-10 19:18       ` Uwe Brauer
  0 siblings, 0 replies; 5+ messages in thread
From: Uwe Brauer @ 2017-03-10 19:18 UTC (permalink / raw)
  To: emacs-orgmode


   > Uwe Brauer <oub@mat.ucm.es> writes:

   > Then you need two placeholders, one for each matrix.


   > You can:

   >   \[
   >     A=
   >   % BEGIN RECEIVE ORGTBL test
   >   \begin{pmatrix}
   >    6 & 7 \\
   >     &  \\
   >    8 &  \\
   >    9 &  \\
   >   \end{pmatrix}
   >   % END RECEIVE ORGTBL test
   >   \]

   >   \begin{comment}

   >   #+ORGTBL: SEND test orgtbl-to-latex :latex-default-table-mode math :environment pmatrix
   >   | 6 | 7 |

   >   |   |   |
   >   | 8 |   |
   >   | 9 |   |
   >   \end{comment}

Thanks, even the following works
so the magic is to use
#+ORGTBL: SEND test orgtbl-to-latex :latex-default-table-mode math :environment pmatrix

_instead 

Of this
#+ORGTBL: SEND this orgtbl-to-latex-matrix :splice nil :skip 0


\[
A=
% BEGIN RECEIVE ORGTBL test
\begin{pmatrix}
 6 & 7 \\
 12 &  \\
 8 & 9 \\
 9 & 10 \\
\end{pmatrix}
% END RECEIVE ORGTBL test
B=
% BEGIN RECEIVE ORGTBL new
\begin{pmatrix}
 5 & 6 \\
 9 & 8 \\
  &  \\
\end{pmatrix}
% END RECEIVE ORGTBL new
\]

\begin{comment}
#+ORGTBL: SEND test orgtbl-to-latex :latex-default-table-mode math :environment pmatrix
  |  6 |  7 |
  | 12 |    |
  |  8 |  9 |
  |  9 | 10 |
#+ORGTBL: SEND new orgtbl-to-latex :latex-default-table-mode math :environment pmatrix
| 5 | 6 |
| 9 | 8 |
|   |   |
\end{comment}

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

end of thread, other threads:[~2017-03-10 19:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-09 11:38 feature proposal, add prefix and suffix to orgtbl matrix Uwe Brauer
2017-03-10 17:19 ` Nicolas Goaziou
2017-03-10 17:40   ` Uwe Brauer
2017-03-10 18:39     ` Nicolas Goaziou
2017-03-10 19:18       ` Uwe Brauer

Code repositories for project(s) associated with this public 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).