Forum Replies Created
-
AuthorPosts
-
May 7, 2018 at 10:07 am in reply to: InDesign Books and fixed paths to associated documents. #103583
Justin Sligh
MemberTim,
No improvements yet.
Justin Sligh
MemberGive us some example bullets with text and then describe how you would like them styled. Im sure a styling solution exists.
Justin Sligh
MemberClark,
Create a Paragraph Style for your callout. In Paragraph Rules, check the Rule On box for both Rule Above and Rule Below. Use the Offset attribute to move the line to the desired location.
Justin Sligh
MemberDwayne,
These are excellent suggestions. I thank you.
January 29, 2017 at 2:16 pm in reply to: How to merge IDML documents/How to rename IDML based on found value in Stori #91686Justin Sligh
MemberI have a functioning solution in PHP. This one will query a database and replace placeholders within IDML templates. It also combines multiple IDML files. I may publish when I have added error handling.
Placeholders are wrapped in percent signs. %PlaceholderName%
1. For each result in the database query, PHP class unzips the selected template to a work folder with a unique name.
2. The Story_XXX.xml files that include placeholder names are selected.
3. Find/Replace is performed on the array of placeholders and the database results.
4. Once all of the placeholders have been handled, the story and spread Ids are made unique. This includes the filename and references within spreads. An array keeps track of these changes.
5. The first template folder is designated the combined workspace. All of the other template stories and spreads are dumped into the appropriate holders.
6. The combined workspace’s designmap.xml is opened as a DOMDocument and the new spreads and stories are added.
7. The combined document is zipped (The mimetype from the template is incorporated.)January 5, 2017 at 10:28 am in reply to: How to merge IDML documents/How to rename IDML based on found value in Stori #91012Justin Sligh
MemberHere is the Droplet i came up with. To add error correction and flexibility, I may add the following:
1. Check to see if output filename provided is already used in the output folder.
2. Get the CombinedDocument’s preferences from the first file. (it is hard coded into mine but it might not matter as mine deletes the first (blank) page.
3. Provide support for filtering filetypes
4. Provide support for dropping folders (getting the first tier results of the contents)
5. Provide a dialog that indicates broken links or overset text in the combined document on completionon run {input, parameters}
--Choose Output Folder
tell application "Finder"
set OutputFolder to choose folder with prompt "Select a folder for output"
set myFilelist to input
set myFileCount to count of myFilelist
end tell
log myFileCount
if myFileCount > 0 then
--Get output filename
display dialog "Please provide the name for the combined file" default answer ""
set SaveNameInput to text returned of result
set SaveName to SaveNameInput & ".indd"
--Need to add check if filename already exists
tell application "Adobe InDesign CC 2017"
activate
set user interaction level of script preferences to never interact
tell view preferences
set horizontal measurement units to inches
set vertical measurement units to inches
end tell
--setup combined document
set myCombinedDoc to make document
tell document preferences of myCombinedDoc
set page height to "8.5"
set page width to "11"
set page orientation to landscape
set pages per document to 1
set facing pages to false
set allow page shuffle to false
end tell
repeat with i from 1 to myFileCount
open (item i of myFilelist)
delay 10
set myCurrentFile to the active document
tell myCurrentFile
set DocName to name
log DocName
duplicate every spread of myCurrentFile to after last spread of myCombinedDoc
close saving no
end tell
end repeat
tell myCombinedDoc
set SavePath to (OutputFolder as string) & SaveName
log SavePath
delete page 1
save to SavePath
close saving no
end tell
set user interaction level of script preferences to interact with all
beep 3
display alert "Complete" giving up after 3
end tell
else
display dialog "No IDML files to process" giving up after 3
end if
return input
end run
January 5, 2017 at 5:42 am in reply to: How to merge IDML documents/How to rename IDML based on found value in Stori #91014Justin Sligh
MemberI have a working Applescript but was unable to post to the forum.
January 3, 2017 at 6:14 am in reply to: How to merge IDML documents/How to rename IDML based on found value in Stori #90907Justin Sligh
MemberI explored an Applescript solution with some minor success. PHP is about the only language I speak. Ill keep exploring.
Justin Sligh
MemberFar better than cut and paste. I know addressing this issue is a common feature request.
Thanks for your help!
Justin Sligh
MemberI would definitely give InCopy a look. Check out Anne-Marie Concepcion’s Collaborative Workflows with InDesign and InCopy (https://www.lynda.com/InDesign-tutorials/Collaborative-Workflows-with-InCopy/62220-2.html)
October 22, 2015 at 12:47 pm in reply to: Arrow and text styled together/Multileader in InDesign #78928Justin Sligh
MemberJustine,
I would agree. That and some sort of node system would be very useful for flow charts and organization charts.
Justin Sligh
MemberYou can do page ranges when dealing with chapters. I have not seen this done with subsections.
A custom script sounds like the best option.
Justin Sligh
MemberAyman,
I try to use the simplest solution for the text you are using it on.
(?<=\d)\.(?=\d{3})
This using a positive lookbehind for a digit, a period, a positive lookahead for at least 3 digits. This will find the periods in your numbers, with the exception periods before a decimal place.
Keep in mind that if you apply this to an entire document, it could find other numbers. For example, phone numbers separated by periods, and decimals (e.g., 1234.5678)
Justin Sligh
MemberEugene’s GREP find/replace will do the trick.
Go with the most simple solution based on the text. If you create a complex GREP, you are more likely to find undesired results.
For the sample text you provided, \w+.?$ is perfect.
If your text is is more complex with punctuation within a single word (e.g., hyphen, apostrophe), you might need something more complex. Here is an example of a more detailed GREP that takes care of words that have one punctuation mark.
(?<=\x20)\w+[[:punct:]]?\w+?(?=[[:punct:]]+$)
“Find one or more word characters followed by a possible punctuation, followed by possibly one or more word characters, which comes after a normal space and before one or more punctuations at the end of a sentence.”
If your full text is as simple as the sample text that you provided, this excessive.
Justin Sligh
MemberJahrod,
(^.+?)(\x20)
\x20 refers to unicode for normal space created by the keyboard’s spacebar (U+0020). includes breaking spaces, which we do not want.
^ Beginning of paragraph.
. Any character
+? One or Many times (Shortest Match)() Parenthese encapsulates found text for use on the replace function.
We cant do a positive lookbehind with the GREP ^.+? but we can find both and only use the second found set in our replace function.
GREP Find
“Find, as found set one, one or many characters (shortest match), which is followed by, as found set two, a normal space.”GREP Replace
“Replace with $1, which was the results of the GREP within the first set of parentheses, and a forced line break.” -
AuthorPosts
