[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: Need help including c source
Norman Walsh wrote: > / Eric Richardson <eric.richardson@milagrosoft.com> was heard to say: > | Thanks for the quick response. I found that it is very close. The > | first markup works except for some extra leading whitespace on the > | first line so perhaps I need to left justify the imagedata tag. The > > Yes. All whitespace is significant in <programlisting> > > | second way has no pre and perhaps that is okay? > > Yes, the <programlisting> provides the <pre>. > I've spent some time to evaluate how this portion of the stylesheets renders to HTML. Here is what I found about <programlisting> and <literallayout>. 1. If the markup includes only text inside of <programlisting> or <literallayout class="monospaced"> then all whitespace is significant. This is expected as these translate directly to <pre class="xxx">. This includes <filename> inside <programlisting> as this translates to <tt>. 2. If the elements have a <inlinemediaobject> inside so you can use <imageobject> and then <imagedata fileref="sometext" format="linespecific"> so you can enable extensions to include the external file then things change a bit. Only the space between the programlisting|literallayout and <inlinemediaobject> seem to be relevent. There are three ways it works okay from my perspective. 1. If there is no space between the elements then it works but the source looks ugly. 2. If you put the <inlinemediaobject> on the next line, left justified. This looks better and doesn't seem to effect the output. The <span class="inlinemediaobject> is put on the next line after the <pre>. 3. Leave an extra empty line in the file. This makes extra space in the result and is really undesirable. I really don't understand the stylesheets well enough to play around for different approaches but I feel this is a bit confusing. Most people understand the idea of literal text like <pre> but the interaction with included text is really non-intuitive based on the fact that markup isn't suppose to matter that much in source form and indenting seems the most comfortable. Also postprocessors are a factor as well but they should not mess with the content of a <pre> either way. Is there any way that the stylesheets could implement 2. above? They could look for the <inlinemediaobject> inside the tags that get translated to <pre> and then make sure that it gets put on the next line or the whitespace removed. This would be complicated a bit since <programlisting><filename><inlinemediaobject> is valid as well. I don't know if this is possible but I think it would help myself and other people doen the road. Thanks, Eric
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC