You are not logged in.

#176 2010-03-30 12:38:10

jakob
Member
From: Berlin
Registered: 2005-10-27
Posts: 419

Re: zathura - a PDF viewer

Wow, really a very nice tool that integrates perfectly into a keyboard-centered setup, thank you for this awesome program!

One thing that seems strange to me: I had the #define ADJUST_OPEN ADJUST_BESTFIT-option uncommented and think it worked once, but when trying to compile again, I get the following errors:

In file included from zathura.c:334:
config.h:51: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ADJUST_OPEN'
config.h:89: warning: ISO C does not allow extra ';' outside of a function
zathura.c: In function 'cb_view_kb_pressed':
zathura.c:2674: error: 'shortcuts' undeclared (first use in this function)
zathura.c:2674: error: (Each undeclared identifier is reported only once
zathura.c:2674: error: for each function it appears in.)
zathura.c: In function 'main':
zathura.c:2871: error: 'ADJUST_OPEN' undeclared (first use in this function)
make: *** [zathura.o] Error 1

If I put a = in front of ADJUST_OPEN, I get:

In file included from zathura.c:334:
config.h:51: warning: data definition has no type or storage class
config.h:51: warning: type defaults to 'int' in declaration of 'define'
config.h:51: error: 'ADJUST_OPEN' undeclared here (not in a function)
config.h:51: error: expected ',' or ';' before 'ADJUST_BESTFIT'
config.h:89: warning: ISO C does not allow extra ';' outside of a function
zathura.c: In function 'cb_view_kb_pressed':
zathura.c:2674: error: 'shortcuts' undeclared (first use in this function)
zathura.c:2674: error: (Each undeclared identifier is reported only once
zathura.c:2674: error: for each function it appears in.)
make: *** [zathura.o] Error 1

If I weren't so sure to have had it working once, I would not post this. Does anyone else encounter similar or the same problems? It doesnt render zathura useless but would be a nice feature anyway.

Thanks for your work!

jakob

edit: Something else that just popped into my mind while using another very commonly known keyboard shortcut: [space] for scrolling (half)-page-wise down, [shift]+[space] for scroling (half)-page-wise up.

I would be perfectly satisfied to alias pressing [space] to 100% and [shift]+[space] to 0%

I just tried the following in the shortcuts-section, but it doesnt work:

  {0,                  GDK_Space,         bcmd_scroll,          NORMAL,   { 100% } },

Does someone use anything like that already and has found a way to get this behaviour?

Last edited by jakob (2010-03-30 13:25:37)

Offline

#177 2010-03-30 13:38:26

alterecco
Member
Registered: 2009-07-13
Posts: 152

Re: zathura - a PDF viewer

jakob wrote:

One thing that seems strange to me: I had the #define ADJUST_OPEN ADJUST_BESTFIT-option uncommented
I just tried the following in the shortcuts-section, but it doesnt work:

config.h is a C header file, and as such does not use commenting like a shellscript. #define ... is not a commented out line, but a preprocessing directive used by the compiler. To have it work you should leave the line like it was, with the # hash and all

jakob wrote:
  {0,                  GDK_Space,         bcmd_scroll,          NORMAL,   { 100% } },

Use GDK_space, not GDK_Space

Offline

#178 2010-03-30 13:53:33

jakob
Member
From: Berlin
Registered: 2005-10-27
Posts: 419

Re: zathura - a PDF viewer

Hm, GDK_space at least doesnt give the "undefined character" error anymore, but it doesnt work either. I also tried with

 {0,                  GDK_space,         bcmd_scroll,          NORMAL,   { 100 } },

But that wasnt succesful as well…

Offline

#179 2010-03-30 15:12:28

neldoreth
Member
From: AT
Registered: 2009-02-01
Posts: 212

Re: zathura - a PDF viewer

Hello,

You would have to add line

   {GDK_SHIFT_MASK,   GDK_space,         sc_scroll,            NORMAL,   { TOP } },
   {0,                            GDK_space,         sc_scroll,            NORMAL,   { BOTTOM } },

in the shortcuts[]-section in your config.h file.

Shortcut functions begin with a sc_, buffered commands begin with a bcmd_ in their name and they
belong in their own section (array). The other thing is that you can not pass any arguments to function
like you want to.

Best regards


pwmt.org : programs with movie titles

Offline

#180 2010-03-31 19:30:51

vando
Member
From: AR
Registered: 2010-03-31
Posts: 1
Website

Re: zathura - a PDF viewer

lolilolicon wrote:
fauno_ wrote:

@neldoreth a feature request: is it possible to add support for djvu files using libdjvu?

++ for that.
Evince does support djvu, so maybe can look at their code smile

+1 feature request: zathura supports djvu

Offline

#181 2010-04-03 17:40:31

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: zathura - a PDF viewer

Here's a (rather ugly) patch for scroll wheel support if anyone wants.

http://omploader.org/vNDFjNg

(It moves 1 page up/down when you scroll. If you actuall want to "scroll" up/down, replace sc_navigate with sc_scroll, NEXT with DOWN and PREVIOUS with UP.)


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#182 2010-04-06 00:56:47

Sara
Member
From: USA
Registered: 2009-07-09
Posts: 219
Website

Re: zathura - a PDF viewer

Zathura has replaced apvlv for me. Thanks a bunch.

I am getting seg faults, that seemed to be triggered when I use the Index to access the bookmarks in my PDF. I have no idea what they mean. For instance, some of the errors are,

Error: Illegal entry in bfrange block in ToUnicode CMap
Error (22549271): Unknown operator 'C'
Error (22549271): Unknown operator '+79.44'

Many lines of suchlike, that finally ends in a seg fault. It's annoying, but even with this, I *still* prefer zathura to apvlv (apvlv wasn't letting me zoom quickly in documents, a problem zathura doesn't have).

[edit] Sorry, I confused the errors that I was getting. The seg faulting, as Neldoreth pointed out, was from using the search function, but I am getting a separate error from using the index, when I access subsections in bookmarks. If I first access a regular section, then again hit tab and access a subsection, it works without a hitch, but if I first try to use an arrow to open a subsection (without hitting a main section first), Zathura freezes, and I get the following output from the terminal:

(zathura:11924): Gtk-CRITICAL **: gtk_widget_event: assertion `WIDGET_REALIZED_FOR_EVENT (widget, event)' failed [/edit]

[edit 04/12/2010] Issue is fixed now in the latest at the git repo. Thanks Neldoreth! smile [/edit]

Last edited by Sara (2010-04-12 15:08:55)


Registed Linux User 483618

Offline

#183 2010-04-06 06:10:42

neldoreth
Member
From: AT
Registered: 2009-02-01
Posts: 212

Re: zathura - a PDF viewer

Hello,

Sara wrote:

I am getting seg faults, that seemed to be triggered when I use the Index to access the bookmarks in my PDF.

The error output comes from poppler itself. Can you be so kind and send me the PDF document via mail to mail@pwmt.org and
write some lines how to reproduce it. There occur some random segfaults when you are using the search function, I am aware of
that, they exist of some synchronising problems with the rendering of the document.

Best regards


pwmt.org : programs with movie titles

Offline

#184 2010-04-06 07:14:20

kaptenen
Member
Registered: 2009-12-06
Posts: 287
Website

Re: zathura - a PDF viewer

hut wrote:

Here's a (rather ugly) patch for scroll wheel support if anyone wants.

http://omploader.org/vNDFjNg

(It moves 1 page up/down when you scroll. If you actuall want to "scroll" up/down, replace sc_navigate with sc_scroll, NEXT with DOWN and PREVIOUS with UP.)

Looks nice, i will try it when i get home again.

Offline

#185 2010-04-07 11:21:32

Berticus
Member
Registered: 2008-06-11
Posts: 731

Re: zathura - a PDF viewer

Not that it really matters since I probably wouldn't use these features, but rotate and blist doesn't work. Couldn't check bmark. info also didn't work.

Couple of feature requests:
> tabs (I often have multiple pdf files open, grouping some together would be great)
> continuous scrolling (I read that it was implemented, but it's not working for me)

Offline

#186 2010-04-07 15:31:32

jackdesert
Member
Registered: 2010-04-07
Posts: 1

Re: zathura - a PDF viewer

Cool! A pdf reader with customizable colors. This is going to save my eyes so much!

I want pdf documents to always open with these colors
Background:
#251700

Foreground:
#AE6F09

But how do I get the default colors to be used? Whenever I open zathura, it opens with black text on white background, even if I change this line in config.h to:
  static const char default_bgcolor[]        = "#251700";

I have the git version of zathura. I also applied the patch from:
   Subject: [PATCH] Changed the invert function to now do recoloring

That patch gets me the colors I want, but only after pressing CTRL - i. How do I get the colors I want as soon as zathura starts up?

Thanks.

Offline

#187 2010-04-09 17:07:36

quigybo
Member
Registered: 2009-01-15
Posts: 223

Re: zathura - a PDF viewer

Just letting you know that I came across the following error when opening a file with an ampersand '&' in the filename

Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 1: Entity did not end with a semicolon; most likely you used an ampersand character without intending to start an entity - escape ampersand as &amp

By the way I love what you are doing here with zathura, it is quickly becoming my favourite pdf viewer.

Offline

#188 2010-04-11 19:50:42

neldoreth
Member
From: AT
Registered: 2009-02-01
Posts: 212

Re: zathura - a PDF viewer

Hello,
I want to announce the newest version of zathura - 0.0.3:

0.0.3 Changelog
* Reload modified PDF document: If the PDF document changes (e.g.: you recompile your LaTeX-File), zathura detects that and reloads the file
* Recolor the page instead of inverting the colors: It is possible to define two colors that are used for recoloring the document pages instead of the classic color reverting.
* Search function: The search function works now and does not let zathura crash, in addition search results are highlighted.
* Show/hide the document information: It is possible again to show and hide the document information
* Follow internal links or open URI in browser: It is now possible to follow links by using the 'f' command (like the vimperator hint feature).
* Implemented the save function
* Other fixes: Markup error, WIDGET_REALIZED_FOR_EVENT, build system, ...

You can get the current source from the follow link zathura-0.0.3.tar.gz or install it from the AUR.

Best regards

Last edited by neldoreth (2010-04-11 19:52:43)


pwmt.org : programs with movie titles

Offline

#189 2010-04-11 20:30:45

ntness
Member
From: The World
Registered: 2009-12-29
Posts: 97

Re: zathura - a PDF viewer

Whenever I open a pdf document I have to press the 'a' key in order to get it to zoom/fitwidth. When I try to declare the function in the config.h file #define ADJUST_OPEN ADJUST_FITWIDTH I get errors compiling. Is there a way to have it zoom to fitwidth upon opening? Also, how would I go about having it invert colors automatically upon open?

Thanks-
jd


transcend to the fifth abode

Offline

#190 2010-04-11 20:58:26

Caedmon
Member
Registered: 2009-08-08
Posts: 18

Re: zathura - a PDF viewer

Thank you. I've been recompiling a lot of LaTeX lately.

A great pdf viewer.

pacman -R apvlv

Offline

#191 2010-04-11 21:45:02

quigybo
Member
Registered: 2009-01-15
Posts: 223

Re: zathura - a PDF viewer

hut wrote:

Here's a (rather ugly) patch for scroll wheel support if anyone wants.

http://omploader.org/vNDFjNg

(It moves 1 page up/down when you scroll. If you actuall want to "scroll" up/down, replace sc_navigate with sc_scroll, NEXT with DOWN and PREVIOUS with UP.)

Nice patch, works perfectly for me. I would love to see this added to zathura.

FYI I had to change NEXT with UP and PREVIOUS with DOWN to get it to scroll the right way...

Offline

#192 2010-04-12 07:38:26

neldoreth
Member
From: AT
Registered: 2009-02-01
Posts: 212

Re: zathura - a PDF viewer

Hello jd,

ntness wrote:

Whenever I open a pdf document I have to press the 'a' key in order to get it to zoom/fitwidth. When I try to declare the function in the config.h file #define ADJUST_OPEN ADJUST_FITWIDTH I get errors compiling. Is there a way to have it zoom to fitwidth upon opening? Also, how would I go about having it invert colors automatically upon open?

Please update to the latest git-version, you are now able to set the recoloring with RECOLOR_OPEN and the automatic adjustment should work correct now.

Best regards


pwmt.org : programs with movie titles

Offline

#193 2010-04-15 19:43:09

Shender
Member
From: Paris, France
Registered: 2009-08-27
Posts: 7

Re: zathura - a PDF viewer

Is there anybody who uses zathura to read papers from arxiv.org? I wrote a small patch for interaction with arxiv and spires. In a few words, it adds  paper which you read at the moment to your library and also adds bibliographical record to your *.bib file. Very convenient!

Offline

#194 2010-04-15 22:52:43

quigybo
Member
Registered: 2009-01-15
Posts: 223

Re: zathura - a PDF viewer

@Shender: sounds good, post it up baby

Offline

#195 2010-04-16 19:21:57

0ld
Member
Registered: 2010-04-16
Posts: 4

Re: zathura - a PDF viewer

I'm sorry, but reload modified PDF document seems to be not working for me. After modifying zathura becomes completely nonreacting:(

Offline

#196 2010-04-17 11:42:53

Caedmon
Member
Registered: 2009-08-08
Posts: 18

Re: zathura - a PDF viewer

I to am having trubble with the reload function. Sometimes it freeses and sometimes it closes dumpig the message:

zathura: cairo-surface.c:406: cairo_surface_reference: Assertion `((*&(&surface->ref_count)->ref_count) > 0)' failed.

Offline

#197 2010-04-23 00:48:15

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: zathura - a PDF viewer

ISSUE: can't change page by page.
Done about 40 minutes trying:)   -- must be something with my system.
Have to ask. as: I'm very interested. Sorry about that.:)

1) Found the AUR package build folder's config.h, though not the installed config.h
( version: "git checkout pdf" tried mostly with modified PKGBUILD)

2) More of a problem is that I've tried every modfier I could think of and combinations thereof.
I can bring up 'insert', 'open' and move around in a single page, also rotate,
which had me thinking 'z' was the default modkey. zf or zF does nothing zb or zB, same.

Can't move between pages in the typical one by one forward or back way.
I can specify a single page to go to though.
No luck simply moving page by page through any pdf
Have tried all versions. git, pdf ...

um, it's me causing this for sure. Plus my PgUp and PgDn are screwy on this laptop
so I'm thinking if I can find the correct config.h I will set the arrow keys o something.
Really though, I've been unlucky I think. Doesn't seem to be doing much and I've tried
scores of key command possibilities.

NOTE: should I perhaps be using the regular -git version rather than the -git pdf version?

Last edited by yvonney (2010-04-23 02:11:12)

Offline

#198 2010-04-23 06:57:22

Ogion
Member
From: Germany
Registered: 2007-12-11
Posts: 367

Re: zathura - a PDF viewer

Uh. Maybe you should check the man page? man zathura

J      Go to next page

       K      Go to previous page

Works for me..

Ogion


(my-dotfiles)
"People willing to trade their freedom for temporary security deserve neither and will lose both." - Benjamin Franklin
"Enlightenment is man's leaving his self-caused immaturity." - Immanuel Kant

Offline

#199 2010-04-23 14:58:03

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: zathura - a PDF viewer

Line 83 in the config.def.h:

  {0,                  GDK_j,             sc_scroll,            NORMAL,   { UP } },

You notice something weird?


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#200 2010-04-23 17:50:04

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: zathura - a PDF viewer

Double Thanks!   This morning shift-j and shift-k work to go page by page in either direction.
Can't say why though some quirk plus/or me managed to be all wrong yesterday.
Or, one of the core update over past 24 hours tweaked something.  cool!
Ranger filemanager loads PDFs with zathura really nicely.

Last edited by yvonney (2010-04-23 17:53:15)

Offline

Board footer

Powered by FluxBB