Bug 543794

Summary: xi:included code samples that use tab indentation have excessive indenting
Product: [Community] Publican Reporter: Jared MORGAN <jmorgan>
Component: publicanAssignee: Jeff Fearn <jfearn>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 1.6CC: jfearn, jmorgan, mmcallis, mmurray, nb, publican-list, r.landmann
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-02 23:55:50 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Jared MORGAN 2009-12-02 23:44:21 EST
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-02 23:55:50 EST
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 01:20:16 EST
(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.