Bug 94667 - [HELP] there is no way to set the width of the table
Summary: [HELP] there is no way to set the width of the table
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
5.1.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-01 12:28 UTC by tagezi
Modified: 2022-01-19 05:41 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
width remains the same (109.23 KB, image/png)
2015-10-01 12:28 UTC, tagezi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tagezi 2015-10-01 12:28:12 UTC
Created attachment 119167 [details]
width remains the same

Although the OOo2HelpAuthoring.pdf discloses a method to set the width of a table and a cell - this is not working.

For example:
<table id="table_averageif_example" width="100">
Comment 1 Olivier Hallot 2015-10-01 12:37:35 UTC
Confirmed. I couldn't set the table width in statistics.xhp.
Comment 2 QA Administrators 2016-11-08 10:38:34 UTC Comment hidden (obsolete)
Comment 3 Rafael Lima 2022-01-14 19:10:46 UTC
This still is an issue in XHP files using the online help.

The "width" is an attribute of a table [1], however it has no effect even if I set the "unit" attribute, f.i:

<table id="tab_id221606235233835" width="100" unit="pct">

By default, not setting "unit" would use "px" as the unit, however this does not work.

[1] https://wiki.documentfoundation.org/Documentation/Understanding,_Authoring_and_Editing_Openoffice.org_Help/3#table

@Ilmari, is this something fixable?
Comment 4 Buovjaga 2022-01-15 14:58:47 UTC
This is the template function: https://git.libreoffice.org/help/+/143eb86de536e863170222617485c3e7f41d628a/help3xsl/online_transform.xsl#1389

Looks like it only has this special case for class named 'wide': <xsl:when test="@class='wide'">
Comment 5 Rafael Lima 2022-01-18 19:15:00 UTC
Indeed. Using class="wide" makes the table 100% wide and this is the only way we can change table width.

For example:
<table id="tab_id221606235233835" class="wide">

IMO having the ability to use the "wide" class is enough for our help pages. I do not believe it would be good to allow anyone to modify table width without using predefined classes, since it might break the look-and-feel of the rendered pages.

How about closing this as WORKSFORME ?
Comment 6 Buovjaga 2022-01-19 05:41:32 UTC
Thanks for evaluating, let's close