[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] org-add-link-type

From: Bastien
Subject: Re: [Orgmode] org-add-link-type
Date: Mon, 17 Jan 2011 19:35:05 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Hi Thomas,

"Thomas S. Dye" <address@hidden> writes:

>   (org-add-link-type
>    "citet" 'ebib
>    (lambda (path desc format)
>      (cond
>       ((eq format 'latex)
>        (if (and desc)
>              (format "\\citet[%s]{%s}" desc path)
>              (format "\\citet{%s}" path))))))
> [[citet:green84:_settl_patter_studies_ocean]]
> yields this:
> \citet[citet:green84:_settl\_patter\_studies\_ocean]
> {green84:_settl_patter_studies_ocean}

This is because "_" chars are usually protected from conversion in
links, but the LaTeX exporter might be confused by links it doesn't

What about this :

   "citet" 'ebib
   (lambda (path desc format)
      ((eq format 'latex)
       (if (and desc)
              (format "\\citet[%s]{%s}" desc path))
          (format "\\citet{%s}" path)))))))

Check for other uses of `org-export-latex-protect-string' in
org-latex.el to better understand in what contexts this function 
is useful.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]