• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Using paragraph number without parenthesis in references

New Here ,
Jan 28, 2017 Jan 28, 2017

Copy link to clipboard

Copied

Hey,

I would like to create a reference to a numbered paragraph inside my text. The problem I have is that the paragraphs are numbered like so (1), (2), (3), ... and the parenthesis are shown in references. I just want to use only the number without the parentheses inside my text. How can I do that? I mean is that even possible? :S

Some notes for you:

  • The number format is: (^#)^t
  • The reference format is <paraNum />
  • In short: I want <paraNum /> to be replaced with ^#  and not (^#) which is currently the case

Some Example:

(1) Lorem ipsum bla blablabla ...

... some text ...

Let's reference paragraph (1) <-- I want the reference without parenthesis.

Many thanks to you folks!

Views

974

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jan 28, 2017 Jan 28, 2017

Hi Mesdames!

No need a script! Think simple!

As we see, Cakasim uses the "cross-reference" feature and plays it correctly!

His apparent problem, extracting the auto-numbering of a para "(1) blablabla…", is that it gives him: "(1)"

… So, what does he forget ? …

I let you some time to think about this question!

…………

Well! … enough time without not giving the way to fix it! …

Cross-references are managed by ID as text!

So, a simple grep style is necessary to make the parentheses "invisible" (or a F/R to rem

...

Votes

Translate

Translate
Community Expert ,
Jan 28, 2017 Jan 28, 2017

Copy link to clipboard

Copied

As a FrameMaker user, it seems like there should be an easy answer. In Fm we have two building blocks—paranumonly and paranum—but that second building block doesn't seem to exist in InDesign. Odder still, the InDesign documentation makes it seem like <paraNum/> should remove punctuation, but I'm getting the same results as you are.

Google Chromess_002.png

I played with removing the parens from the auto number (that works of course) but I can't figure out any way of adding them back in that isn't picked up by <paraNum/>.

This is the point when I would consider redesigning the doc and removing the parens from the numbers. However, there are a number of creative folks in the forum who make magic happen. Let's stay tuned and see what others come up with.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 28, 2017 Jan 28, 2017

Copy link to clipboard

Copied

Just take out the parenthesis!

This format yields number period tab

1.

2.

3.

If you don't want the period, it would be:

Select some text and turn on Preview as you experiment. Does this work?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 28, 2017 Jan 28, 2017

Copy link to clipboard

Copied

Oh, I didn't catch that it's a cross reference. Mine was for numbered paragraphs.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 28, 2017 Jan 28, 2017

Copy link to clipboard

Copied

I played with removing the parens from the auto number (that works of course)...This is the point when I would consider redesigning the doc and removing the parens from the numbers.

Maybe I missed the point of the question, Jane, but I thought Cakasim​ was looking for a way to keep the parens in the auto-number, yet not include it in the x-ref.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 28, 2017 Jan 28, 2017

Copy link to clipboard

Copied

If I understand you, this may work.

1. Auto numbered paragraphs

(1) blah blah blah

2. Insert a text anchor. Name it "1". I put mine at the beginning of the paragraph.

3. Create a cross-ref to the text anchor named "1"

4. For the format, start with "Text Anchor Name". Click the Pencil to edit the format. Click the + to create a copy and rename it to preserve the original. Remove the quotation marks.

5. Repeat

How many of these do you have?

Maybe someone can write a script in the InDesign Scripts forum to automate it if this method works.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 28, 2017 Jan 28, 2017

Copy link to clipboard

Copied

Hi Mesdames!

No need a script! Think simple!

As we see, Cakasim uses the "cross-reference" feature and plays it correctly!

His apparent problem, extracting the auto-numbering of a para "(1) blablabla…", is that it gives him: "(1)"

… So, what does he forget ? …

I let you some time to think about this question!

…………

Well! … enough time without not giving the way to fix it! …

Cross-references are managed by ID as text!

So, a simple grep style is necessary to make the parentheses "invisible" (or a F/R to remove them but you'll destroy the link!)

I let you again some time to think about this point!

…………

Well! … enough time again without not giving the way to fix this last point:

Capture d’écran 2017-01-28 à 20.00.36.png

I supposed all "(number)" make reference to cross-references!

If not, Cakasim could insert a "marker" in his CR format to fix a CR-target problem!

(^/) 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 28, 2017 Jan 28, 2017

Copy link to clipboard

Copied

My logic was backwards! I was going after the auto-number and not the X-refs.

Ok, Obi-wan, your GREP is perfect in targeting the parentheses. I set the Character style to pink so that I could see that:

InDesign CCss_007.png

For Cakasim​'s copy and pasting pleasure:

paragraph\h\K\((?=\d+\))

and

paragraph\h\(\d+\K\)

And Cakasim​, if you are unfamiliar with GREP styles:

  • Create a character style (mine is called Invisible, but temporarily set to pink)
  • Create a paragraph style (mine is Sample)
  • Add the GREP styles shown above to assign the character styles

InDesign CCss_006.png

Now, forgive me, Obi-wan Kenobi but here's my stupid question. Now that we found the parentheses, how do we make them invisible and close up the space? Just making them white will leave the space on both sides of the number.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 28, 2017 Jan 28, 2017

Copy link to clipboard

Copied

Just, for ID, what we call: "The infinitely small!"

A "Invisible" char style:

0,1 pt font size

1% horizontal/vertical scaling

no color!

With a grep style, we can't do more invisible!  … but, with a F/R, we can "delete" them!!

(^/)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 28, 2017 Jan 28, 2017

Copy link to clipboard

Copied

Ok, Cakasim​:

If you change the character style called invisible to:

InDesign CCss_009.png

You get what you asked for!

InDesign CCss_008.png

I'm going to go ahead and mark this question as answered, but if you have any questions, just let us know.

Nice job, Obi-wan Kenobi​!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 28, 2017 Jan 28, 2017

Copy link to clipboard

Copied

Yes, extremely helpful, Obi-wan Kenobi​!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 28, 2017 Jan 28, 2017

Copy link to clipboard

Copied

Nice clarification, Barb! 

(^/)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 28, 2017 Jan 28, 2017

Copy link to clipboard

Copied

LATEST

Now, just imagine we can't use "paragraph " as delimiter [e.g.: "see (1), page 24"] and have another (1) in our text that isn't a reference to a "(1) Blablabla …" para!

How can we distinguish the 2 occurrences and avoid a real mess?

Note it's just a thought about all we said above! 

(^/)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines