Bug 543794 - xi:included code samples that use tab indentation have excessive indenting
xi:included code samples that use tab indentation have excessive indenting
Product: Publican
Classification: Community
Component: publican (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Jeff Fearn
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-12-02 23:44 EST by Jared MORGAN
Modified: 2015-08-09 21:21 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-12-02 23:55:50 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
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:


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.

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