Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi Miklos,

On 7 Mar 2013, at 08:42, Miklos Vajna wrote:

On Wed, Mar 06, 2013 at 11:07:27AM -0500, Kohei Yoshida <kohei.yoshida@gmail.com> wrote:
I manage a wiki which is being used to produce the text for a book
that is due to be published shortly. We can currently produce an ODT
document that is about 95% print-ready, but there are a few
typesetting features missing from LibreOffice which mean we will have
to use something like InDesign to complete our work flow.

One of these features relates to the justification of text. Word
processors like Writer tend to produce lines with uneven line-to-line
inter-word spacing as they do not generally consider reducing the
spaces and/or micro-spacing the characters themselves. I thought it
would be worth looking at the code-base of LibreOffice to see if it
would be possible to add this functionality. This search lead me to
your blog page at
http://kohei.us/2010/01/21/distributed-text-justification/.

It seems as if the code you modified when adding the 'Distributed
Justification' mode would be very similar to what I think is needed.
Could you please point me to the files / classes that were involved?

Any pointers would be much appreciated! Thank you for your time.

Paragraphs in Writer are "adjusted" to left/right/center/etc, the
SvxAdjustItem class stores this info in the document model. However, I
think Writer already supports what you want.

Have you tried Format -> Paragraph -> Alignment -> Justified, then
setting Last line to Justified as well?

Thanks, that's what we currently use.

However, this doesn't give the same output as a professional typesetter would give.

As far as I can tell, LO only uses the inter-word spaces for justification and it only makes these 
larger.
This generally works fairly well in many cases, but it does sometimes lead to output with large 
gaps between
words and where the gaps vary significantly between the lines of a paragraph.

A more visually-pleasing result (important for book publication) can be obtained if the gaps are 
balanced within a paragraph.
This can be done by defining a range for the inter-word gap (e.g. 80% to 120% of 'normal') and 
allowing the
inter-character gaps to be altered as well (say -5% to 10%).

I think adding this to LO would be really nice (possibly as an 'advanced' setting to hide it from 
'normal' users) and would give it a 
major feature advantage over 'standard' word processors ;-)

HTH,

Miklos

Chris Tapp

opensource@keylevel.com
www.keylevel.com




Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.