emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Joe Riel <joer@san.rr.com>
To: "Jan Böcker" <jan.boecker@jboecker.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: Specify page number in hyperlink [to pdf]
Date: Thu, 29 Apr 2010 21:27:28 -0700	[thread overview]
Message-ID: <4BDA5C30.8090700@san.rr.com> (raw)
In-Reply-To: <4BD9DC70.3090006@jboecker.de>

Jan Böcker wrote:
> On 28.04.2010 20:30, Joe Riel wrote:
>   
>> The hyperlink syntax allows specifying a line number, however,
>> that doesn't do anything (other than force the document to
>> be opened inside of emacs) with a non-text file (say a pdf).
>>
>> Is therea an extension to allow specifying a page number
>> so that a link to a pdf is opened at the specified page?
>>     
>
> There is in the current git version, its not yet documented though.
>
>
> Add an entry to the variable org-file-apps like this:
> ("\\.pdf::\\([0-9]+\\)\\'" . "evince \"%s\" -p %1")
>
> Or as seen in the customize interface:
> Extension: \.pdf::\([0-9]+\)\'
> Command:   evince "%s" -p %1
>
> The subexpression \([0-9]+\) in the regex captures the page number,
> which replaces the %1 in the command string. (This example assumes you
> want to open your PDFs with evince, which accepts a page number after
> the -p option.)
>
> You can then reference a specific page of a PDF like this:
> [[file:/path/to/document.pdf::42]]
>
>
>   
Thanks.  Just cloned the git and built.  This feature
 does precisely what I want.

  reply	other threads:[~2010-04-30  4:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-28 18:30 Specify page number in hyperlink [to pdf] Joe Riel
2010-04-29 19:22 ` Jan Böcker
2010-04-30  4:27   ` Joe Riel [this message]
2010-04-30  4:43   ` Joe Riel
2010-04-30  8:10     ` Nick Dokos
2010-04-30 13:05       ` Jan Böcker
2010-04-30 15:24         ` Nick Dokos
2010-04-30 15:28           ` Carsten Dominik
2010-04-30 14:28       ` Joe Riel
2010-04-30 16:03         ` Nick Dokos
2010-04-30 17:23           ` Joe Riel

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=4BDA5C30.8090700@san.rr.com \
    --to=joer@san.rr.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jan.boecker@jboecker.de \
    /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).