Jump to content

Hard Justify rule?


GailUdell

Recommended Posts

I have to recreate a card online and the designer has chosen to adjust tracking per line to essentially do a hard right and left justify. Of course, there are variables within each line... I am hoping there is a rule within javascript that can help me achieve this. Any ideas?

 

___________________

Gail Udell

Web-to-Print Administrator

Windows XP Pro. Acrobat 9.x, FP 6.2P1a

Link to comment
Share on other sites

Here is the bottom of the card. Every line of her InDesign file has a different tracking. To add to that, there is the option of a cell number in which the phone headers change to a single letter (p/c/f) and the tracking then changes again.

BCbottomSample.jpg.6d396a64f4badc93811a781bd80ef449.jpg

Link to comment
Share on other sites

I did use the "Justify" tool, but I guess it only works on paragraphs? Since I have a return at the end of each line, it only makes it left justified. :mad:

 

Does it work if you put in a soft return instead of a hard return?

Link to comment
Share on other sites

I don't think I can do that. The address line is fixed, so I think I can just set the tracking on that. The phone numbers line is a single rule, but I think I can extend that rule to accommodate different tracking based on two or three phone numbers (saw how I could do that with javascript in another thread... just need to find it again) and the final line - the email - will just have to be justified left. What a rotten design!
Link to comment
Share on other sites

I don't think I can do that. The address line is fixed, so I think I can just set the tracking on that. The phone numbers line is a single rule, but I think I can extend that rule to accommodate different tracking based on two or three phone numbers (saw how I could do that with javascript in another thread... just need to find it again) and the final line - the email - will just have to be justified left. What a rotten design!

 

Seems FP doesn't behave as I'd expected! My solution would have worked except FP applies spacing between each word rather than each character with no apparent options to change that behaviour.

 

I've used some software called PageFlex and I could do exactly what you want to achieve in that so thought FP would be the same.

 

Hope you get it sorted!

Link to comment
Share on other sites

  • 2 weeks later...
and the final line - the email - will just have to be justified left. What a rotten design!

This is the way that "full justification" works in the Text Editor: the last line of the paragraph is left-justified. Look at the last line of a paragraph in a newspaper, or try it in any word processor. Admittedly, since you're not formatting a newspaper column or a similar "flow" of text, your needs are different, but any other design would be non-standard and more confusing to users who expect it to work the way that it does.

 

That said, there are several things you can do:

 

  1. You can put a "soft return" at the end of the last line by holding down the shift key and hitting Enter. This will force justification on the previous line. If you don't want the extra whitespace from the empty line, type a space, select it, and set its point size to 1. Note that this solution requires no JavaScript or tagging.
  2. You can use a tag such as <p br=false quad=JJ> (note the double "J") to force full justification on every line of the paragraph, including the last line. You can return this tag from a JavaScript rule and place the variable before the line of text.
  3. You can "fake out" a line with something left-justified and something else right-justified by putting a tag like <p leading=1 quad=R> between the two items.

Link to comment
Share on other sites

You can put a "soft return" at the end of the last line by holding down the shift key and hitting Enter.

 

Thank you Dan! This essentially worked but I am missing something on that last line - it is effecting the copy fit, and returns this error:

OnCopyfit, line 3: warning: Could not copyfit text in flow

 

It is talking about that last line (the email line) that does not force justify, which is fine. I have it set to adjust text on overflow (reduce only).

Link to comment
Share on other sites

Thank you Dan! This essentially worked but I am missing something on that last line - it is effecting the copy fit, and returns this error:

OnCopyfit, line 3: warning: Could not copyfit text in flow

 

It is talking about that last line (the email line) that does not force justify, which is fine. I have it set to adjust text on overflow (reduce only).

You need to either do what I described in the rest of option 1 to prevent the extra "soft return" from taking up significant space, or try one of the other options I listed.

 

  1. You can put a "soft return" at the end of the last line by holding down the shift key and hitting Enter. This will force justification on the previous line. If you don't want the extra whitespace from the empty line, type a space, select it, and set its point size to 1. Note that this solution requires no JavaScript or tagging.
  2. You can use a tag such as <p br=false quad=JJ> (note the double "J") to force full justification on every line of the paragraph, including the last line. You can return this tag from a JavaScript rule and place the variable before the line of text.
  3. You can "fake out" a line with something left-justified and something else right-justified by putting a tag like <p leading=1 quad=R> between the two items.

Link to comment
Share on other sites

HI Dan - I did do that.. I think... did you mean to enter a return then type a space making that new "line" 1pt, which force justifies the line above (the email line). After testing, I prefer the last line to be left justified, but I am concerned about long emails, which is why I am trying to make it adjust smaller on overflow. But it won't do it - and as far as i can tell it is related to the copyfit error.
Link to comment
Share on other sites

  • 2 months later...

Could you show us how to create the rule to use this tag

<p br=false quad=J>

for a field my customer will be using the Rich Text Editor to populate?

It doesn’t work to prefill the Rich Text Editor with the tag.

For now, I have changed the field to a regular multi-line text box. It no longer has Rich Text Editor enabled. I sent my customer the tag to paste in before typing or pasting her own text. She can handle this.

However, before we get more people working in those templates, I need to create and apply a rule to fix it.

What would be GREAT is for the Rich Text Editor to include this type of paragraph justification, as well as the <p br=false quad=JJ> (note the double "J").

Thanks for all you do

Link to comment
Share on other sites

Could you show us how to create the rule to use this tag

 

<p br=false quad=J>

 

for a field my customer will be using the Rich Text Editor to populate?

It doesn’t work to prefill the Rich Text Editor with the tag.

 

For now, I have changed the field to a regular multi-line text box. It no longer has Rich Text Editor enabled. I sent my customer the tag to paste in before typing or pasting her own text. She can handle this.

 

However, before we get more people working in those templates, I need to create and apply a rule to fix it.

 

What would be GREAT is for the Rich Text Editor to include this type of paragraph justification, as well as the <p br=false quad=JJ> (note the double "J").

Are you talking about MarcomCentral? If so, you need to post requests specific to that product in the MarcomCentral forum, as the folks who work on that don't normally monitor these other forums, and they know more about MarcomCentral than I do. Better yet, contact your CPM.

 

Anyway, I think that the general way you want to do this is to create a rule which prepends the tag before the field value, like so:

return '<p br=false quad=J>' + Field("Your Field Name");

This should work with your multi-line text box, without making the customer type the tag manually.

 

However, if you're using MarcomCentral's Rich Text Editor, then the field value already contains <p> tags with "quad" attributes, which take effect and basically undo what your initial tag is trying to do. The bottom line is that the Rich Text Editor in MarcomCentral can only do a limited subset of the tagging that the Variable Text Editor in FusionPro Desktop can do, so that limits what you can do with it. Again, though, this is something to take up on the MarcomCentral forum or with your CPM.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...