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

Indent to here with right align tab

New Here ,
Jul 08, 2021 Jul 08, 2021

Copy link to clipboard

Copied

 I'm typesetting a volume of correspondence. I would like to have the address set flush right with the text frame and the date immediately under it but aligned flush left with the beginning of the address:

 

Screenshot 2021-07-08 at 17.09.58.png

 

In this instance, I've set the address with a right-align tab and the date with a manually adjusted tab to align beneath it. But I would like to somewhat automate this, as I can't manually adjust every instance.

 

What I had planned to do was to insert an "indent to here" marker at the beginning of the address line, but this doesn't work: for some reason, it forces the following text out of the bounds of the text frame:

 

Screenshot 2021-07-08 at 17.13.14.png

This may be a bug or it may be a feature; either way, it doesn't work for what I need to do here. I feel like this should be fairly straightforward, but nothing I have tried works. Any tips or workarounds would be appreciated. I'm using the latest InDesign on a MacBook Pro.

 

All best,

 

Sudhaus

TOPICS
How to , Type

Views

826

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

Community Expert , Jul 08, 2021 Jul 08, 2021

The indent to here marker can produce unexpected results—I’m not sure why it’s not working with the right indent tab.

 

The indent for the 2nd line could be scripted so that it matches the horizontal position of the address line. Something like this where you put your cursor anywhere in the address line and run the script, which could be assigned a key command:

 

 

var sel = app.documents.item(0).selection[0];
var ho = sel.parent.paragraphs[sel.paragraphs[0].index].insertionPoints[1].horizontalO
...

Votes

Translate

Translate
Community Expert ,
Jul 08, 2021 Jul 08, 2021

Copy link to clipboard

Copied

Set it in a separate text frame

and set the auto width from the right as per below

 

EugeneTyson_2-1625759490354.png

 

 

Anchor your text frame in your overall text frame.

Cut the frame. 

Place the text cursor into the letter text frame

Paste

It's now anchored. 

 

you can right align it and add more text and the text frame will grow

 
 

EugeneTyson_1-1625759462019.png

 

 

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 ,
Jul 08, 2021 Jul 08, 2021

Copy link to clipboard

Copied

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
New Here ,
Jul 08, 2021 Jul 08, 2021

Copy link to clipboard

Copied

Thanks so much, Eugene. This is quite neat but is there not a way to keep it within a single text frame? There will be several hundred of these address/date letter headings and I'm afraid this method might be rather laborious. 

 

In any case, thanks again. I appreciate the help.

 

Sudhaus

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 ,
Jul 08, 2021 Jul 08, 2021

Copy link to clipboard

Copied

I can't think of a way to be honest.

 

You could save the file as a template or as a snippet that could take the labor out of it.

 

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 ,
Jul 08, 2021 Jul 08, 2021

Copy link to clipboard

Copied

The indent to here marker can produce unexpected results—I’m not sure why it’s not working with the right indent tab.

 

The indent for the 2nd line could be scripted so that it matches the horizontal position of the address line. Something like this where you put your cursor anywhere in the address line and run the script, which could be assigned a key command:

 

 

var sel = app.documents.item(0).selection[0];
var ho = sel.parent.paragraphs[sel.paragraphs[0].index].insertionPoints[1].horizontalOffset;
var np = sel.parent.paragraphs[sel.paragraphs[0].index+1];
var npi = np.insertionPoints[0].horizontalOffset;
np.rightIndent = npi-ho;

 

 

Note there needs to be a right indent tab before the address and a full return between the two lines:

 

Screen Shot 38.pngScreen Shot 39.png

 

 

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 ,
Jul 08, 2021 Jul 08, 2021

Copy link to clipboard

Copied

@rob day That script worked perfectly for me, terrific, thanks! Great to have for future applications. I also created a paragraph style specifically for the location and date text, which might be helpful should just that portion of text ever need to be changed and as a find tag.

 

JainLemos_0-1625771387149.png

 

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 ,
Jul 08, 2021 Jul 08, 2021

Copy link to clipboard

Copied

I also created a paragraph style specifically for the location and date text,

 

Hi @J E L , I don’t think a paragraph style will work for @Sudhaus44 because the amount of right indent depends on the length of the address line—every date line would need a different right indent applied to the line below, which is what the script is doing. There might be a way to do this without a script, but the obvious Intent to Here character isn’t working.

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 ,
Jul 08, 2021 Jul 08, 2021

Copy link to clipboard

Copied

@rob day ... Hmmm. It's just a style with right alignment for those two sentences. Then, I manually inserted an "indent to here marker in front of the first character in the first line (which moves the marker to the center of the line and doesn't work as we know). Then ran your script and the result is correct. So it wouldn't matter how long the length of the first line is as far as I can see?

 

JainLemos_0-1625772965672.png

 

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 ,
Jul 08, 2021 Jul 08, 2021

Copy link to clipboard

Copied

I think if you try to make a change to the paragraph style, the lines won’t align anymore.

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 ,
Jul 08, 2021 Jul 08, 2021

Copy link to clipboard

Copied

Oh, okay, too bad. It is a strange thing though that it can't be more intuitive to do this simple thing!

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
New Here ,
Jul 08, 2021 Jul 08, 2021

Copy link to clipboard

Copied

I'm glad I'm not the only one who thinks it odd that this can't be done
more simply! Perhaps someone at Adobe needs to look at the function of the
"Indent to here" marker.

Anyway, thanks for your help.

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
New Here ,
Jul 08, 2021 Jul 08, 2021

Copy link to clipboard

Copied

Great, thank you so much!

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 ,
Jul 08, 2021 Jul 08, 2021

Copy link to clipboard

Copied

LATEST

I think it is a bug. 

 

You should post it here and if you do link it back to the forums so we can vote for it too

https://indesign.uservoice.com/forums/601180-adobe-indesign-bugs

 

 

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