Two line headings for chapters are quite common. In fact they are default on all "book" documentclasses for LaTeX. They usually display like this
The Chapter Name
usually with the fist line displaying a different format than the chapter name.
On Writer it is possible to get quite close to this format but for a single point: there is no way to insert an automated line break between chapter number and chapter name, it needs to be manually added each time.
Hence the enhancement proposal: in addition to normal text allow the use of a line break control on "separator, after".
Note: AFAIK, on ODT line breaks are created with the tag <text:line-break/>. I tried to edit the styles.xml to manually add that tag on the heading style definition but then Writer complains of a badly formatted file. It seems that the file format do not allow control tags on the "separator, after" field so maybe there is a limitation on ODT format that prevents this, but I do not know enough of ODF to be sure.
Sounds good, but could you mention in what feature this would be added? Table of contents or something else?
Created attachment 137343 [details]
Sample file with a manually inserted two line heading
@Buovjaga just for chapter numbering. See the attached sample file: the two line heading you'll find below the TOC has a *manually* inserted line break to get two lines as described on comment 0. This enhancement request is about gaining the ability to set that line break *as part of the outline numbering* so it's inserted *automatically*.
I confirm this enhancement.
Tools => Cahpter Numbering. An option for line break as a separator after is missing
Version: 18.104.22.168.alpha1 (x64)
Build ID: c1d1f859b268f650143d48f294999cda0fa57350
CPU threads: 4; OS: Windows 10.0; UI render: default;
Locale: de-DE (de_DE); Calc: group
I plan to try to implement this during the Hamburg Hackfest.
Nithin Kumar Padavu committed a patch related to this issue.
It has been pushed to "master":
tdf#112384 sw: Allow New line as a label followed by chapter numbering
It will be available in 6.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:
Affected users are encouraged to test the fix and report feedback.
nice - thanks! esp. Nithan!
what distance will be between first and second line of Heading in this case?
I inserted line break in option ... and?
A big thanks to Miklos and Michael for helping me in the Hackfest. Specially to Miklos for helping with basic cpp, git and Linux Commands.
The distance between the First and Second line of the Heading will depend upon the Paragraph Format settings specified in "Heading #".
Will fix the Preview as well and commit a patch this week.
(In reply to Nithin from comment #8)
> A big thanks to Miklos and Michael for helping me in the Hackfest. Specially
> to Miklos for helping with basic cpp, git and Linux Commands.
> The distance between the First and Second line of the Heading will depend
> upon the Paragraph Format settings specified in "Heading #".
Will it be a new option?
Or you talk about existing options in dialogue Paragraph style? What is option?
In the Tools>Chapter Numbering> Position Tab
There will be a new option in the dropdown list "Numbering followed by:" called New Line.
Adolfo Jayme Barrientos committed a patch related to this issue.
It has been pushed to "master":
tdf#112384 Mention the new possibility of adding a line break as separator…
(In reply to Nithin from comment #10)
> In the Tools>Chapter Numbering> Position Tab
> There will be a new option in the dropdown list "Numbering followed by:"
> called New Line.
Unfortunately in the preview box there's no changes. It would be nice if we add them to see the differences.
(In reply to Rizal Muttaqin from comment #12)
> Unfortunately in the preview box there's no changes. It would be nice if we
> add them to see the differences.
I agree. But since the reported issue is fixed, I think it will be better to open a new bug report for that.
The code for the Preview is also submitted. But there was some problem in i being able to see the changes and the others not. So checking what is the problem now.
Reviewed the code again today. Opened a bug report for it. Hope someone can shed light on how the behavior should be. Bug 117818
The preview is broken in the current version as well.