Centred paragraph style for a heading with rules/lines

Learn / Forums / General InDesign Topics / Centred paragraph style for a heading with rules/lines

Viewing 11 reply threads
  • Author
    Posts
    • #102275
      Ann Farr
      Member

      I’ve hunted and hunted for a way to make this a paragraph style but what I need is a centred heading with a line on either side. I don’t want one with a rule or underline showing behind the text, I want it to stop an em space or so before the text and start an em space or so after the text. Thought I’d nailed it by making a Paragraph Style of a heading with two em spaces on either side, centred, with a grep style applying an underline (Character Style and offset half way up the text) to the em spaces.

      However, adding em spaces to the centred heading, whether on the right or left side, rather weirdly moves it to the right, one em space at a time.

      I want this heading to appear over a variety of backgrounds and therefore need a colour of None behind the text, otherwise I could do this with a paragraph rule (and the heading would stay centred). Is there no way I can give the rule behind the text a colour of none? I was thinking of two rules but that gets complicated because the indents would change with every heading. I’m sure I’m missing something here … and your help would be invaluable.

    • #102280
      David Blatner
      Keymaster

      As you point out, the normal way to do this would be using BOTH a rule above and a rule below, such as:

      But you’re right that you cannot do this over colored backgrounds!

      Hm. I can’t think of any good way around that. Anyone else?

    • #102288

      Hi! …

      Even if fun, not the way I prefer! … [Obi-wan was a Jedi using The Force, not a Scripter! …]

      Best,
      Michel, from FRIdNGE
      [email protected]

    • #102289
      David Blatner
      Keymaster

      Michel: WOW! I see it, so I believe it! But… do I understand it? No!

      Underline? Strikethrough? Something with Line Styles? Hm…

    • #102290

      https://forums.adobe.com/message/9649561#9649561

      After this thread, I’ve studied again the matter and, not really satisfied, written a script I think more relevant!

      With it, it’s not automatic [1 click], but the construction is really “pure”: 2 simple para rules!

      The Key: the Script makes calculations faster than you and me to define the good length of each of them! … ;-)

      Best,
      Michel, from FRIdNGE
      [email protected]

    • #102291
      David Blatner
      Keymaster

      Are you talking about the solution shown by Vinny? Wow, that is CRAZY. That would be horrible to do in a real project (like a book or magazine), but it is interesting that it works!

      So you have a script that places anchored lines? And then it can replace them if the text changes (by re-running the script)?

    • #102292

      No anchoring, just and simply 2 Para rules! …

      In fact 2 scripts! =D

      The first that plays as Vinny showed: it converts and validates to “table” … So, it’s not horrible! … if we can consider a click could be! ;-)

      The 2nd is really more interesting and it works as you say: It takes in account the para style para rules feature. Only it.
      That means if the style applied is not pure because something has been modified as space before or after, these modifications will be saved by the script!

      I’ll post a link for a trial version that uses a very small gap between the text and the para rules!

      Best,
      Michel

    • #102293
      Ann Farr
      Member

      Thank you both so much for trying to help — Michel’s video looks interesting and I’d love to see how that paragraph style is built — just what I need (book catalogue for the publisher I work for as he asked me to turn it into more of a ‘magazine-look and feel’) but so far have only covered the stroke behind the text with a white/paper stroke.

      Any idea why my underlined em spaces just move the text to the right rather than stay centred? Do em spaces have some sort of weird behaviour that has escaped me?

    • #102302
      David Blatner
      Keymaster

      I’m not sure about the em space thing, but your comment made a lightbulb go off in my head… if you’re willing to add some spaces around the heading, you can automate this pretty easily!
      For example: search for all the text in the Heading paragraph style and put a tab and en space before the heading, and then an en space and a right-align tab after it. (This is possible with the GREP tab of the Find/Change dialog box.)
      Then set the heading paragraph style to be Left Aligned, and give it a Center tab stop in the middle of the column. That way, the heading is automatically centered.
      And, here’s the fun part: add a nested style that applies a strikethrough to the two tabs!
      In the image below, you can see the finished result (top), the finished result with hidden characters visible (middle), and the nested style I applied (bottom)

    • #102306
      Ann Farr
      Member

      That is THE RIGHT ANSWER AND BRILLIANT! Apologies for the shouting but I’m just so excited. Thank you so much, David, for taking all this trouble. I absolutely love it and am so grateful. A pint the next time you come to England? :)

    • #102321
      David Blatner
      Keymaster

      I’m so glad, Ann! I’ll write this up as a blog post, too, so we don’t forget it in the future.

      A pint would be lovely. I recently had something called a “snakebite”: a pint with half-Guinness and half-apple cider… wow! :-)

    • #102333
      Ann Farr
      Member

      I must remember snakebite — we’re fond of a ginger beer and bitter shandy (a pint, that is, half and half — bitter being the beer)!

Viewing 11 reply threads
  • You must be logged in to reply to this topic.
>
Notice: We use cookies on our websites to give you a great online experience. If you keep browsing, we'll assume you're ok with this. For more information, see our privacy policy. By closing this banner, you agree to the use of cookies.I AGREENo