-
Notifications
You must be signed in to change notification settings - Fork 500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support [.pagewide] role for tables and images #1415
Comments
I implemented this role in a custom converter. Here is the code for tables: #
# Implement the role ".pagewide" for tables. The effect is to strech
# the table up to the page margins, instead of only to the section width
#
def convert_table node
if (node.has_role? 'pagewide')
indent_l, indent_r = inflate_indent @theme[:section_indent]
else
indent_l, indent_r = 0,0
end
indent -indent_l, -indent_r do
super
end
end |
I like this idea, but I'm not convinced the name is correct. Page-wide implies that it stretches the width of the whole page. In fact, we have a similar option for block images already named If you only anticipate needing to make the table break out of the section indent, then I would suggest the option name |
Basically, this feature needs terminology improvement. The idea is great. |
How do you feel about |
Hi! I initially thought |
That's very useful input. I'll dig into that. |
To follow up on that, here are the docs from DITA:
So it's clearly a toggle, which would be best suited by a role (e.g., |
DITA also has an attribute named Here are the two proposals on the table:
At first, I had said page-wide could be confused with the width spanning from edge-to-edge of the document, but I now realize it would be more appropriate / accurate to refer to that as the canvas (i.e., canvas-wide). If we do anticipate needing both of those options for other elements (like an image), perhaps we should consider an enumerated attribute:
|
Text content can now be globally indented (theme property
section_indent
, see #737).But then, a table that has the
[.stretch]
role is only stretched to that section indent, not to the page margin.It is useful for some wide tables to stretch them to the page margins.
I suggest the converter should support the role
[.pagewide]
for that. The role should be applicable to tables and to images.The text was updated successfully, but these errors were encountered: