Bug 543794 - xi:included code samples that use tab indentation have excessive indenting
Summary: xi:included code samples that use tab indentation have excessive indenting
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Publican
Classification: Community
Component: publican
Version: 1.6
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jeff Fearn 🐞
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-03 04:44 UTC by Jared MORGAN
Modified: 2015-08-10 01:21 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-12-03 04:55:50 UTC
Embargoed:


Attachments (Terms of Use)

Description Jared MORGAN 2009-12-03 04:44:21 UTC
Description of problem:

For xi:included code block samples enclosed in <programlisting> elements, the default indentation is h u g e.

Version-Release number of selected component (if applicable):

Publican Version 1.2

How reproducible:

100%

Steps to Reproduce:
1. svn co https://svn.devel.redhat.com/repos/ecs/JBoss_Documentation_Guide/
2. Publish the book to HTML/HTML-Single.
3. Look at "Appendix A Pom.xml multi profile".
  
Actual results:

When published, indentation used to nest elements in the included file looks like about 8 spaces per tab stop.

Expected results:

Less indentation, for example two spaces per tab stop. Even 4 spaces is quite large when you are dealing with Java code samples with a lot of nesting.

Additional info:

Comment 1 Jeff Fearn 🐞 2009-12-03 04:55:50 UTC
It renders exactly what you have in your example pom file, this is correct for verbatim tags. If you want 4 spaces in the output then you need to use that in the source.

Comment 2 Jared MORGAN 2009-12-03 06:20:16 UTC
(Jeff, this isn't necessarily for you, but I wanted to add this to the ticket as a "laymans" explanation why spaces are better than tabs with regard to publican and code samples)

I was going to write a huge diatribe about tabs blah blah blah, but I understand now that because tab settings for ASCII (plain text) can not be saved as metadata in  plain text, the way tabs are interpreted by different systems and text editors is variable.

Because spaces are "just spaces", they are consistently interpreted by all systems, and you are "guaranteed" that your nesting will be preserved as nature intended.

If you still want to use the Tab key to indent your code, change the settings in your text editor to insert X number of spaces for each tab press.  You may also want to specify in your code how may tab spaces are inserted for each level of indent.


Note You need to log in before you can comment on or make changes to this bug.