Jaliste's blog
Tuesday, September 9, 2014
Evince Highlighting support
So this is a quick update on Giselle post on SoC. (see here) There you could see a screencast of highlighting working but with a big lag. It turns out that the lag was related to a memory leak on the cache engine that only was triggered when doing the "animation" in the drag-and-drop of the highlighting annotation. Giselle luckily fixed this already, and I managed to spend some time adding new API to poppler to render the annotation directly, without need of reloading the page as we were force to before. Thus, we get an even smoother animation, as you can see here.
Monday, April 15, 2013
Building evince with jhbuild under a fresh install of Ubuntu 12.04
In the last year or so, Jhbuild has received a lot of love and know it is much easier to use (for the first time) than it used to, but how much? Since Google Summer of Code is coming, I wondered whether was easy for a person with no experience building GNOME to build Evince. It turns out it is not that trivial, although it is quite better than the first time I managed to compile Evince using jhbuild. Since the Jhbuild manual seems to be still a little outdated, I publish here the steps I needed, on a fresh install of Ubuntu 12.04.
NOTE: For the time being, this will give you an error because jhbuild won't compile libsecret when compiling using --ignore-suggests. See this bug for more info. If it fails for you with a LIBSECRET not found error, then start a shell, do
and then resume the compilation of evince. If you want, you could do, at this stage
We use --ignore-suggests to ignore compiling a lot of modules that are not really important for developping with evince.
If everything goes right, you should have evince 3.8 compiled. If you want master, you need to choose the "gnome-suites-core-3.10" moduleset
- Install all the things jhbuild won't install for you.
$sudo apt-get install build-essential $sudo apt-get install git $sudo apt-get install gettext xsltproc docbook-xml docbook-xsl $sudo apt-get install apt-file autopoint
- Install jhbuild from git (if you have previously installed from apt-get, use apt-get remove jhbuild to remove it)
$git clone git://git.gnome.org/jhbuild $cd jhbuild $./autogen.sh $make $make install $echo PATH=$PATH:~/.local/bin >> ~/.bashrc
- Prepare your first .jhbuildrc config file.
$cp examples/sample.jhbuildrc ~/.jhbuildrc
- Edit ~/.jhbuildrc file
- Search for the line starting with "prefix" and change the directory to a writable one (the default /opt/gnome is not writable by default on ubuntu it seems)
- For evince, you need to add the following lines to ~/.jhbuildrc
skip=['libnotify','polkit','nautilus','vala'] module_autogenargs['evince'] = autogenargs + ' --enable-debug --disable-nautilus'
- Install dependencies using the new "sysdeps" command of jhbuild
$jhbuild sysdeps --install
- Building evince
$jhbuild build evince --ignore-suggests --nodeps
$jhbuild buildone libsecret
and then resume the compilation of evince. If you want, you could do, at this stage
$jhbuild buildone evinceto trigger just the compilation of evince and NONE of its dependencies.
We use --ignore-suggests to ignore compiling a lot of modules that are not really important for developping with evince.
If everything goes right, you should have evince 3.8 compiled. If you want master, you need to choose the "gnome-suites-core-3.10" moduleset
Sunday, November 18, 2012
Tiling rendering in Evince
One of the oldest bug in evince is the ability to zoom-in a large scales, like 1600% or more. This happens because the Cache that render the pages can only render full pages and rendering full pages at large scales eats a lot of memory. So some days ago I started to work on making the cache in evince "tile" aware, that is, to render only portions of a full page. I am happy to say that a preliminary result can be found in
my evince repo in github (github.com/jaliste/evince) in the wip/tiling_manager branch. Right now a lot of things still don't work, but tile rendering in single and continuous mode are working (not in dual mode yet)...
In the video above, you can see evince rendering a page using 256 tiles. The red tiles only appear while there is no rendered tile, and are just there to test the code.
Note that the rendering 256 tiles is quite slow because Poppler will reparse the pdf file each time we render a tile... So why bother? In fact, the video is only for ilustration, ideally evince will use tiles of the size of the screen or around that size, so you only get to see a few tiles at a time. The main advantage of this code is that now we can easily implement larger zoom modes. The next picture shows Evince running the Pdf 1.7 reference document at 1600% using 256 tiles for each page. Memory used by evince is around 150 M with this.
Unfortunately, there are a lot of things that still don't work...selections, dual_page mode, and other... Also since this is a main refactor/rework of the Cache code, it will need a lot of testing and review before it gets merged into master (as new code it is likely to have more bugs and we don't want to evince to be unstable) ... but we are right in the begining of the 3.7 cycle, so I hope I can get this merged into evince 3.8.
my evince repo in github (github.com/jaliste/evince) in the wip/tiling_manager branch. Right now a lot of things still don't work, but tile rendering in single and continuous mode are working (not in dual mode yet)...
In the video above, you can see evince rendering a page using 256 tiles. The red tiles only appear while there is no rendered tile, and are just there to test the code.
Note that the rendering 256 tiles is quite slow because Poppler will reparse the pdf file each time we render a tile... So why bother? In fact, the video is only for ilustration, ideally evince will use tiles of the size of the screen or around that size, so you only get to see a few tiles at a time. The main advantage of this code is that now we can easily implement larger zoom modes. The next picture shows Evince running the Pdf 1.7 reference document at 1600% using 256 tiles for each page. Memory used by evince is around 150 M with this.
Unfortunately, there are a lot of things that still don't work...selections, dual_page mode, and other... Also since this is a main refactor/rework of the Cache code, it will need a lot of testing and review before it gets merged into master (as new code it is likely to have more bugs and we don't want to evince to be unstable) ... but we are right in the begining of the 3.7 cycle, so I hope I can get this merged into evince 3.8.
Tuesday, October 11, 2011
About a trip to Canada, or Montreal Summit
So in the last two weeks I have been for the first time in Canada. I was first some days at the Banff Centre, which is awesome, and spent last weekend in Montreal for the GNOME Montreal Summit.
This was my first international GNOME (no)conference, and it was great to finally meet people like Colin, Owen, Ryan, Cosimo, Karen, etc.
I discussed and asked a lot of questions to Ryan, Cosimo and Colin about some ideas of the future of Evince related technologies. For instance, we agreed with Cosimo that it probably makes sense to have a evince-based plugin for your browser (finally!!) because it could be better for the workflow where you don't
want to download the document (and you don't need to). I also asked Ryan and Colin for ways of making evince safer by splitting the rendering code into a sandboxed process. And I asked many other things with cosimo about evince, gtk, css.
I also participated in some sessions like the jhbuild session, the GSoC session, and I even organized a short session about online metadata for our desktop. Although not many people were excited about my ideas, it was nevertheless great to have the feedback of many talented hackers in GNOME.
I also discussed with Andreas the idea of getting some cool Laptop Skins with GNOME designs, so hopefully he will get some cool designs soon, and with Marina I discussed about Women outreach and how the gnome-chile community is working to promote GNOME and all these programs.
Overall, it was really great for me to meet all the prople, and I thank all the people i met for all their feedback, surely I have now a lot of ideas about how to improve evince... if only i would have more time. The GNOME Foundation for sponsornig my trip and to an anonymous friend for letting me crash at his couch on Montreal.
Time to go into the plain.... some 10 hours ahead to be back in a sunny Santiago again
This was my first international GNOME (no)conference, and it was great to finally meet people like Colin, Owen, Ryan, Cosimo, Karen, etc.
I discussed and asked a lot of questions to Ryan, Cosimo and Colin about some ideas of the future of Evince related technologies. For instance, we agreed with Cosimo that it probably makes sense to have a evince-based plugin for your browser (finally!!) because it could be better for the workflow where you don't
want to download the document (and you don't need to). I also asked Ryan and Colin for ways of making evince safer by splitting the rendering code into a sandboxed process. And I asked many other things with cosimo about evince, gtk, css.
I also participated in some sessions like the jhbuild session, the GSoC session, and I even organized a short session about online metadata for our desktop. Although not many people were excited about my ideas, it was nevertheless great to have the feedback of many talented hackers in GNOME.
I also discussed with Andreas the idea of getting some cool Laptop Skins with GNOME designs, so hopefully he will get some cool designs soon, and with Marina I discussed about Women outreach and how the gnome-chile community is working to promote GNOME and all these programs.
Overall, it was really great for me to meet all the prople, and I thank all the people i met for all their feedback, surely I have now a lot of ideas about how to improve evince... if only i would have more time. The GNOME Foundation for sponsornig my trip and to an anonymous friend for letting me crash at his couch on Montreal.
Time to go into the plain.... some 10 hours ahead to be back in a sunny Santiago again
Saturday, September 17, 2011
I am going to the Montreal Summit
This is just a quick note to say that I am going to the Montreal GNOME Summit. Contrary that for many the move from Boston to Montreal was bad, I just happened to be in Canada on the same dates, so for me it was a lucky move! I am looking forward to meet some GNOME devs for the first time on live.
Greets
Greets
Sunday, September 11, 2011
Gedit-latex has been ported to Gedit 3.
So this post is to announce that I just have released gedit-latex 3.1.1. This is the first (unstable) release of Gtk3 port we did of the great plugin by Michael Zeising. You can download it from http://download.gnome.org/sources/gedit-latex/3.1/ and please file bugs against GNOME Bugzilla (product:gedit component:latex). We have been using it for quite some time and should be fairly stable. We hope to release Gedit-latex 3.2 along wi th the GNOME 3.2 Release.
Many thanks to Ignacio Casal Quinteiro, John Stowers, Lucas Roesler and Michael Zeising for all their help.
Enjoy!
Many thanks to Ignacio Casal Quinteiro, John Stowers, Lucas Roesler and Michael Zeising for all their help.
Enjoy!
Friday, August 13, 2010
SyncTeX support in Gnome 2.32
In the 2.32 release, Gnome is getting SyncTeX support. For those of you that don't use LaTeX, SyncTeX is a method (created by Jêrome Laurens) that enables synchronization between the TeX source file and the resulting Pdf or Dvi output. Here the required screencast.
So to implement SyncTeX in Gnome, together with Carlos Garcia Campos we added SyncTeX support to evince and exported a new DBUS API so editors can communicate with Evince. Next, I added a "synctex" plugin for gedit, to use the DBUS API exported by Evince. We support both Backward Search (Evince to Gedit synchronization) and Forward Search (Gedit to Evince synchronization).
We also added a new modeline parser, so if you add a complex project with several TeX files you can put
So to implement SyncTeX in Gnome, together with Carlos Garcia Campos we added SyncTeX support to evince and exported a new DBUS API so editors can communicate with Evince. Next, I added a "synctex" plugin for gedit, to use the DBUS API exported by Evince. We support both Backward Search (Evince to Gedit synchronization) and Forward Search (Gedit to Evince synchronization).
We also added a new modeline parser, so if you add a complex project with several TeX files you can put
% mainfile: mainfile.texeither in the first or last three lines of each included TeX file, and ForwardSearch will just work (BackwardSearch should always work, even if you don't add the modeline).
Subscribe to:
Posts (Atom)