Bug 64975 - FORMATTING: autoIndent for Chinese should be two characters
Summary: FORMATTING: autoIndent for Chinese should be two characters
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Mark Hung
URL: http://ask.libreoffice.org/en/questio...
Whiteboard: BSA target:5.1.0
Keywords:
Depends on:
Blocks: CJK
  Show dependency treegraph
 
Reported: 2013-05-25 03:19 UTC by Jiero
Modified: 2016-10-25 19:17 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
a screenshot showing problem (101.96 KB, image/png)
2013-05-25 03:19 UTC, Jiero
Details
Thanks to @oweng using his time to create this sample (331.33 KB, application/vnd.oasis.opendocument.text)
2013-05-30 13:23 UTC, Jiero
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiero 2013-05-25 03:19:11 UTC
Created attachment 79779 [details]
a screenshot showing problem

Problem description: 
Chinese paragraph start with space width as 2 Chinese characters in the beginning of paragraphs.

As of 4.0.3.3, there is still problems with "Auto" indent.



Steps to reproduce:
1. Change paragraph language to Simplified Chinese
2. Edit paragraph style and set indent "auto"
3. 

Current behavior:

See the screenshot, only one Chinese character space was left in front of main text.

Expected behavior:
Leave space width as of two Chinese characters  in front of main text.
              
Operating System: All
Version: 4.0.3.3 release
Comment 1 Jiero 2013-05-30 13:23:43 UTC
Created attachment 80041 [details]
Thanks to @oweng using his time to create this sample

He also summarize and expand my question.

AOO#85257 is a related bug; 

the CJK macro package for LaTeX introduced a \CJKindent macro in v4.5.1 on 17 June 2002 that was set to two ideographic spaces.
Comment 2 Jiero 2013-05-31 13:43:32 UTC
http://ask.libreoffice.org/en/question/18253/correct-auto-indent-for-chinese-text-not-sure-if/?answer=18305#post-id-18305

oweng did excellent job analysing my question. So I can confirm this bug.
Comment 3 Jiero 2013-06-06 09:06:59 UTC
@Rots52 mentions: "As we have a comment yet from a Japanese native speaker, I just check about 10 Japanese books written vertically or horizontally. I always see only a 1 character (double byte) indent. Thus for me the default indent in Japanese is correct." 


The auto indent currenly used for Chinese, might have been implemented in Japanese way as there is japanese people actively working on OpenOffice/LibreOffice. :) It looks like I need to get a Chinese developer to handle this behaviour for Chinese paragragh. 

In FOSS, Chinese owe Japanese a LOT, thank you. You did better than none LOL.
Comment 4 Owen Genat (retired) 2013-12-19 11:46:37 UTC
The People's Republic of China national standard [中华人民共和国国家标准] GB/T 9704-2012 "Layout key for official documents of Party and government bodies" [党政机关公文格式] does provide clear examples on pages 13-23 of the leading two-character indentation for Chinese text:

http://www.snwugong.gov.cn/Html/wgdj/UploadFile/201305020922251117.pdf

This version (2012) replaces the earlier GB/T 9704-1999, which evidently specified in words the same thing under 8.2.3:

> 主送机关名称下一行,每自然段左空2字,回行顶格。数字、年份不能回行。

Translation: Leave 2 characters space on first line of each paragraph.

Source: http://www.sasac.gov.cn/n1180/n1271/n6716920/n6716950/n6723785/6723886.html

This earlier version of the standard also includes similar examples of page layout at the end.

Thanks Jiero for indicating the earlier document.

As a result of details in related Apache OO bug, Version set to Inherited From OOo.
Comment 5 Kevin Suo 2014-10-13 09:09:17 UTC
In version 4.3.2, set first line indent to "2 字" or "2 ch" will work.
If you want all your documents do be indent 2 chars, please set your "Text Body" style and save it as default template.

(I realized that "字" should be “字符" here. Translation has been revised and will be reflacted in 4.3.3 release. So start from version 4.3.3, input "2 字符" or "2 ch" instead)

As this easy workaround, set "Importance" to "Medium Normal".
Comment 6 Jiero 2014-10-15 00:05:13 UTC
(In reply to Kevin Suo from comment #5)
> In version 4.3.2, set first line indent to "2 字" or "2 ch" will work.
> If you want all your documents do be indent 2 chars, please set your "Text
> Body" style and save it as default template.
> 
> (I realized that "字" should be “字符" here. Translation has been revised and
> will be reflacted in 4.3.3 release. So start from version 4.3.3, input "2
> 字符" or "2 ch" instead)
> 
> As this easy workaround, set "Importance" to "Medium Normal".


Hi Kevin,

I don't get 4.3.2 installed yet; as in default, your test run can be little rough.

Yes, I agree it is an easy hack but problem isn't solved by changing the translation. It was a dirty hack assuming the user ONLY work with text size 12.

Auto-indent works well actually, on Japanese language which have one glyph as indent. All we need is an added rule to get it up for Chinese. Locate the code and hack it, sorry, I'm still not looking up the codebase myself as Im lazy to learn coding (and lazier to be in a project) while it impress me this bug - one complained by thousands as a major headache/denial to Chinese users over years is not fixed. Ha, stupid Chinese just won't do anything but translations and bug reportings. How smart :S

Cheers
Jiero
Comment 7 Commit Notification 2015-08-16 01:14:57 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6cd04e9ea447a4828a6fc03d47a7d136f3914501

Fix tdf#64975: FORMATTING: autoIndent for Chinese should be two

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Kevin Suo 2016-01-17 12:17:32 UTC
Confirm fixed in
Version: 5.1.0.2 (x64)
Build ID: ecd3574d51754b043f865cf5bafee286d24db7cc
CPU Threads: 4; OS Version: Windows 6.19; UI Render: GL; 
Locale: zh-CN (zh_CN)

Mark as RESOLVED FIXED.

Any plan to backport this to 5.0 branch?