emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Latex export format control - emphasis and radio link
@ 2009-12-23 14:27 Baptiste Fouques
  2009-12-24  8:31 ` Carsten Dominik
  0 siblings, 1 reply; 3+ messages in thread
From: Baptiste Fouques @ 2009-12-23 14:27 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

I am using Org for a while, and I actually do like it a lot. I'd like
to extend my usage a bit, but I have some difficulties with export
format.
Basically, my point is about expanding/escaping control sequences in
latex output.

My sample org file is :

#+TITLE:     Org Test
#+AUTHOR:    Baptiste Fouques
#+EMAIL:     bat@m4tp.org
#+DESCRIPTION: org mode link test
#+OPTIONS:   ^:nil

* org-export-latex-emphasis-alist difficutlies

# <<<link_radio>>>

 =link_radio=

 =not_a_link=

* Radio Link format

<<<other_radio_link>>>


EOF-----------------

What I would expect as a Latex export would be :

\section{org-export-latex-emphasis-alist difficutlies}
\label{sec-1}

\label{link_radio}
 \texttt{\hyperref[link_radio]{link\_radio}}
 \texttt{not\_a\_link}

\section{Radio Link format}
\label{sec-2}
\label{other_radio_link}other\_radio\_link

EOF ----------------

But, I naturally get
...
 \texttt{[[link\_radio][link\_radio]]}                             {1}
...
\label{other_radio_link}other_radio_link                     {2}

which does not work at all as {1} is just a no-sense for LaTeX, and
{2} has not escaped the _ in plain text output (also the org header
has #+OPTIONS: ^:nil ).

I can manage to get {1} quite correct, manipulating
org-export-latex-emphasis-alist : ( ... ("=" "\\texttt{%s}" nil) ... )
...
 \texttt{\hyperref[link_radio]{link\_radio}}
...
but then, =not_a_link= became naturally broken ( _ are no more escaped ... )
And I found no such parameter that can be used to manipulate radio
link export format (to get <<<oher_radio_link>>> beeing exported as
\label{other_radio_link}other\_radio\_link .


If you could help me on this issue, I will be able to use Org mode
more widely in my everyday work (and propose it to my co-worker).

Thanks a lot,

---Bat

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

* Re: Latex export format control - emphasis and radio link
  2009-12-23 14:27 Latex export format control - emphasis and radio link Baptiste Fouques
@ 2009-12-24  8:31 ` Carsten Dominik
  2009-12-24 16:25   ` Baptiste Fouques
  0 siblings, 1 reply; 3+ messages in thread
From: Carsten Dominik @ 2009-12-24  8:31 UTC (permalink / raw)
  To: Baptiste Fouques; +Cc: emacs-orgmode

Hi Baptiste,

first of all, why don't you just use not-a-lint instead of not_a_link?
Using underscore sort-of asks for problems in this context.

Also, why do you want the links to be in typewriter font?  This is  
unusual.  Maybe instead of modifying org-emph-alist, you'd want to add  
to it and create a new emphasis with is texttt but not verbatim?

Finally,

> <<<other_radio_link>>>

it is indeed a bug that this is not exported with escaped underscores.
I have fixed this issue.

- Carsten

On Dec 23, 2009, at 3:27 PM, Baptiste Fouques wrote:

> Hi,
>
> I am using Org for a while, and I actually do like it a lot. I'd like
> to extend my usage a bit, but I have some difficulties with export
> format.
> Basically, my point is about expanding/escaping control sequences in
> latex output.
>
> My sample org file is :
>
> #+TITLE:     Org Test
> #+AUTHOR:    Baptiste Fouques
> #+EMAIL:     bat@m4tp.org
> #+DESCRIPTION: org mode link test
> #+OPTIONS:   ^:nil
>
> * org-export-latex-emphasis-alist difficutlies
>
> # <<<link_radio>>>
>
> =link_radio=
>
> =not_a_link=
>
> * Radio Link format
>
> <<<other_radio_link>>>
>
>
> EOF-----------------
>
> What I would expect as a Latex export would be :
>
> \section{org-export-latex-emphasis-alist difficutlies}
> \label{sec-1}
>
> \label{link_radio}
> \texttt{\hyperref[link_radio]{link\_radio}}
> \texttt{not\_a\_link}
>
> \section{Radio Link format}
> \label{sec-2}
> \label{other_radio_link}other\_radio\_link
>
> EOF ----------------
>
> But, I naturally get
> ...
> \texttt{[[link\_radio][link\_radio]]}                             {1}
> ...
> \label{other_radio_link}other_radio_link                     {2}
>
> which does not work at all as {1} is just a no-sense for LaTeX, and
> {2} has not escaped the _ in plain text output (also the org header
> has #+OPTIONS: ^:nil ).
>
> I can manage to get {1} quite correct, manipulating
> org-export-latex-emphasis-alist : ( ... ("=" "\\texttt{%s}" nil) ... )
> ...
> \texttt{\hyperref[link_radio]{link\_radio}}
> ...
> but then, =not_a_link= became naturally broken ( _ are no more  
> escaped ... )
> And I found no such parameter that can be used to manipulate radio
> link export format (to get <<<oher_radio_link>>> beeing exported as
> \label{other_radio_link}other\_radio\_link .
>
>
> If you could help me on this issue, I will be able to use Org mode
> more widely in my everyday work (and propose it to my co-worker).
>
> Thanks a lot,
>
> ---Bat
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

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

* Re: Latex export format control - emphasis and radio link
  2009-12-24  8:31 ` Carsten Dominik
@ 2009-12-24 16:25   ` Baptiste Fouques
  0 siblings, 0 replies; 3+ messages in thread
From: Baptiste Fouques @ 2009-12-24 16:25 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Hi,

thank you for having answered quickly my questions

On Thu, Dec 24, 2009 at 9:31 AM, Carsten Dominik
<carsten.dominik@gmail.com> wrote:
> first of all, why don't you just use not-a-lint instead of not_a_link?
> Using underscore sort-of asks for problems in this context.

Guess that I am not really looking for problems (I am not this type of
guy ;) ), but where I work, symbol names are defined with underscores
as word separators, and I need a tool that handle it ... And I prefer
facing the the problems when they come (well,  first trying to find
the correct way,  before asking for help).


> Also, why do you want the links to be in typewriter font?
still, it is about symbol names ... so the typewriter font, Then they
are defined once, then any reference should link to the definition ...

>  This is unusual.
>  Maybe instead of modifying org-emph-alist, you'd want to add to it and
> create a new emphasis with is texttt but not verbatim?
It do work, thanks for the advice. Also now I have to handle to prefix
for word that are radio-linked and those who are not ...

>> <<<other_radio_link>>>
>
> it is indeed a bug that this is not exported with escaped underscores.
> I have fixed this issue.

Thank you. Got it and confirm that it works.

Have a good Christmas

--- Bat

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

end of thread, other threads:[~2009-12-24 16:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-23 14:27 Latex export format control - emphasis and radio link Baptiste Fouques
2009-12-24  8:31 ` Carsten Dominik
2009-12-24 16:25   ` Baptiste Fouques

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