* ~verbatim~ and =code= inconsistency exporting to Latex/HTML
@ 2009-03-12 20:39 Emilio Garcia Cota
2009-03-13 17:46 ` Carsten Dominik
0 siblings, 1 reply; 7+ messages in thread
From: Emilio Garcia Cota @ 2009-03-12 20:39 UTC (permalink / raw)
To: emacs-orgmode
#+TITLE: (bug|feature)? report -- exporting ~verbatim~ and =code= into Latex
#+AUTHOR: me
#+EMAIL: e@ma.il
# I use latest Git (that's 1 commit ahead of 6.24c) on Emacs 22.3.1
* ~verbatim~ and =code=---inconsistency exporting to Latex and HTML
#+BEGIN_EXAMPLE
[a-zA-Z_]
[!#&*+-/:;<=>?]
[\t\n\r ,]
This works OK
#+END_EXAMPLE
However if I want to randomly inline any of those in a paragraph,
=[!#&*+-/:;<=>?]= they're not properly escaped =[a-zA-Z_]= for Latex
---while for HTML =[\t\n\r ,]= org-mode does the Right Thing(tm).
I also find odd that ~verbatim~'ed text is =monospaced= in Latex while
it is not in HTML.
* Another little thing---EMAIL option for Latex seems to have no effect
The +EMAIL option below is not shown in Latex---whereas I can see it in
the exported HTML. Is that a feature, a bug, or both?
* Thanks!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ~verbatim~ and =code= inconsistency exporting to Latex/HTML
2009-03-12 20:39 ~verbatim~ and =code= inconsistency exporting to Latex/HTML Emilio Garcia Cota
@ 2009-03-13 17:46 ` Carsten Dominik
2009-03-14 2:23 ` Baoqiu Cui
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Carsten Dominik @ 2009-03-13 17:46 UTC (permalink / raw)
To: Emilio Garcia Cota; +Cc: emacs-orgmode
On Mar 12, 2009, at 9:39 PM, Emilio Garcia Cota wrote:
> #+TITLE: (bug|feature)? report -- exporting ~verbatim~ and =code=
> into Latex
> #+AUTHOR: me
> #+EMAIL: e@ma.il
> # I use latest Git (that's 1 commit ahead of 6.24c) on Emacs 22.3.1
>
> * ~verbatim~ and =code=---inconsistency exporting to Latex and HTML
>
> #+BEGIN_EXAMPLE
> [a-zA-Z_]
> [!#&*+-/:;<=>?]
> [\t\n\r ,]
> This works OK
> #+END_EXAMPLE
>
> However if I want to randomly inline any of those in a paragraph,
> =[!#&*+-/:;<=>?]= they're not properly escaped =[a-zA-Z_]= for Latex
> ---while for HTML =[\t\n\r ,]= org-mode does the Right Thing(tm).
The reason for this is that in LaTeX, inline pieces use
\verb=[a-zA-Z_]=
If "=" is part of the string, this construct fails. Whatever character
I choose, it will fail for someone. I guess I could use the
paragraph symbol §, maybe this is the least likely one of them all?
it works in my LaTeX installation - could a few more people try this
on their systems?
does
\verb§bladibla§
work in LaTeX?
> I also find odd that ~verbatim~'ed text is =monospaced= in Latex
> while
> it is not in HTML.
Yes, I know this, both constructs use \verb in LateX. I'd say this is
clearly good enough, though.
Is there a non-monospaced, verbatim equivalent for \verb in LaTeX?
>
> * Another little thing---EMAIL option for Latex seems to have no
> effect
> The +EMAIL option below is not shown in Latex---whereas I can see
> it in
> the exported HTML. Is that a feature, a bug, or both?
What should it influence? The standard LaTeX header we use (maketitle)
does not list the email. You can build your own title, using
{{{email}}}
as a place holder.
- Carsten
>
> * Thanks!
>
>
> _______________________________________________
> 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] 7+ messages in thread
* Re: ~verbatim~ and =code= inconsistency exporting to Latex/HTML
2009-03-13 17:46 ` Carsten Dominik
@ 2009-03-14 2:23 ` Baoqiu Cui
2009-03-14 7:37 ` Carsten Dominik
2009-03-14 19:23 ` Emilio Garcia Cota
2009-03-14 19:31 ` Emilio Garcia Cota
2 siblings, 1 reply; 7+ messages in thread
From: Baoqiu Cui @ 2009-03-14 2:23 UTC (permalink / raw)
To: emacs-orgmode
Carsten Dominik <dominik@science.uva.nl> writes:
> On Mar 12, 2009, at 9:39 PM, Emilio Garcia Cota wrote:
>
>> #+TITLE: (bug|feature)? report -- exporting ~verbatim~ and =code=
>> into Latex
>> #+AUTHOR: me
>> #+EMAIL: e@ma.il
>> # I use latest Git (that's 1 commit ahead of 6.24c) on Emacs 22.3.1
>>
>> * ~verbatim~ and =code=---inconsistency exporting to Latex and HTML
>>
>> #+BEGIN_EXAMPLE
>> [a-zA-Z_]
>> [!#&*+-/:;<=>?]
>> [\t\n\r ,]
>> This works OK
>> #+END_EXAMPLE
>>
>> However if I want to randomly inline any of those in a paragraph,
>> =[!#&*+-/:;<=>?]= they're not properly escaped =[a-zA-Z_]= for Latex
>> ---while for HTML =[\t\n\r ,]= org-mode does the Right Thing(tm).
>
> The reason for this is that in LaTeX, inline pieces use
>
> \verb=[a-zA-Z_]=
Don't know if this is a good idea, but can we scan the text string and
dynamically choose a delimiter that does not appear in the string? We
need to have some delimiter candidates to choose from, and have to spend
some extra CPU cycles to scan the string, which can be assumed short??
> If "=" is part of the string, this construct fails. Whatever character
> I choose, it will fail for someone. I guess I could use the
> paragraph symbol §, maybe this is the least likely one of them all?
> it works in my LaTeX installation - could a few more people try this
> on their systems?
>
> does
>
> \verb§bladibla§
>
> work in LaTeX?
I got the following error on my MacBook:
------------------------------------------------------------------------
ERROR: Package inputenc Error: Keyboard character used is undefined
--- TeX said ---
(inputenc) in inputencoding `utf8'.
See the inputenc package documentation for explanation.
Type H <return> for immediate help.
...
l.43 \verb.§
bladibla.§
--- HELP ---
From the .log file...
You need to provide a definition with \DeclareInputText
or \DeclareInputMath before using this key.
------------------------------------------------------------------------
Baoqiu
>
>> I also find odd that ~verbatim~'ed text is =monospaced= in Latex
>> while
>> it is not in HTML.
>
> Yes, I know this, both constructs use \verb in LateX. I'd say this is
> clearly good enough, though.
>
> Is there a non-monospaced, verbatim equivalent for \verb in LaTeX?
>
>>
>> * Another little thing---EMAIL option for Latex seems to have no
>> effect
>> The +EMAIL option below is not shown in Latex---whereas I can see it
>> in
>> the exported HTML. Is that a feature, a bug, or both?
>
> What should it influence? The standard LaTeX header we use (maketitle)
> does not list the email. You can build your own title, using
> {{{email}}}
> as a place holder.
>
> - Carsten
>
>
>>
>> * Thanks!
>>
>>
>> _______________________________________________
>> 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] 7+ messages in thread
* Re: Re: ~verbatim~ and =code= inconsistency exporting to Latex/HTML
2009-03-14 2:23 ` Baoqiu Cui
@ 2009-03-14 7:37 ` Carsten Dominik
0 siblings, 0 replies; 7+ messages in thread
From: Carsten Dominik @ 2009-03-14 7:37 UTC (permalink / raw)
To: Baoqiu Cui; +Cc: emacs-orgmode
Yes, this is the right idea, I have implemented this, thanks.
- Carsten
On Mar 14, 2009, at 3:23 AM, Baoqiu Cui wrote:
> Carsten Dominik <dominik@science.uva.nl> writes:
>
>> On Mar 12, 2009, at 9:39 PM, Emilio Garcia Cota wrote:
>>
>>> #+TITLE: (bug|feature)? report -- exporting ~verbatim~ and =code=
>>> into Latex
>>> #+AUTHOR: me
>>> #+EMAIL: e@ma.il
>>> # I use latest Git (that's 1 commit ahead of 6.24c) on Emacs 22.3.1
>>>
>>> * ~verbatim~ and =code=---inconsistency exporting to Latex and HTML
>>>
>>> #+BEGIN_EXAMPLE
>>> [a-zA-Z_]
>>> [!#&*+-/:;<=>?]
>>> [\t\n\r ,]
>>> This works OK
>>> #+END_EXAMPLE
>>>
>>> However if I want to randomly inline any of those in a paragraph,
>>> =[!#&*+-/:;<=>?]= they're not properly escaped =[a-zA-Z_]= for Latex
>>> ---while for HTML =[\t\n\r ,]= org-mode does the Right Thing(tm).
>>
>> The reason for this is that in LaTeX, inline pieces use
>>
>> \verb=[a-zA-Z_]=
>
> Don't know if this is a good idea, but can we scan the text string and
> dynamically choose a delimiter that does not appear in the string? We
> need to have some delimiter candidates to choose from, and have to
> spend
> some extra CPU cycles to scan the string, which can be assumed short??
>
>> If "=" is part of the string, this construct fails. Whatever
>> character
>> I choose, it will fail for someone. I guess I could use the
>> paragraph symbol §, maybe this is the least likely one of them all?
>> it works in my LaTeX installation - could a few more people try this
>> on their systems?
>>
>> does
>>
>> \verb§bladibla§
>>
>> work in LaTeX?
>
> I got the following error on my MacBook:
>
> ------------------------------------------------------------------------
> ERROR: Package inputenc Error: Keyboard character used is undefined
>
> --- TeX said ---
> (inputenc) in inputencoding `utf8'.
>
> See the inputenc package documentation for explanation.
> Type H <return> for immediate help.
> ...
>
> l.43 \verb.§
> bladibla.§
> --- HELP ---
> From the .log file...
>
> You need to provide a definition with \DeclareInputText
> or \DeclareInputMath before using this key.
> ------------------------------------------------------------------------
>
> Baoqiu
>
>>
>>> I also find odd that ~verbatim~'ed text is =monospaced= in Latex
>>> while
>>> it is not in HTML.
>>
>> Yes, I know this, both constructs use \verb in LateX. I'd say this
>> is
>> clearly good enough, though.
>>
>> Is there a non-monospaced, verbatim equivalent for \verb in LaTeX?
>>
>>>
>>> * Another little thing---EMAIL option for Latex seems to have no
>>> effect
>>> The +EMAIL option below is not shown in Latex---whereas I can see
>>> it
>>> in
>>> the exported HTML. Is that a feature, a bug, or both?
>>
>> What should it influence? The standard LaTeX header we use
>> (maketitle)
>> does not list the email. You can build your own title, using
>> {{{email}}}
>> as a place holder.
>>
>> - Carsten
>>
>>
>>>
>>> * Thanks!
>>>
>>>
>>> _______________________________________________
>>> 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
>
>
>
> _______________________________________________
> 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] 7+ messages in thread
* Re: ~verbatim~ and =code= inconsistency exporting to Latex/HTML
2009-03-13 17:46 ` Carsten Dominik
2009-03-14 2:23 ` Baoqiu Cui
@ 2009-03-14 19:23 ` Emilio Garcia Cota
2009-03-17 19:16 ` Carsten Dominik
2009-03-14 19:31 ` Emilio Garcia Cota
2 siblings, 1 reply; 7+ messages in thread
From: Emilio Garcia Cota @ 2009-03-14 19:23 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
Carsten Dominik wrote:
> The reason for this is that in LaTeX, inline pieces use
>
> \verb=[a-zA-Z_]=
>
> If "=" is part of the string, this construct fails. Whatever character
> I choose, it will fail for someone. I guess I could use the
> paragraph symbol §, maybe this is the least likely one of them all?
> it works in my LaTeX installation - could a few more people try this
> on their systems?
>
> does
>
> \verb§bladibla§
>
> work in LaTeX?
It works, but it would just move the problem somewhere else instead of
solving it.
More flexible solutions (yet more involved) could be:
- Escape the characters ourselves (i.e. do not use \verb)
- have a stack of suitable delimiter characters (i.e. any character except
letters, * or space) and use the first one that's not in the region.
A simpler solution would be to stick to '=' and '~' as delimiters,
documenting this shortcoming when exporting to LaTeX.
> Yes, I know this, both constructs use \verb in LateX. I'd say this is
> clearly good enough, though.
Agreed.
> Is there a non-monospaced, verbatim equivalent for \verb in LaTeX?
AFAIK there isn't.
> What should it influence? The standard LaTeX header we use (maketitle)
> does not list the email. You can build your own title, using
> {{{email}}}
> as a place holder.
I was expecting it to generate something like this:
\author{my Name $<$\href{mailto:e@ma.il}{e@ma.il}$>$
Anyway yes, I could do it myself.
By the way, using \verb inside other commands (such as \section) is
forbidden in LaTeX; shall we include a warning in the manual, silently
ignore ~~ and == in those places, or maybe just leave as it is (It'll
break when compiling the.tex) ?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ~verbatim~ and =code= inconsistency exporting to Latex/HTML
2009-03-13 17:46 ` Carsten Dominik
2009-03-14 2:23 ` Baoqiu Cui
2009-03-14 19:23 ` Emilio Garcia Cota
@ 2009-03-14 19:31 ` Emilio Garcia Cota
2 siblings, 0 replies; 7+ messages in thread
From: Emilio Garcia Cota @ 2009-03-14 19:31 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode, kota85
hmm I've just seen that I missed Baoqiu Cui's e-mail, because I'm not
suscribed to the list and forgot to CC myself in the first place.
Sorry for the noise,
Emilio.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ~verbatim~ and =code= inconsistency exporting to Latex/HTML
2009-03-14 19:23 ` Emilio Garcia Cota
@ 2009-03-17 19:16 ` Carsten Dominik
0 siblings, 0 replies; 7+ messages in thread
From: Carsten Dominik @ 2009-03-17 19:16 UTC (permalink / raw)
To: Emilio Garcia Cota; +Cc: emacs-orgmode
On Mar 14, 2009, at 8:23 PM, Emilio Garcia Cota wrote:
> Carsten Dominik wrote:
>> The reason for this is that in LaTeX, inline pieces use
>>
>> \verb=[a-zA-Z_]=
>>
>> If "=" is part of the string, this construct fails. Whatever
>> character
>> I choose, it will fail for someone. I guess I could use the
>> paragraph symbol §, maybe this is the least likely one of them all?
>> it works in my LaTeX installation - could a few more people try this
>> on their systems?
>>
>> does
>>
>> \verb§bladibla§
>>
>> work in LaTeX?
>
> It works, but it would just move the problem somewhere else instead of
> solving it.
>
> More flexible solutions (yet more involved) could be:
> - Escape the characters ourselves (i.e. do not use \verb)
> - have a stack of suitable delimiter characters (i.e. any character
> except
> letters, * or space) and use the first one that's not in the region.
This is how it works now.
>
> A simpler solution would be to stick to '=' and '~' as delimiters,
> documenting this shortcoming when exporting to LaTeX.
>
>> Yes, I know this, both constructs use \verb in LateX. I'd say this
>> is
>> clearly good enough, though.
>
> Agreed.
>
>> Is there a non-monospaced, verbatim equivalent for \verb in LaTeX?
>
> AFAIK there isn't.
>
>> What should it influence? The standard LaTeX header we use
>> (maketitle)
>> does not list the email. You can build your own title, using
>> {{{email}}}
>> as a place holder.
>
> I was expecting it to generate something like this:
> \author{my Name $<$\href{mailto:e@ma.il}{e@ma.il}$>$
> Anyway yes, I could do it myself.
>
>
>
> By the way, using \verb inside other commands (such as \section) is
> forbidden in LaTeX; shall we include a warning in the manual, silently
> ignore ~~ and == in those places, or maybe just leave as it is (It'll
> break when compiling the.tex) ?
I think we can just have it break when compiling TeX. We cannot
possibly document TeX in the Org manual.
- Carsten
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-03-17 19:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-12 20:39 ~verbatim~ and =code= inconsistency exporting to Latex/HTML Emilio Garcia Cota
2009-03-13 17:46 ` Carsten Dominik
2009-03-14 2:23 ` Baoqiu Cui
2009-03-14 7:37 ` Carsten Dominik
2009-03-14 19:23 ` Emilio Garcia Cota
2009-03-17 19:16 ` Carsten Dominik
2009-03-14 19:31 ` Emilio Garcia Cota
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.