I
I
Igogo20122015-04-17 17:38:09
Programming
Igogo2012, 2015-04-17 17:38:09

What formula should I use?

Hi all!
Need help with the following situation:

  • I have an e-book with 100 pages
  • with 10th font size
  • open let's say 5th
  • this (5th) page is being bookmarked
  • then the font size changes, for example, to the 20th (that is, there are already twice as many pages as 200)
  • I need a formula that will help find the page on which the bookmark was created

In the example, he indicated beautiful numbers, but in real practice there will be completely different font sizes and the number of pages for books.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
R
RR, 2015-04-17
@romkaby

easier to bind a bookmark to, for example, a paragraph/character number in a book

E
Evgeny Petrov, 2015-04-17
@Petroveg

There are certainly chapters in the book (after all, it is not written all the time) and the appearance of several lines on a new page will increase their number by a leap, clearly not corresponding to an increase in size.
Let's add here the dependence of the number of lines on the length of words, as a result of which the increase in the number of lines occurs in jumps, not necessarily according to the increase in size.
For gas station, we will take into account short paragraphs, which may not change or change at all, but, say, only 3 out of 2 lines come out.
Bottom line: you will hardly find such an exact dependence. Or become an ace linguist.

V
Vladimir Martyanov, 2015-04-17
@vilgeforce

In general, no way. For one text, the line break will be one, for the other it will be completely different, as a result there will be a different number of lines.

M
mamkaololosha, 2015-04-17
@mamkaololosha

Page number *= currentFontSzie/defaultFontSize

D
DISaccount, 2015-04-17
@DISaccount

Alternatively, keep in mind a structure in which there are two lines of page indexes - a word at the beginning of the page, and a word at the end of the page.

P
Puma Thailand, 2015-04-17
@opium

It is logical to bookmark the first paragraph on the page since it is natural for the reader, that is, if he consciously stopped reading just before the first paragraph on the page

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question