Forum Replies Created
-
AuthorPosts
-
Sebastien Gauthier
MemberBringing this back to life !
Let’s say I also have other numbers on page that would match \d\d(?!\d) and they shouldn’t change.
I try making sure there is a $ sign before the digit sequence as such (?<=\$\d)\d\d(?!\d)Now it works for $2<sup>99</sup> but for some reason I don’t understand adding (one or more) (?<=\$\d+)\d\d(?!\d) won’t get anything… I would have thought $2<sup>99</sup> and $20<sup>99</sup> would have been caught.
Any idea ?
September 25, 2016 at 7:01 pm in reply to: Assign data merge tag automatically using a script #88643Sebastien Gauthier
MemberHi Loic,
I’ve managed to understand what I did wrong… but I don’t totally understand why it behave like this.
The script does work just as intended. When the Data merge panel is shown I can see that they are applied, and when I try to select a part of a tag it select as a whole.What I was doing wrong is thinking that once applied as a tag it would always be selectable as a whole.. but when the Data merge panel isn’t shown on screen tags are still selectable as bare text. I was looking at the script panel and selecting the text to see if it worked… which wouldn’t happened until I had both the script panel and data merge panel opened side by side and thus shown on the screen. Then it magically worked and select as I thought it would.
Again, you’re help was and is very precious.
September 22, 2016 at 10:47 am in reply to: Assign data merge tag automatically using a script #88616Sebastien Gauthier
MemberHi Loic,
Your website form give me an error when I try to send the message.
I guess it’s because I’m trying to send a link… but I can’t seems to find a way to attach a file (which should be utf-8).@David, these are product numbers they represent a whole lot of information in each segment. Categories, Sections, Rows, etc.
Even if I do a new empty document it doesn’t work, is there some error reporting I could add to the script ?
Regards
September 22, 2016 at 9:04 am in reply to: Assign data merge tag automatically using a script #88606Sebastien Gauthier
MemberThat is how it is setup.
Not sure wow to upload an image, here a screenshot in dropbox.
https://www.dropbox.com/s/ccr2sb7kxim6dpc/Screen%20Shot%202016-09-22%20at%2011.56.27%20AM.png?dl=0The text is selectable before and after the script is played.. and the data merge reference is about at the same height on the left.
Regards
September 22, 2016 at 8:41 am in reply to: Assign data merge tag automatically using a script #88601Sebastien Gauthier
MemberHi Loic,
Thank you very much for your help.
I tried the script and it run without error but it does not produce any result… but I think I know why.My tags are like this <<19,6,0,0,0>> could it be that it just doesn’t find any of those ?
Sebastien Gauthier
MemberJust because I’m still having this in my head,
I found something better then using the use-tags processing instruction for what I wanted to achieve and maybe that will help someone trying to figure out the same. InDesign can import (some) Unicode Hex entities in the xml file, so (without space) 
 ; does a Paragraph Return, 	 ; does a Tab, and & #x2028 ; is a Soft return. No namespace required, and no post-handling done by InDesign that takes forever after import.
That is useful also if you need to had a soft return in many xml element but don’t want to break them in InDesign manually after import.
Sebastien Gauthier
MemberI think that in this snippet the key word is “InDesign user-created”. I believe it is true that once the xml is in InDesign it will not bother with processing instruction, comments, and even attribute, by itself… even more if they are added within InDesign.
On the other side, one thing I’m sure of is that no matter what is written in the docs, InDesign will obey to the <?whitespace-handling use-tags?> processing instruction when importing an xml file if it’s hard written in it. I’m using it in combination to <aid:br/> and <aid:tab/> and the “xmlns:aid=”https://ns.adobe.com/AdobeInDesign/3.0/” namespace and it work just find ignoring the paragraph return between tags.
As said in the opening comment, it doesn’t work through XSL at import though.
Sebastien Gauthier
MemberThat is exactly how discretionary hyphens work… it’s up to the discretion of InDesign to decide if they are close enough to the container edge to wrap or not and if that is going to help the line spacing or not. Their main purpose is to vanish if the text is reflowed so that you don’t get frustrated about the hyphen showing in the middle of your paragraph.
If you want to force hyphenation just use a regular hyphen and it will wrap if close enough to the edge. If in the middle of the line you could use a hyphen + soft return… but that will most likely render your text very awkward.
Manually tracking each line of a printed document seams to me a bit counter intuitive as if you add a single word you’ll have to go throughout the document all over again. I think you should play with the H&J (hyphenation and justification) options to allows InDesign to behave the closest to what you are doing manually.
Sebastien Gauthier
MemberThanks Allan for your feedback,
I’m starting not to trust most of the xml import feature keeping them all unchecked if possible and rely only on what can be scripted in the incoming xml. Are there any hidden gems in the adobe namespace that nobody is aware of ? I’m using aid: from ID3.0 for aid:br an aid:tab, aid: from ID4.0 for aid:pstyle an aid:cstyle, and aid5: form ID5.0 for table stuff… but then I find really strange that there are no way of telling ID what size an anchored image should be for example. -
AuthorPosts