Author Topic: How would you?  (Read 7568 times)

0 Members and 1 Guest are viewing this topic.

Offline AutoFetishist

  • Sr. Member
  • ****
  • Posts: 397
  • Karma: 2
  • Gender: Male
How would you?
« on: April 21, 2010, 02:08:02 PM »
I have a document with text blocks that need their lines to manually be run down (with soft returns).
Like so:


I'm wondering how the other people on this board would automate this?

Would you go through the Xpress tags in a text editor, line by line, and just count a certain number of characters from the beginning / then insert an ASCII character 7?

Offline Publi-Script

  • Administrator
  • Hero Member
  • *****
  • Posts: 596
  • Karma: 16
  • Gender: Male
  • Automate your Life!
    • Publi-Script.com
Re: How would you?
« Reply #1 on: April 22, 2010, 12:01:05 AM »
I would NEVER lay this out like this... It simply does not make sense

If a bunch of text is meant to be together (as your "left column" appears to be) than I set it in its own text box. The same goes for your apparent table on the right.

Furthermore, I doubt your text came to you like this, so you would need to parse your left and right text together which is a pain at scripting time and more pain at editing time when the powers that be realizes they for got a word or two in there.

Now, if you are lucky, you can use a two-columns text box.If not, simply lay two text boxes next to each other.

Just my 2 cents.
Michel Lemieux
Forum Administrator
-------------------------
OS X 10.6.4
Quark 6.5 / 7.5 / 8.1.6
Adobe Design Premium CS / CS2 / CS3 / CS4 / CS5
Script Debugger 4.5

Offline AutoFetishist

  • Sr. Member
  • ****
  • Posts: 397
  • Karma: 2
  • Gender: Male
Re: How would you?
« Reply #2 on: April 22, 2010, 07:49:45 AM »
Sorry, I don't think I worded that properly:

These are rows of text. The first "column" (basically the text before the first tab) needs to wrap if it exceeds a certain length.


Does that make it clearer?

Offline Publi-Script

  • Administrator
  • Hero Member
  • *****
  • Posts: 596
  • Karma: 16
  • Gender: Male
  • Automate your Life!
    • Publi-Script.com
Re: How would you?
« Reply #3 on: April 22, 2010, 08:25:11 AM »
I got that from the get go AF.

What I said is I would NEVER lay this out like this.

That said, your example made it clearer in the sense that I did not originally realized that the "Jabber Text" was actually part of the table.
So my question is now this:

Why don't you lay this out in a table?
Michel Lemieux
Forum Administrator
-------------------------
OS X 10.6.4
Quark 6.5 / 7.5 / 8.1.6
Adobe Design Premium CS / CS2 / CS3 / CS4 / CS5
Script Debugger 4.5

Offline AutoFetishist

  • Sr. Member
  • ****
  • Posts: 397
  • Karma: 2
  • Gender: Male
Re: How would you?
« Reply #4 on: April 22, 2010, 09:43:42 AM »
I've never been able to convince my coworkers to make the switch, and frankly, the table tool was very unstable in QX6.5. I had hoped it would have been patched up in 7, but so far it seems to still cause random crashing of Q.


Offline Publi-Script

  • Administrator
  • Hero Member
  • *****
  • Posts: 596
  • Karma: 16
  • Gender: Male
  • Automate your Life!
    • Publi-Script.com
Re: How would you?
« Reply #5 on: April 22, 2010, 10:02:06 AM »
I agree that the table tool is clunky but that is just the API that allows you to make changes to that table.

At the base, a table in Quark is really a collection of text and picture boxes that have been grouped together (Plus the API to control them). Since you are doing this with AppleScript you can simply generate text boxes that will follow the same layout scheme.

That said, I sure hope you are using Xtags for this as it can generate text, picture and graphic boxes based on the location of other boxes (static or previously drawn) on you page.

To see what I mean, install Xtags on your Quark and make a table in Quark. While the table is selected, do a "Copy with Xtags" from your Edit menu. Paste the result in a text editor window. There you will see the code to generate all these single boxes and their content.

HTH
Michel Lemieux
Forum Administrator
-------------------------
OS X 10.6.4
Quark 6.5 / 7.5 / 8.1.6
Adobe Design Premium CS / CS2 / CS3 / CS4 / CS5
Script Debugger 4.5

Offline AutoFetishist

  • Sr. Member
  • ****
  • Posts: 397
  • Karma: 2
  • Gender: Male
Re: How would you?
« Reply #6 on: April 22, 2010, 11:25:35 AM »
Yeah, the table method seems the way to go, especially now that 7 allows breaking tables across multiple pages.
Oh well.

Thanks again Michel.

Offline Publi-Script

  • Administrator
  • Hero Member
  • *****
  • Posts: 596
  • Karma: 16
  • Gender: Male
  • Automate your Life!
    • Publi-Script.com
Re: How would you?
« Reply #7 on: April 22, 2010, 12:35:06 PM »
Have you looked at the Xtags Xtension?
Michel Lemieux
Forum Administrator
-------------------------
OS X 10.6.4
Quark 6.5 / 7.5 / 8.1.6
Adobe Design Premium CS / CS2 / CS3 / CS4 / CS5
Script Debugger 4.5

Offline AutoFetishist

  • Sr. Member
  • ****
  • Posts: 397
  • Karma: 2
  • Gender: Male
Re: How would you?
« Reply #8 on: April 22, 2010, 03:58:06 PM »
I downloaded it, but I'm still "feeling my way" with regular XPress tags / Tex Edit Plus.

What if I try to go with my original idea, inserting soft returns after a certain number of characters on each line.

I thought maybe loop through the document, and isolate the first space after character #35 of each line, and then replace it with (ascii character 7).

What do you think of doing that in Tex Edit Plus?


Offline Publi-Script

  • Administrator
  • Hero Member
  • *****
  • Posts: 596
  • Karma: 16
  • Gender: Male
  • Automate your Life!
    • Publi-Script.com
Re: How would you?
« Reply #9 on: April 22, 2010, 04:39:21 PM »
I think you would be opening a bigger can of worms...

You will more than likely be cutting words in half, so you would have to account for that by either preventing it of supplying sufficient hyphenation info
Michel Lemieux
Forum Administrator
-------------------------
OS X 10.6.4
Quark 6.5 / 7.5 / 8.1.6
Adobe Design Premium CS / CS2 / CS3 / CS4 / CS5
Script Debugger 4.5