[Okular-devel] Okular auto center papers, any way to prevent this?

Mark Altern mark.altern at gmail.com
Sun Nov 22 00:00:06 CET 2009


Hi, there, That is interesting. Sorry for the confusion, this is the same
issue I have been trying to describe.

Yes, I have configured emacs to forward jump to okular, just like we can do
it with kdvi, here is the okular-search.el file I used for emacs to jump to
okular, actually I modified kdvi-search.el to achieved it. It works fine
except whenever it jump to the right place but auto-center the page, which
is quite annoying.

When we use emacs to jump to kdvi, the page horizontal position doesn't
change, but okular will always auto-center horizontally  the new page.

In addition, here is the lisp code I put in .emacs in order for it to do so:

;; start the server so that the inverse search works
(server-start)
(require 'okular-search)
(add-hook 'LaTeX-mode-hook (lambda () (local-set-key "\C-x\C-j"
'okular-jump-to-line)))
(add-hook 'tex-mode-hook (lambda () (local-set-key "\C-x\C-j"
'okular-jump-to-line)))

See both the okular-search.el file as well as the lines above.

Your help is greatly appreciated. Thanks a lot.

On Sat, Nov 21, 2009 at 12:18 PM, Luigi Toscano <luigi.toscano at tiscali.it>wrote:

> Hi,
> I think that you are talking about two different things.
>
> Mark Altern wrote:
> > Sure, there is something like: < 5 of 34 > at the bottom of the page,
> > and when you click >, it turn to next page, but every time you click it
> > to turn to next page, it will auto-center the page.
> This is what all the viewers I tested do: kdvi, evince, acroread, xdvi
> (and okular, of course). When you change the page, the view changes to
> the upper-left corner of the chosen page. This is a consistent
> behaviour, I don't think it's worth to change that.
> But...
>
> > In most cases, the dvi file I am viewing is not-symmetric and it is
> > zoomed in as large as possible to fit my screen, thus the pages are NOT
> > centered. Then when I use emacs to forward jump from emacs to okular, it
> > will jump to the proper line in proper page, BUT it will auto-center the
> > page that makes the page land in the middle, which is of couse will
> > messed up its original hozinontal position.
> What is that "forward jump", exactly? Have you configured emacs to call
> okular and jump to the specified line? Can you provide us this
> configuration?
> I don't think that this is the same "issue" you described before,
> because as I told you, kdvi acts exactly like okular, in that case.
>
> Regards,
> --
> Luigi
> _______________________________________________
> Okular-devel mailing list
> Okular-devel at kde.org
> https://mail.kde.org/mailman/listinfo/okular-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/okular-devel/attachments/20091121/36a48f19/attachment-0001.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: okular-search.el
Type: text/x-emacs-lisp
Size: 4190 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/okular-devel/attachments/20091121/36a48f19/attachment-0001.el 


More information about the Okular-devel mailing list