Forum Replies Created
-
AuthorPosts
-
Kai Rübsamen
MemberHi Spencer,
you need a second toc for kindle on your real document page. If you click on the go to button, the navigation jump to this toc, and not to the reader toc!
Additional to that, you need a guide section. Something like that:
<guide> <reference href="file.htm" title="Cover" type="cover"/> <reference href="file.htm" title="Title Page" type="title-page"/> <reference href="file.htm" title="Table Of Contents" type="toc"/> <reference href="file.htm" title="Start Reading" type="text"/> </guide>
You can create this second toc with InDesign, but the guide-section must be added manually in the content.opf-file.
If you work with InDesign CC 2015 most oft the entries in the guide-section are created from InDesign during the export.best
KaiKai Rübsamen
MemberHm, it seems, that this feature isn’t part of a cell style and must be applied manually.
But a script could find the cell automatically (based on a text search, the applied paragraph or cell style style) and set the right popertie!
Kai
Kai Rübsamen
MemberDo we have the same testfile? There is no space at the beginning of the first entry! To me it is logical, that the lines must be identical, if I want to find doubles ;-)
ah: Ari, if you get a space at the beginning, you don’t use my exact GREP!
Kai Rübsamen
MemberHm, tried it also on the testfile and everything was found?!
Kai Rübsamen
MemberHi Liz,
you can insert an non-joiner-character between s & p.
Find what: (s)(p)
Change to: $1~j$2or maybe the better idea:
Find what: sp
Change to: nothing + Change Format OpenType Features > Checkbox Discretionary Ligatures off (this can also applied by a character style!)best
KaiKai Rübsamen
MemberHi Ari,
this is true. That’s why I said, you must execute it multiple times.
It does not take longer than the script to install ;-)Kai
Kai Rübsamen
MemberHi all,
not a script, but I had the same question at the weekend, so I did it in this way:
Find what: (^.+)(?.+)\r\1
Change to: $1$2,The last character in ‘Change to’ is a space!
The GREP find always two lines. So ‘Change all’ needs to be executed multiple times.
Kai
Kai Rübsamen
MemberMaybe too late, but I wrote the attached lines a year ago and they might be helpful:
if (app.books.length != 1) { alert("Please open one book!"); exit(); } var userInterAct = app.scriptPreferences.userInteractionLevel; app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT; var curBook = app.books[0]; var allDocuments = curBook.bookContents; app.findTextPreferences = app.changeTextPreferences = null; for (var n = 0; n < allDocuments.length; n++) { var curPath = allDocuments[n].fullName; var curDoc = app.open(File(curPath)); changeFont("Minion ProItalic", "Myriad ProItalic"); // enter here your fontnames curDoc.save(); curDoc.close(); } function changeFont(currFont, ChangeFont) { app.findTextPreferences.appliedFont = currFont; app.changeTextPreferences.appliedFont = ChangeFont; app.activeDocument.changeText(); } app.findTextPreferences = app.changeTextPreferences = null; app.scriptPreferences.userInteractionLevel = userInterAct;The two fonts must be entered in the line ‘changeFont(); The tab () devides the font family from the font style and must be set.
Kai
Kai Rübsamen
MemberSkemicle, these are js-basics! https://www.w3schools.com/js/js_variables.asp or google by words such as “declaring” & “initializing”.
Ari and I adopt the code from Kathy, so there is a little inconsistency in that.
Kai Rübsamen
MemberHi Kathy,
if you want to export all documents, you must iterate over all documents ;-) But in your script ‘myDoc’ is always the same document.
Did you realize, that you export always the first page, nothing more?Try the following:
var myFilePath; var myFile; var allDocs = app.documents; var myDoc; app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.high; app.jpegExportPreferences.exportResolution = 200; for (var i = 0; i < allDocs.length; i++) { myDoc = allDocs[i]; var myFilePath = “/Users/kcote/Desktop/TEST update/JPG/” + myDoc.name.replace(/indd$/, "jpg"); var myFile = new File(myFilePath); myDoc.exportFile(ExportFormat.jpg, myFile, false); }best
KaiJune 22, 2016 at 3:37 am in reply to: GREP style, i want to add "," in numbers 3454342? 3,454,342 #85972Kai Rübsamen
MemberDid you read the comments above?
is a word boundary. To make clear, what is excactly a word, there is an article from Marc Autret: https://www.indiscripts.com/post/2011/09/what-exactly-is-a-word
So the GREP will not work at the end of a story. Since every cell behaves like a story, the GREP will fail.Solution
Do it with 3 steps!1. Insert something that could be a boundary
Find what: \d\Z
Change to $0~<2. The FC on the numbers
Find what: \d(?=(\d{3})+)
Change to: $0~<3. Remove the space at the end of the cell (the story)
Find what: ~<\Z
Change to: nothingIf you work with a GREP-Style instead of FC, don’t do step 3!
best
KaiKai Rübsamen
MemberAri, you are wrong here! If a regular character style is applied, this character style is highlighted in the panel. If a GREP style is applied, the character style is not highlighted, but the name of the style is shown in the bottom left corner. This is, what Mari described and this works in CC as in CS6.
Kai
-
AuthorPosts
