[O] LaTeX beamer export: relative file links?

2012-09-28 Thread James Harkins
I'm writing presentations for my classes using beamer export from org-mode
(which is working beautifully, btw -- it's faster than LibreOffice impress
and I get a convenient plain text archive of my slide contents to boot).

I'm authoring in Linux but I have to show the pdfs in windows. That's
generally no problem, except... this week I wanted a link on one slide to
an mp3 audio example. I entered the link in org-mode as a relative path
./blah.mp3, which either org or latex expanded to a UNIX-style full path.
(I'm guessing org.) Obviously windows would not understand the UNIX path.

The question, then: Is it possible to use relative paths for file links in
latex export? (I admit, I haven't searched for customize variables before
writing this- apologies if it's obvious. I spent most of my research time
this week setting up a mingw build environment for SuperCollider, so I'm a
bit search-fatigued I'm afraid.)

Thanks,
hjh


Re: [O] LaTeX beamer export: relative file links?

2012-09-29 Thread Nick Dokos
James Harkins  wrote:

> I'm writing presentations for my classes using beamer export from org-mode 
> (which is working
> beautifully, btw -- it's faster than LibreOffice impress and I get a 
> convenient plain text archive
> of my slide contents to boot).
> 
> I'm authoring in Linux but I have to show the pdfs in windows. That's 
> generally no problem,
> except... this week I wanted a link on one slide to an mp3 audio example. I 
> entered the link in
> org-mode as a relative path ./blah.mp3, which either org or latex expanded to 
> a UNIX-style full
> path. (I'm guessing org.) Obviously windows would not understand the UNIX 
> path.
> 
> The question, then: Is it possible to use relative paths for file links in 
> latex export? (I admit, I
> haven't searched for customize variables before writing this- apologies if 
> it's obvious. I spent
> most of my research time this week setting up a mingw build environment for 
> SuperCollider, so I'm a
> bit search-fatigued I'm afraid.)
> 

Maybe this:

,
| org-link-file-path-type is a variable defined in `org.el'.
| Its value is adaptive
| 
| Documentation:
| How the path name in file links should be stored.
| Valid values are:
| 
| relative  Relative to the current directory, i.e. the directory of the file
|   into which the link is being inserted.
| absolute  Absolute path, if possible with ~ for home directory.
| noabbrev  Absolute path, no abbreviation of home directory.
| adaptive  Use relative path for files in the current directory and sub-
|   directories of it.  For other files, use an absolute 
`

Nick



Re: [O] LaTeX beamer export: relative file links?

2012-09-29 Thread James Harkins
At Sat, 29 Sep 2012 12:34:05 -0400,
Nick Dokos wrote:
> Maybe this:
> 
> ,
> | org-link-file-path-type is a variable defined in `org.el'.
> | Its value is adaptive

No. That's about storage of links, but in my org file, the links *are* 
relative. They become absolute during export.

Less search-fatigued this morning. It seems, from the section of 
org-export-latex-links pasted below, that file paths are always expanded and 
this is not configurable.

My test:

# export header stuff omitted except the really critical:

#+TITLE: Applied Techniques for Digital Audio \newline Introduction to 
Filters
#+AUTHOR:H. James Harkins
#+DATE:  26 September 2012

* Section
** Slide
*** Bullet with [[./1346482292091_2436.mp3][inline link]]

C-c C-e l produces:

\item Bullet with 
\href{file:///media/39ED-A99A/some/folders/omitted/1346482292091_2436.mp3}{inline
 link}

hjh

(path (cond
   ((member type '("coderef"))
raw-path)
   ((member type '("http" "https" "ftp"))
(concat type ":" raw-path))
   ((and re-radio (string-match re-radio raw-path))
(setq radiop t))
   ((equal type "mailto")
(concat type ":" raw-path))
   ((equal type "file")
(if (and (org-file-image-p
  (expand-file-name
   raw-path)
  org-export-latex-inline-image-extensions)
 (or (get-text-property 0 'org-no-description
raw-path)
 (equal desc full-raw-path)))
(setq imgp t)
  (progn (when (string-match "\\(.+\\)::.+" raw-path)
   (setq raw-path (match-string 1 raw-path)))
 (if (file-exists-p raw-path)

; hjh editorial comment: It's mandatory... oops!
; expand-file-name is a built-in function in `C source code'.
; (expand-file-name NAME &optional DEFAULT-DIRECTORY)
; ***Convert filename NAME to absolute***, and canonicalize it.

 (concat type "://" (expand-file-name raw-path))
   (concat type "://" (org-export-directory
   :LaTeX 
org-export-latex-options-plist)
   raw-path



--
James Harkins /// dewdrop world
jamshar...@dewdrop-world.net
http://www.dewdrop-world.net

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman

blog: http://www.dewdrop-world.net/words
audio clips: http://www.dewdrop-world.net/audio
more audio: http://soundcloud.com/dewdrop_world/tracks