emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* latex preview table environment
@ 2017-02-16 21:26 Jeremie Juste
  2017-02-16 21:52 ` Nick Dokos
  0 siblings, 1 reply; 6+ messages in thread
From: Jeremie Juste @ 2017-02-16 21:26 UTC (permalink / raw)
  To: emacs-orgmode


Hello,

I would like to preview easily latex table environment. I noticed that
org-toggle-latex-fragment shows the latex-preview for the tabular
environment but not for the table environment.

Would it be possible to find a to do that?
I tried to tweak org-latex-options in the following way in the hope
that the org-format latex would use only the tabular environment but it
did not work as expected. 

 (setq org-format-latex-options '(:foreground default :background default :scale 1.4 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers ("begin{.*[^table]}" "end{.*[^le]}" "$1" "$" "$$" "\\(" "\\[")))


Do you have any suggestions?

Best wishes,
Jeremie


\begin{center}                                                                                                                                              
  \begin{tabular}{ l | c | r }                                                                                                                              
    \hline                                                                                                                                                  
    1 & 2 & 3 \\ \hline 
    4 & 5 & 6 \\ \hline 
    7 & 8 & 9 \\                                                                                                                                            
    \hline                                                                                                                                                  
  \end{tabular}                                                                                                                                             
\end{center} 



\begin{table}
\begin{center}                                                                                                                                              
  \begin{tabular}{ l | c | r }                                                                                                                              
    \hline                                                                                                                                                  
    1 & 2 & 3 \\ \hline 
    4 & 5 & 6 \\ \hline 
    7 & 8 & 9 \\                                                                                                                                            
    \hline                                                                                                                                                  
  \end{tabular}                                                                                                                                             
\end{center} 
\end{table} 

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

* Re: latex preview table environment
  2017-02-16 21:26 latex preview table environment Jeremie Juste
@ 2017-02-16 21:52 ` Nick Dokos
  2017-02-16 22:43   ` Jeremie Juste
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Nick Dokos @ 2017-02-16 21:52 UTC (permalink / raw)
  To: emacs-orgmode

Jeremie Juste <jeremiejuste@gmail.com> writes:

> Hello,
>
> I would like to preview easily latex table environment. I noticed that
> org-toggle-latex-fragment shows the latex-preview for the tabular
> environment but not for the table environment.
>

For me, the preview shows both tables. My org-preview-latex-default-process
is set to imagemagick.

>
> \begin{center}                                                                                                                                              
>   \begin{tabular}{ l | c | r }                                                                                                                              
>     \hline                                                                                                                                                  
>     1 & 2 & 3 \\ \hline 
>     4 & 5 & 6 \\ \hline 
>     7 & 8 & 9 \\                                                                                                                                            
>     \hline                                                                                                                                                  
>   \end{tabular}                                                                                                                                             
> \end{center} 
>
>
>
> \begin{table}
> \begin{center}                                                                                                                                              
>   \begin{tabular}{ l | c | r }                                                                                                                              
>     \hline                                                                                                                                                  
>     1 & 2 & 3 \\ \hline 
>     4 & 5 & 6 \\ \hline 
>     7 & 8 & 9 \\                                                                                                                                            
>     \hline                                                                                                                                                  
>   \end{tabular}                                                                                                                                             
> \end{center} 
> \end{table} 
>

-- 
Nick

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

* Re: latex preview table environment
  2017-02-16 21:52 ` Nick Dokos
@ 2017-02-16 22:43   ` Jeremie Juste
  2017-02-18  7:25   ` Jeremie Juste
       [not found]   ` <c86058037ebe440b8b6e594c4db9bd5b@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  2 siblings, 0 replies; 6+ messages in thread
From: Jeremie Juste @ 2017-02-16 22:43 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

Thanks for replying

> For me, the preview shows both tables. My org-preview-latex-default-process
> is set to imagemagick.

my org-preview-latex-default-process variable is set to imagemagick as
well.

Interesting..., I wonder why the tabular would work but not the table
environment

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

* Re: latex preview table environment
  2017-02-16 21:52 ` Nick Dokos
  2017-02-16 22:43   ` Jeremie Juste
@ 2017-02-18  7:25   ` Jeremie Juste
       [not found]   ` <c86058037ebe440b8b6e594c4db9bd5b@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  2 siblings, 0 replies; 6+ messages in thread
From: Jeremie Juste @ 2017-02-18  7:25 UTC (permalink / raw)
  To: emacs-orgmode

I found the culprit. 

I have set my background color to black and forground color to white.

Yet when I adust the org-format-latex-options to see the preview white on black, the tabular environment displays the expected color setting but not the table environment.

So far I can only change the background color to preview the table environment but not the foreground color. I'll try to find a solution and come back if I do. In the meantime any idea to fix this issue is welcome :-).


Below are the settings with which I hope you could reproduce this phenomenon.

(set-background-color "black")
(set-foreground-color "white")
   
(setq org-format-latex-options '(:foreground "white" :background "black" :scale 1.4 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers ("begin{.*[^table]}" "end{.*[^le]}" "$1" "$" "$$" "\\(" "\\[")))

Thanks again,
Jeremie

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

* Re: latex preview table environment
       [not found]   ` <c86058037ebe440b8b6e594c4db9bd5b@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2017-02-18 12:38     ` Eric S Fraga
  2017-02-22 23:38       ` Jeremie Juste
  0 siblings, 1 reply; 6+ messages in thread
From: Eric S Fraga @ 2017-02-18 12:38 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 652 bytes --]

On Saturday, 18 Feb 2017 at 07:25, Jeremie Juste wrote:
> I found the culprit. 
>
> I have set my background color to black and forground color to white.
>
> Yet when I adust the org-format-latex-options to see the preview white
> on black, the tabular environment displays the expected color setting
> but not the table environment.

When I switched my colour theme to one with a dark background, I found I
had to set org-format-latex-options to

    '(:background default :foreground default)

actually specifying colours did not seem to work for me.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.4-242-g2c27b8

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: latex preview table environment
  2017-02-18 12:38     ` Eric S Fraga
@ 2017-02-22 23:38       ` Jeremie Juste
  0 siblings, 0 replies; 6+ messages in thread
From: Jeremie Juste @ 2017-02-22 23:38 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> When I switched my colour theme to one with a dark background, I found I
> had to set org-format-latex-options to
>
>     '(:background default :foreground default)
>

 '(:background default :foreground default) work
for be as well.


> actually specifying colours did not seem to work for me.
I had as far as I can tell the following setting works for me. but I
need to remove the table environment for the foreground to turn blue (in
this case).


may be modifying the table after changing the color might help.  I always fall in this trap. 


(setq org-format-latex-options '(:foreground "blue" :background "gray" :scale 1.4))

\begin{table}
\begin{center}
  \begin{tabular}{ | l | c | r }
    \hline
    1 & 2 & 3 \\ \hline
    4 & 5 & 6 \\ \hline
    7 & 8 & 9 \\
    \hline
  \end{tabular}
\end{center}
\end{table}

Best wishes,
Jeremie

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

end of thread, other threads:[~2017-02-22 23:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-16 21:26 latex preview table environment Jeremie Juste
2017-02-16 21:52 ` Nick Dokos
2017-02-16 22:43   ` Jeremie Juste
2017-02-18  7:25   ` Jeremie Juste
     [not found]   ` <c86058037ebe440b8b6e594c4db9bd5b@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-02-18 12:38     ` Eric S Fraga
2017-02-22 23:38       ` Jeremie Juste

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).