emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* using subscripts in table captions
@ 2015-08-25  6:09 Johannes Rainer
  2015-08-25  7:57 ` Suvayu Ali
  2015-08-25 12:49 ` Nicolas Goaziou
  0 siblings, 2 replies; 5+ messages in thread
From: Johannes Rainer @ 2015-08-25  6:09 UTC (permalink / raw)
  To: emacs-orgmode

dear all!

I have a strange problem now with org-mode (I don't know whether I had that with previous org-versions because I never paid attention): 
any _ I have in a caption is automatically formatted as a subscript, independently of using #+OPTIONS: ^:nil or #+OPTIONS: ^:{}.
Is there any other way I can force org-mode to export captions "as-is"? For plain text it works nicely, but not for caption (and export to latex or html).

The test org-file I used contains the following:
--------


#+TITLE:TestTest
#+OPTIONS: ^:nil
-----


* Test tables

just in plain text: bla_blu, bla\_blu; both works nicely.

#+CAPTION: Some bla bla and an underscore: bla_blu. The same escaped: bla\_blu. Doesn't work for either of them; blu is always used as subscript.
|    | agegp |     alcgp |    tobgp | ncases | ncontrols |
|----+-------+-----------+----------+--------+-----------|
|  1 | 25-34 | 0-39g/day | 0-9g/day |   0.00 |     40.00 |
|  2 | 25-34 | 0-39g/day |    10-19 |   0.00 |     10.00 |
|  3 | 25-34 | 0-39g/day |    20-29 |   0.00 |      6.00 |


-------

The _ in the plain text are exported as expected, but not the caption.

I'm using org-mode 8.3.1 (release_8.3.1-166-g5bfdfc)

any suggestions?

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

* Re: using subscripts in table captions
  2015-08-25  6:09 using subscripts in table captions Johannes Rainer
@ 2015-08-25  7:57 ` Suvayu Ali
  2015-08-25 11:54   ` Johannes Rainer
  2015-08-25 12:49 ` Nicolas Goaziou
  1 sibling, 1 reply; 5+ messages in thread
From: Suvayu Ali @ 2015-08-25  7:57 UTC (permalink / raw)
  To: emacs-orgmode

On Tue, Aug 25, 2015 at 08:09:55AM +0200, Johannes Rainer wrote:
> 
> The test org-file I used contains the following:
> --------
> 
> 
> #+TITLE:TestTest
> #+OPTIONS: ^:nil
> 
> * Test tables
> 
> just in plain text: bla_blu, bla\_blu; both works nicely.
> 
> #+CAPTION: Some bla bla and an underscore: bla_blu. The same escaped: bla\_blu. Doesn't work for either of them; blu is always used as subscript.
> |    | agegp |     alcgp |    tobgp | ncases | ncontrols |
> |----+-------+-----------+----------+--------+-----------|
> |  1 | 25-34 | 0-39g/day | 0-9g/day |   0.00 |     40.00 |
> |  2 | 25-34 | 0-39g/day |    10-19 |   0.00 |     10.00 |
> |  3 | 25-34 | 0-39g/day |    20-29 |   0.00 |      6.00 |
> 
> 
> -------
> 
> The _ in the plain text are exported as expected, but not the caption.

Using your example file, I get the following.  I guess that confirms
your bug.  I'm using release_8.3.1-129-g526927.

Hope this helps,


\section{Test tables}
\label{sec:orgheadline1}

just in plain text: bla\_blu, bla$\backslash$\_blu; both works nicely.

\begin{table}[htb]
\caption{Some bla bla and an underscore: bla\(_{\text{blu}}\). The same escaped: bla$\backslash$\(_{\text{blu}}\). Doesn't work for either of them; blu is always used as subscript.}
\centering
\begin{tabular}{rrlrrr}
 & agegp & alcgp & tobgp & ncases & ncontrols\\
\hline
1 & 25-34 & 0-39g/day & 0-9g/day & 0.00 & 40.00\\
2 & 25-34 & 0-39g/day & 10-19 & 0.00 & 10.00\\
3 & 25-34 & 0-39g/day & 20-29 & 0.00 & 6.00\\
\end{tabular}
\end{table}

-- 
Suvayu

Open source is the future. It sets us free.

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

* Re: using subscripts in table captions
  2015-08-25  7:57 ` Suvayu Ali
@ 2015-08-25 11:54   ` Johannes Rainer
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Rainer @ 2015-08-25 11:54 UTC (permalink / raw)
  To: Suvayu Ali; +Cc: emacs-orgmode

well, kind of helps. At least I know it's reproducible... although I would like to have that fixed somehow.

> On 25 Aug 2015, at 09:57, Suvayu Ali <fatkasuvayu+linux@gmail.com> wrote:
> 
> On Tue, Aug 25, 2015 at 08:09:55AM +0200, Johannes Rainer wrote:
>> 
>> The test org-file I used contains the following:
>> --------
>> 
>> 
>> #+TITLE:TestTest
>> #+OPTIONS: ^:nil
>> 
>> * Test tables
>> 
>> just in plain text: bla_blu, bla\_blu; both works nicely.
>> 
>> #+CAPTION: Some bla bla and an underscore: bla_blu. The same escaped: bla\_blu. Doesn't work for either of them; blu is always used as subscript.
>> |    | agegp |     alcgp |    tobgp | ncases | ncontrols |
>> |----+-------+-----------+----------+--------+-----------|
>> |  1 | 25-34 | 0-39g/day | 0-9g/day |   0.00 |     40.00 |
>> |  2 | 25-34 | 0-39g/day |    10-19 |   0.00 |     10.00 |
>> |  3 | 25-34 | 0-39g/day |    20-29 |   0.00 |      6.00 |
>> 
>> 
>> -------
>> 
>> The _ in the plain text are exported as expected, but not the caption.
> 
> Using your example file, I get the following.  I guess that confirms
> your bug.  I'm using release_8.3.1-129-g526927.
> 
> Hope this helps,
> 
> 
> \section{Test tables}
> \label{sec:orgheadline1}
> 
> just in plain text: bla\_blu, bla$\backslash$\_blu; both works nicely.
> 
> \begin{table}[htb]
> \caption{Some bla bla and an underscore: bla\(_{\text{blu}}\). The same escaped: bla$\backslash$\(_{\text{blu}}\). Doesn't work for either of them; blu is always used as subscript.}
> \centering
> \begin{tabular}{rrlrrr}
> & agegp & alcgp & tobgp & ncases & ncontrols\\
> \hline
> 1 & 25-34 & 0-39g/day & 0-9g/day & 0.00 & 40.00\\
> 2 & 25-34 & 0-39g/day & 10-19 & 0.00 & 10.00\\
> 3 & 25-34 & 0-39g/day & 20-29 & 0.00 & 6.00\\
> \end{tabular}
> \end{table}
> 
> -- 
> Suvayu
> 
> Open source is the future. It sets us free.
> 

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

* Re: using subscripts in table captions
  2015-08-25  6:09 using subscripts in table captions Johannes Rainer
  2015-08-25  7:57 ` Suvayu Ali
@ 2015-08-25 12:49 ` Nicolas Goaziou
  2015-08-25 14:21   ` Johannes Rainer
  1 sibling, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2015-08-25 12:49 UTC (permalink / raw)
  To: Johannes Rainer; +Cc: emacs-orgmode

Hello,

Johannes Rainer <johannes.rainer@gmail.com> writes:


> I have a strange problem now with org-mode (I don't know whether I had
> that with previous org-versions because I never paid attention): any _
> I have in a caption is automatically formatted as a subscript,
> independently of using #+OPTIONS: ^:nil or #+OPTIONS: ^:{}. Is there
> any other way I can force org-mode to export captions "as-is"? For
> plain text it works nicely, but not for caption (and export to latex
> or html).

This is fixed. Thank you.

Regards,

-- 
Nicolas Goaziou

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

* Re: using subscripts in table captions
  2015-08-25 12:49 ` Nicolas Goaziou
@ 2015-08-25 14:21   ` Johannes Rainer
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Rainer @ 2015-08-25 14:21 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

great! thanks Nicolas!


> On 25 Aug 2015, at 14:49, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> 
> Hello,
> 
> Johannes Rainer <johannes.rainer@gmail.com> writes:
> 
> 
>> I have a strange problem now with org-mode (I don't know whether I had
>> that with previous org-versions because I never paid attention): any _
>> I have in a caption is automatically formatted as a subscript,
>> independently of using #+OPTIONS: ^:nil or #+OPTIONS: ^:{}. Is there
>> any other way I can force org-mode to export captions "as-is"? For
>> plain text it works nicely, but not for caption (and export to latex
>> or html).
> 
> This is fixed. Thank you.
> 
> Regards,
> 
> -- 
> Nicolas Goaziou

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

end of thread, other threads:[~2015-08-25 14:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-25  6:09 using subscripts in table captions Johannes Rainer
2015-08-25  7:57 ` Suvayu Ali
2015-08-25 11:54   ` Johannes Rainer
2015-08-25 12:49 ` Nicolas Goaziou
2015-08-25 14:21   ` Johannes Rainer

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