CreativePro Forum
Join our community of graphic designers, publishers, and production artists from around the world. Our members-only forum is a great place to discuss challenges and find solutions!
- You must be logged in to reply to this topic.Login
Paragraph Shading with Tables
Tagged: paragraph shading, paragraph styles, Tables
- This topic has 37 replies, 1 voice, and was last updated 1 year, 11 months ago by
Amaury De SAint Chamas.
-
AuthorPosts
-
-
June 7, 2017 at 11:36 am #95159
Ronald Cox
MemberI’m trying to find a solution to paragraph shading with tables. I have a section of text, Examples, that has paragraph shading behind it. But when a table is used in these sections, the shading isn’t being applied. Any help would be much appreciated!
EDIT: Here’s an image of what I’m trying to describe. https://i.imgur.com/X0ErxOX.png
-
June 7, 2017 at 1:15 pm #95162
Dwayne Harris
MemberI think you will need to apply the shading in the table cell options.
-
June 7, 2017 at 2:42 pm #95175
Ronald Cox
MemberI looked into that option, unfortunately there’s no way to overset the shading like you can with Paragraph shading, so I’m still left with white space where I want the shading to be.
-
-
June 7, 2017 at 2:45 pm #95176
David Blatner
KeymasterYeah, I don’t think it’ll work… paragraph shading doesn’t appear to work on paragraphs with tables.
-
June 7, 2017 at 2:55 pm #95177
Ronald Cox
MemberI think we’re in agreement, but I was hoping for a miracle answer :)
-
June 7, 2017 at 2:57 pm #95178
Ronald Cox
MemberIf you were working on this project, with probably 150-200 instances of tables in paragraphs, how would you do it?
-
June 8, 2017 at 9:10 am #95227
Masood Ahmad
ParticipantHere’s how I’ll handle such situations. There’s ALWAYS an alternative way:
I would go to Paragraph Shading Options and set the Bottom Offsets to the paragraph above the Tables and saved it as a Style.
For your convenience you can download the InDesign file to try. Though I haven’t created a Style.
https://www.dropbox.com/s/veoziy063mtd5ps/ParagraphShadingWithTables.png?dl=0
https://www.dropbox.com/s/3h6quxziefx3a7m/Paragraph%20Shading.indd?dl=0
I bet you wont need a script. And this workaround is absolutely FREE!
-
June 7, 2017 at 5:28 pm #95194
Dwayne Harris
MemberDavid-I tested and had turned off paragraph shading on the table text. And then shaded the text cells with the same shading numbers. I think it was under the cell “fill” options.
But it seems I am misunderstanding or something.
-
June 8, 2017 at 9:27 am #95231
Masood Ahmad
ParticipantDavid, why is that Adobe comes up with some NEW feature and releases it without testing it. I think a Table is a basic thing in a layout and the Testing Team at Adobe should have tested the Paragraph Shading on Tables as well.
Just ask them (Adobe) to hire a person like you before introducing something new.
Said that you’ll be too busy then :)
-
-
June 7, 2017 at 4:20 pm #95183
Michel Allio for FRIdNGE
ParticipantThink different!
You have 3 aligned points A, B and C! … and a wire!
The points A and C are, say, 2 trees and B a waterfall!I ask you to join the 3 points with the wire! Impossible because we can catch water? Absolutely not!
All is only a matter of point of view!
If you are able to apply a shading to the paras A and C but not B, apply a shading to cover A and C AND the space between them, occupied by the table!
I did it and you can do it too!… but is it doable with 150-200 tables? … in 1 click!
Yes! It’s only a mathematics and code problem!
(^/) ;-)
-
June 7, 2017 at 4:23 pm #95184
Ronald Cox
MemberThis is… encouraging? Care to share your solution?
-
-
June 7, 2017 at 4:28 pm #95185
Michel Allio for FRIdNGE
ParticipantTo do what I mean, you’ll need a script! … and personally, I don’t write such a script for free!
(^/)
-
June 7, 2017 at 5:26 pm #95190
Dwayne Harris
MemberObi–I thought the point of this site was to help people–not a place to post riddles and ask for money.
As I said in an earlier post–if the issue is just the shading so it’s includes the paragraphs and the table, I think one can just turn off paragraph shading on the table text, and create a cell style with shading that matches the paragraph shading (while turning off paragraph shading on table text).
I was under the impression that is what was wanted. That the entire section (text, table, text) was to be shaded.
-
June 8, 2017 at 9:17 am #95229
Masood Ahmad
ParticipantDwayne, I too have the same thoughts.
-
June 8, 2017 at 2:52 pm #95251
Dwayne Harris
MemberThank you, Masood.
-
-
June 7, 2017 at 5:18 pm #95186
Dwayne Harris
MemberIt’s quite possible I am wrong on this, but I tried a small test (actually three times). I was under the impression that the text and the table were supposed to be shaded. Kinda like one page of totally shading. All the same shade.
I tested quickly, and I kept paragraph shading for the regular text–and turned off for the table text. Then I applied the same shading for the table cells and the entire page was shaded. I had to tweak the text paragraph shading so far as offset.
-
June 7, 2017 at 5:50 pm #95195
Dwayne Harris
MemberTried again–and I can’t automate. Paragraph shading above/below has to be adjusted.
-
June 7, 2017 at 6:46 pm #95203
Michel Allio for FRIdNGE
ParticipantDwayne,
You don’t know me! So, please, keep your comments about me in your pocket, like others.
Here, Ronald has 2 questions:
How to do it once?
How to do all in 1 click?I answered these 2 questions …
To help you to visualize, you could make a small sketch with a pencil and a white paper (or another color if you want) :
A script can extract the Y-Offset of the baseline of the last line of the para [A] above the table [B], the height of this table and the Y-Offset of the baseline of the line-para that supports it, and finally, the Y-Offset of the baseline of the first line of the para [C] below the table!
These data for each table are enough to allow you to play!
So, with this scenario, I let you write the script to help Ronald, for free of course!
… and no need to thank me, I did it with pleasure!
(^/) =D
-
June 8, 2017 at 9:04 am #95226
David Blatner
KeymasterThere is no doubt that a script could handle this, but you could also do it manually. For example, you could select the paragraph above the table, apply paragraph shading, and change the Bottom Offset of the paragraph shading so that it extends down under the table.
-
June 8, 2017 at 9:16 am #95228
Masood Ahmad
ParticipantHey David, Our replies match but your post came in first. :)
-
-
June 8, 2017 at 9:20 am #95230
Michel Allio for FRIdNGE
Participant… and do it 150-200 times!
Oups! the layout has changed! Let’s play it again … 150-200 times!
Oups again! … 150-200 times!
…………
Not very productive!
But you’re all right! It could be done manually! Personally, I’m very too lazy for that! =D
(^/)
-
June 8, 2017 at 10:45 am #95239
Kai Rübsamen
Member@Ron: Why not use the fill color of the table? And why is there an inset left and overset right? > If paragraph shading would be possible, the fills would not align perfectly.
@Masood: Sometimes things are not implemented, because no one have the idea to use a feature in that way or the engineers have no capacities for everything.
If I understand the feature correct, it is based on the fontsize of the paragraph. Since a table behave like a single character, but with no fontsize, it is not possible to measure the dimensions for the shading-feature.
Not helpful, but interesting: If you span your para, that hold the table, in two, insert a real character, then para shading is working.
So I vote either for table fills or a script, especially if the tables have different heights.
Kai
-
June 9, 2017 at 3:39 am #95258
Masood Ahmad
Participant@Kai, Thanks a lot for describing it so nicely. But I still think that a shading with Tables should have been noticed by the Adobe. They have a team of exports who could have avoided this easily.
-
-
June 8, 2017 at 10:53 am #95240
David Blatner
KeymasterWhen I look at the image that Ronald included in his original post, I think it would be impossible to do this with table color fill (because the shading must extend outside the table, and even outside the text frame).
The amazing thing about this thread is that I think there are people from 4 or 5 different countries, and at least 3 different languages! Of course, because it is in English, we must remember that sometimes meaning and intention is difficult to communicate.
But I very much appreciate the community trying to help in our various ways!
-
June 8, 2017 at 11:51 am #95241
Kai Rübsamen
MemberDavid, I saw this extending. If this is really needed, we could fake the insets with addtional blank columns?!
-
June 8, 2017 at 2:10 pm #95247
Michel Allio for FRIdNGE
ParticipantI forgot I’ve written this script at 04/22/2017:
0149_RoundCornersTable-Batch_MichelAllio.jsx
Here’s its little brother:
0173A_TableShading-Batch_MichelAllio.jsx
[Alas, not for free!]
I’ve just included the shading feature!
Especially for Masood and Dwayne:
(^/) ;-)
-
June 8, 2017 at 2:35 pm #95249
Dwayne Harris
MemberCongratulations. Don’t “especially” for me. I have no intention of watching it.
-
-
June 8, 2017 at 3:11 pm #95253
Dwayne Harris
MemberThe only thing I could do was add an extra blank column on both sides of the table (the width of the shade extension). Then used the cell fill on all the columnns. That shaded properly. The only issue, of course, is the white space above and below the table, which can be fixed by adjusting the offset on the previous paragraph so it goes down to the table; and adjusting the paragraph below so the offset fills in above.
I tried to do a rule above/below on the table of the proper length and offsets and shading, but it didn’t work. I had thought it would as you can do it on anchored boxes. But apparently not on tables.
Hang on–I cut and pasted the table and placed into a separate text box and anchored it. I kept the fill-in in the cells and deleted the two outside columns I earlier used.
Since the table box is not technically a table now but an anchored object I was able to use the paragraph above and below for the rules (with the offset and shading. The top rule was huge (100 point).
Creating cell styles for the shading, and a style for the paragraph return that is the table anchor could speed things up.
It will require cutting and pasting the tables into boxes and anchoring, and tweaking the rules above/below on some tables, but if you set the to rule to really big, it may not be necessary. And add the text spacing above/below to the anchored paragraph style.
I’d guess a hundred or so would take a half-day to set up that way.
I guess it depends upon how much time you have for the project and the budget. And how often you get jobs like that.
It may be cheaper to buy Obi’s script.
David: I did try to use the paragraph shading to extend past the table (before it was anchored as an anchored object) and the shading stopped at the top cell. It wouldn’t go past it.
-
June 8, 2017 at 3:21 pm #95254
Dwayne Harris
MemberNote: Paragraph shading works on the anchored tables. So, we know that we can use paragraph shading on anchored objects, but not tables (unless they are cut and pasted and anchored).
-
-
June 9, 2017 at 12:09 am #95257
Michel Allio for FRIdNGE
ParticipantDwayne Harris said:
“… It may be cheaper to buy Obi’s script. …”
What a positive attitude and a good concession at last! =D
(^/)
-
June 9, 2017 at 5:06 am #95259
Dwayne Harris
MemberI wouldn’t necessarily call it a concession =D
-
-
June 9, 2017 at 8:07 am #95261
Michel Allio for FRIdNGE
ParticipantAha! However, it’s a beginning! ;-)
I’ve written a more powerful version!
It’s based on the Shading Bottom Offset calculation relatively to the table height!
The user can play with all kinds of selection (one table: cursor into it, selected cells/lines/columns ; single text frame ; active document ; all open docs).
It have an “Undo”!
After running the script once, if a table is modified and have a new (width/height) dimension, the user simply launches the script again: the script loops on all the tables and only plays with the modified one and refreshes the view!
Always especially for my fans! ;-)
(^/)
-
June 9, 2017 at 1:50 pm #95272
Michel Allio for FRIdNGE
ParticipantHi all!
After 2 videos I know you liked a lot, you can now download my ID test file [CC 2015] and the script no 0173_TableShading-Batch or “how to apply a shading to tables when you can’t!”.
(^/)
PS: The bad news is that it’s a jsxbin file (no access to the [JS] code), locked on the test file and limited to 1 month.
But it’s totally playable for fun! ;-)
So…ENJOY! =D
-
June 9, 2017 at 2:15 pm #95273
Dwayne Harris
MemberThanks, but I have no need as I don’t have any jobs that require it.
Congratulations on doing a script to get around the issue.
-
-
February 9, 2018 at 12:59 pm #101609
Michael Miller
MemberI had a similar situation. Managed to put a non-printing character (a discretionary line break, to be specific) before and after the table, but in the same paragraph that “holds” the table itself. Shading then worked.
However, InDesign forced them onto three lines. To address this, I set the leading for that paragraph style to zero, and adjusted space above/below as needed.
-
February 22, 2019 at 8:57 am #114608
Edd Grinham
MemberHad been wrangling with this for a little while – Hadn’t thought of using discretionary line breaks! Genius!
All works great
-
-
July 24, 2018 at 10:15 am #105084
Jon Hooton
MemberUsing Michael’s solution above, if you create a character style with 0 leading and 0.1pt text you can apply that to the 1st and 3rd lines and then a new paragraph style using GREP to apply it to the first and last return in a paragraph which should work in most cases.
-
July 10, 2023 at 9:57 am #14394059
Amaury De SAint Chamas
ParticipantThis is an old post but the problem still exists in 2023… I have a small and very easy trick with NO SCRIPT and NO GREP :
Just add a FORCE RETURN character BEFORE and AFTER the table.
Note: It will add a space before and after the table, but you can create a dedicated paragraph style with a smaller line height…
-
-
AuthorPosts
- The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
