Bug 130420 - Add possibility to define tab positions in percentage of paragraph area width
Summary: Add possibility to define tab positions in percentage of paragraph area width
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevEval
Depends on:
Blocks: Writer-Styles-Paragraph ODF-spec
  Show dependency treegraph
 
Reported: 2020-02-04 11:04 UTC by Kribly Krably
Modified: 2021-06-21 11:44 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kribly Krably 2020-02-04 11:04:15 UTC
Description:
For simplicity, I will describe my personal use-case, though proposed feature may have more widely use.

In my documents there are some numerated formulas, e.g:

            a + b = b + a                           (12)

Formulas is centered, and numbering is right aligned. To do this formatting I create special paragraph style with two tab-stops defined: one "centered" at 8,75cm and another "right" at 17,50cm. This numbers are depend on page width and other parameters, and this is where the problem.

It is impossible to use this one paragraph style with others page styles (page format and orientation, page margins), in columns, inside tables, text-boxes and frames: for each case we must define different tabs to achieve the goal.

I propose to add possibility to define tab positions in percentage of paragraph area width. In described case they should be 50% and 100%. Paragraph styles will become more universal, adoptive, smart.

We can already set paragraph style's font size in percentage of font size of "father" (inherited from) style. Proposed feature will be natural progression of such smart style technique.




Steps to Reproduce:
1. Create new writer document;
2. Choose in main menu: Styles -> Edit Style...
3. Open Tabs tab
4. Type "50 %" in Position field
5. Press New button

Actual Results:
Tab position inserted at 50,00 cm

Expected Results:
Tab position inserted at 50%


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Heiko Tietze 2020-02-17 14:56:09 UTC
Could imagine that many benefit from tab stop position in percent as an alternative to the numeric value. The question is what reference users expect. Is the total page width 100% or the page style or the current paragraph? Plus, can we deal with this variable tab stop at all given that all these parameters may change?

The actual formula problem is typically solved with a table. There is even an autotext for this purpose (use FN+F3 with UI in English or look for Standard > Formula Numbering under Tools > AutoText... resp. Ctrl+F3).
Comment 2 Kribly Krably 2020-02-19 12:01:09 UTC
>> The question is what reference users expect.

I am sure that 100% should be current paragraph area with, NOT total page width. Exactly this detail allows proposed feature work as described in my Description: "in columns, inside tables, text-boxes and frames".

>> Plus, can we deal with this variable tab stop at all given that all these parameters may change?

Doubt I am understand this question correctly, sorry. If this question about users, then I think only few of them will even know about this alternative feature, e.g. those, who reads Users Manuals. They are usually heavy skilled users and will easy to manage this intricate feature, if needed.

If this question is about programmers (bear in mind, I am not programmer), then I, with a feeling of regret, think that the best way to realize this feature is go through support in ODF format.
Comment 3 Heiko Tietze 2021-06-21 09:00:43 UTC
(In reply to Kribly Krably from comment #2)
> >> Plus, can we deal with this variable tab stop at all given that all these parameters may change?
> 
> Doubt I am understand this question correctly, sorry. 

The current value is absolute while a percentage would be relative. For example, 50% of a page width of 21cm is 10.5cm. If you change the page style to letter, it will be 10.8cm.

If we talk about the paragraph width I wonder if indentation before/after the text also affects the calculation. Otherwise percentage would be effective relative to the page.

This feature needs to be added the the open document format.
Comment 4 Regina Henschel 2021-06-21 11:44:33 UTC
Another use case are the paragraph styles 'Header' and 'Footer', where the tabs currently need to be adjusted, when you change size, margin, gutter or orientation in the page format.

(In reply to Heiko Tietze from comment #3)
> 
> If we talk about the paragraph width I wonder if indentation before/after
> the text also affects the calculation. Otherwise percentage would be
> effective relative to the page.

The question of the base of measurement is similar in case of length values. There will be the attribute text:relative-tab-stop-position to determine whether the outer or inner edge of the margin area of the paragraph is used. The same attribute could be used in case of a percent value.

> 
> This feature needs to be added the the open document format.

When someone wants to implement such feature, please make a copy of the template [1], fill in as much as possible and sent it to the ODF TC[2] or to someone of the LibreOffice community, who is member in the ODF TC, _before_ actually implementing it.
[1] https://wiki.oasis-open.org/office/ProposalTemplate%20ODF%201.4
[2] https://www.oasis-open.org/committees/comments/index.php?wg_abbrev=office