Forum Replies Created
-
AuthorPosts
-
Theunis De Jong
MemberDavid suggested a GREP style, so it gets applied automatically (or perhaps automagically) when and where necessary. The character style would only need the “no break” attribute selected.
If you want to search-and-replace, you can still use a character style (with No Break) so you can find/change it later on, or just set “No Break” in the Change Formatting box.
Don't use the first option if you may already have used character styles for formatting the numbers. This new replace-op will remove the former formatting style.
Don't use the second option if you have a strong dislike of the “Paragraph +”, as it only applies the No Break in the volatile 'local' way.
GREP Styles have neither of these disadvantages, plus (the biggest one of all) they get automatically applied and removed where and when necessary. All in all, if you have CS4 or newer, GREP styles are the best.
Theunis De Jong
MemberIn Acrobat Pro, it's in the Preferences — I bet it's in the same place in the Reader.
Perhaps in Bridge as well? (Just a mo'.) Yep — you cannot select any measure you want but you can select “Dimensions (in cm)” in the Show Metadata preferences.
Theunis De Jong
MemberIn Acrobat Pro, it's in the Preferences — I bet it's in the same place in the Reader.
Perhaps in Bridge as well? (Just a mo'.) Yep — you cannot select any measure you want but you can select “Dimensions (in cm)” in the Show Metadata preferences.
Theunis De Jong
MemberDo any of these pages have items on their Master page that span two pages?
Theunis De Jong
MemberDo any of these pages have items on their Master page that span two pages?
Theunis De Jong
MemberI had a brief go at this, but the only — really, just one! — method that can access glyphs, rather than Unicodes, is findGlyph/changeGlyph (that's two… but they are the only two!).
Problem is, #1: you have to find a glyph code first to replace. But you cannot simply insert any character and then replace it with the glyph you need, because you have to feed it the glyph code it has to find. And you don't know the glyph code of the character you just inserted, because you inserted it as a character — so you have to insert a glyph code to begin with. Round and round we go.
#2 is much simpler: even with known glyph codes, just to test the idea, ID kept on complaining I didn't set the various parameters correctly. Perhaps it's due to inexperience: I used Find/Change Glyphs only once, with CS3, and boy, did it not work as advertised. Never used it again.
Theunis De Jong
MemberI might as well throw this in: I think both Adobe's ExtendScript Editor and its novelty “Help” viewer blow, big time! I use TextPad on the PC, TextWrangler on the Mac. Wot — then you don't have access to the Help? Luckily, I found all the text of the Help files is stored into a single *huge* XML file, and using an XSLT transform I was able to convert all of it to a coherent set of HTML files, and compile that again — an idea of fellow scripter ABC GREEN — into a Windows CHM Help file, getting indexed and full text search for free!
I also added loads and loads of extra hyperlinks, and an incredibly useful — if you don't mind me saying so
— hierarchical view per object. That's how I can tell right away what parent-child relations are for all classes. The XSLT transform file is 2490 lines, at present…You can download either HTML or CHM sets, for CS3, CS4 or CS5, from my site: https://www.jongware.com/idjshelp.html
The Windows CHM version is the most user-friendly. On Windows, you don't need anything else; for the Mac, you need a CHM viewer (I use Robin Lu's iCHM For Mac — https://www.robinlu.com/blog/ichm –, it's almost as good as the Windows help but much easier on the eyes
).Theunis De Jong
MemberYour myVar parent might point to something quite else; my Help lists “The parent of the Text (a XmlStory, TextPath, TextFrame,Text, Character, Word, Line, TextColumn, Paragraph,TextStyleRange, InsertionPoint, Story, Cell, XMLElement, Footnote, Change, Note or HiddenText).” — in reality, I've rarely seen anything else than simply “Story” or “Cell”.
A good way to debug this kind of stuff is to check what InDesign thinks myVar and its parent are:
alert (myVar.constructor.name+” / “+myVar.parent.constructor.name);
You can always try myVar.parentTextFrames[0] — this will point directly to the frame holding your text.
Theoretically, you ought to be able to change the contentType of a frame's properties from TEXT_TYPE to UNASSIGNED, but I remember having wrestled with this before. It might be ID simply does not believe you when you want to change the type of a Text Frame …
Theunis De Jong
MemberI had a brief go at this, but the only — really, just one! — method that can access glyphs, rather than Unicodes, is findGlyph/changeGlyph (that's two… but they are the only two!).
Problem is, #1: you have to find a glyph code first to replace. But you cannot simply insert any character and then replace it with the glyph you need, because you have to feed it the glyph code it has to find. And you don't know the glyph code of the character you just inserted, because you inserted it as a character — so you have to insert a glyph code to begin with. Round and round we go.
#2 is much simpler: even with known glyph codes, just to test the idea, ID kept on complaining I didn't set the various parameters correctly. Perhaps it's due to inexperience: I used Find/Change Glyphs only once, with CS3, and boy, did it not work as advertised. Never used it again.
Theunis De Jong
MemberI might as well throw this in: I think both Adobe's ExtendScript Editor and its novelty “Help” viewer blow, big time! I use TextPad on the PC, TextWrangler on the Mac. Wot — then you don't have access to the Help? Luckily, I found all the text of the Help files is stored into a single *huge* XML file, and using an XSLT transform I was able to convert all of it to a coherent set of HTML files, and compile that again — an idea of fellow scripter ABC GREEN — into a Windows CHM Help file, getting indexed and full text search for free!
I also added loads and loads of extra hyperlinks, and an incredibly useful — if you don't mind me saying so
— hierarchical view per object. That's how I can tell right away what parent-child relations are for all classes. The XSLT transform file is 2490 lines, at present…You can download either HTML or CHM sets, for CS3, CS4 or CS5, from my site: https://www.jongware.com/idjshelp.html
The Windows CHM version is the most user-friendly. On Windows, you don't need anything else; for the Mac, you need a CHM viewer (I use Robin Lu's iCHM For Mac — https://www.robinlu.com/blog/ichm –, it's almost as good as the Windows help but much easier on the eyes
).Theunis De Jong
MemberYour myVar parent might point to something quite else; my Help lists “The parent of the Text (a XmlStory, TextPath, TextFrame,Text, Character, Word, Line, TextColumn, Paragraph,TextStyleRange, InsertionPoint, Story, Cell, XMLElement, Footnote, Change, Note or HiddenText).” — in reality, I've rarely seen anything else than simply “Story” or “Cell”.
A good way to debug this kind of stuff is to check what InDesign thinks myVar and its parent are:
alert (myVar.constructor.name+” / “+myVar.parent.constructor.name);
You can always try myVar.parentTextFrames[0] — this will point directly to the frame holding your text.
Theoretically, you ought to be able to change the contentType of a frame's properties from TEXT_TYPE to UNASSIGNED, but I remember having wrestled with this before. It might be ID simply does not believe you when you want to change the type of a Text Frame …
Theunis De Jong
MemberHeezza, are you referring to Justification -> Composer -> Adobe Paragraph Composer?
Theunis De Jong
MemberHeezza, are you referring to Justification -> Composer -> Adobe Paragraph Composer?
Theunis De Jong
MemberAh, the wonders of error suppression … I thought: if an error occurs, you might want to have the script ignore that one image and continue automatically. Unfortunately, I made a typo and checked the wrong 'type' somewhere — with the result that both of these image types are skipped without giving me an error message to tell me the code did not work!
Change these two lines
if (pg instanceof InsertionPoint)
pg = pg.parentTextframes[0];
to this
if (pg instanceof Character)
pg = pg.parentTextFrames[0];
to make the script work as planned.
Theunis De Jong
MemberAh, the wonders of error suppression … I thought: if an error occurs, you might want to have the script ignore that one image and continue automatically. Unfortunately, I made a typo and checked the wrong 'type' somewhere — with the result that both of these image types are skipped without giving me an error message to tell me the code did not work!
Change these two lines
if (pg instanceof InsertionPoint)
pg = pg.parentTextframes[0];
to this
if (pg instanceof Character)
pg = pg.parentTextFrames[0];
to make the script work as planned.
-
AuthorPosts
