Currently, if want to show a large chunk of code, there are two options: show all of it in the <screen> or <programlisting> output, or have an appendix at the end of the book. Neither one of these is great from the user perspective. It would be good to have the ability to provide a snippet of code, for example 5-10 lines, and then have a link that allows the user to click on it to see all of the code. For example: <programlisting> line 1 line 2 line 3 ........ </programlisting> Click here to see all the code This keeps the book clean with no long pieces of code, but provides the user an option to see all of the code. Preferably, when the user clicks to see all of the code, it opens a new tab in their browser.
If you set role="popper" on a program listing, screen, or synposis, it will: 1: add a 'Show All' link to the top 2: show the first 4.5 lines of code 3: add a dashed border to the bottom Clicking "Show All" will reveal the rest of teh content and change the link to "Hide". Demo is two list items above http://fedorapeople.org/~jfearn/HTML5_Test/html/chap-Publican-Users_Guide-Installing_Publican.html#sect-Users_Guide-Linux_operating_systems-OpenSuse_12 To ssh://git.fedorahosted.org/git/publican.git 725d2e6..ae38cf1 devel -> devel
(In reply to Jeff Fearn from comment #1) > If you set role="popper" on a program listing, screen, or synposis, it will: > > 1: add a 'Show All' link to the top > 2: show the first 4.5 lines of code > 3: add a dashed border to the bottom > > Clicking "Show All" will reveal the rest of the content and change the link > to "Hide". > Reviewed. 1) This does not work in docbook 4.5, only in docbook 5. Is this expected? 2) I created a docbook 5 book and tested using "role=popper" inside a <screen> tag. It works, except: - there is no 'Show all' link It does however show 4 lines of text with a dotted line below, and when one hovers the mouse pointer over the screen text, it gets a colored background, and clicking displays the whole screenful of text, as it should. So setting this bug back to assigned for the lack of "show all" link in para 2) and just to confirm 4.5 vs. 5 in 1).
(In reply to Bruce Reeler from comment #2) > (In reply to Jeff Fearn from comment #1) > > If you set role="popper" on a program listing, screen, or synposis, it will: > > > > 1: add a 'Show All' link to the top > > 2: show the first 4.5 lines of code > > 3: add a dashed border to the bottom > > > > Clicking "Show All" will reveal the rest of the content and change the link > > to "Hide". > > > > Reviewed. > > 1) This does not work in docbook 4.5, only in docbook 5. Is this expected? Yes, we are not adding new features to docbook 4. > 2) I created a docbook 5 book and tested using "role=popper" inside a > <screen> tag. It works, except: > - there is no 'Show all' link > > It does however show 4 lines of text with a dotted line below, and when one > hovers the mouse pointer over the screen text, it gets a colored background, > and clicking displays the whole screenful of text, as it should. > > So setting this bug back to assigned for the lack of "show all" link in para > 2) and just to confirm 4.5 vs. 5 in 1). Did you test using the common-db5 brand? It might be other brands need updating.
Yes, publican.cfg has: xml_lang: "en-US" dtdver: "5.0" brand: "common-db5" type: Book
Hi, the show/hide tags where removed by the designer for UX reasons.
Ah, OK, thanks. Setting to Verified then.
A fix for this shipped in Publican 4.2.0.