* RE: BUG: Problems with LaTeX exporting of ^ and _
@ 2008-10-17 13:22 Sullivan, Gregory (US SSA)
2008-10-17 17:36 ` Carsten Dominik
0 siblings, 1 reply; 3+ messages in thread
From: Sullivan, Gregory (US SSA) @ 2008-10-17 13:22 UTC (permalink / raw)
To: Daniel J. Sinder, Org Mode List
As far as:
Ideally, it should be
\item This is a $\mbox{super}^{\mbox{\scriptsize{s}}}$cript
but I'd settle for this
\item This is a $super^{s}cript$
I agree that it should be the first (using mbox). The second is just
wrong, as it uses math mode spacing for each letter.
Possibly a simpler way to accomplish this is
\item This is a super${}^{s}$cript
--Greg
--
Gregory T. Sullivan, Ph.D.
BAE Systems Advanced Information Technologies
6 New England Executive Park, Burlington, MA 01803
781-262-4553 (office), 978-430-3461 (cell)
gregory.sullivan@baesystems.com
-----Original Message-----
From: emacs-orgmode-bounces+gregory.sullivan=baesystems.com@gnu.org
[mailto:emacs-orgmode-bounces+gregory.sullivan=baesystems.com@gnu.org]
On Behalf Of Daniel J. Sinder
Sent: Friday, October 17, 2008 1:33 AM
To: Org Mode List
Subject: [Orgmode] BUG: Problems with LaTeX exporting of ^ and _
Consider the following simple org file:
-- start org file --
#+OPTIONS: ^:{}
* This is a test
- This is a super^script
- This is a sub_script
-- end org file --
If I export this to HTML, as expected I get this (relevant portion
only):
<ul>
<li>
This is a super^script
</li>
<li>
This is a sub_script
</li>
</ul>
But, if I export to LaTeX, I surprisingly get this:
\begin{itemize}
\item This is a $super^{script}$
\item This is a $sub_{script}$
\end{itemize}
I would expect no superscript and no subscript because I didn't use
braces and I have ^:{} in my OPTIONS line.
Things get plain weird if I use braces in the first item, so my org
file is now this:
-- start org file --
#+OPTIONS: ^:{}
* This is a test
- This is a super^{s}cript
- This is a sub_script
-- end org file --
HTML output in this case is still what I'd expect:
<ul>
<li>
This is a super<sup>s</sup>cript
</li>
<li>
This is a sub_script
</li>
</ul>
But the LaTeX output is not at all what I'd expect:
\begin{itemize}
\item This is a $super^{s}$cript
\item This is a sub_script
\end{itemize}
Note that now the second item has changed in latex even though it
didn't change in the org file. Plus it actually throws an error in
latex because there is no equation environment and no escape of the
underscore. The first item is also a problem because the equation
environment splits in a strange place, causing fonts to get mixed.
Ideally, it should be
\item This is a $\mbox{super}^{\mbox{\scriptsize{s}}}$cript
but I'd settle for this
\item This is a $super^{s}cript$
Dan
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: BUG: Problems with LaTeX exporting of ^ and _
2008-10-17 13:22 BUG: Problems with LaTeX exporting of ^ and _ Sullivan, Gregory (US SSA)
@ 2008-10-17 17:36 ` Carsten Dominik
0 siblings, 0 replies; 3+ messages in thread
From: Carsten Dominik @ 2008-10-17 17:36 UTC (permalink / raw)
To: Sullivan, Gregory (US SSA); +Cc: Org Mode List
Hi Daniel and Greg,
I believe I have fixed these issues. I am not entirely sure though if
I do understand Bastien's code well enough. Please test and report
back.
One addition I have made: If the sub/superscript is a single char, it
it typeset in the normal math italic. If it is longer, it is typeset
in roman. If someone needs an explanation for this convention, ask,
and I will explain.
- Carsten
On Oct 17, 2008, at 3:22 PM, Sullivan, Gregory (US SSA) wrote:
> As far as:
>
> Ideally, it should be
> \item This is a $\mbox{super}^{\mbox{\scriptsize{s}}}$cript
> but I'd settle for this
> \item This is a $super^{s}cript$
>
> I agree that it should be the first (using mbox). The second is just
> wrong, as it uses math mode spacing for each letter.
>
> Possibly a simpler way to accomplish this is
>
> \item This is a super${}^{s}$cript
>
> --Greg
>
> --
> Gregory T. Sullivan, Ph.D.
> BAE Systems Advanced Information Technologies
> 6 New England Executive Park, Burlington, MA 01803
> 781-262-4553 (office), 978-430-3461 (cell)
> gregory.sullivan@baesystems.com
>
>
> -----Original Message-----
> From: emacs-orgmode-bounces+gregory.sullivan=baesystems.com@gnu.org
> [mailto:emacs-orgmode-bounces+gregory.sullivan=baesystems.com@gnu.org]
> On Behalf Of Daniel J. Sinder
> Sent: Friday, October 17, 2008 1:33 AM
> To: Org Mode List
> Subject: [Orgmode] BUG: Problems with LaTeX exporting of ^ and _
>
> Consider the following simple org file:
> -- start org file --
> #+OPTIONS: ^:{}
>
> * This is a test
> - This is a super^script
> - This is a sub_script
> -- end org file --
>
> If I export this to HTML, as expected I get this (relevant portion
> only):
> <ul>
> <li>
> This is a super^script
> </li>
> <li>
> This is a sub_script
> </li>
> </ul>
>
> But, if I export to LaTeX, I surprisingly get this:
> \begin{itemize}
> \item This is a $super^{script}$
> \item This is a $sub_{script}$
> \end{itemize}
>
> I would expect no superscript and no subscript because I didn't use
> braces and I have ^:{} in my OPTIONS line.
>
> Things get plain weird if I use braces in the first item, so my org
> file is now this:
> -- start org file --
> #+OPTIONS: ^:{}
>
> * This is a test
> - This is a super^{s}cript
> - This is a sub_script
> -- end org file --
>
> HTML output in this case is still what I'd expect:
> <ul>
> <li>
> This is a super<sup>s</sup>cript
> </li>
> <li>
> This is a sub_script
> </li>
> </ul>
>
> But the LaTeX output is not at all what I'd expect:
> \begin{itemize}
> \item This is a $super^{s}$cript
> \item This is a sub_script
> \end{itemize}
>
> Note that now the second item has changed in latex even though it
> didn't change in the org file. Plus it actually throws an error in
> latex because there is no equation environment and no escape of the
> underscore. The first item is also a problem because the equation
> environment splits in a strange place, causing fonts to get mixed.
> Ideally, it should be
> \item This is a $\mbox{super}^{\mbox{\scriptsize{s}}}$cript
> but I'd settle for this
> \item This is a $super^{s}cript$
>
> Dan
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 3+ messages in thread
* BUG: Problems with LaTeX exporting of ^ and _
@ 2008-10-17 5:33 Daniel J. Sinder
0 siblings, 0 replies; 3+ messages in thread
From: Daniel J. Sinder @ 2008-10-17 5:33 UTC (permalink / raw)
To: Org Mode List
Consider the following simple org file:
-- start org file --
#+OPTIONS: ^:{}
* This is a test
- This is a super^script
- This is a sub_script
-- end org file --
If I export this to HTML, as expected I get this (relevant portion
only):
<ul>
<li>
This is a super^script
</li>
<li>
This is a sub_script
</li>
</ul>
But, if I export to LaTeX, I surprisingly get this:
\begin{itemize}
\item This is a $super^{script}$
\item This is a $sub_{script}$
\end{itemize}
I would expect no superscript and no subscript because I didn't use
braces and I have ^:{} in my OPTIONS line.
Things get plain weird if I use braces in the first item, so my org
file is now this:
-- start org file --
#+OPTIONS: ^:{}
* This is a test
- This is a super^{s}cript
- This is a sub_script
-- end org file --
HTML output in this case is still what I'd expect:
<ul>
<li>
This is a super<sup>s</sup>cript
</li>
<li>
This is a sub_script
</li>
</ul>
But the LaTeX output is not at all what I'd expect:
\begin{itemize}
\item This is a $super^{s}$cript
\item This is a sub_script
\end{itemize}
Note that now the second item has changed in latex even though it
didn't change in the org file. Plus it actually throws an error in
latex because there is no equation environment and no escape of the
underscore. The first item is also a problem because the equation
environment splits in a strange place, causing fonts to get mixed.
Ideally, it should be
\item This is a $\mbox{super}^{\mbox{\scriptsize{s}}}$cript
but I'd settle for this
\item This is a $super^{s}cript$
Dan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-10-17 17:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-17 13:22 BUG: Problems with LaTeX exporting of ^ and _ Sullivan, Gregory (US SSA)
2008-10-17 17:36 ` Carsten Dominik
-- strict thread matches above, loose matches on Subject: below --
2008-10-17 5:33 Daniel J. Sinder
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).