Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 03-21-2021, 05:47 AM   #1
reinsley
Connoisseur
reinsley began at the beginning.
 
reinsley's Avatar
 
Posts: 65
Karma: 10
Join Date: Dec 2016
Location: France
Device: Kindle PaperWhite
MCQ code (for Multiple Choice Question) in epub format

Hello,

I am looking for an example of MCQ (for Multiple Choice Question) in epub format.
I have a weather forecast paper manual for gliding. It's a pity to not convert it to epub. I have no idea how to start this project and a piece of code will be appreciated to see throught Calibre.

Epub or mobi format example are welcome as I will read it on a Kindle. The format conversion could be an issue.

Thank you for any help and good idea.

Best regards
reinsley is offline   Reply With Quote
Old 03-21-2021, 08:31 AM   #2
fbrzvnrnd
Fanatic
fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.
 
Posts: 557
Karma: 400004
Join Date: Feb 2009
Device: ONYX M96
Quote:
Originally Posted by reinsley View Post
Hello,

I am looking for an example of MCQ (for Multiple Choice Question) in epub format.
I have a weather forecast paper manual for gliding. It's a pity to not convert it to epub. I have no idea how to start this project and a piece of code will be appreciated to see throught Calibre.

Epub or mobi format example are welcome as I will read it on a Kindle. The format conversion could be an issue.

Thank you for any help and good idea.

Best regards
If you are talking about a form with questions and a score for the user, you cannot do this on Kindle or ePub2, you have to use EPUB3 and write some code in javascript. Or, in kindle formats and ePub2, you can create something similar to a tree structure where the wrong question brings to a dead end, and the correct one brings to another question (like a "choose you own adventure"). But you can not stop a user from turn a page and "jump" in another random place of the tree: you can not really create a "dead end" in ePub or Kindle (sigh).
fbrzvnrnd is offline   Reply With Quote
Advert
Old 03-21-2021, 12:45 PM   #3
reinsley
Connoisseur
reinsley began at the beginning.
 
reinsley's Avatar
 
Posts: 65
Karma: 10
Join Date: Dec 2016
Location: France
Device: Kindle PaperWhite
Thank so much for your help.
I am looking for your second option. A "choose your own adventure".
A good answer brings you to another new question.
A bad answer brings you to revise and reread a chapter or an explanation you did not get it.

It's a tutorial, if the reader wants to cheat, too bad for him.
If I could restart from the last entry of the last session, it will be a plus.
These points are cosmetic options as the main thing is the whole structure. Texts, images ( clouds' photos, diagrams, patterns...) and links to go to the next question or to force to read the not well understood point.
reinsley is offline   Reply With Quote
Old 03-21-2021, 01:48 PM   #4
fbrzvnrnd
Fanatic
fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.
 
Posts: 557
Karma: 400004
Join Date: Feb 2009
Device: ONYX M96
Quote:
Originally Posted by reinsley View Post
Thank so much for your help.
I am looking for your second option. A "choose your own adventure".
So, the code is quite simple: link. Every item is a link to a "chapter". Every chapter (my suggestion) a different file.
In the "right answer" chapter you will create another form with questions and so on.

The tag for link is <a href="nameofthefile">answer</a>.

This an example from a ebook "choose your own adventure" I created:

Code:
    <body>
<div id="t24" class="stanza">
            <h2 class="sigil_not_in_toc">Un enorme masso scuro</h2>
            <p>A fatica raggiungi la base di questo masso che si erge eretto come un monolite primitivo. L'umidità ha favorito la crescita di <a href="mens_0029.xhtml">rampicanti e felci</a> che coprono buona parte della roccia.</p>
            <p>Alzando gli occhi, <a href="mens_0008.xhtml">torni a guardarti attorno</a>.</p>
        </div>
</body>
fbrzvnrnd is offline   Reply With Quote
Old 03-22-2021, 05:27 AM   #5
reinsley
Connoisseur
reinsley began at the beginning.
 
reinsley's Avatar
 
Posts: 65
Karma: 10
Join Date: Dec 2016
Location: France
Device: Kindle PaperWhite
I appreciate your help.
Thank you very much.
reinsley is offline   Reply With Quote
Advert
Old 03-22-2021, 06:58 AM   #6
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,010
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Or add an anchor/bookmark in the source file at the destination start of paragraph, and then the URL for that is prefixed with # on each answer link.
Quoth is offline   Reply With Quote
Old 03-22-2021, 08:09 AM   #7
fbrzvnrnd
Fanatic
fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.
 
Posts: 557
Karma: 400004
Join Date: Feb 2009
Device: ONYX M96
Quote:
Originally Posted by Quoth View Post
Or add an anchor/bookmark in the source file at the destination start of paragraph, and then the URL for that is prefixed with # on each answer link.
Yes, in this case you also have to split the ebook in different files and transform internal link to external to be sure the answers will appear on different pages (Sigil does this).
fbrzvnrnd is offline   Reply With Quote
Old 03-22-2021, 09:24 AM   #8
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,010
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Or simply use a style with Page Break Before in the Wordprocessor at the start of each answer. Don't make it a heading style unless you want it in the TOC.

I've never needed to explicitly decide file breaks. Calibre does it fine with a properly styled DOCX as input source.

There was originally in Mobi, recognised by Mobi creator if you used HTML source, a tag that meant don't page past here, so you COULD make parts of the ebook accessible only via links. I tested this years ago with MS Word 2002 on XP:
1) Export as HTML*
2) Clean ghastly MS generated HTML
3) Add the no page tags.
4) Import into Mobi Creator.

At the time I only had a Mobi viewer for XP, which I read gutenberg on. No suitable smart phone, tablet or eink till years later. I gave up on the idea of doing the Plot Your Own Adventure because there was no mechanism to score. A Client Side HTML image map would have been nice too. Crazy that epub2 and KF8 never added it.

* Back then OpenOffice Writer generated better / cleaner HTML. But import of MS Word wasn't great then. Import of doc or docx to LibreOffice Writer today depends on how insane the Word doc formatting is. LO does better HTML and PDF than Word2007, but Sigil or Calibre make better epub2 than the LO plugin or built in.

Last edited by Quoth; 03-22-2021 at 09:37 AM. Reason: OO
Quoth is offline   Reply With Quote
Old 03-22-2021, 10:25 AM   #9
fbrzvnrnd
Fanatic
fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.
 
Posts: 557
Karma: 400004
Join Date: Feb 2009
Device: ONYX M96
Quote:
Originally Posted by Quoth View Post
Or simply use a style with Page Break Before in the Wordprocessor at the start of each answer. Don't make it a heading style unless you want it in the TOC.
Ok, I don't use WP, so I do it directly in XML.

Quote:
Originally Posted by Quoth View Post

I've never needed to explicitly decide file breaks. Calibre does it fine with a properly styled DOCX as input source.
In ePub2 I usually work on a single large XHTML file with internal links. It is faster for editing. When all is ready, I use Sigil to split the single sections. Usually. For some works the author created a software to do this. One of our ebooks has 5000 locations with 11.000 internal links, so it is better automatize this job.

Quote:
Originally Posted by Quoth View Post

There was originally in Mobi, recognised by Mobi creator if you used HTML source, a tag that meant don't page past here, so you COULD make parts of the ebook accessible only via links
I know... and I tested it a lot, but the support on Kindle was poor. There is another way to do it on ePub, and I build an ebook using it: create an ebook with the first page as linear="yes" and the rest of the book with linear="no". It works... but only with some software, so I published it as "experiment". iBooks for example creates a web page (!) for the linear="no", so it is not readable on iBooks.

Quote:
Originally Posted by Quoth View Post

Crazy that epub2 and KF8 never added it.
The big problem is the book: all the e-book formats give you the tools to create a analogic-book-in-digital instead of a digital one.

f.
fbrzvnrnd is offline   Reply With Quote
Old 03-23-2021, 01:04 PM   #10
reinsley
Connoisseur
reinsley began at the beginning.
 
reinsley's Avatar
 
Posts: 65
Karma: 10
Join Date: Dec 2016
Location: France
Device: Kindle PaperWhite
Gents,

I started a test epub. I did not imagine the structure it would take.
Obviously, with your experience, you anticipate all the sensitive points.

For the page break, I will probably use :

Into stylessheet.css :
.WordSection {
display: block;
page: WordSection1
}

or </br>, I will see.

For the score I could write a reminder of the questions total number in the theme or section. As the reader comes back to the sub-section as long he is wrong, he can see the progression, question4... question5...question6 out of ten. And a kind of progress bar with stars or something.
And a note could send some kind of popup message. It's still abstract for now, the simplier will decide.
WRONG leads again to the start of the question, CORRECT leads to the next question. And a link to go to the next sub-section as the reader could be trapped without exit.

I don't know if I can post into the forum my skeleton epub, in case anybody would like to comment...

I keep your precious advices about Export as HTML and also Sigil tools.
I use plugin Sigil to make links.

Best regards

Last edited by reinsley; 03-23-2021 at 01:11 PM.
reinsley is offline   Reply With Quote
Old 03-24-2021, 07:00 AM   #11
fbrzvnrnd
Fanatic
fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.
 
Posts: 557
Karma: 400004
Join Date: Feb 2009
Device: ONYX M96
Quote:
Originally Posted by reinsley View Post
For the page break, I will probably use :

Into stylessheet.css :
.WordSection {
display: block;
page: WordSection1
}
Uhm, I do not understand what are you using to develope the ebook...
fbrzvnrnd is offline   Reply With Quote
Old 03-24-2021, 07:13 AM   #12
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 802
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
Quote:
Originally Posted by reinsley View Post
Thank so much for your help.
I am looking for your second option. A "choose your own adventure".
A good answer brings you to another new question.
A bad answer brings you to revise and reread a chapter or an explanation you did not get it.

It's a tutorial, if the reader wants to cheat, too bad for him.
If I could restart from the last entry of the last session, it will be a plus.
These points are cosmetic options as the main thing is the whole structure. Texts, images ( clouds' photos, diagrams, patterns...) and links to go to the next question or to force to read the not well understood point.
I loved this kind of tutorial when I was younger in pBook form. I also loved the "choose your own adventure". when they appeared.

Some "choose your own adventure" books have definitely been turned into ebooks. I have one or two so it is definitely possible and from cleaning up the code, they are not particularly difficult to code.
Thasaidon is offline   Reply With Quote
Old 03-24-2021, 09:47 AM   #13
reinsley
Connoisseur
reinsley began at the beginning.
 
reinsley's Avatar
 
Posts: 65
Karma: 10
Join Date: Dec 2016
Location: France
Device: Kindle PaperWhite
Quote:
Originally Posted by fbrzvnrnd View Post
Uhm, I do not understand what ...
Er ! you are right, it does not work.
I used to store a chapter in a single html file.
So the page jump is automatic.
In this case it makes too many html files.
I should have 10 html files for questions, and 10 html files for answers.
And a page jump after each question to display only one question at a time.
I have to do my homework.

I use Calibre and sometimes Sigil for the links automation.
Another minor thing. The Calibre convertion epub to azw3 does not keep my links.

To evaluate the job : 10 chapters, 515 questions with 3 or 4 MCQ for each, it means about 1800 choices ( links), and 10 MCQ final test for each chapter ( about 150 questions with 8 to 25 choices) it means about 2200 choices ( links).

The automation with Sigil's plugin Footnotelinker is useless. The 4000 links or more must be build by hand. Some line should have two links.

I have a better view of the job. Even if I don't know how to do it for some points.
reinsley is offline   Reply With Quote
Old 03-24-2021, 09:53 AM   #14
fbrzvnrnd
Fanatic
fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.fbrzvnrnd ought to be getting tired of karma fortunes by now.
 
Posts: 557
Karma: 400004
Join Date: Feb 2009
Device: ONYX M96
Quote:
Originally Posted by reinsley View Post
Er ! you are right, it does not work.
I used to store a chapter in a single html file.
So the page jump is automatic.
In this case it makes too many html files.
I should have 10 html files for questions, and 10 html files for answers.
And a page jump after each question to display only one question at a time.
I have to do my homework.

I use Calibre and sometimes Sigil for the links automation.
Another minor thing. The Calibre convertion epub to azw3 does not keep my links.

To evaluate the job : 10 chapters, 515 questions with 3 or 4 MCQ for each, it means about 1800 choices ( links), and 10 MCQ final test for each chapter ( about 150 questions with 8 to 25 choices) it means about 2200 choices ( links).

The automation with Sigil's plugin Footnotelinker is useless. The 4000 links or more must be build by hand. Some line should have two links.

I have a better view of the job. Even if I don't know how to do it for some points.
The wrong answers link to a standard "wrong page" or there are informations about the error?
fbrzvnrnd is offline   Reply With Quote
Old 03-25-2021, 01:32 PM   #15
reinsley
Connoisseur
reinsley began at the beginning.
 
reinsley's Avatar
 
Posts: 65
Karma: 10
Join Date: Dec 2016
Location: France
Device: Kindle PaperWhite
Quote:
Originally Posted by fbrzvnrnd View Post
The wrong answers link to a standard "wrong page" or there are informations about the error?


Good question. Just a recap of the answer and the word Correct or Wrong.
What I did : one question with 4 MCQ and 4 links towards the 4 answers. The correct A has a link to the next question.
The 3 wrong A have the same texte and the same link to comeback to the same question.
I could simplify.
One good A links to the next step and one text only for the wrong 3 answers with the same link.

I discover a strange thing. The links are ok now but the popup footnote does not work anymore. I jump to the Answer.html, it's not easy to read as I see the full texte.
I have to restart with the footnote links that display one answer only. This is the equivalent to display a endnote at a time.


I found a guide : Kindle Publishing Guidelines : How to make books available for Kindle devices and applications
I have to dig inside, it may help.

By the way, the conversion epub to azw3 keeps the links.
The pagebreak works fine and is done with
.pagejump {
page-break-before:always;
}
If I convert epub to epub, Calibre kills my page, swallows the pagebreak and it splits the page in little chapter.html as many as it meets a page break.

Not so simple but its a good training.
reinsley is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Epub code question dynabook ePub 1 05-09-2017 02:42 PM
Smashwords and ePub format question yarndog ePub 31 01-04-2012 11:57 AM
Untitled.ePub-Sigil and Code question soulartist Sigil 3 12-09-2010 05:06 PM
question about move to epub format kelly1010 Sony Reader 1 12-22-2009 01:52 AM
Question about lrx vs epub format jfinli Sony Reader 2 05-27-2009 08:15 AM


All times are GMT -4. The time now is 03:01 AM.


MobileRead.com is a privately owned, operated and funded community.