emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Thomas S. Dye" <tsd@tsdye.com>
To: Mauro Rovezzi <mauro.rovezzi@gmail.com>
Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org
Subject: Re: LaTeX export: inline markup underscore problem
Date: Mon, 11 Apr 2011 06:58:43 -1000	[thread overview]
Message-ID: <15EA52A3-0CA5-4219-A22E-A29B4B1D38A3@tsdye.com> (raw)
In-Reply-To: <BANLkTikWgRu3ZMpQrVG++nrEu3_pw8O5ZA@mail.gmail.com>

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

Aloha Mauro,

On my system I define a citep link:

> #+source: define-citep-link
> #+begin_src emacs-lisp :results silent
>     (org-add-link-type
>      "citep" 'ebib
>      (lambda (path desc format)
>        (cond
>         ((eq format 'html)
>          (format "(<cite>%s</cite>)" path))
>         ((eq format 'latex)
>          (if (or (not desc) (equal 0 (search "citep:" desc)))
>                (format "\\citep{%s}" path)
>                (format "\\citep[%s]{%s}" desc path)
>   )))))
> #+end_src


then the following Org-mode source:

> Hawaiian archaeology's response to the late Roger Green's call for an
> investigation of diachronic settlement patterns
> [[citep:green84:_settl_patter_studies_ocean]] has been slow and  
> difficult.

exports as:

> Hawaiian archaeology's response to the late Roger Green's call for an
> investigation of diachronic settlement patterns
> \citep{green84:_settl_patter_studies_ocean} has been slow and  
> difficult.

Perhaps you could post a minimal example that doesn't work for you?

Note that this solution doesn't depend on ebib.  It is perfectly OK to  
enter the bibliography key by hand if you prefer.

On your other observation: I don't use underscores in headlines, so  
hadn't run across the limitation in the cross references that you  
mention.  I don't know if there is any way around this.  If you do  
find a way, please feel free to add the solution to the LaTeX export  
tutorial.

All the best,
Tom
On Apr 11, 2011, at 3:55 AM, Mauro Rovezzi wrote:

> On Mon, Apr 11, 2011 at 3:44 AM, Nick Dokos <nicholas.dokos@hp.com>  
> wrote:
>> Thomas S. Dye <tsd@tsdye.com> wrote:
>>>
>>> The code the OP cited passes desc to \cite{}.  The code I pointed to
>>> passes path to \cite{}.  It does this to get around the problem of
>>> escaped underscores, if I remember correctly.  In any case, I use  
>>> this
>>> code with bibliography keys that include underscores, so it should
>>> work for the OP.
>>>
>>
>> I still don't quite understand, so obviously I'm missing something
>> fundamental - but I'll read your tutorial completely first (great
>> tutorial btw!) and try some things out.
>
> Thomas, I also do not understand your reply, sorry. I have tried to
> implement your solution with ebib, but it is not working. Well,
> personally I do not use ebib, so it would be more elegant for me do
> not depend on it. Anyway, I think I have to invest more time to better
> understand this ebib-oriented solution to underscore.
>
> In addition, I also find out that the cross-references
> (http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-16)
> do not work either when the reference has underscore in it.
>
> Thanks,
> Mauro


[-- Attachment #2: Type: text/html, Size: 6208 bytes --]

  reply	other threads:[~2011-04-12  1:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-09 16:55 LaTeX export: inline markup underscore problem Mauro Rovezzi
2011-04-10 19:36 ` Thomas S. Dye
2011-04-10 20:08   ` Nick Dokos
2011-04-10 20:45     ` Thomas S. Dye
2011-04-11  1:44       ` Nick Dokos
2011-04-11  4:52         ` Thomas S. Dye
2011-04-11 13:55         ` Mauro Rovezzi
2011-04-11 16:58           ` Thomas S. Dye [this message]
2011-04-11 18:54             ` Mauro Rovezzi
2011-04-12  3:34               ` Thomas S. Dye

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15EA52A3-0CA5-4219-A22E-A29B4B1D38A3@tsdye.com \
    --to=tsd@tsdye.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mauro.rovezzi@gmail.com \
    --cc=nicholas.dokos@hp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).