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

add the section number in cross-references

Community Beginner ,
Sep 09, 2025 Sep 09, 2025

Good morning everyone,
is it possible to include the section number in the cross-references? I can't find the option in the drop-down menu when I create the cross-reference format.

TOPICS
How to
231
Translate
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 ,
Sep 10, 2025 Sep 10, 2025

Use paragraph number, it's used for sections as well:

 

PeterKahrel_0-1757503998366.png

 

Unless you're using chapter numbers as section numbers, in which case you can add it from the fly-out menu by pressing the +:

PeterKahrel_0-1757504160797.png

 

 

Translate
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 Beginner ,
Sep 10, 2025 Sep 10, 2025

Thank you for the reply, but perhaps I didn’t explain myself well (or I simply didn’t understand how to do it).
A brief premise: I am using InDesign in Italian and maybe some objects have different names. By “section” I mean this (see highlight in the figure)

DarioDBZZanfardin_0-1757506413217.png


and I would like to add it to the reference format (only the indicator).

DarioDBZZanfardin_1-1757506468563.png

 


Is this possible? Like "see para. 8.2 on section II"

Translate
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 ,
Sep 10, 2025 Sep 10, 2025

I see. No, unfortunately that's not possible, the only cross-reference targets are those in the screenshots I posted.

Translate
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 Beginner ,
Sep 10, 2025 Sep 10, 2025

Thank you very much anyway.

Translate
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
Guide ,
Sep 10, 2025 Sep 10, 2025

Hi Peter,

 

Applying a specific char style to the cross-ref., a simple script could simply find the variable corresponding to the section numbering (of the cross-ref.) and convert it to text.

Including a grep style to make the "-page number" invisible, the op will get what he tries to play.

 

(^/)  The Jedi

Translate
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 ,
Sep 10, 2025 Sep 10, 2025

Yes, but you'd have to override the section marker and apply the style (or a text anchor). Then you need to undo it when the document changes.

Translate
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
Guide ,
Sep 10, 2025 Sep 10, 2025

Not exactly!

Thinking a little more : the char style is directly applied in the cross-ref. settings, the script just searches the right variable with this applied char style, converts the variable to text and, instead of using a grep style, runs this simplistic regex:

Find: Section \u+\K-\d+ with char style / Replace by nothing.

So, if the layout moves, the Script will just need to firts update the cross-ref. and play the process above again.

 

(^/)

Translate
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 ,
Sep 10, 2025 Sep 10, 2025

There is no variable in the sense of text variable. A script could go to the first page of a section, read the section market's content, add a text frame on the page, add a text anchor named for the section marker. Then create a cross-ref to that anchor.

Translate
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
Guide ,
Sep 10, 2025 Sep 10, 2025

Peter,

This simple regex is relevant to play the game:

 

Capture d’écran 2025-09-10 à 19.50.06.png

 

(^/)

Translate
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 ,
Sep 10, 2025 Sep 10, 2025

So you see, @Dario DBZ Zanfardin , there's a way to do it, preferably with a script.

Translate
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 Beginner ,
Sep 10, 2025 Sep 10, 2025
LATEST

Thank you very much @Peter Kahrel @FRIdNGE 

Translate
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