Bug 146787 - Enhancement request: better UI (e.g., shortcut key) for making Hanging Indents
Summary: Enhancement request: better UI (e.g., shortcut key) for making Hanging Indents
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.0.1 rc
Hardware: x86-64 (AMD64) Windows (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevAdvice
Depends on:
Blocks: Paragraph-Indent
  Show dependency treegraph
 
Reported: 2022-01-15 22:21 UTC by Michael Wogan
Modified: 2022-08-26 18:36 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Hanging Indent Toolbar Button and Sidebar (28.03 KB, image/png)
2022-01-20 22:33 UTC, Tex2002ans
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Wogan 2022-01-15 22:21:06 UTC
Description:
In M.S. Word, if the cursor is in a paragraph, CTRL T causes a block indent.  If the entry is longer than one line, the line wraps to the tab stop, not back to the left margin.  Writer needs a similar feature.  In Writer a block indent for an individual paragraph can be generated by: Format > Paragraph > Indents and Spacing; with Indent Before = 0.5 inches; and First Line = 0.5 inches 
where 0.5 is the first tab stop.  But it’s cumbersome.  It would be hard to develop a macro for this.  The macro would have to retrieve the setting for the tab stop, which will differ from one document to the next.  Writer should have a shortcut like the one in M.S. Word, where CTRL T causes a block indent just for the paragraph the cursor is in.

Actual Results:
There is no CTRL T in Writer.  Can only create block tab using Format > Paragraph > Indents and Spacing, as described above.

Expected Results:
Format > Paragraph > Indents and Spacing has to be repeated for every paragraph where block tab is needed.  


Reproducible: Always


User Profile Reset: No



Additional Info:
In Word, CTRL T can be repeated to indent to 2nd, 3rd, etc. tab stop (not just the first one) so it's very flexible.
Comment 1 Tex2002ans 2022-01-20 22:33:28 UTC
Created attachment 177682 [details]
Hanging Indent Toolbar Button and Sidebar

> In M.S. Word, if the cursor is in a paragraph, CTRL T causes a block indent. If the entry is longer than one line, the line wraps to the tab stop, not back to the left margin.  Writer needs a similar feature.

No. This isn't a "block indent"... this is called a "Hanging Indent" or a "negative indent".

LibreOffice does have a "Hanging Indent" button, but it:

- isn't visible in the default UI.
- doesn't have a default shortcut.
- seems to have very unintuitive interaction... on the surface.
--- LO's is a toggle.
--- Word's is a constant bigger indent.

I'm going to write mini-tutorials for each of your issues below:

- - -

ADDING BUTTON TO UI

***See attached image!!!***

1. Tools > Customize > Toolbars.

2. Type "Hanging Indent" in the Search box.

3. Assign the "Hanging Indent" button to your UI.

(You may want to add it near the "Increase" or "Decrease" buttons.)

ALTERNATE METHOD

***See attached image!!!***

1. Open the "Properties" sidebar.

2. The "Hanging Indent" button is there.

- - -

ADDING SHORTCUT

1. Tools > Customize > Keyboard.

2. In the "Shortcut keys" list, scroll down to the key combination you want to assign—for example, Ctrl+T—and press on it.

3. Type "hanging indent" in the Functions box.

4. In the "Function" box (bottom middle), you should see "Hanging Indent" highlighted.

5. Press the "Modify" button in the upper right.

This will assign your "Hanging Indent" to Ctrl+T.

- - -

UNINTUITIVE(?) INTERACTION

I was pressing on the button... and "nothing occurred".

After scratching my head for a while...:

1. LO's Hanging Indent button works like a toggle.
2. Your paragraph already needs a "First Line Indent".

What the button does is swaps the "First Line Indent" with the "Before Text Indent".

See this image:

https://i.ibb.co/RbDy5MP/Libre-Office-Hanging-Indent-Swapping.png

When pressing again, it does the opposite, returning you to your original position.

Because the default "first line indent" = 0... "nothing happens" until you make it positive/negative.

* * *

The way that Word 2016's "Hanging Indent" works:

- Ctrl+T changes the paragraph into a special "Hanging" paragraph.
- Constantly adds .5" to the indentation.

While this deals with the default 0" paragraphs... I think this is bogus.

LO's toggle method makes more sense once I figured out what it did.

- - -

BEST METHOD TO DO HANGING INDENTS

Assign the "Hanging Indent" Style!!!

1. Click inside your paragraph.

2. Press **View > Styles (F11)** to show the Styles sidebar.

3. Select the "Hanging Indent" style.

* * *

Note: If you do not see it in the list, you may need to look allll the way down at the bottom of the sidebar.

Below the "Show previews" checkbox, there's a dropdown.

In that dropdown, make sure to select "All Styles". You should now see all the default Styles in LibreOffice.

* * *

With Styles, you can change consistently adjust all hanging indents within your book in a single location.
Comment 2 Heiko Tietze 2022-05-25 08:39:20 UTC
(In reply to Tex2002ans from comment #1)
> I'm going to write mini-tutorials for each of your issues below:
Thanks a lot for the thorough explanation.

> I was pressing on the button... and "nothing occurred".
Do you think this needs to be improved by adding some value in case of zero. Comes on cost of consistency as we just toggle later.

> The way that Word 2016's "Hanging Indent" works:...
> While this deals with the default 0" paragraphs... I think this is bogus.
> LO's toggle method makes more sense once I figured out what it did.
Agreed.

Anything else that needs to be discussed?
Comment 3 Heiko Tietze 2022-06-27 10:56:55 UTC
Summary: Hanging Indent has no dedicated interaction besides a button on the sidebar and the Tabbed notebookbar (IMO no need to add it on some toolbar). More relevant issue is that it has no effect in case of no indentation and toggles otherwise between first/second line indent. Not sure if this was intentional (would require a renaming). 

Szymon & Samuel, you submitted patch https://gerrit.libreoffice.org/c/core/+/35930/. What do you think?
Comment 4 LeroyG 2022-08-26 18:36:30 UTC
(In reply to Heiko Tietze from comment #3)
> (would require a renaming). 

"Toggle indent: First line with Hanging"? Too much long.

And a change in the button color (like in the Align buttons).