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] Strange paragraph justification issue


Thanks for the reply, Erik. I get it now. I was under the impression that my paras were all left-aligned and not justfied (ragged right), but I see that I am wrong. So it all makes sense now. 

I tried your code element example and it also gets justified. Adding a linebreak template and inserting a <?linebreak?> processing instruction in the XML works a treat.

On Wed, Dec 17, 2014 at 1:28 AM, Erik Zander <Erik.Zander@studentlitteratur.se> wrote:

Hi Alan,

 

Although I do not have any vast knowledge of how the PDF generator works I do give a try to explain and maybe someone else might add in on you query.

 

The reason to this behavior is that the text is justified and both you examples are just that but you don’t have any spaces that can be extended in the link. If you for experiment removes the spaces in your first example you will see that it behaves similar to the link. However as we both know this is not an workable solution you may want to change your xml instead by for example using programlisting (for a block) or literallayout they both represents the text as written in xml this way you can control the look exactly. The drawback is of course that your text doesn’t reflow. If you find that you do need the ability to reflow the text you probably have to work with the rendering turning of justification whit all the side effects that that have.

Alternative if you do tag up your xml with additional information example using the code element and parameter <code language="html">&lt;img width="300" height="200"src="" href="http://img.example.com/ggbridge.jpg" target="_blank">http://img.example.com/ggbridge.jpg<parameter>?i10c=img.resize(width:300,height:200)</parameter>"&gt;</code></para>

 

And using link for the URI

 

<link xlink:href="http://img.example.com/ggbridge.jpg?i10c=img.crop(width:1000,height:1000);img.resize(width:500,height:500)">"http://img.example.com/ggbridge.jpg<emphasis role="bold">?i10c=img.crop(width:1000,height:1000);img.resize(width:500,height:500)</emphasis></link>

 

You could modify the transform to produce a better output.

 

I hope this was of some help

 

Regards

Erik

 

Från: Alan Oehler [mailto:aoehler@instartlogic.com]
Skickat: den 16 december 2014 22:11
Till: docbook-apps
Ämne: [docbook-apps] Strange paragraph justification issue

 

Hi all,

 

I have an interesting problem. I've got a couple of para elements, one that contains a long example HTML tag:

 

<para>&lt;img width="300" height="200" src="">http://img.example.com/ggbridge.jpg<emphasis role="bold">?i10c=img.resize(width:300,height:200)</emphasis>"&gt;</para>

 

and another with a similarly long URL

 

<para>http://img.example.com/ggbridge.jpg<emphasis role="bold">?i10c=img.crop(width:1000,height:1000);img.resize(width:500,height:500)</emphasis></para>

 

For some mysterious reason, for the first of these, the first line of the rendered text to look really stupid in the PDF output. It's as if the line breaks at a reasonable place (the question mark that denotes the beginning of the query string), but then the line is justified at the left and the right, with big spaces between each "word" – though the second line is left-aligned as normal. Something like this:

 

<img      width="300"     height="200"     src="">http://img.example.com/ggbridge.jpg   ?

i10c=img.resize(width:300,height:200) " />

 

However, the second example renders just fine. Breaks at the question mark, both lines are left-aligned.

 

That suggested to me that perhaps the presence of the entities in the string might be causing this to happen. But if remove them as an experiment, it still breaks badly. If I chop out some text so that it's short enough to fit in one line, it left aligns just fine.

 

I was able to work around this by adding a linebreak processing instruction as described in the Book, but I was mystified and wondered if anyone else has seen this.

 

Thanks!

 

 

 

I tried using

 

--

Regards,
Alan

Instart Logic 

Alan C. Oehler

Senior Technical Writer


Phone: 650-919-8856 | Email: aoehler@instartlogic.com 
Instart Logic | 450 Lambert Ave, Palo Alto, CA 94306 | instartlogic.com

 



--
Regards,
Alan

Instart Logic 

Alan C. Oehler
Senior Technical Writer

Phone: 650-919-8856 | Email: aoehler@instartlogic.com 
Instart Logic | 450 Lambert Ave, Palo Alto, CA 94306 | instartlogic.com



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