Espruino Reference PDF

Posted on
  • Hi. Been lurking here for a while. Having lots of fun playing with my shiny new pico. Is there a pdf version of the espruino reference? I'd like to be able to read it on my Kindle offline.

    Thanks, Rob.

  • Hi Rob,

    Someone else was asking about this too - there isn't one right now, but I did add a Printable Version link down the bottom of each page. For instance here's the Reference one. You could then print that page to a PDF file yourself.

    Unfortunately there are no page numbers - I did have a go, but it seems that it's really hard to do in a Web Browser at the moment. If someone could come up with some CSS/HTML/JS that I could put on those 'Printable Pages' that'd allow the table of contents of the Reference to show the correct page numbers I'd love to include it though.

  • @Gordon, if it is a single html page, you do not need page numbers to work. It just needs the proper anchors and linking of anchors and the printed pdf will do it just right... (html in browser can though have some more convenience suggar: jumped-to heading is dynamically highlighted, which helps to direct reader's attention when more than one heading is shown on the 'page' / in the view port.

    I'm working on the testing doc as html page and use a bit of js - how dare I ;) - to crate (client-side) the table of content and back-linking from the headings back to the table of content... and cross reference links (to headings, tables/images (captions))... something like that on the Espruino reference page would solve the issue (the 'missing' backlinking I mentioned in an earlier comment'). Im attaching the pdf - where you can check the linking - and I'm also attaching the source I'm using (html file and colocated image (sub-)directory for relatively addressing images... Opening the html in the unzipped dir and creating the pdf does it (I'm using chrome on OS X). I expect that pdf internal links are properly handled in reader devices, such as kindle and alike.

    I know that your pages are created a bit diffent - including toc - actually server side, which should make some of the things even easier... just did not have the time / guts (yet) to get into that and propose a back linking solution...

    Notes:

    • I stayed on a very frugal side in regard of css... but that's all up for grabs to make a better looking job.
    • The js code is pretty concise/terse - I had not planned to publish for use by others (yet), therefore the doc is rudimentary too...
    • The only restriction for simple use is that headings have to be unique.

    2 Attachments

  • @Gordon, that's perfect for what I need. Thanks.

  • @allObjects thanks - my problem was actually more with the Reference page. That already contains a ToC, and that links and is fine for Kindle.

    However some people still like printed copies, and when printed the hyperlinks don't work - at least not on my printer :)

    I guess ideally:

    Array
    -----
    * constructor Array(args, ...)
    * function Array.concat(args, ...)
    * function Array.every(function, thisArg)
    

    would turn to:

    Array  ........................................­...... Page 5
    -----
    * constructor Array(args, ...)  ..................... Page 6
    * function Array.concat(args, ...) .................. Page 7
    * function Array.every(function, thisArg) ........... Page 8
    

    and links in the text might be of the form:

    see E.openFile (page 30) for more information.
    

    But this kind of thing isn't handled at all well by the Web Browser. It looks like it's only Opera that's implemented something usable, but virtually nobody uses that :(

  • I know about presence of the toc and forward links... but there are no links to go back...

    For what you are looking - print on paper with page referencing - is DTP, with a two-pass process: 1. do the rendering, which means formatting and page-breaking according to the given page size/layout parameters, 2. go through the references - hyperlinks - and add various formats the page numbers: in a toc as you showed column-adjusted, in an inline link just adding the page number to the link text. With a multi-file (web page) document, a master document is required and things get worse (I used Adobe's Framemaker to author books of several 100 pages... - but it requires a different setup: the html would be published by the FrameMaker... and so also the pdf version - with all references just fine in browser, pdf in reader, and paper/hard-copy).

    I did not know about this Opera feature... shame on me because I used Opera some time ago quite extensively.

  • print on paper with page referencing is ... a two-pass process

    Yes - however I had hoped that there would be a JavaScript library to handle that already!

    With a multi-file (web page) document, a master document is required and things get worse

    Agreed - it'd be a complete pain unless all the docs were merged into one file.

    I could do that, but I'm not sure that's really something anyone needs at the moment.

    Opera feature

    It's this: http://stackoverflow.com/questions/15797­161/browser-support-for-css-page-numbers­

    I'm not 100% sure it is supported in Opera now - maybe nothing supports it and that user posted an answer without trying it :( It would have been perfect though.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Espruino Reference PDF

Posted by Avatar for RobR @RobR

Actions