Bug 187733

Summary: line numbers in program listings cycle from 0-9
Product: Documentation Reporter: Dru Lavigne <dru>
Component: Books & ArticlesAssignee: Warren Block <wblock>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
docs.css.linenum_v5.patch none

Description Dru Lavigne freebsd_committer freebsd_triage 2014-03-19 13:00:00 UTC
If a program listing is more than 9 lines long, the line numbers cycle back to 0-9. For example, the first program listing in http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-iscsi.html is 15 lines long, but the lines are numbered from 1-9, then from 0-5.
Comment 1 Warren Block freebsd_committer freebsd_triage 2014-03-19 15:02:17 UTC
Responsible Changed
From-To: freebsd-doc->wblock

Take.
Comment 2 Allan Jude 2014-03-19 20:40:57 UTC
Warren and I have been working on this for over a week

The attached patch resolves this for up to 3 digit numbers (999 lines)
and also changes the font colour to make it more readable and
differentiate it from the output text, make it scale properly if the
user zooms the font size (using em the font-width unit of measure,
instead of a fixed number of pixels). It also centers the numbers in the
line number column (actually the left-border of the block level
element), and removes the space after the numbers as it was throwing off
the measurements and alignment.

-- 
Allan Jude
Comment 3 dfilter service freebsd_committer freebsd_triage 2014-03-20 04:13:09 UTC
Author: wblock
Date: Thu Mar 20 04:13:05 2014
New Revision: 44293
URL: http://svnweb.freebsd.org/changeset/doc/44293

Log:
  Fix the display of line numbers in screen and programlisting elements.
  Later version of the patch supplied by Allan Jude
  <freebsd@allanjude.com>.
  
  PR:		docs/187733
  Submitted by:	Dru Lavigne <dru@freebsd.org>

Modified:
  head/share/misc/docbook.css

Modified: head/share/misc/docbook.css
==============================================================================
--- head/share/misc/docbook.css	Wed Mar 19 23:47:11 2014	(r44292)
+++ head/share/misc/docbook.css	Thu Mar 20 04:13:05 2014	(r44293)
@@ -272,7 +272,7 @@ html {
 	background-color: #edc;
 	border-style: solid;
 	border-color: #EEB985;
-	border-width: 0 0 0 24px;
+	border-width: 0 0 0 2.5em;
 	border-radius: 6px;
 	counter-reset: code;
 }
@@ -284,7 +284,7 @@ html {
 	background-color: #eee;
 	border-style: solid;
 	border-color: #BABABA;
-	border-width: 0 0 0 24px;
+	border-width: 0 0 0 2.5em;
 	border-radius: 6px;
 	counter-reset: code;
 }
@@ -292,18 +292,19 @@ html {
 span.verbatim {
 	counter-increment: code;
 	display: block;
-	padding: 0 13px 0 29px;
+	padding: 0 0.5em 0 3.75em;
 	position: relative;
-	margin: 0 -8px 0 -24px;
+	margin: 0 -0.3em 0 -3.85em;
 	overflow: hidden;
 }
 
 span.verbatim:before {
-	width: 24px;
+	width: 3em;
 	text-align: right;
-	content: counter(code) " ";
+	content: counter(code);
 	position: absolute;
-	left: -10px;
+	left: 0;
+	color: #404040;
 }
 
 @media screen {  /* hide from IE3 */
_______________________________________________
svn-doc-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-doc-all
To unsubscribe, send any mail to "svn-doc-all-unsubscribe@freebsd.org"
Comment 4 Warren Block freebsd_committer freebsd_triage 2014-03-20 04:13:23 UTC
State Changed
From-To: open->closed

Fixed, thanks to much work by Allan Jude.  Thanks!