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
hanging indents on centered text
- This topic has 25 replies, 3 voices, and was last updated 5 years, 1 month ago by
Flavio Mini.
-
AuthorPosts
-
-
October 21, 2020 at 1:04 pm #14331090
Flavio Mini
Participantby using a paragraph style I would like to create a hanging indent on centered text.
-
October 21, 2020 at 1:22 pm #14331092
David BlatnerKeymasterDo you have a picture of what this should look like? You cannot upload here, but you can put the picture on a sharing site and link to it.
More on hanging indents here:
-
October 21, 2020 at 1:53 pm #14331100
Flavio Mini
ParticipantHanging indent centered the second line is offset
Whereas hanging indent on justified left lines up
2 images found here
https://www.dropbox.com/sh/tf1mrkponbkf9q7/AAC1S_JSpyskun7RWYht4dO6a?dl=0 -
October 21, 2020 at 2:59 pm #14331114
David BlatnerKeymasterAh! I see now. That is going to be very tricky. But it would be easy if you use a table. Put the “Figure 1” in one column, and the other text in the second column.
Or maybe you can use an anchored frame, like in this poetry example:
-
October 24, 2020 at 10:55 am #14331655
Michel Allio for FRIdNGE
ParticipantNot really tricky! Just a 6-lines simplistic script! [I’ve just counted in my head]
(^/) The Jedi
-
October 24, 2020 at 10:55 am #14331670
David BlatnerKeymasterLOL. Michel is back!
Yes, I am sure it is very possible with scripting. :-)
-
-
October 24, 2020 at 11:19 am #14331671
Flavio Mini
ParticipantGreat Michael (^/)The Jedi
but what is the answer:) -
October 24, 2020 at 4:06 pm #14331672
Michel Allio for FRIdNGE
ParticipantDavid, je serai de retour quand tu supprimeras ta modération débile [5h de décalage entre mon post et son affichage].
LOL
-
October 24, 2020 at 4:09 pm #14331675
David BlatnerKeymasterBien, j’ai fait le changement. J’espère que vous pouvez jouer selon les règles! J’ai hâte que vous aidiez les gens plus que de les rendre fous.
-
-
October 24, 2020 at 4:27 pm #14331676
Michel Allio for FRIdNGE
ParticipantOk! … Simplement pour vérifier !
(^/)
-
October 24, 2020 at 5:03 pm #14331677
Michel Allio for FRIdNGE
ParticipantCool ! Merci David.
Il ne te reste plus qu’à annuler la modération sur les commentaires du reste de ton site web et le décret de bannissement de ton shérif sur Facebook !
A+ et merci pour ta joie de me voir revenir ! [ je note également que tu as fait beaucoup de progrès en Français ! ;-) ]
(^/) The Jedi, who is [nearly] back!
-
October 24, 2020 at 5:04 pm #14331679
David BlatnerKeymasterWell, thank goodness for Google Translate. :-)
I did remove the moderation here… I thought I did. But it looks like something might still be stuck. So please forgive me, and be patient.
-
-
October 26, 2020 at 5:30 am #14331687
Michel Allio for FRIdNGE
Participant@ David Blatner: Done? …
(^/) The Jedi
-
October 26, 2020 at 5:48 am #14331691
Flavio Mini
ParticipantBonjour Michel moi aussi je suis en attente.
pendant que nous attendon David es-ce que ill y’a une façon de change le nom de la figure dans le texte
j’aimerais que la refence dans le texte est comme fig. xx.xx au lieu de Figure. xx-xx -
October 26, 2020 at 9:29 am #14331764
Flavio Mini
ParticipantThe tip center on the longest line does not suit what I need. nice tip I can use that in another part of the book
I have a figure text box that is 2.5″ wide or 5″
what I need to do is center the text in this text box
no problem for that all I have to do is set the center option.
but if the the text line is too long the second line will flow and also be centered.
what I would like is that the second and all other lines line up with the first word in the figure description
it would be very useful
many figures in this book that I am working onAgain thank you for the help
-
October 26, 2020 at 10:07 am #14331770
Flavio Mini
ParticipantOooop’s
forgot to mention something
the maximum figure size width is 2.375 and 5.00
;) -
October 26, 2020 at 4:09 pm #14331837
Michel Allio for FRIdNGE
ParticipantI was wrong: I needed 7 code-lines!
(^/) The Jedi
/*
_FRIdNGE-0662_Justif-Center.jsx
Script written by FRIdNGE, Michel Allio [26/10/2020]
See: https://creativepro.com/topic/hanging-indents-on-centered-text/ [Flavio Mini, 21/10/2020]
Object: Left-indent calculated on para first line parameters. Not use a “tab” as delimiter but another space-type.
*/app.doScript(“main()”, ScriptLanguage.javascript, undefined, UndoModes.FAST_ENTIRE_SCRIPT, “Justif-Center! …”);
function main()
{
var mySel = app.selection[0].paragraphs[0],
myLeft = mySel.lines[0].insertionPoints[0].horizontalOffset – app.selection[0].parentTextFrames[0].geometricBounds[1];
myRight = app.selection[0].parentTextFrames[0].geometricBounds[3] – mySel.lines[0].insertionPoints[-2].horizontalOffset;
mySel.justification = Justification.LEFT_ALIGN;
mySel.leftIndent = myLeft;
mySel.rightIndent = myRight;
mySel.firstLineIndent = -myLeft + myRight;
} -
October 27, 2020 at 5:27 am #14331851
Flavio Mini
ParticipantThank you very much for the help
I am totally new with scripting
no idea on how to create or save scripts
I know how to import a script into InDesign
but: How do I save the script that Michel has so graciously providedI can copy from . /* upto and include the last}
paste into what an editor (in my case TextEdit)
and then what?Flavio
-
October 27, 2020 at 8:16 am #14331853
David BlatnerKeymasterThis should help:
How to Install a Script in InDesign That You Found in a Forum or Blog Post
Especially note the need to change curly quotes to straight quotes!! (Our forum automatically changes the quotes.)
Michel: In the future, please put <code> or pre html tags around the code. :-)
-
October 27, 2020 at 8:21 am #14331855
David BlatnerKeymaster@Michel: It is important to explain how to use this code: What needs to be selected? What kind of “setup” do we need? I have tested it and only get errors.
-
-
October 27, 2020 at 8:26 am #14331856
Flavio Mini
ParticipantMan you guys are awesome
-
October 27, 2020 at 8:26 am #14331857
Michel Allio for FRIdNGE
ParticipantJust place the cursor in the para you want to be treated!
Simplistic!(^/)
-
October 27, 2020 at 8:45 am #14331858
David BlatnerKeymasterPerhaps I am missing something obvious, but what does this mean: “Not use a ‘tab’ as delimiter but another space-type”?
I was getting a syntax error… I see how that our forum also changes the “-” to an en dash! That is strange. So line 14 and 15 were causing problems until I changed the code to this:
/*
_FRIdNGE-0662_Justif-Center.jsx
Script written by FRIdNGE, Michel Allio [26/10/2020]
See: https://creativepro.com/topic/hanging-indents-on-centered-text/ [Flavio Mini, 21/10/2020]
Object: Left-indent calculated on para first line parameters. Not use a “tab” as delimiter but another space-type.
*/app.doScript("main()", ScriptLanguage.javascript, undefined, UndoModes.FAST_ENTIRE_SCRIPT, "Justif-Center! …");
function main()
{
var mySel = app.selection[0].paragraphs[0],
myLeft = mySel.lines[0].insertionPoints[0].horizontalOffset - app.selection[0].parentTextFrames[0].geometricBounds[1];
myRight = app.selection[0].parentTextFrames[0].geometricBounds[3] - mySel.lines[0].insertionPoints[-2].horizontalOffset;
mySel.justification = Justification.LEFT_ALIGN;
mySel.leftIndent = myLeft;
mySel.rightIndent = myRight;
mySel.firstLineIndent = -myLeft + myRight;
}
-
-
October 27, 2020 at 10:38 am #14331861
Flavio Mini
ParticipantDavid instead of using a tab delimiter how about and indent to here mac indesign shortcut “cmd\”
Just tried it and it works wonderfully
YAAAAAAAAAAAAA!!!!!
this reduces my styles from 3 different styles to just 1
imagine 3 styles for Figure number, 3 for Tables, 3 For Examples , 3 for Problems
That’s 4 styles instead of 12…….
-
October 27, 2020 at 10:45 am #14331862
Michel Allio for FRIdNGE
ParticipantThat’s the “light” version!
The “batch” version works for all the doc with just “1click”!
But you will have to find it … in a galaxy far far away!
(^/)
-
October 27, 2020 at 10:52 am #14331863
Flavio Mini
ParticipantI will follow the force….
no I am trying the other little problem of changing Figure to fig.
Stay tuned on the other help request…..
-
-
AuthorPosts
- The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
