Forum Replies Created
-
AuthorPosts
-
Theunis De Jong
MemberYou cannot change the opacity of layers in InDesign, you'll have to select the objects instead, and change those.
November 13, 2010 at 1:30 pm in reply to: How to remove a rule around a box without changing the box size #57725Theunis De Jong
Member1 point equals .466%
Where'd you get that from? Points are real measurement units (other than, say, hand's widths or pixels). Your conversion only works if the entire object is exactly 1/0.00466 = 214.6 points wide. Only then is 0.466% of that amount exactly 1 point.
I'd set the measurement to points, the proxy to center, then add the stroke width to both height and width.
Theunis De Jong
MemberWell, yes, yes, and yes. (I think.) The only “no” I'd suggest is on saving as JPEG. [a]
If you reduce the size of an image in InDesign, you are automatically increasing its resolution. On exporting, InDesign may decide the resolution gets ridiculously high — default is above 450 dpi — and automatically downsample it to its default of 300 dpi. Therefore, it really doesn't matter if you downsample it yourself to 300 dpi, or let ID do it for you.
Downsampling does “degrade” the image quality, because it needs to throw away actual data. However, if the resolution after downsampling is still sufficiently high for your intended output target (print?), the degradation is not visible at all.
[a] Given a choice, you're better off saving as PSD. If you save as JPEG — even using the highest possible quality –, its compression introduces artifacts. That kind of artifacts is most visible when using the lowest quality (try it!), and they may very well be invisible at 300 dpi. But if you decide the image doesn't look right, open it again in PS, adjust something and save it again as JPEG, the amount of artifacts increase. Do it a couple of times, and it gets worse every time. PSD uses a lossless compressed format, so it doesn't suffer from this.
Theunis De Jong
MemberWordRTFImportPreferences? It comes with a couple of settings that may apply: preserveLocalOverrides, removeFormatting; perhaps a bit more.
Usually, I would set them to useful defaults in the UI, but ID Server has none of that …
Theunis De Jong
MemberThanks! (Me too!)
Theunis De Jong
MemberUse GREP.
bl will mark only the first character of a word starting with a lowercase. The b code marks a location, not an actual character, so it will work whether there is a space (or any other non-word character), or nothing at all.
Theunis De Jong
MemberAs with find & change, text variables, and section numbering, you cannot include real formatting in Index entries. There simply is no provision for formatting text that you input in the fields.
A possible workaround is to add 'formatting codes' into the index entries, and replace this with the correct formatting after generating the index. I would have suggested David's Automatically Format super/subscript trick (Auto Format Superscript and Subscript Numbers using GREP Styles), except … you happen to mention that “^7” yields a paragraph symbol. So his straightforward solution won't work.
The workaround is slightly more cumbersome to enter, but after that your index ought to be just fine every time you generate it.
1. Surround each of your superscripts with this: ^{text}, for example, to enter “x²” use “x^{2}”.
2. Surround each of your subscripts with this: _{text} — like this: “H_{2}O (water)”.
3. Create three character styles:
a. “HideMe” — set character color to “None” and horizontal scale to 1%.
b. “Super” — set character color to “Black”, horizontal scale to 100%, and position to Superscript.
c. “Sub” — same as Super, but with Subscript.
4. Add the following GREP styles to your Index Level 1 style (or any other style you are applying to the generated index text):
[_^]{.+?}
— apply character style “HideMe”.
(?<=^{).+?(?=})
— apply character style”Super”
(?<=_{).+?(?=})
— apply character style”Sub”.
The first character style effectively hides everything formatted with the codes ^{..} and _{..}, including all text in between. The Super and Sub styles make just the inside text visible again, and applies the correct formatting.
If you also want to include stuff like bold, italics, or underline, you can work out a similar system for these — all you have to do is add another code, and a character style that applies it.
Theunis De Jong
MemberMind you, XML is not the only way you can import database data. Look at Mail Merge, for example — it should be able to import your CSV (never used it, personally). You can use this if the transition from web text to InDesign is a straightforward one — i.e., import text, apply styles, print, go home.
But if you need to move stuff around, rename and group elements, or add custom texts, XML is the way.
I would recommend not to use InDesign to test your first XSTL transformations with. It doesn't appear to emit any useful errors, and if anything at all is wrong, the XML doesn't appear at all. So I use Saxon, a powerful XSLT processor, through the Kernow GUI. The screenshots are Windows, but it also works happily on my Mac. You edit your XML and XSLT with a good plain text editor (I use TextPad/Windows and TextWrangler/Mac) and process the files with Kernow. Since it has an output window of its own, you can immediately see what happens. You can dot your XSLT with debug stuff like <xsl:message>… thus far it works …</xsl:message>, and these will also appear in the Kernow output window. And if everything seems to work, you can try the same files in InDesign.
(Apart from the huge difference in XSLT versions — 1.0 for InDesign, which covers pretty much the basics and nothing else, where Saxon supports 2.0 plus a handful of extensions — there appear to be a few minor differences as well. My first try did work in Kernow/Saxon but failed in InDesign. I wouldn't know where to start looking for more info on that. Fortunately, there are dozens of different ways to do the same thing, even with bog standard XSLT 1.0.)
Theunis De Jong
MemberHow are you drawing that grid? Is it a table? (Because table lines do not obey the baseline grid, only text does.)
Theunis De Jong
MemberThe canonical XSLT reference is at https://www.w3.org/TR/xslt, and https://www.w3schools.com/xsl/ contains lots of useful snips and tips.
One thing is important: within seconds (well, minutes anyway) I had something up-and-running using the powerful “for-each-group” and “group-by” XSLT commands. However, InDesign didn't load the XSL at all — those commands are “XSLT 2.0”, and apparently InDesign only can handle XSLT 1.0. I didn't even get an error message …
So I had to take a short round-trip to the web — fortunately, your grouping problem is a well-known one (look for “Grouping with the Muenchian Method”, named after its inventor Steve Muench).
XSLT is a somewhat odd 'programming language', as it's not procedural/structured, like Javascript or Visual Basic, but rather functional (see https://en.wikipedia.org/wiki/C….._paradigms) — you define a set of 'rules' to apply, and the XSLT parser runs each of the rules on your input file.
It takes some mind-shifting to “get what you want”, because it would seem that most of the times you don't get anything at all … (when none of your rules appear to match anything of the input XML). So yeah, it takes some practice. But, in the words of Kay, “Oh yeah, it's worth it. … If you're strong enough.”
Theunis De Jong
MemberIt would require you to sort by the contact/department field in your spreadsheet, then move the department “one level up” around all of the contact groups with that same department field.
I have no idea if that's even possible.
Here is my idea instead
Let InDesign's XSLT parser do the hard work. If you import your original XML and apply this XSLT on importing, it will create a “dep_group” around a list of contacts for that department. The first element inside the dep_group is your original “department”, and this line is removed from the actual contact information.XSLT:
<?xml version=”1.0″ encoding=”UTF-8″?>
<xsl:stylesheet version=”1.0″ xmlns:xsl=”https://www.w3.org/1999/XSL/Transform”>
<xsl:output method=”xml” version=”1.0″ encoding=”UTF-8″ indent=”yes”/><xsl:key name=”all_deps” match=”department” use=”.” />
<xsl:template match=”/”>
<xsl:element name=”contactlist”><xsl:apply-templates /></xsl:element>
</xsl:template><xsl:template match=”contactlist”>
<xsl:for-each select=”contact[department[generate-id() = generate-id(key('all_deps', .)[1])]]”>
<xsl:variable name=”cur_dep” select=”department” />
<xsl:element name=”dep_group”>
<xsl:element name=”department”><xsl:value-of select=”department” /></xsl:element>
<xsl:apply-templates select=”../contact[department=$cur_dep]” />
</xsl:element>
</xsl:for-each>
</xsl:template><xsl:template match=”department”></xsl:template>
<xsl:template match=”@*|node()”>
<xsl:copy>
<xsl:apply-templates select=”@*|node()” />
</xsl:copy>
</xsl:template></xsl:stylesheet>
(Warning: It seems some of the straight quotes are translated into 'curly' ones. Sorry 'bout that –you'll gonna have to weed them out one by one…)
Theunis De Jong
MemberThe DTD is not the correct place to add or remove items; it merely describes what goes where (and with what attributes, and in which order — etc.).
In fact this shows a shortcoming in your XML file: it ought to look like
<categoryHeader>
<contact>
<name><address><etc>
</contact>
<contact>
<name><address><etc>
</contact>
</categoryHeader>— but in this case, each contact has its own header. I'm sorry for your overheated brain, but … XSLT is the way to transform one type of XML into another type.
Can you post a small sample of what your XML looks like now, i.e., with the cat headers in the wrong position?
November 8, 2010 at 2:40 pm in reply to: Any Way to Synchronize a Book to Turn On/Off Layers? #57618Theunis De Jong
MemberIf Adobe is going to incorporate it into CS6, should I send them my bank account number? :D
Theunis De Jong
MemberThat's some funny stuff you got there — I think I'm gonna hold you to that promise!
All created on the computer?
Theunis De Jong
MemberI'm still in the dark what you mean with a 3d ebook cover. A 3d cover for an ebook? A 3d picture of an ebook cover? (Which would be, I think, a contradictio in terminus.) Or, what Mike suggests, a 3d image to display on the 'cover' of an ebook?
The main reason Photoshop was suggested above, would be that it's a real drawing package, where InDesign is (emphatically) not. Even with Illustrator you could do better.
But Photoshop is far from 'the only way'. If you need a free high quality bitmap editor, you could try GIMP; Inkscape is a free vector imaging application.
Here is the best I could do using only InDesign. I made a guess at the thickness ;) — but, of course, your ebook wouldn't have a “thickness”.

-
AuthorPosts
