Skip to content
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

Assorted manual fixes #140

Merged
merged 3 commits into from
Feb 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/prawn/table.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ module Errors
# Prawn::Table::
# Creates a subtable (a table within a cell). You can use
# Prawn::Document#make_table to create a table for use as a subtable
# without immediately drawing it. See examples/table/bill.rb for a
# somewhat complex use of subtables.
# without immediately drawing it.
# Array::
# Creates a simple subtable. Create a Table object using make_table (see
# above) if you need more control over the subtable's styling.
Expand Down
10 changes: 8 additions & 2 deletions manual/table/cell_dimensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
move_down 20
end

text "Padding can also be set with an array: [0, 0, 0, 30]"
table(data, :cell_style => {:padding => [0, 0, 0, 30]})
text "Padding can also be set with an array by specifying values for all sides: [0, 0, 0, 30]"
table(data, :cell_style => {:padding => [0, 0, 0, 30]}) # top, right, bottom, left

text "Padding can also be set by specifying only vertical and horizontal values: [0,30]"
table(data, :cell_style => {:padding => [0, 30]}) # vertical, horizontal

text "Padding can also be set by specifying top, horizontal and bottom values: [0,30,10]"
table(data, :cell_style => {:padding => [0, 30, 10]}) # top, horizontal, bottom
end