A bit of topic, but how do I activate line numbers in a program listing? Am 06.05.2012 17:25 schrieb "David Cramer" <da...@thingbag.net>:
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 05/06/2012 01:55 AM, davep wrote: > > On 06/05/12 01:23, David Cramer wrote: > ... > >> But what if the user wants to put the callout somewhere other > >> than the end of the line? If you do that, you should just abandon > >> callouts and refer to line numbers from a list below the code > >> listing. > > > > If you want that you can't let your readers cut and paste as (I > > think) is the objective here? 'Readers come first'?? > > I can think of a few ways to avoid copying callouts, each with tradeoffs: > > 1. Remove the alt text, so that when the user copies the code listing > nothing comes with it, but then you don't have alt text. > > 2. Use SyntaxHighligher with modifications to allow callouts. This > gives you syntax highlighting, line numbering, and copy, but has the > tradeoffs mentioned in my previous posting in this thread. > > 3. a. Put the code listing in the page twice, once formatted however > you like with callouts, syntax highlighting, line numbering, etc, and > another time completely unmodified. If JavaScript is turned on, hide > the unmodified version and show the modified version, but provide a > "Copy" button which copies the content of the unmodified version into > the clipboard > b. Instead of a "Copy" button, use a "Raw" button/link which opens > a small window showing the unmodifed version of the listing. And > instead of putting the code listing in the page twice, put the > unmodified listing in a separate file which is loaded in a new window > when the user clicks the Raw link. > > I think you could do 3.b. with no JavaScript at all. > > David > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.11 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iQEcBAEBAgAGBQJPppfHAAoJEMHeSXG7afUh+lIH/iPw8vHFg+TP6FvSzOKOyZws > 4bMfhdFKHckkEQ/nTNuR1afkuYZ/68aQ1HXZDPIugoLHGZitIvicMhfNK0PmFs1P > psAdA7msa7lC7Uu4uqAPpjQnkubzEiO7C+R176bV0kubhrwstnTRl50xOo2+w/Zr > 48QsNa7CbbA9QPZRmPUpWevOGE3Z9vS432x0utBcmgE5Wx6bxoj6hj0aauWXjLjU > ZL1p24qZyMVfF4nU9OjOjvqiW9kXQhBUp+HgM36xVzCo+TdmTPoib13c5jAyZECG > f36l4nP6uMPa7DjnBFYT3orX2xue7dJHj53We8GIfojpxzN7qNRjbABF/LefXgo= > =SSnZ > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org > For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org > >