Copy link to clipboard
Copied
Bonjour,
Comment faire pour ajouter le numéro de puce d'un titre dans un en-tête de page continu (dans le gabarit), de manière automatique ?
Le nom du titre apparait bien dans l'en-tête (sous forme de variable, avec un style), mais pas le numéro de la puce.
Je joins une photo de mon document.
Merci pour votre aide.
Il y a effectivement "plus simple" et sans script ! … 4 manip. relativement basiques :
Point de départ :
Présupposé :
Lizaaa a bien évidemment créé sur les pages de gabarit un bloc-text contenant la variable "Running header" basée sur le style de paragraphe que l'on va appeler pour l'exemple "heading".
Étape 1 : On crée le Style de caractère suivant "Invisible" :
Étape 2 : On insère un style Grep dans notre Style de paragraphe "heading" (qui permettra de rendre invisible le texte associé)
...Well, Michel, that's a lot of steps, all of which can be captured in a script. I updated the script so that it handles everything, including adding and applying GREP styles, so that the only document preparation is to make sure that the running-header frames are labelled correctly. and I updated the web page to reflect that there's not really much to do.
Later: Your solution is great if it's just about automatic paragraph numbers -- very clever! But when styling is involved then the solution I
...Copy link to clipboard
Copied
La seule solution que je vois (mais qui n'est pas parfaite) est de convertir la numérotation automatique en texte (sélection du style dans le panneau des styles de paragraphe, puis clic droit > convertir [Nom du style] Numérotation en texte). Bien évidemment, il faut faire ça à la toute fin, quand ton document est finalisé.
Une fois la manipulation faite, les en-têtes se mettent à jour et incluent la numérotation.
Copy link to clipboard
Copied
From my phone:
Hmm!
(^/) The Jedi
Copy link to clipboard
Copied
Décidément Michel tu resteras un mystère pour moi !
Copy link to clipboard
Copied
Merci pour votre réponse, mais malheureusement, cette façon de faire me supprime toute la numérotation de mon document (niveau 1), qui est très long.
Une autre solution ?
Merci à vous.
Copy link to clipboard
Copied
Je ne comprends pas pourquoi le fait de convertir la numérotation en texte la supprime.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
OK, je comprends mieux. Je n'ai pas d'autre solution, mis à part convertir en texte TOUTES les numérotations automatiques des styles de paragraphe en commençant par le niveau le plus bas. Ou bien attendre une réponse de @FRIdNGE qui va peut-être nous dire que c'est facilement scriptable. Tu peux aussi essayer de contacter Laurent Tournier https://www.linkedin.com/in/laurent-tournier-786a0540/?originalSubdomain=fr et jeter un œil à son livre « Optimiser InDesign pour les documents longs » https://www.indigrep.com/Optimiser_presentation.html c'est le spécialiste français de ce type de cas.
Copy link to clipboard
Copied
Merci beaucoup jmlevy pour les infos et les liens.
Si quelqu'un a une autre solution, je suis preneuse.
Merci beaucoup pour votre aide.
Copy link to clipboard
Copied
La solution proposée par @Peter Kahrel ne te convient pas ?
Copy link to clipboard
Copied
Cette solution me semble un peu compliquée, et je n'ai jamais utilisé de script.
D'après ce que j'ai compris, il s'agit d'un script qui transforme les puces en texte, donc à vraiment faire à la dernière minute.
Copy link to clipboard
Copied
Il y a effectivement "plus simple" et sans script ! … 4 manip. relativement basiques :
Point de départ :
Présupposé :
Lizaaa a bien évidemment créé sur les pages de gabarit un bloc-text contenant la variable "Running header" basée sur le style de paragraphe que l'on va appeler pour l'exemple "heading".
Étape 1 : On crée le Style de caractère suivant "Invisible" :
Étape 2 : On insère un style Grep dans notre Style de paragraphe "heading" (qui permettra de rendre invisible le texte associé) :
Auto-num :
Style Grep :
Étape 3 : Dans le panneau des Styles de paragraphe, on clique-droit sur le style de paragraphe "heading",
1/ On "convertit heading Numérotation en texte", comme Jean-Marc l'a proposé … très justement ! 😉
2/ On réactive l'auto-num que l'on vient de détruire en remodifiant l'option du style de paragraphe "heading" :
• Après destruction et avant reconstruction :
• Après reconstruction :
… Voilà, le tour est joué !
Bien évidemment, en ce qui me concerne, toutes ces manip. sont gérées via un Script et le jeu se fait en 1 clic.
Et ce clic se fait quand on veut et n'est absolument pas destructif.
Cette approche présente bien évidemment certaines limites d'enrichissement que Peter intègre mais elle peut s'avérer suffisante dans nombre de cas … et peut-être celui qui nous intéresse ici !
(^/) The Jedi
Copy link to clipboard
Copied
Michel, j'ai suivi pas à pas le déroulé et le fait de rétablir la numérotation automatique de l'en-tête ne fait que tous les numéroter en 1. J'ai raté un truc, certainement.
Copy link to clipboard
Copied
Qui a parlé de la num du titre courant ! Pas moi ! 😉
(^/)
Copy link to clipboard
Copied
OK, compris ! Brillant !
J'utilise le truc du syle invisble pour d'autres cas un peu tordus, mais là, je n'y ai pas pensé.
Copy link to clipboard
Copied
Merci beaucoup pour toutes ces explications, FRIdNGE !
Je n'ai pas tout compris mais ça semble fonctionner dans mon fichier de test.
Je n'ai plus qu'à apprendre le GREP et à faire des script maintenant...
Mille mercis.
Copy link to clipboard
Copied
This problem comes back regularly. Here's a (convoluted) workaround:
https://creativepro.com/files/kahrel/indesign/text-variables-in-running-headers.html
Copy link to clipboard
Copied
Thank you very much for the link, Peter Kahrel.
It all seems a bit complicated, but I'll give it a try.
Thanks!
Copy link to clipboard
Copied
Well, Michel, that's a lot of steps, all of which can be captured in a script. I updated the script so that it handles everything, including adding and applying GREP styles, so that the only document preparation is to make sure that the running-header frames are labelled correctly. and I updated the web page to reflect that there's not really much to do.
Later: Your solution is great if it's just about automatic paragraph numbers -- very clever! But when styling is involved then the solution I described is needed.
Copy link to clipboard
Copied
Probably mustard after the meal, but I updated the script to deal better with paragraph numbers (adopting Michel's trick), separately from text styling. And rewrote the web page accordingly. Same link.