[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Djvu mode
From: |
Camm Maguire |
Subject: |
Re: Djvu mode |
Date: |
Mon, 03 Oct 2011 15:59:00 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
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" <address@hidden> 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 address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah
- Re: Djvu mode, Roland Winkler, 2011/10/01
- Re: Djvu mode, Camm Maguire, 2011/10/03
- Re: Djvu mode, Roland Winkler, 2011/10/03
- Re: Djvu mode, Camm Maguire, 2011/10/03
- Re: Djvu mode,
Camm Maguire <=
- Re: Djvu mode, Camm Maguire, 2011/10/03
- Re: Djvu mode, Roland Winkler, 2011/10/04
- Re: Djvu mode, Camm Maguire, 2011/10/12
- Re: Djvu mode, Roland Winkler, 2011/10/14
- Re: Djvu mode, Roland Winkler, 2011/10/04