|
InLine Headings version 0.4.0 – 2021-10-06 – Author : Jean-François Nifenecker, Bordeaux. An inline (or run-in) headings generator for LibreOffice writer documents to comply with some academic reports constraints. InLining made easy! |
Academic reports and works must often follow very precise formatting guidelines. Such guidelines may require the use of so-called inline or run-in headings. The APA (American Psychologists Association) is one of these organizations.
Aka “run-in” heading. This is a heading (outline) paragraph with a special formatting, so that the heading is not in a separate paragraph, as usually, but part of the text body that follows.
Here’s an example
Standard heading. The heading paragraphs are separated from the text body:
With inline heading (level 4 text is now in the same paragraph as the following body):
Unfortunately, LibreOffice and ApacheOpenOffice don’t provide a native functionality that covers this use case.
But, there’s a trick, as developed by user RGB in a forum thread (see Sources). The InLine Headings extension, that was designed with this trick in mind, aims at making the creation, modification and suppression of inline or run-in headings easy.
InLine Headings extension:
Processes the current Writer document.
The process covers the text body and sections. Note that tables, frames, headers and notes are not processed.
Turns any heading paragraph level into an inline heading (levels 1..10).
Can undo the inlining for easy document update or correction.
Tries to create document backups before processing.
InLine
Headings comes as a
two-toolbuttons toolbar.
|
Create inline headings in the current Writer document. |
|
Remove all existing inline headings from the current document. |
If the toolbar doesn’t appear, check the View > Toolbars menu.
The document process is extensive. This means that, in some contexts, things might go wrong. Even though I’ve tested this extension for a while without meeting any problem, and even though an attempt to backup the document is run before the actual process, I very strongly advise to work on a copy of the original document.
Document preparation | The Main Dialogue | What’s the magic? | InLine Headings Localization | Sources | Credits | Author | License
In order to take advantage of the inlining facilities that InLineHeadings provide, you’ll have to prepare your document like this:
Create and write you document as usual, using the standard outline functionalities (for instance, apply the Heading N paragraph styles wherever necessary).
Format the to-be inlined outline levels as you’d like them to be when inlined: character settings, numbering, character separation with the text body (usually a dot), etc.
InLine Heading will use this formatting as a template when processing the outline level.
Note: The separation with the text body is always obtained using a space. Do not add this character to the heading paragraph.
Then run the extension and select the outline level to inline.
After a given heading level has been inlined, its contents becomes invisible. It would be tedious, to say the least, to then try to update the headings.
The solution is to:
Undo
the inlining, using the inline removal tool
.
Apply the changes and modifications (text contents, formatting) to the wanted headings.
Run Inline
Headings again
.
This dialogue helps setting the inlining definitions. The following settings are available:
|
Description |
Notes |
---|---|---|
Level listbox |
Lists all 10 outline levels that you may set. |
|
InLine heading checkbox |
Tick the box for each level to inline. |
|
Heading style list |
Select the heading style that is used for the outline level formatting. |
|
The dialog has five buttons: |
||
APA v7 presets |
Presets the inlining selection according to the APA version 7 style guidelines. |
The APA v7 guidelines require that outline levels 4 and 5 be inlined (see Sources). |
Insert |
Validate the dialogue and run the inlining process. A summary message is displayed when terminated. |
The document is backed up before the process starts. The backup occurs in the same directory. The backup is named from the original name with _ilh added. In case of multiple runs, multiple backups occur, each one being numbered accordingly. |
Cancel |
Quit the dialogue without processing. |
|
Help |
Get to the help file (here!) |
|
About |
Display the About box. |
|
Here are some details about the (de)inling processes.
For each to-be inlined heading in the text:
InLine Headings creates a set of three styles per level to process:
A special paragraph style for internal use. This style stores the current heading settings so that they may be restored in the future (in case of inlined headings removal). Naming convention: ilh_heading_N.
Two special character styles for internal use:
An inline style that is set from the corresponding heading character settings. Naming convention: ilh_heading_N.
A special style to hide the marks that are inserted at start and end of the inlined text. Naming convention: ilh_mark_N.
These styles are not meant to be used outside of InLine Headings. Thus they are set as hidden styles.
Note that there’s no style creation if no paragraph heading exists for the wanted inlining.
Scans the document and, for each paragraph met that complies with the requirements:
Sets the Heading N paragraph style so that it is hidden (white characters, very small size, no space before and after, attached with the next paragraph).
The (now invisible) heading style remains Heading N, thus there’s no change to the Writer summary and crossref functionalities.
Inserts the corresponding chapter fields at the next paragraph start and sets them with the appropriate character style (ilh_heading_N). Surrounding marks are also inserted so that a future fields suppression is easy. These marks are hidden using the ilh_mark_N character style.
Note: Wherever a heading paragraph is not followed with a body paragraph, an empty one is added and the inline items are inserted there. This empty paragraph is not removed by the inline removal tool.
The inline removal tool does the following:
Restores the initial Heading_N settings by copying them back from the ilh_heading_N paragraph style.
Removes the text that is enclosed between the start and end marks.
Removes the three special styles that were created at inlining time.
InLine Headings is developed in English but the UI is designed to automatically adjust to the current LibreOffice environment localization. As of current version, only two UI locales are supported: English, as the default fall-back language, and French, my mother language.
Of course, language localization is made available through PO files (https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html) (for the UI) and an HTML help file (for help). Thus adding other languages is easy.
The PO files are stored into the extension po subdir. HTML help files are stored in the extension help subdir. The localized files are automatically selected when they fit the current locale, otherwise English is the UI fallback language.
Open the .pot template text file provided (en.pot).
Edit it using any text editor and fill the msgstr strings (do not touch to the msgids!).
Save as a xx.po file, where xx stand for the language 2-chars code (es : Spanish, de : German, etc.)
Copy it to the po subdir and that’s it. At the next start, the UI should be adjusted to your strings.
Do not forget to send the author the released PO file. You’ll be credited for that in this help page.
Open the HTML help English version (ilh_help_en.html).
Translate it into your language of choice.
Name it accordingly : ilh_help_xx.html, where xx stand for the language 2-chars code (es : Spanish, it : Italian, etc.)
Place it in the help directory and that’s all about it. At next start, the help should be adjusted to your new language.
Do not forget to send the author the released HTML file. You’ll be credited for that in this help page for the next release.
RGB user forum post, here:
https://forum.openoffice.org/en/forum/viewtopic.php?f=71&t=709#p2870
The APA style guidelines v.7:
https://apastyle.apa.org/style-grammar-guidelines/paper-format/headings
InLine Heading is being developed by Jean-Francois Nifenecker, Bordeaux (France)
jean-francois.nifenecker@laposte.net
It takes its inspiration and extends from RGB user forum post, as shown in the Sources chapter above.
(none yet)
The InLine Heading icon is adapted from an artwork by Pixel perfect author, found in https://www.flaticon.com/. It is released under the CC0 license and is freely reusable.
(currently none)
Version |
Date |
Notes |
---|---|---|
0.4.0 |
2021-10-06 |
First public version |
|
|
|
InLine Heading is released under the GNU GPL v3 (and up) license.
More information here: https://www.gnu.org/licenses/gpl-3.0.en.html