Optical Margin Alignment in Paragraph Styles?

Hello,
I'm currently redesigning a newsletter for a company. I have been setting up various Paragraph Styles for different areas of text. Is there any way that I can use the Optical Margin Alignment tool in a Paragraph Style so that all text applied to that style uses the same Optical Margin Alignment setting? I'd rather not have to manually select every single piece of text and set it that way.
Any help would be greatly appreciated.
Thanks,
Laurence

Hi Steve,
Yes, I thought that would be the case. I've read everywhere that it can only be "ignored" in Paragraph Styles. I'm still learning InDesign in some respect, so could you explain to me what you mean when you say "at the level of a story"?
Also, is there any rule of thumb for using the Optical Margin Alignment with text? Or is it a simple case of trial and error until you get good results?

Similar Messages

  • Paragraph-level Optical Margin Alignment

    InDesign CS2 (4.0.5) on Mac (10.4.11) - shortly upgrading to CS4
    Maybe I'm missing something here, but I can't figure out the sense of having Optical Margin Alignment at "Story" level.
    I have a layout with a story that runs across several pages. Within that story (and in any given text frame), I have large headlines, medium-sized introductory paragraphs and/or pull quotes, and the body text. There appears to be no way of setting a type size to control the optical alignment for each paragraph. If I set the type size (in Story options) to the size of the body copy (say, 9pt), it isn't enough to make a difference to the headlines (say, 24pt). Obviously if I set the type size to 24pt it makes a total mess of the body copy. How many layouts only have one type size per story? Surely this hanging punctuation option needs to be at para level?

    Can you switch off Optical alignment in the paragraph styles in CS2
    or only CS3 and above?
    Even still, I think this is worthy of a feature (amendment) request.
    I'm not surprised it has been mentioned before!
    Having used Quark for years, I found InDesign so much better from
    version 2 (pre-CS) onwards, but this is just frustrating and so not
    like Adobe, whose products I generally rate as well-rounded and well
    conceived. Oh well, guess I'll just have to do my hanging
    quote marks manually… until CS5?

  • Optical margin alignment

    I'm using Win Indesign CC 2014.
    I would like one paragraph to have optical margin alignment. But I would like all the rest to not have it.
    It seems as though if I turn it on, that it applies optical margin alignment to the whole document.
    Is there any way to have it apply to just selected paragraphs, or have I just missed something?
    Thanks,
    Phil

    There is no way to select a single paragraph and apply Optical Margin Alignment to it, OMA is a story-wide setting.
    That said, funny enough (if you are inclined to think of such weird "design" decisions as "funny", ha ha), the reverse is possible: a paragraph and/or paragraph style can be set to ignore OMA. Look in the paragraph/style Alignment subdialog, there should be a checkbox.

  • Optical margin alignment not in Indesign cc

    When I open Story it is blank. There is no box to activate optical margin alignment. And there does not seem to be a way to activate it in Preferences. Are other users having the same problem or is this just me?
    James

    Try: Troubleshooting 101: Replace, or "trash" your InDesign preferences
    http://forums.adobe.com/thread/526990

  • Character styles & Body paragraph style not rendering as specified

    Hi, I am creating my first epub, and am using InDesign CS 5 (no intention of upgrading). I've constructed it as a book, each chapter in its own file. I am encountering two problems I am unable to think my way out of:
    1. None of the three character styles are rendering as they should.
    -"Bold" text is rendering much larger than "Body" paragraph style, even though both are specified at 18 px.
    -"Bullet" renders as UL, but at a much smaller point size than "Body" despite being specified as 18px.
    -"Ital" is also rendering a much larger font size than is should.
    2. I don't seem to be able to affect spacing between "Body" paragraphs, or below h1, etc.
    Any insights? Any help?
    Here is the CSS:
    @font-face {
    font-family: Times New Roman;
    font-style: normal;
    font-weight: bold;
    src:url("../Fonts/timesbd.ttf");
    @font-face {
    font-family: Times New Roman;
    font-style: normal;
    font-weight: normal;
    src:url("../Fonts/times.ttf");
    @font-face {
    font-family: Minion Pro;
    font-style: normal;
    font-weight: normal;
    src:url("../Fonts/MinionPro-Regular.otf");
    @font-face {
    font-family: Helvetica;
    font-style: normal;
    font-weight: bold;
    src:url("Fonts/hvb____.PFB");
    @font-face {
    font-family: Times New Roman;
    font-style: italic;
    font-weight: normal;
    src:url("../Fonts/timesi.ttf");
    div.generated-style {
    div.generated-style-2 {
    div.generated-style-3 {
    p.h1 {
    font-family: "Times New Roman";
    font-weight: bold;
    font-style: normal;
    font-size: 2em;
    line-height: 1.20em;
    text-decoration: none;
    font-variant: normal;
    text-indent: 0em;
    text-align: center;
    color: #000000;
    margin: 0em 0em 1em 0em;
    p.author {
    font-family: "Times New Roman";
    font-weight: normal;
    font-style: normal;
    font-size: 2em;
    line-height: 1.20em;
    text-decoration: none;
    font-variant: normal;
    text-indent: 0em;
    text-align: center;
    color: #000000;
    margin: 0em;
    p.body {
    font-family: "Times New Roman";
    font-weight: normal;
    font-style: normal;
    font-size: 1.50em;
    line-height: 1.20em;
    text-decoration: none;
    font-variant: normal;
    text-indent: 0em;
    text-align: left;
    color: #000000;
    margin: 0em;
    p.basic-paragraph {
    font-family: "Minion Pro";
    font-weight: normal;
    font-style: normal;
    font-size: 1em;
    line-height: 1.20em;
    text-decoration: none;
    font-variant: normal;
    text-indent: 0em;
    text-align: left;
    color: #000000;
    margin: 0em;
    p.h2 {
    font-family: "Times New Roman";
    font-weight: bold;
    font-style: normal;
    font-size: 1.67em;
    line-height: 1.20em;
    text-decoration: none;
    font-variant: normal;
    text-indent: 0em;
    text-align: left;
    color: #000000;
    margin: 1em 0em 0.50em 0em;
    p.h3 {
    font-family: "Times New Roman";
    font-weight: bold;
    font-style: normal;
    font-size: 1.50em;
    line-height: 1.20em;
    text-decoration: none;
    font-variant: normal;
    text-indent: 0em;
    text-align: left;
    color: #000000;
    margin: 0.78em 0em 0em 0em;
    p.bullet {
    font-family: "Times New Roman";
    font-weight: normal;
    font-style: normal;
    font-size: 1.50em;
    line-height: 1.20em;
    text-decoration: none;
    font-variant: normal;
    text-indent: 0.06em;
    text-align: left;
    color: #000000;
    margin: 0em 0em 0.56em 1.39em;
    p.caption {
    font-family: "Helvetica";
    font-weight: bold;
    font-style: normal;
    font-size: 1.33em;
    line-height: 1.20em;
    text-decoration: none;
    font-variant: normal;
    text-indent: 0em;
    text-align: center;
    color: #000000;
    margin: 0em;
    p.pr-head {
    font-family: "Times New Roman";
    font-weight: normal;
    font-style: normal;
    font-size: 1.50em;
    line-height: 1.20em;
    text-decoration: none;
    font-variant: normal;
    text-indent: 0em;
    text-align: center;
    color: #000000;
    margin: 0em;
    span.bold1 {
    font-family: "Helvetica";
    font-weight: bold;
    font-style: normal;
    font-size: 1.50em;
    span.ital {
    font-family: "Times New Roman";
    font-weight: normal;
    font-style: italic;
    font-size: 1.50em;
    span.no-style-override {
    span.h-link {
    text-decoration: underline;
    color: #0000ff;
    span.no-style-override-1 {

    Try watching this lynda course: Watch the Online Video Course InDesign CS5 to EPUB, Kindle, and iPad
    If you don't have a subscription this link will get you a 10 day trial: lynda.com library | Trial Subscription
    That said, I'd be remiss if I didn't tell you that you're in for a world of torture compared to InDesign CC2014. The advancements in EPUB export are amazing.

  • Newsletter layout, aligning columns, paragraph breaks and lines of text

    HI,
    I have never designed a newsletter before.
    It is annoying me because I am trying to be as meticulous as possible with my alignment, but I notice there are things all over the place that don't line up.
    I have a paragraph style, with space before and after. I have three columns. When I look at one line of text across all three columns, they do not line up. The WOULD line up if I had all straight text and no image wraps, but the image wraps, and the start of a new paragraph in column two, throws off alignment in column three.
    What is the best way to make stuff line up with the least amount of effort possible?
    Are there tutorials on good newsletter layout design? Grid layout?
    Thanks,
    Stan

    I just stated working with InDesign in my GA 101 class. It really was great fun but takes alot of practice. Still learning something new everyday. I  will be working with grids the next class and will be checking in the forum for help.
    Rhonda

  • Changes to [No Paragraph Style] causing unwanted style overrides

    Hi fellow InDesigners
    I'm using InDesign CS6. I'm working with long documents that were originally created in previous versions (CS4 and possibly earlier). My standard workflow for these jobs is to do the bulk of the text formatting in a newly created, bare-bones, single column document. First, I load the paragraph and character styles from the template, and when I'm done I copy and paste the formatted text back into the template for final layout and typesetting. This used to work fine in CS4, but in CS6, all my paragraphs show the plus sign in the Paragraph Styles panel, indicating that they have been overridden. They should be identical, since I imported the styles from one file to the other. The overrides include drop cap alignment, and even more obscure things like 'IdeoSpaceBehavior' and 'Diacritic Positioning'.
    It seems likely to me that this problem is due to Adobe having changed the definition of the mysteriously ubiquitous '[No Paragraph Style]' style between versions. The template file has carried over the definition from CS4, but the newly created working files have the new definition, and since [No Paragraph Style] is not included when importing styles from one document to another, the inconsistency remains. Copying and pasting text with no overrides in one document, shows overrides in the other.
    So the simplest solution I can think of, would be to change the [No Paragraph Style] in the template to match the definition of new CS6 documents. Is this even possible? My Googling thus far suggests that [No Paragraph Style] is pretty much untouchable.
    Is there nothing for it but to create the template files again as new documents in CS6?

    No worries Michael. Yes, I vaguely remember the change too.
    My understanding is, [No Paragraph Style] is very much a style—a paradoxically named style to be sure, but a style nonetheless. Check out the [Basic Paragraph] style definition by double clicking on it in the Paragraph Styles panel. It's style definition is: '[No Paragraph Style] + next: [Same style]'. That's it. Minion Pro 12 point, with auto leading—and every other conceivable paragraph attribute—all handled by [No Paragraph Style]. Adobe needed some defaults, and that's what [No Paragraph Style] is—just a default style. You can never escape it either, since every style, no matter what it's based on, has [No Paragraph Style] as its most senior ancestor.
    So that's essentially my problem. Adobe has, in their wisdom, changed the [No Paragraph Style] style between versions, so that a document originally created in an earlier version and a document created in CS6 have different [No Paragraph Style] settings. I'm pretty confident this is the cause of my problems.
    Lots of my paragraph styles inherit from other styles. Why would I not want that? My custom 'Paragraph' style has lots of other styles based on it—from typesetting variations, to quotes, lists, etc. But the 'Paragraph' style itself is based on [No Paragraph Style]. As I said, you can't really escape [No Paragraph Style].

  • GREP for changing paragraph style?

    Okay folks, I have another one for all you smart people out there. I think GREP can be used to change formatting in the following instance, but I have no idea how to set it up.
    I have a very long document, essentially a phone book-type listing of names, phone numbers, addresses, well over 150 pages' worth. The paragraph styles are fairly simple, only two per listing. The name/phone number is bold with a right hand tab with leader dots to a phone number that is flush to the right side of the column. The following lines are flush left, not bold, but indented 6pts. I've placed the text file and assigned the entire thing the NameListing paragraph style. I'd like to use GREP to find the address lines and change them to the NameListingAddress paragraph style.
    Here's a screen shot to give you an idea. The left column is formatted correctly with both styles, the right column is "raw", all paragraphs formatted with the NameListing paragraph style.
    Is this an appropriate application for GREP? If so, how do I set it up to only change the paragraphs that "don't have tabs"? It would save me a crapload of time.
    THANKS again! --Dina

    If your intent here is to use the character style to trigger a variable, as I belive it is based on your other thread, you MUST apply the character style up to the first tab to pick up the text at the start of the paragraph. There are two approaches to automating the formatting after that, but it may be too late for you to be much help.
    In cases where every listing has the same number of lines it makes sense to use a unique paragraph style name (not necessarily format -- base on on another) for each lline and make it its own paragraph. Set up "next styles" to rotate through the list so each line is assigned the correct style based on the style of its predecessor. You get the rotation to sart over by making the first line style the next style for the last line. This works for manual entry and can be applied to an entire block of placed text in a single operation by selecting the text, then right-clicking the name of the first style to be applied and choose Apply <stylename>, Then Next Style.This ONLY works if you have exactly the same number of paragraphs in each listing.
    The other option is to use forced line breaks instread of paragraphs and use one style for the entire listing. Set a left indent and negative first line indent, create a character style for the part of the first line that you want to appear in your header and apply it Up To ^t^n (that's a little-known trick -- if you enter more than one character in the trigger for a nested style it will activate on the first instance of any of the characters listed that occurs, so for example if you enter the word cat, your style will end on the first, c, a or t that appears inthe paragraph. ^t is the metacharacter for tab, and ^n is for forced line break) so that the style will end at either the tab, if present, or the forced line break if there is no tab (if you use a right-indent tab instead of a regualr right aligned tab [tricky to do a leader, but that's another discussion] substitute ^y for the ^t), then add a nested Line Style for one line. That line style should use a second character style that is based on the first character style you created for the name text and has no other attributes if you want the line to be the same from end to end. Sounds more complex than it is, and will work for listings with variable lenghths. The trick is to repalce your paragraph returns with forced line breaks, and will require a little thinking.
    If using separate paragraph styles for each line, you'd use the same technique of a nested style up to a tab for the first line, but there is no need to get fancier since it will apply to the whole line if there is no tab. The paragraph style, in this case, would carry all of the bold and size formatting (and no need for any indents), and the character style would be nothing more than a name that will allow you to use it in the variable.

  • Issue with right aligning of Character Styles in my TOC

    Hello all!
    I'm working on my very first book project and I have been reading soooo many threads on here for the past hour, but i either just don't get it, or i didn't find what i needed still, so i already apologize in case this very question has been answered before ...
    ok, so ... i am building my TOC and have set up the corresponding TOC styles to the paragraph styles used throughout the book.
    what i want is for the page number to appear before the entry. so for the page number i have set up it's own TOC page number character style.
    NOW
    the page number appears left aligned. I have checked the character styles palette and there i can't set a tab for the page number to appear right aligned ...
    how do i get this page number to be right aligned? and THEN, how do i specify the distance between the page number and the entry? there is "tab character"mentioned on the TOC dialogue box to specify the distance between page number and entry, but then do i have to go in manually every time something changes? that can't be it? i have seen in the paragraphy styles palette there is a tab section ... tried to input the tabs so the number would appear right aligned and the distance to the entry, but nothing happened, then the number is stuck right on the entry once the TOC is generated ...
    does this make any sense?
    will attach a screenshot to try to clarify the issue ...
    hope you can help me out.
    thanks a lot in advance!
    cheers
    sta-cy

    sta-cy wrote:
    sorry to have bugged you.
    Seriously, if we didn't enjoy this stuff we wouln't be here. It's not like we even get T-shirts. :-P
    An awful lot of what I know and am able to pass on comes from having spent waaaaay to much time here reading about odd problems and trying to figure out ways to solve them. I'd never seen a requst like yours until the other day, but then up pops Joel with a similar story, and what do you know, this may not be such a strange thing to want at all. Hopefully your question, and the work we put into trying to find an answer, has not only helped you, but some other users who come along next week or next year.
    Everybody starts someplace and at some point in time. There's no shame in being a beginner, and less in asking for help when you need it, especially after you put in the effort you did on your own to try to find a solution. It's also true that some folks are more design oriented and others more process oriented, and that's just the way it is. This forum has many, many, followers who are expert in different areas of InDesign (even the engineers who write the program are not experts in all the various parts) and are here to share what they know as volunteers. You are always welcome here, especially when the question is as intersting as this one.

  • Set tabs in Paragraph Style

    Hi, i am creating paragraph Styles in JavaScript. I looked but found absolutely no info about setting tabs in a paragraph style.
    Am i too tired? Can someone point me in the right direction please?
    Thanks
    Ben

    I have made two InDesign scripts, one that deletes all TabStops from all ParagraphStyles of a Document and one that adds TabStops to all ParagraphStyles of a Document.
    var oDoc = app.documents.item(0);
    // First delete all tabstops
    deleteTabStops(oDoc);
    var iNumberOfTabsToAdd = 3;
    var iTabDistance = 5;
    // Then add tabstops
    addTabStops(oDoc, iNumberOfTabsToAdd, iTabDistance);
    function deleteTabStops(oDocument)
         var iNumberOfParagraphStyles = oDocument.paragraphStyles.length;
         for (var iParagraphStyleItem = 0; iParagraphStyleItem < iNumberOfParagraphStyles; iParagraphStyleItem++) {
              var oParagraphStyle = oDoc.paragraphStyles.item(iParagraphStyleItem);
              if (oParagraphStyle != null) {
                   var iNumberOfTabStops = parseInt(oParagraphStyle.tabStops.length);
                   if (iNumberOfTabStops > 0) {
                        var iLastTabStop = parseInt(iNumberOfTabStops - 1);
                        for (var iLastTabStopItem = iLastTabStop; iLastTabStopItem >= 0; iLastTabStopItem--) {
                             var oTabStop = oParagraphStyle.tabStops.item(iLastTabStopItem);
                             if (oTabStop != null) {
                                  oTabStop.remove();
    function addTabStops(oDocument, iNumberOfTabsToAdd, iTabDistance)
         var iNumberOfParagraphStyles = oDocument.paragraphStyles.length;
         for (var iParagraphStyleItem = 0; iParagraphStyleItem < iNumberOfParagraphStyles; iParagraphStyleItem++) {
              var oParagraphStyle = oDoc.paragraphStyles.item(iParagraphStyleItem);
              if (oParagraphStyle != null && iParagraphStyleItem > 0) {
                   for (iTabNumber = 1; iTabNumber <= iNumberOfTabsToAdd; iTabNumber++) {
                        var sPosition = parseInt(iTabDistance * iTabNumber) + 'mm';
                        var oTabStop = oParagraphStyle.tabStops.add();
                        oTabStop.alignment = TabStopAlignment.CENTER_ALIGN;
                        oTabStop.leader = '';
                        oTabStop.position = sPosition;
    I hope this helps you further.

  • 'Clear Paragraph Style' and 'Clear Selection Style'

    In an old archived topic, someone wrote:
    quote:
    In DWMX, you could select text in the design view and in the
    "HTML Styles" window (which no longer exists in MX 2004) all you
    had to do was click "Clear Selection Style" and all HTML formatting
    (paragraph tags, font faces, colours, bold, italics etc) would be
    removed. This was marvellous for reformatting <font> tag
    based text with CSS. MX 2004 claims to be a CSS machine, but it
    seems to lack this very important feature which helps to re-inforce
    the use of CSS over font tags.
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=189&threadid=714513&arc tab=arc
    I absolutely agree, and none of the alternative methods
    people suggested in that thread matched this lost feature for speed
    and ease of use.
    I've not seen a replacement for these commands in Dreamweaver
    8 either (although I've often wished for one). Does anyone know of
    a hidden feature that exists in version 8 for removing all the HTML
    formatting in one fell swoop?

    I count 4 steps.
    1. Copy the entire line
    2. Paste into notepad
    3. Copy the entire line
    4. Paste into DW
    That does it nicely no matter how much presentational markup
    there is.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Kals" <[email protected]> wrote in message
    news:[email protected]...
    >
    quote:
    I think what the O/P is wanting is a quick and easy method to
    remove
    > all of
    > those presentational tags.
    >
    > Thanks Gary ? spot on! I'll use the term 'presentational
    markup' rather
    > than
    > 'HTML styles' from now on. (Excuse my ignorance, but
    what's an 'OP'?
    > Should I
    > like being called such a thing? :)
    >
    >
    quote:
    Murray: ? but you just cannot create predefined "HTML STYLES"
    any
    > longer.
    > It's no great loss....
    >
    > Agreed! Okay, we've established that no one's lamenting
    the loss of 'HTML
    > styles' in the sense of a style sheet that stores HTML
    presentational
    > markup.
    >
    >
    quote:
    And if "HTML STYLES" were not used in the first place, then
    even having
    > that feature available now wouldn't help OP, if your
    interpretation is
    > correct.
    >
    > Perhaps you are misinterpreting what those commands did.
    'Clear Paragraph
    > Style' was the equivalent of applying a predefined 'HTML
    style' with no
    > presentational markup ? making it as far as I know, the
    quickest, easiest
    > way
    > to strip all presentational markup out of your HTML
    (irrespective of
    > whether
    > the markup originated through the use of 'HTML styles').
    This could have
    > very
    > easily been replaced by a stand-alone command.
    >
    >
    quote:
    There are certainly quick and easy ways to remove many of
    them.
    > Okay then, here's the test. How many steps does it take
    you to clean up
    > the
    > following paragraph?
    >
    > <p align="center"><font size="+1" face="Times
    New Roman, Times, serif">The
    > quick
    brown fox
    jumps over the
    <font
    > color="#FF0000">lazy</font>
    dog</font></p>
    >
    > I count 10 steps if you select the entire paragraph and
    use nothing but
    > the
    > Properties panel and/or Text menu. Perhaps you can beat
    my attempt. If I
    > use
    > the 'Clean Up HTML' command, it takes me about 20
    seconds to check for and
    > type
    > in all the individual tags I want removed, then I still
    have to manually
    > fix
    > the alignment. Do you know of a quicker, easier way?
    >

  • Slices & Extract Assets, or Copy CSS & paragraph styles for retina web designs?

    I'm trying to figure out how Adobe wants me to work in Photoshop when producing website designs.
    Extract Assets is useful for fixed-size objects to produce 50% & 100% assets. 200% png output results in anti-aliasing even from vector shapes. Please correct me if I'm wrong but this seemed to be the case. Slicing is useful for elements on the site that may have variable height/width needing end-caps and repeat-x or repeat-y images e.g. buttons and nav-bars.
    If I need to work at 2x resolution for retina, using Extract Assets and Slices, my paragraph and character styles dimensions are doubled, as are the dimensions of all my objects. This makes the Copy CSS a bit pointless - double height, width, margin, padding, shadow blur etc.
    Should I be designing at 2x resolution and extracting and slicing, or at 1x and using Copy CSS, exporting paragraphing styles? Or something in-between?

    Hi Ben, I ammended this line of code as you have shown and still I have no joy. So I reverted to an older version which was correct, but i am stil having the same issue.
    I have a my_site folder (defined local root folder), with the index.dwt in it. In my_site there is also an assets folder with 3 further folders, CSS, JS and Images and their respective files in these.
    Bregent. Thanks, I did define at set up. I went back to manage sites and checked there too and thr root file on the local is the same at set up. I just don't get why after I made changes to the carousel and and reiploaded the site I have had issues :-(
    Any other places I should be looking people? This is driving me crackers!

  • Is there a script to change paragraph style based on even/odd page

    Is there a script or way to have paragraph style change between 2 styles based on the text being on an even or odd page? 

    @JustMikey – as I understand your task, the problem has nothing to do with "special" paragraph styles, but (nearly) all with anchored objects (the images and parts of the gray bar) and appropriate margin settings.
    Just see the following IDML file I exported from InDesign CS5.5:
    Dropbox - ImagesAwayFromSpine-CS5.5.zip
    ImagesAwayFromSpine-CS5.5.zip
         ImagesAwayFromSpine-CS5.5.idml
         080731_Manchester-xxl_Grau.tif
    Of course you could add paragraph styles to format the data automatically or optimize in other ways.
    That's up to you. But you can see the principle:
    Inspect the Anchored Object Options for the image and the gray bar. Also the frame fitting options for the image.
    Note: See also the margin settings, that are not exactly mirrored on even and odd pages (for good reason).
    Uwe

  • Applescript/Pages and adjusting column width (and paragraph style)

    I was hoping that some someone might know how to adjust the width of individual columns in Pages using Applescript. It seems like it should be a simple task, and I can adjust the overall width/height of the table, but I haven't found a way to adjust the column width. Alternatively, I could have the program create the table in Numbers and copy/paste it into Pages, but I'd imagine that would get a bit messy and wouldn't allow me to use a hanging indent in the cells (to the best of my knowledge).
    Also, is there a way to adjust the paragraph style used by the text in the table? Otherwise, I could just use a templet and define the the default table style appropriately. (Though not the most elegant solution).
    Thanks in advance for your help!
    (In case it helps, the script I'm working on parses an unformatted inventory and parses it into paragraphs/tables.)

    Try this:
    set tableCount to 0
    --open file to be pased here, excluded for example
    tell application "Pages"
        activate
        set theDoc to (make new document)
        tell theDoc
            --makes paragraph styles used
            make new paragraph style with properties {name:"Folio", font name:"Times New Roman", font size:12, bold:true, alignment:left, space after:5, keep with next paragraph:true, space before:15}
            make new paragraph style with properties {name:"Place", font name:"Times New Roman", font size:12, bold:false, alignment:left, line spacing type:relative, line spacing:100}
            make new paragraph style with properties {name:"Description", font name:"Times New Roman", font size:12, bold:false, italic:true, alignment:left, line spacing type:relative, line spacing:100}
            make new paragraph style with properties {name:"Table", font name:"Times New Roman", font size:12, alignment:left, left indent:0.5, first line indent:0.0}
            --begin repeat, gathers MS info from one doc (unformatted) and writes it into another with formatting, setting variables directly for example
            set MSName to "new Manuscript"
            set MSPlace to "place where MS is stored"
            set MSDesc to "description of MS"
            set tableData to {{"folio", "title", "composer"}, {"", "subtitle", ""}, {"etc", "next", "next"}}
            --write paragraph information from earlier
            set currentPar to (make new paragraph at end of paragraphs with data MSName)
            set paragraph style of currentPar to "Folio"
            set currentPar to (make new paragraph at end of paragraphs with data MSPlace)
            set paragraph style of currentPar to "Place"
            set currentPar to (make new paragraph at end of paragraphs with data MSDesc)
            set paragraph style of currentPar to "Description"
            --create table, add data, and format
            tell application "System Events" to tell process "Pages"
                key code 125 using {command down} -- move the insertion point to the end
                tell menu bar 1
                    -- Insert a new table:
                    click menu item "Table" of menu 1 of menu bar item "Insert"
                    -- Delete the header row:
                    tell menu 1 of menu bar item "Format"
                        click menu item "Delete Row" of menu 1 of menu item "Table"
                    end tell
                    -- Show the Inspector:
                    tell menu 1 of menu bar item "View"
                        if menu item "Show Inspector" exists then
                            click menu item "Show Inspector"
                        end if
                    end tell
                end tell
                tell window 1 -- the Inspector window
                    click radio button 7 of radio group 1 -- select the Table Inspector
                    perform action "AXRaise" -- activate the Table Inspector
                    tell tab group 1 of group 1
                        click radio button "Table" -- select “Table”
                        -- Reduce width of all three columns:
                        repeat 3 times
                            set value of text field 2 to "0.5 in"
                            set focused of text field 2 to true
                            keystroke return
                            keystroke tab -- next column
                        end repeat
                        key code 126 -- the Up Arrow
                        -- Set width of each column:
                        repeat with theValue in {"0.75 in", "4.25 in", "1.5 in"}
                            set value of text field 2 to theValue
                            set focused of text field 2 to true
                            keystroke return
                            keystroke tab -- next column
                        end repeat
                        key code 126 -- the Up Arrow
                    end tell
                end tell
                keystroke "i" using {option down, command down} -- hide the Inspector
                -- Add the data:
                repeat with i from 1 to 3
                    set thisRow to item i of tableData
                    repeat with j from 1 to 3
                        keystroke (item j of thisRow)
                        if (i * j = 9) then exit repeat
                        keystroke tab
                    end repeat
                end repeat
            end tell
            set tableCount to tableCount + 1
            tell table tableCount
                select
                set stroke width to 0.0
                set wrap to center
                set name to MSName
            end tell
            --after which it would continue with the next MS and repeat the process until all are done
        end tell
    end tell

  • Extract paragraph style name with formating

    All
    kindly help me How to extract ParagraphStyle name with formating to Sample.txt:
    EG:
    Style Name: "Body"
    Font = "15"
    leading = '"18"
    Aligh = "Left"
    etc...
    Regards
    Hurix
    Edit by Dave Saunders: Something is preventing the Reply button from working. I'm hoping this edit will reactivate it.

    Hi all,
    This is something I threw together
    doc = app.activeDocument,
    ps = doc.paragraphStyles.everyItem().getElements().slice(0),
    l = ps.length,
    paraStyles = [],
    c = 0;
    while (l--) {
        var styleDetails = [], n = 0, s, x, p, q;
        s = ps[l].properties;
        for (x in s) {
            p = (s[x] && s[x].hasOwnProperty ("name")) ? s[x].name : s[x]; // change according to requirements.
            if (p && p.constructor.name == "String") p = '"' + p +'"'; // ok if the sctring doesn't contain a " mark
            else if (x == "tabList") p = getTabList (s[x]);
            else if (p instanceof Object && p.constructor.name != "Enumerator") {
                var objProps = [], z = 0;
                for (q in p) objProps[z++] = q + ": " + p[q]
                p = x + " {" + objProps.join(", ") + "}";
            styleDetails[n++] = x + ": " + p;
        paraStyles[c++] = "{" + styleDetails.join(", ") + "}";
    temp = new File (Folder (Folder.temp) + "/" + doc.name + " Paragraph Style Properties  " + ("" + new Date).replace(/:/g,"\xB7").replace(/\s\S+$/,"")+ ".txt");
    temp.encoding = "UTF-8";
    temp.lineFeed = ($.os[0]=="M") ? "Macintosh" :" Windows";
    temp.open('w');
    temp.write("\uFEFF" + paraStyles.join("\r"));
    temp.close();
    $.sleep(300);
    temp.execute(true);
    function getTabList (t) {
        var tl = t.length, n, pTabList = [];
        for (n = 0; n < tl; n++) { // if the leader etc. contains a " then you have to use ' instead of "
            pTabList[n] = "({alignment: " + t[n].alignment + ', alignmentCharacter: "' + t[n].alignmentCharacter + '", leader: "' +t[n].leader +  '", position: ' + t[n].position + "})";
        return "[" + pTabList.join(", ") + "]";
    function getGrepList (g) { // nestedGrepStyles
        return // couldn't be bothered to do this one, sorry
        var tl = g.length, n, pnestedGrepList = [];
        for (n = 0; n < tl; n++) { // if the leader etc. contains a " then you have to use ' instead of "
            // pTabList[n] = figure for yourself
        return "[" + pTabList.join(", ") + "]";
    You can then recreate the styles by splitting the string by "\r" and using doScript or Eval.
    Might be better to produce a tagged doc with <alignment> foo </alignment> type structure to get around quotation porblems
    However for a simple import export snippet wouldn't this be better?
    var doc = app.activeDocument,
          newDoc = app.documents.add(),
          fp;
    // if you need to add function to remove app.styles that are automatically added to the new document
    fp = new File (Folder.temp + "/" + +new Date + ".indd")
    doc.saveACopy (fp);
    $.sleep (500);
    newDoc.importStyles (ImportFormat.TEXT_STYLES_FORMAT, fp); // can add all sorts of things to import or load
    fp.remove();
    // You now have a clean new Document to load the styles from using importStyles
    Trevor

Maybe you are looking for

  • Internal Order Balance

    Hi All i have been settle the (70%) of Internal Order per the period 06 .i .e Last month wht is the treatment fro the remaing 30%- is there any process for month end closing for IO (like G/L, Vendor Balances Etc..) in Internal Order Report showing th

  • Photoshop CC "locks down"

    PC; When I launch Adobe Photoshop CC, that I bought, the app "locks" down. It disables my power to create new files, etc. I have contacted multiple times, and all technicians failed to fix it. Any ideas? P.S. Happy Holidays.

  • Msi 5124 serial port com1 com2

    i have a mainboard msi 5124 and want to use the serial port (COM1) for connecting a standard serial mouse. however i cannot get the mouse to work nor even be detected. not under dos nor under win98. before i used a ps/2 mouse, and never a serial mous

  • [Ubuntu 14.04] How can I enable port-range endpoint?

    I have deployed an Ubuntu 14.04 VM on Azure and I want to enable port-range endpoint.. How can I do that? If not allowed from the portal, does configuring the ports via iptables command opens these ports for me? Sorry I'm new to Cloud and got confuse

  • Aperture 2 and RAW vs JPG ?

    Just downloaded the trial version and haven't done any work yet with RAW files. Previously everything was done with JPG on iPhoto. Should I now shoot RAW+JPG mode on my Canon 30D and then use Aperture for the RAW files? Is using JPG on Aperture worth