Add go-to-page facilty.

Issue #21 resolved
Philip Burns created an issue

Add a facility for going to a specific page (by page offset?) in the text.

Comments (6)

  1. Craig Berry

    One way to do this would be to duplicate the existing table of contents except having the new variant page-oriented rather than div-oriented as the existing one is. The two TOCs could be two different tabs.

    Another possibility is a slider similar to what the Internet Archive has.

  2. Martin Mueller

    I’d vote for the slider, if it isn’t a lot harder to do. It’s an intuitive and ‘haptic’ way of getting there.

  3. Philip Burns reporter

    Craig Berry wrote:

    Here's an example from the Encyclopedia of Chicago which combines a table of contents with the OpenSeadragon facility for displaying an image reference strip.

    http://www.encyclopedia.chicagohistory.org/pages/11094.html

    The problem is that this only works when you have an image for every page. Texts with missing images would need placeholder images added, and texts without images wouldn't work at all. I'm not sure about an image strip using the Internet Archive as a source, particularly for a large texts. I imagine it would be quite slow. It might be possible to precompute indices for each texts, but that starts to get complicated to support.

    Creating a page-based table of contents would work for all texts. The vertical scroll bar would act something like a slider.

    It might interesting to think about a combined table of contents with both divs and page images. It probably would be cleaner to have a tabbed pair as Craig suggests. How to handle navigation when in div mode versus page mode would take some thought.

    -- Philip R. "Pib" Burns Academic and Research Technologies Northwestern University, Evanston, IL. USA pib@northwestern.edu

  4. Craig Berry

    I think the way to do a slider would be to have eXist construct a list of page references similar to how it constructs the list of div references for the existing table of contents. The index would just be an integer indicating which page counting from zero, but the value would be the series of page references 001-a, 001-b, 002-a, 002-b, etc., with omissions for blank pages. Then the slider would need to show the value (not the index) as a tooltip.

    I think this one can do that:

    https://cdnjs.com/libraries/bootstrap-slider

    See example 23 here:

    http://seiyria.com/bootstrap-slider/

    But the index and the more or less human-readable EEBO page reference are not enough; the fact that you have chosen page 003-b of Rule a Wife and Have a Wife does not by itself tell you to navigate to this URL:

    https://shc.earlyprint.org/shc/works/A00967.xml?root=2.5.5.3.6&odd=nuteisimple-annotate.odd&view=page

    where the 2.5.5.3.6 is an internal eXist reference. That reference would have to be constructed and included into whatever data structure lies behind the slider.

  5. Martin Mueller

    I’ve though a little more about why I like the slider idea if it can be implemented. The main reason is that we are stuck with ugly image numbers like ‘003-b’ etc. Getting the user to input those correctly ( or remember them in the first place) is tough. The slider handles that more elegantly: you move roughly where you think you want to go and then adjust left or right until you find what you want.

  6. Craig Berry

    Resolved with:

    commit 358f4ece1dbf542ef24c559f643805c0eb4c0d48
    Author: Craig A. Berry <craigberry@mac.com>
    Date:   Sat Aug 26 17:54:27 2017 -0500
    
        Add a page navigation slider.
    
        It uses the HTML5 range input type and some ajax to get both
        the xml:id's of the <pb> elements and the eXist internal node
        identifier for each page in the document.  Mouse up on the
        slider chooses whatever page matches the current index and
        navigates to that page.
    
  7. Log in to comment