From: Tassilo Horn <tassilo@member.fsf.org>
To: sho nakatani <lay.sakura@gmail.com>
Cc: 8364@debbugs.gnu.org
Subject: bug#8364: 24.0.9999; PATCH: Fit to width/height/page for doc-view.el
Date: Mon, 28 Mar 2011 17:28:33 +0200 [thread overview]
Message-ID: <87k4fj6z8e.fsf@member.fsf.org> (raw)
In-Reply-To: <AANLkTineE71o8wFzq_PGEvnUSrK76mVRrcMeXNkGF_0-@mail.gmail.com> (sho nakatani's message of "Mon, 28 Mar 2011 23:56:14 +0900")
sho nakatani <lay.sakura@gmail.com> writes:
Hi!
>> Good, thanks. I'll still have to do it by hand, sadly, since I like
>> to "fit the text" rather than "fit the page", i.e. I like to keep the
>> margins outside of the viewable area. A command to do that
>> automatically would be really nifty.
>
> Sad to say, I have no idea to realize such function, although I completely
> agree with you.
> Currently, the scale factor for enlarge/shrink is determined by the ratio of
> the size of PNG image to the size of window. It is pretty difficult to specify
> where 'margins' are from PNG image.
Users can cut the margins using the slice feature (`s m'). The
information about the current slice (X Y WIDTH HEIGHT) can be accessed
using the `doc-view-current-slice' macro. So it seems doable to
calculate the right zoom factor and adjust the slice accordingly after
zooming if a slice was set. How that can be done is left as an exercise
to the reader. ;-)
Nakatani, feel free to implement that, and send updated patches to this
"bug" report.
> It might be possible if the scale factor is determined not from PNG
> image but from PDF/PS. However, it is far difficult than current
> implementation.
I'd advice not to add special-case code for certain kinds of documents.
Bye,
Tassilo
next prev parent reply other threads:[~2011-03-28 15:28 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-28 10:08 bug#8364: 24.0.9999; PATCH: Fit to width/height/page for doc-view.el Tassilo Horn
[not found] ` <handler.8364.B.130130692430672.ack@debbugs.gnu.org>
2011-03-28 10:38 ` bug#8364: Acknowledgement (24.0.9999; PATCH: Fit to width/height/page for doc-view.el) Tassilo Horn
2011-03-28 14:36 ` bug#8364: 24.0.9999; PATCH: Fit to width/height/page for doc-view.el Stefan Monnier
2011-03-28 14:56 ` sho nakatani
2011-03-28 15:17 ` Stefan Monnier
2011-03-29 9:32 ` joakim
2011-03-28 15:28 ` Tassilo Horn [this message]
2011-03-28 15:58 ` sho nakatani
2011-03-28 17:35 ` Tassilo Horn
2011-03-30 9:10 ` sho nakatani
2011-03-30 10:20 ` Tassilo Horn
[not found] ` <AANLkTinuF6KanSo5XuTQOm+G-+qHzS8QM9zMy3S73-_g@mail.gmail.com>
2011-03-30 13:18 ` Tassilo Horn
2011-03-30 14:35 ` sho nakatani
2011-03-30 15:17 ` Tassilo Horn
2011-03-30 15:49 ` sho nakatani
2011-03-30 17:07 ` Tassilo Horn
2011-03-30 17:13 ` sho nakatani
2011-03-30 14:42 ` Stefan Monnier
2011-03-30 15:08 ` Tassilo Horn
2011-03-30 21:07 ` Stefan Monnier
2011-03-31 6:32 ` Tassilo Horn
2011-03-31 6:57 ` sho nakatani
2011-03-31 7:47 ` Tassilo Horn
2011-04-08 16:18 ` Chong Yidong
2011-04-08 20:12 ` Tassilo Horn
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k4fj6z8e.fsf@member.fsf.org \
--to=tassilo@member.fsf.org \
--cc=8364@debbugs.gnu.org \
--cc=lay.sakura@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).