OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Reducing the top-margin and botton margin in programlisting


Hello Bob,

thanks a bunch for clarifying my misunderstanding.

I adjusted my regular expression which I use in my Ant script to strip
out trailing spaces to delete also the line break.

For reference here is the Apache Ant regular expression I use:

		<!-- Remove the indentation in programlisting at the begining -->
		<replaceregexp flags="g">
			<regexp pattern="(&lt;programlisting.*&gt;)(\n\s+)" />
			<substitution expression="\1" />
			<fileset dir="${outputtmp.dir}/">
				<include name="**/*" />
			</fileset>
		</replaceregexp>

Thanks again Bob, the result looks much nicer.

Best regards, Lars


2012/6/26 Bob Stayton <bobs@sagehill.net>:
> Hi Lars,
> Indeed, those attributes in 'verbatim.properties' control the space of the
> block relative to the text before and after.  Regarding the space in the
> color block, do you have a line break at the beginning of your
> programlisting?  That is, does it start like this:
>
> <programlisting>
> package com.example.e4.rcp.todo.ui.parts;
>
> If that is the case, then that vertical space is just an empty line, not
> XSL-FO spacing properties.  *All* whitespace in programlisting is respected,
> including the first line break.  You can eliminate that blank line by
> removing the line break after the start tag:
>
> <programlisting>package com.example.e4.rcp.todo.ui.parts;
>
> If that isn't possible, you can check out this customization that strips off
> the leading and trailing line breaks in a programlisting:
>
> https://lists.oasis-open.org/archives/docbook-apps/201011/msg00012.html
>
>
> Bob Stayton
> Sagehill Enterprises
> bobs@sagehill.net
>
>
> ----- Original Message ----- From: "Lars Vogel" <lars.vogel@googlemail.com>
> To: "Bob Stayton" <bobs@sagehill.net>
> Cc: "DocBook Apps" <docbook-apps@lists.oasis-open.org>
> Sent: Monday, June 25, 2012 3:12 PM
> Subject: Re: [docbook-apps] Reducing the top-margin and botton margin in
> programlisting
>
>
>
> Hello Bob,
>
> thanks a lot for the reply. I think this controls the outer border
> (text to program code).
>
> Is it also possible to control the "inner" border of the program test?
>
> I'm sure I'm describing it incorrectly therefore a screenshot
> attached. I would like to reduce the gray area at the beginning of my
> program code. I highlighted the area in the screenshot.
>
> Best regards, Lars
>
> 2012/6/18 Bob Stayton <bobs@sagehill.net>:
>>
>> That spacing is set with these attributes in the 'verbatim.properties'
>> attribute-set, which is used by the 'monospace.verbatim.properties'
>> attribute-set:
>>
>> <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
>> <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
>> <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
>> <xsl:attribute name="space-after.minimum">0.8em</xsl:attribute>
>> <xsl:attribute name="space-after.optimum">1em</xsl:attribute>
>> <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute>
>>
>> If you want to override these just for programlisting, not literallayout,
>> then set new attributes in 'monospace.verbatim.properties' in your
>> customization layer.
>>
>> Bob Stayton
>> Sagehill Enterprises
>> bobs@sagehill.net
>>
>>
>> ----- Original Message ----- From: "Lars Vogel"
>> <lars.vogel@googlemail.com>
>> To: "DocBook Apps" <docbook-apps@lists.oasis-open.org>
>> Sent: Friday, June 15, 2012 2:00 AM
>> Subject: [docbook-apps] Reducing the top-margin and botton margin in
>> programlisting
>>
>>
>>
>> Hello,
>>
>> I my PDF output I would like to reduce the top and botton margin which
>> is added to a programlisting section. Attached a screenshot of the
>> current output, the highlighted area is included in the output.
>>
>> Any suggestions how to do this?
>>
>> Best regards, Lars
>> --
>> Lars
>> http://www.vogella.com - Eclipse, Android and Java Tutorials
>> http://www.twitter.com/vogella - Lars on Twitter
>>
>>
>>
>>
>> --------------------------------------------------------------------------------
>>
>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
>>> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>>
>>
>>
>
>
>
> --
> Lars
> http://www.vogella.com - Eclipse, Android and Java Tutorials
> http://www.twitter.com/vogella - Lars on Twitter
>
>
>
> --------------------------------------------------------------------------------
>
>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
>> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>
>



-- 
Lars
http://www.vogella.com - Eclipse, Android and Java Tutorials
http://www.twitter.com/vogella - Lars on Twitter


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]