From: Camm Maguire <camm@maguirefamily.org>
To: "Roland Winkler" <winkler@gnu.org>
Cc: joakim@verona.se, emacs-devel@gnu.org
Subject: Re: Djvu mode
Date: Mon, 03 Oct 2011 15:59:00 -0400 [thread overview]
Message-ID: <874nzpq22j.fsf@maguirefamily.org> (raw)
In-Reply-To: <20105.64927.931187.909507@gargle.gargle.HOWL> (Roland Winkler's message of "Mon\, 3 Oct 2011 13\:23\:27 -0500")
Greetings! OK here is the alignment patch:
--- djvm2.el 2011-09-22 14:19:41.000000000 +0000
+++ djvm3.el 2011-10-03 19:57:18.000000000 +0000
@@ -630,7 +630,10 @@
(defun djvm-box-to-rect (p c &optional perm)
(let* ((w (caar p))(w (cdr w))(xn (pop w))(yn (pop w))(xx (pop w))(yx (pop w))
(p (caar (last p)))(p (cdr p))(pxn (pop p))(pyn (pop p))(pxx (pop p))(pyx (pop p))
- (xn (- xn pxn))(xx (- xx pxn))(yn (- yn pyn))(yx (- yx pyn))(pxx (- pxx pxn))(pyx (- pyx pyn)))
+; (xn (- xn pxn))(yn (- yn pyn))
+; (xx (- xx pxn))(yx (- yx pyn))
+ (pxx (+ pxx pxn))(pyx (+ pyx pyn))
+ )
`(rect
,(/ (float xn) pxx)
,(- 1.0 (/ (float yx) pyx))
Thanks again!
"Roland Winkler" <winkler@gnu.org> writes:
> On Sun Oct 2 2011 Camm Maguire wrote:
>> Currently the code ignores but preserves non-djvm-mode produced
>> annotations, but this should be easy to add.
>
> I am sorry, I am confused! What kind of annotations are then added
> to the file? Are they incompatible with the standard djvu format?
> Why that?
>
>> Me too. This is the main point. I am currently using it for this
>> with success. I'm not really sure though whether text notes are best
>> placed in the file, as you have to click on the box to see them (in
>> emacs djvm mode or djview),
>
> Depending on how you set up the annotations. djview displays them
> immediately - at least for me (with DjVuLibre DjView 4.5 under GNU linux).
>
>> > nicely displays these annotations including any text layers they
>> > might have.
>>
>> Emacs with this mode does too, but just for the annotations it writes
>> itself at the moment. It labels these with a "djvm" comment.
>
> Why "djvm"? Why being incompatible?
>
>> This is a somewhat common indication of a poorly constructed text
>> layer by an early ocr engine. I've always cleared this by a fresh
>> ocrodjvu --in-place foo.djvu. Boxes then line up perfectly. I think
>> the ocr code has only very recently matured.
>
> Again I am confused. Take the djvu file I attached earlier in this
> thread (produced with pdf2djvu-0.7.7). If I search a word via
> djview, it highlights the matches such that the boxes are perfectly
> aligned with the text. So I assume that the djvu file is OK. Yet
> with your mode the highlighting is shifted relative to what it is
> supposed to match. Something is misaligned here.
> (My emacs is GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+
> Version 2.20.1) of 2011-09-19.)
>
> What am I missing here?
>
> Roland
>
>
>
>
--
Camm Maguire camm@maguirefamily.org
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah
next prev parent reply other threads:[~2011-10-03 19:59 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-27 20:17 highlighting large regions (comments) with font-lock keywords Eric Schulte
2011-09-28 1:30 ` Stefan Monnier
2011-09-28 13:08 ` Eric Schulte
2011-09-28 14:18 ` Djvu mode Camm Maguire
2011-09-28 16:50 ` Sivaram Neelakantan
2011-09-29 16:07 ` gnu-emacs-sources down? [was: Djvu mode] Roland Winkler
2011-09-29 16:21 ` gnu-emacs-sources down? Glenn Morris
2011-09-29 17:39 ` gnu-emacs-sources down? [was: Djvu mode] Sivaram Neelakantan
[not found] ` <87r52zl29j.fsf_-_@maguirefamily.org>
[not found] ` <20100.46983.768447.889306@gargle.gargle.HOWL>
[not found] ` <87d3ejgmmz.fsf@maguirefamily.org>
[not found] ` <20103.17789.10053.53615@gargle.gargle.HOWL>
2011-10-02 4:22 ` Djvu mode Camm Maguire
2011-10-03 18:23 ` Roland Winkler
2011-10-03 19:41 ` Camm Maguire
2011-10-03 19:59 ` Camm Maguire [this message]
2011-10-03 20:35 ` Camm Maguire
2011-10-04 6:20 ` Roland Winkler
2011-10-12 15:19 ` Camm Maguire
2011-10-14 12:52 ` Roland Winkler
2011-10-04 10:21 ` Roland Winkler
2011-09-28 21:02 ` Stefan Monnier
2011-09-29 6:26 ` Roland Winkler
2011-09-29 9:08 ` joakim
2011-09-29 19:07 ` Roland Winkler
2011-09-29 20:06 ` Camm Maguire
2011-09-29 21:34 ` joakim
2011-10-01 17:01 ` Roland Winkler
2011-10-01 17:19 ` joakim
2011-10-01 18:04 ` Roland Winkler
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874nzpq22j.fsf@maguirefamily.org \
--to=camm@maguirefamily.org \
--cc=emacs-devel@gnu.org \
--cc=joakim@verona.se \
--cc=winkler@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.