Making a textframe centre within margins but be left justified

I'd like a textframe to size its width automatically and centre itself within page margins, but for the text to remain left justified. Is this possible? e.g. Three pages of poetry with very different line lengths. If possible this would be some sort of general layout that I could then drop different pages of text into

I like the double-click-the-right-handle idea. And if you need to add a poem earlier, add a page using the page palette and all of the custom frames will stay with their poems.
I happen to have an Applescript for shrinking a frame to its longest line and centering it. It's designed to work both for left or centered justified text (I had some poems where the text was centered but the author attribution was right justified, we wanted the right end of that to line up with the right end of whatever the longest line of text is, so shrinking those text frames was important too). You can select all of the frames on a spread and it will adjust each of them to its longest line, or if you've got text selected it will work on whatever frame the cursor is in. I've adapted it below to an 8.5 x 11 page document, but it's pretty straightforward to change. You'll want to define LeftColumnCenter to the horizontal offset, in picas, of the centerline of the left page; and likewise RightColumnCenter to the centerline of the right page.
Assign this a keystroke shortcut, and your job should zip along.
tell application "Adobe InDesign CS3"
tell view preferences of active document
set horizontal measurement units to picas
end tell
-- Change the following numbers to the horizontal offset, in picas, of
-- the vertical line you want the frame to align to on the left and right pages.
set LeftColumnCenter to 25.5
set RightColumnCenter to 76.5
repeat with SelectionCounter from 1 to count of items in selection
set mySelection to item SelectionCounter of selection
if class of mySelection is not text frame then
set myFrames to parent text frames of item SelectionCounter of selection
set myFrame to item SelectionCounter of myFrames
else
set myFrame to mySelection
end if
-- get the boundaries of the selected frame
set OriginalBounds to geometric bounds of myFrame
set OriginalTop to item 1 of OriginalBounds
set OriginalLeft to item 2 of OriginalBounds
set OriginalBottom to item 3 of OriginalBounds
set OriginalRight to item 4 of OriginalBounds
-- figure out if the selected frame is on the right or left page
set ColumnCenter to LeftColumnCenter
if OriginalLeft is greater than 56 then
set ColumnCenter to RightColumnCenter
end if
-- find the length of each line in the frame and remember the longest one
set NumberOfLines to number of lines in myFrame
set LongestLine to 2
tell view preferences
set horizontal measurement units to points
end tell
repeat with myCounter from 1 to NumberOfLines
if justification of line myCounter of myFrame is in {left align, left justified} then
set StartOfLine to horizontal offset of line myCounter of myFrame
set EndOfLine to end horizontal offset of line myCounter of myFrame
set StartofCharacter to horizontal offset of last character of line myCounter of myFrame
set EndofCharacter to end horizontal offset of last character of line myCounter of myFrame
set ThicknessofCharacter to EndofCharacter - StartofCharacter
set LineLength to (EndOfLine - StartOfLine) - ThicknessofCharacter
if LongestLine is less than (LineLength) then
set LongestLine to (LineLength)
end if
end if
if justification of line myCounter of myFrame is in {center align, center justified, fully justified} then
set StartOfLine to horizontal offset of line myCounter of myFrame
set EndOfLine to end horizontal offset of line myCounter of myFrame
set LineLength to EndOfLine - StartOfLine
--+ (point size of last character of line myCounter of myFrame) * 0.05
if LongestLine is less than (LineLength) then
set LongestLine to (LineLength)
end if
end if
end repeat
--figure out the new width of the frame and assign the new bounds to the frame
set HalfLine to LongestLine / 2
set NewLeft to ColumnCenter - (HalfLine)
set NewRight to ColumnCenter + (HalfLine)
set geometric bounds of object reference of myFrame to {OriginalTop, NewLeft, OriginalBottom, NewRight}
end repeat
end tell

Similar Messages

  • Very URGENT:am not able to log in to my account on installation of OSX lion...tried to resolve this issue by calling apple support centre ,but was left in vain...am not able to access my documents nor do any work...plz help me resolve this issue asap...

    am not able to log in to my user account after installation of OSXLion,have called up the support centre many times,but was left in vain ...i belief its a simple problem ,but why is apple support center not able to help me out ...have given them all the required information with respect to everything...somebody plz help me to log in as am not able to access my docs and do any work...

    My phone works all fine when am in mumbai but as soon s i leave mumbai I am not able to make an otgoing call
    This is entirely a carrier issue.  If your carrier (airtel) doesn't provide service outside of Mumbia, this has nothing to do with your iPhone.
    i feel i need to change my brand
    This is a user-to-user tech support forum, not Apple.  No one here cares at all about your threats.
    NEVER post personal info in this public forum

  • I am making an animation(frames) on Illustration but im having a problem.

    SO Im making the frames for my animation on illustrator - im making 8 frames per artboard. (im gonna have around 450 frames)
    But i have to put each frame in Photoshop - the size of a6 paper (making a flip book too) .
    But its takes so long to put each frame into photoshop and then i have to save it which also takes ages ?????????????
    Is there any fast ways to do this?
    PLease  if  you know a way you will save me soooo sooo soo much time.

    Sorry i did no explain my self.
    I am making a animation (stop-motion with type)
    I am making the frames on illustrator - i make 8 frames on one art board at a time.
    I then takes those frames i made ( each frame is a word blending in to each other) Ie  'Memory' into 'of'  Happy into Sad.  so its takes 8 frames to do that.
    I then copy and paste each frame/word into photoshop so i centre the frame/word so the animation will be more smooth . But there will be aout 500 frames and it takes ages.
    I was wondering is there a faster way to do this.
    I not to familar with Illustrator . rememeber i got 8 frames that have to be saved separtly on illustrator at a time !!!
    Thanks Monika

  • 5th Gen iPod seen in iTunes, shows sync complete within seconds but nothing

    5th Gen iPod seen in iTunes, shows sync complete within seconds but nothing actually gets transferred. iTunes64 bit on new laptop. Has synced successfully for a couple weeks.
    This is my spouse's device and she is away for awhile. Is she stuck or try a restore? Don't want to do that until last resort in case ipod will not load afterwards.

    mine used to freeze randomly during songs and i re-set it twice and that worked.

  • How can I troubleshoot this problem with the iMac keyboard? My keyboard disconnects and reconnects within seconds but all the typing is lost while it was offline.  This is usually 5 seconds or less but happens 2 or 3 times in a minute.  Annoying!

    My wireless keyboard disconnects and reconnects within seconds but all text that was typed during the time offline is missing.  i have to go back and retype missing parts.  What can I do to troubleshoot this.  The computer is only about six month old.  This problem is new in the last couple weeks.  Thanks for suggestions.

    Beat me to it, Donald.     But there is a possible alternative.  If the batteries have been replaced since new, were they replaced with the same batteries or another make.    There are examples around which do not fit perfectly and leave a certain amount of movement inside the battery housing.  That could lead to instability such as the OP describes.

  • Making the move to 16:9, but totally confused about what settings to use!

    Hi, It seems to me that since all new TV's being sold are wide-screen, it is time for me to stop making videos in 4:3. But I am completely stumped by the procedure to work in 16:9. I have shot my footage in standard definition, 16:9. The final product will be a DVD created in DVD Studio Pro. I would like the picture to fill a widescreen TV, and.... when played on a 4:3 screen, I would like it to fill the width of the screen and be letterboxed on top and bottom.
    I think that I am correct to capture this footage into Final Cut Express, using Easy Setup, and choosing 'Anamorphic'. At least that gives me a 16:9 screen in FCE.
    But can someone tell me what settings to use in DVDSP when I when I import that video? I tried to import Anamorphic video into DVDSP, and went to Preferences, and chose 16:9 Letterbox. I got a wide screen, but my footage came in as a squished 4:3 image. I'm totally at a loss, and would very much appreciate any help you can give.
    Thanks very much, Bob

    Yes, Anamorphic is the Easy Setup you'd want to use in FCE.
    When I say it's distorted, that means anamorphic is recorded to tape squished (much like how it imports into DVDSP for you) and that the format demands being unsqueezed during playback. Sorry, if I scared you.
    The encoding settings are also available in DVDSP's Preferences under the Encoding tab.
    Also - and this is the single most important element of this workflow - in addition to setting the default Display Mode to 16:9 Letterbox, be sure to confirm that this is not overridden (for whatever reason) after you've placed your clips onto a track. So check the Inspector and make sure Display mode is correct. (It's been known to happen once in a blue moon and, if not readjusted, will mean that your DVD will not display correctly on any proper setup)

  • Making a interactive PDF from indesign, but it's too big. Tried to reduce file size in Acrobat, but

    Making a interactive PDF from indesign, but it's too big. Tried to reduce file size in Acrobat, but it does not reduce file size.

    Use the Optimize PDF command in Acrobat, it gives you more control. I think it's under the Advanced menu in Acrobat 9 Pro and File > Save As > Optimized PDF in Acrobat X Pro.
    You might try playing around with different settings. You can also click the Audit Space button at the upper right to see if its from images or other things causing the file size problem.
    Unfortunately, InDesign doesn't write interactivity in a very optimized way. You get better results with buttons, for example, creating them in Acrobat Pro and using the Duplicate command to duplicate them across multiple pages.

  • HT4356 The ipad2 working fine with AirPrint. Now the print centre says printing but nothing happens. Anyway to fix this ?

    The AirPrint from ipad2 to hp printer was working fine. All of a sudden the function no longer works! The ipad2 recognises the printer and even sends the print command. The printer centre say 'printing' but it remains syptuck in that position and no printing occurs. I've reset the wireless connections and deleted printing queues and reset the printter to original settings. The printer is found but nothing happens! Can anyone help out?

     ccrobin I’m sorry your having this much trouble with this printer . Hopefully this step will fix your problem try a partial reset.
    Ccrobin have you tried to connect a USB cord to the printer directly to the computer to see if it has the same issue?
    {edited for non standard info}

  • HT4623 So I upgraded my 4S phone to IOS6, and when I try to log in to Cloud on the phone, it comes back as wrong password. I tried a dozen times, VERY SLOOOOWLY to make sure I wasn't making some sort of typing error, but noo.

    So I upgraded my 4S phone to IOS6, and when I try to log in to Cloud on the phone, it comes back as wrong password. I tried a dozen times, VERY SLOOOOWLY to make sure I wasn't making some sort of typing error, but noo.

    hi i had the same problem today when i updated my itunes to latest version. however, i have just found my songs in the 'itunes media' folder. this was accessed through 'my music'  then keep clicking through until you find itunes media and all my library songs were in there and i then just added these files to my library and all were restored however, i have lost all my playlists but at least my 700 songs are back. very dissapointed with apple that they have let this happen with their latest update, the previous version was miles better than this one . hope you find them. stevo

  • Work Centre within BOM

    Hi all,
    I am working in a manufacturing company, and the company is considering to use SAP B1 to replace the current system. However, we are not fully confident on how SAP B1 handles work centre within BOM.
    The current system:
    We have 10-12 work centre that works as a cost centre and it is associated with the machineries we have. In that work centre setting, we set labour cost, production speed, number of production in an hour etc, the purpose is to enable calculating the production cost per item and for other purposes as well.
    We also have work sequences, that will pretty much handle the sequences in producing items. The relationship between work centre and work sequence is one to many or one to one.
    Does SAP B1 have this capability?
    Another question will be in regard to barcoding. I understand that there is add-on to handle barcoding and RFID. My question is whether the SAP B1 add-on can handle the automatic process of updating the system when the barcode scanner is used, or do we have to update the system manually?
    Thanks in advance for the help.
    Regards
    Ferdinand

    Hi Hendry,
    Many thanks for your suggestion. My company's objective is replicating the the current DBA Manufacturing system, that means saving monies whenever possible to do so. The primary option is AIO, however the Board asked project members to explore the possibilities to implement B1.
    I will conclude now that B1 is be good enough to fully replicate DBA Manufacturing without hassles of implementing heaps of add-ons.
    Thanks everyone.
    I'd like to keep the thread on, in case if I have further questions.
    Regards
    Ferdinand

  • Hello-- I'am thinking off making an app to the iphone, but i'am not sure aboutsomething. the app should get some alarms from a specific phone number, and my question is, can i make an app that can receive message from a specific phone number ?

    Hello-- I'am thinking off making an app to the iphone, but i'am not sure aboutsomething. the app should get some alarms from a specific phone number, and my question is, can i make an app that can receive message from a specific phone number ?

    This needs to be asked at http://developer.apple.com/

  • Adjusting margins on the left?

    Hi,
    I need to adjust the margin on the left hand side of the page to 2.2cm. Is there a way to do this?
    Regards,
    Jeremy

    FormsCentral does not have a page setup in which you can adjust the margins.  You can try changing the field label location to see if that helps, but there is no precision control that sets page margins.

  • How to fill up my laptop screen with Firefox horizontally as it currently has a 3" margin on the left and right sides?tly has a

    I just purchased a 17.3" screened-laptop using MS Outlook and Explorer 9 Browser. I cannot use Firefox as my default Browser because I cannot get Firefox to fill up my screen.When I open up Firefox, it maintains a large 3" margin on the left and right sides which does not exist when I open up Explorer 9. Increasing the font size only increases the text size vertically but does nothing to decrease the margin size horizontally.

    You can use this extension to set a default font size and page zoom on web pages:
    *Default FullZoom Level: https://addons.mozilla.org/firefox/addon/default-fullzoom-level/

  • The screen of my ipod broke so will i be able to get a new one but i left my ipod in the locker and my mom is planning to go tomorrow without the ipod to the apple store

    the screen of my ipod cracked so will i be able to get a new one but i left my ipod in the locker and my mom is planning to go tomorrow without the ipod to the apple store but we still got the case of the ipod from the first day we cant find the receit though

    1) you can get a replacement one, though you might have to pay the out of warranty price for the device (normal iPod touch 4th gen 8g = $99)
    2) If you don't have the iPod itself, its is highly unlikely they'll replace it since you won't be handing the original over (since its in your locker)

  • How do you unlock a disabled ipad mini? I have my notes in Notability and I don't want to lose them. I know my passcode but I left my keyboard on and it disabled it.

    How do you unlock a disabled ipad mini? I have my notes in Notability and I don't want to lose them. I know my passcode but I left my keyboard on and it disabled it.

    Unfortunately... Once the Device is asking to be Restored with iTunes... it is too late to save anything...
    See Here  >  http://support.apple.com/kb/HT1808
    However... Once you have Recovered your Device...
    Re-Sync your Content or Restore from the most recent Backup...
    Restore from Backup  >  http://support.apple.com/kb/ht1766
    Jessica Sanchez wrote:
    I am installing itunes to a laptop and have not sync device to this lap. ...
    Using a computer, other than the one you have regularily been Syncing and Backing up to, was the begining of your issue.

Maybe you are looking for