Docbook: programlisting and screen

Warren Block wblock at
Mon Sep 30 19:36:47 UTC 2013

On Mon, 30 Sep 2013, Randy Pratt wrote:

> I've noticed that trying to copy content from the rendered Handbook
> from a browser does not retain the line breaks in some places.  This
> occurs for material that are contained within a <programlisting> or
> <screen> elements.
> As an example, try to copy and paste some content from the section
> for "An Example Stateful Ruleset" into a text editor.
> (
> The result is the entire copied content is a single line which would
> require a lot of tedious editing.  I've tried different browsers with
> the same result.  I finally ended using the xml source to do the
> copy.
> I seem to remember being able to do a copy but it was probably
> when sgml was used.  Is there some way to make it easier to copy
> these sections?

Firefox on FreeBSD does this for me also.  Interestingly, IE on Windows 
copies and pastes that example fine.  Firefox does not, on either 
FreeBSD or Windows.  Midori on FreeBSD pastes it correctly.  Either a 
new Firefox bug, or maybe a default setting that changed?

More information about the freebsd-doc mailing list