Real World Adobe InDesign CS4- P9 pot

30 422 0
Real World Adobe InDesign CS4- P9 pot

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

      7. Click the Change button to change the text to the regular expression you entered in the Change To eld. 8. At this point, you can continue nding and changing text by clicking the Find Next, Change, or Change and Find buttons, or click the Change All button to apply your changes to all of the matching text in the specied range. One of the coolest things about nding and changing text using GREP is that you can use marking subexpressions—a way of slic- ing, dicing, and rearranging the text you’ve found. Marking subex- pressions can take a part of the text you’ve found and use it in the replacement text. e best way to show what this means is to present a couple of examples. Re-ordering names. Imagine that you have to take a list of names that have been typed in “last name, rst name” order and convert them to “rst name last name” order. is kind of operation is impossible to do using the Text search method, but it’s easy with GREP and mark- ing subexpressions (see Figure 3-78). Marking Subexpressions GREP Expression: What it does: (?i) Makes the nd/change case-insensitive [A-Z0-9._%-] Matches the specied character range: from A to Z, from 0 to 9, and the char- acters “._%-” + Matches the character range one or more times @ Matches a literal ampersand [A-Z0-9._%-] Matches the specied character range: from A to Z, from 0 to 9, and the the characters “._%-” + Matches the character range one or more times /. Matches a literal period character [A-Z] Matches the character range A-Z {2,4} Matches a two to four letter string (.com, .org, .edu) $ Matches the end of the word  - What’s Going on in the GREP Example? Real_World_Adobe_InDesign_CS4b.pdf 241Real_World_Adobe_InDesign_CS4b.pdf 241 08/04/2009 05:54:41 p.m.08/04/2009 05:54:41 p.m.  .    - Re-Ordering Names with GREP Parentheses mark parts of the found text. In this example, the GREP regular expression we’re entering in the Find What eld is: ^(.+),\s(.+)$ When we enter: $2 $1 In the Change To eld, we’re telling InDesign to swap the order of the two marked parts of the found text. $1 $2 Formatting text between tags. Next, imagine that you’re working with an author who consistently marks bold and italic text with simple HTML-style formatting tags: “<i>” for italic and “<b>” for bold. Luckily, they’re quite consistent about marking the end of the formatting using “</i>” and “</i>”. How can you nd the text between the formatting tags, format it, and, at the same time, remove the tags? In this example, we’ll use a marking subexpression to capture the text between the tags, and we’ll replace the text with the captured text, excluding the tags (see Figure 3-79). Using regular expressions to nd text between some arbitrary beginning and ending text is one of the great things about the GREP nd/change method. By now, every desktop publisher is familiar with the drill: place a word processing le, then nd and change all of the little annoyances that make a mess of text. Double spaces. Multiple tabs. Space before punctuation. For years, we’ve used the standard text nd/change fea- tures (what you see in the Text panel of the Find/Change dialog box) to do this—but this oen means that we have to run through the search multiple times to get all of the instances of the oending text. Take double spaces as an example: we search, search, and then search again until InDesign tells us no more instances have been found. GREP oers us a better way to deal with this type of search. Rather than nding and changing the text multiple times, we can take care of it all in a single pass. Table 3-10 shows a few of our favorite text cleanup operations. Note that we use $1 in some cases to avoid delet- ing a return character and, potentially, paragraph formatting. Simple Searches Made Better with GREP Real_World_Adobe_InDesign_CS4b.pdf 242Real_World_Adobe_InDesign_CS4b.pdf 242 08/04/2009 05:54:41 p.m.08/04/2009 05:54:41 p.m.       Task: Find What: Change To: Replace runs of spaces with single space \s+ <space> Replace multiple returns with single return (\r)+ $1 Remove empty paragraphs ^\r Remove spaces before a return \s+(\r) $1 Remove spaces before specied punctuation \s([.?!;:,]) $1 Remove spaces at end of story \s+\Z  - Simple Searches Made Better with GREP  - Formatting Tags with GREP Parentheses mark parts of the found text. In this example, the GREP regular expression we’re entering in the Find What eld is: <i>(.+?)</i> is captures the text between the tags as $1. Replace the text between the tags and format it as italic. is deletes the tags themselves. InDesign replaces applies the formatting and removes the tags themselves. We don’t have the space here to cover GREP in all its glory. Peter Kahrel has written an excellent tutorial on using GREP in InDesign that is available as a downloadable PDF from O’Reilly—that would probably be the best place to start learning about GREP. Learning More about GREP Real_World_Adobe_InDesign_CS4b.pdf 243Real_World_Adobe_InDesign_CS4b.pdf 243 08/04/2009 05:54:42 p.m.08/04/2009 05:54:42 p.m.  .   Another O’Reilly book, Mastering Regular Expressions, by Jerey E. F. Friedl, is a fairly complete tour of GREP. It does not specically talk about GREP in InDesign, but it’s a great place to learn more about the inner details of how regular expressions do their work. For more information on either or both of the above titles, you can go to www.indesignsecrets.com/grep/. Ole likes a regular expression development and debugging tool called “RegexBuddy,” by JGSo. It’s Windows-only, and a demo ver- sion is available from www.regexbuddy.com. We’ve talked about the wonder of Unicode and OpenType fonts, or, at least, we will talk about them in Chapter 4, “Type.” ere are lots of good things to say about a system that makes publishing in just about any language or character set much easier than it used to be, and provides great typesetting features at the same time. But you’ve probably noticed that there are some things that the combination of Unicode, OpenType, and InDesign don’t handle very well. By “noticed,” of course, we mean that you’ve spent time yelling at your screen when a specic character can’t be found, or can’t be entered, or displays the “dreaded pinkness” of glyph substitution. Take, for example, the font we use for this book, Minion Pro. Minion Pro has a number of ornamental characters we’re very fond of—the only trouble is that they’re all considered bullet characters by InDesign. Which leads to a problem: ere is simply no way to enter the replacement character in the Change To eld of the Text panel of the Find/Change dialog box. If you try to copy the character into the eld, you’ll get ^8 (or Unicode <2022>), a normal bullet. You can’t even use the Unicode value you can nd from your operating system to refer to the correct character. Instead of screaming in frustration, you can use the controls in the third panel of the Find/Change dialog box, Glyph. e Glyph nd and change method can only nd one character at a time, but it does this single job very well (see Figure 3-80). 1. Open the Find/Change dialog box (press Command-F/Ctrl-F). Click the Glyph tab to display the Glyph panel. 2. Choose the font, font style, and glyph you want to nd. You can enter the Unicode/Glyph ID if you know it, but it’s usually better to choose a glyph from the Glyph pop-up menu (which is really something like a miniature version of the Glyphs panel). 3. Choose the font, font style, and glyph you want to change to. 4. Set the range of the search using the Search pop-up menu. Finding and Changing Glyphs Real_World_Adobe_InDesign_CS4b.pdf 244Real_World_Adobe_InDesign_CS4b.pdf 244 08/04/2009 05:54:42 p.m.08/04/2009 05:54:42 p.m.        - Finding and Changing Glyphs In this example, we need to replace a Zapf Dingbats ornament with an ornament from Minion Pro. Set the font family and font style in the Find Glyph section of the panel, then use the Glyph pop-up menu to specify the glyph you want to nd. en do the same thing for the replacement glyph in the Change Glyph section of the panel. InDesign replaces the glyph you’re looking for with the replacement glyph. 5. Click the Find button. InDesign nds an occurrence of the character you specied and displays the matching text in the document window, turning pages and scrolling to display the character, if necessary. Real_World_Adobe_InDesign_CS4b.pdf 245Real_World_Adobe_InDesign_CS4b.pdf 245 08/04/2009 05:54:42 p.m.08/04/2009 05:54:42 p.m.  .   6. Click the Change button to change the glyph. 7. At this point, you can continue nding and changing text by clicking the Find Next, Change, or Change and Find buttons, or click the Change All button to apply your changes to all of the matching text in the specied range. If you have a nd/change operation that you use oen, you should save it. To do this, click the Save Query button in the Find/Change dialog box—it looks like a oppy disk—a computer storage medium some of us can still remember. Enter a name for the query in the Save Query dialog box, then click the OK button to save the query. Once you’ve done this, the name of the query will appear on the Query pop-up menu in the Find/Change dialog box, and you can recall all of the settings of that particular nd/change operation by choosing the menu item. Working with InDesign Tagged Text One of the most useful features of InDesign is rarely mentioned in the marketing materials. It’s not the typesetting features, nor is it the ability to place native Photoshop and Illustrator les. We think those are great features, but they’re not it. What is this mystery feature? It’s the ability to save and read tagged text. To explain why this is so important, we’ve got to explain a little bit about what tags are. Tags have been around for a long time. Before desktop publishing appeared, the world of typesetting was ruled by dedicated typeset- ting systems. As we set type on these machines, we didn’t see any- thing that looked like the type we were setting. Instead, we saw the text of our newspapers, books, and magazines surrounded (and sometimes obscured) by cryptic symbols: typesetting tags and codes. To see what these symbols meant, we had to print the le. Only then would we see our type with its formatting applied. en came the Macintosh, PageMaker, the LaserWriter, and WYSIWYG (What you See Is What You Get) publishing. is revo- lution made it easier for more people to set type—in part because it freed us from having to learn and use the obscure codes and tags of the dedicated typesetting systems. ese days, modern desktop publishing programs are better typesetting systems than anything we had in the old days—and you can see what you’re doing. Saving Queries e Land at WYSIWYG Forgot Real_World_Adobe_InDesign_CS4b.pdf 246Real_World_Adobe_InDesign_CS4b.pdf 246 08/04/2009 05:54:42 p.m.08/04/2009 05:54:42 p.m.       Why should you mess with tags in this day and age? It turns out that they can make some jobs easier, and sometimes they can make it possible to do things that wouldn’t be practical to do using menus, dialog boxes, and the Character and Paragraph panels. e tagged text export lter takes formatted InDesign text and turns it into tags in a text le. e tagged text import lter reads tags and turns them into formatted (“WYSIWYG”) text. InDesign’s tagged text export lter is the only text export lter that doesn’t change the appearance of the text you’re exporting. Here are some of the reasons you might want to use tags:  If you work with people who use text editors (instead of full- featured word processors), they cannot apply formatting such as bold or italic or paragraph styles.  Any application that can save les in text-only format can be used to create formatted text for use in InDesign. is means that your catalog clients can use FileMaker database to mark up their text—Visual Basic, Microso Excel, and Microso Access are other obvious choices. It might even help your old uncle who lives in a cave and uses nothing but EDLIN.  You can store frequently used formatted text as tagged text les. It’s far quicker to place a tagged text le than it is to open another InDesign publication and copy/paste the text you want. To learn how tags work, the best thing to do is export some format- ted text from InDesign (select the story, choose Export from the File menu, and change the Format pop-up menu to InDesign Tagged Text) and then use a text editor to look at the le. While it is possible to open these tagged text les in a word proces- sor like Microso Word, those programs oen assume that because there are tags in the le, it must be HTML (so you either get errors or things get really weird). at’s why text editors (such as Windows Notepad or BBEdit) are better—they just deal with plain text and never try to format anything. e “ocial word” on tagged text is the Tagged Text.pdf le, which you’ll nd inside the Adobe Technical Info folder on your InDesign installation CD. is guide includes basic instructions and a list of most of the tags you can use. One thing that’s implied by the tagged text documentation, but not explicitly stated, is that you can enter any character using its Uni- code value. To do that, use the form “<0xnnnn>”, where nnnn is the hexadecimal form of the code (as seen in the Glyphs panel). Why Bother with Tags? Getting Started with Tagged Text Real_World_Adobe_InDesign_CS4b.pdf 247Real_World_Adobe_InDesign_CS4b.pdf 247 08/04/2009 05:54:42 p.m.08/04/2009 05:54:42 p.m.  .   InDesign’s tags can specify basic character formatting (such as font, point size, color, or baseline shi), paragraph formatting (such as indents, tabs, and paragraph space before and aer), and styles (both paragraph styles and character styles). Any formatting that can be applied to text can be applied using tags. Even tables can be exported or imported as tagged text. (at means you can program your data- base to export fully formatted InDesign tables.) InDesign tags are always surrounded by open (<) and close (>) angle brackets (which most of us also know as “greater than” and “less than” symbols). e rst characters in a tagged text le must state the character encoding (ASCII, ANSI, UNICODE, BIG5, or SJIS), followed by the platform (MAC or WIN). So the typical Windows tagged text le begins with <ASCII-WIN>, and the Macintosh ver- sion begins with <ASCII-MAC>. If InDesign doesn’t see one of these tags at the start of the le, InDesign won’t interpret the tags, and all the tags show up as part of your text. Here are a few more details.  Any characters you enter outside a tag will appear as characters in the imported text.  Enter an empty tag to return the formatting aected by the tag to its default state. For example: Baseline <cBaselineShift:3>Shift<cBaselineShift:> text following should be back to normal. If you’re a long-time PageMaker user, you may have worked with PageMaker’s style tags to apply paragraph formatting to text les. InDesign’s tagged text format is dierent than PageMaker’s, but you can create a “minimalist” tagged text le that’s almost as easy to work with as PageMaker’s paragraph style tags. Here’s the header for an example tagged text le: <ASCII-WIN> <DefineParaStyle:heading><DefineParaStyle:subhead><DefineParaStyle:para> <ColorTable:=<Black:COLOR:CMYK:Process:0,0,0,1>> Note that the paragraph style denitions in this tagged text le do not contain any formatting—our assumption is that you’ll set up corresponding paragraph styles in your publication. en all you need to do is paste the appropriate header at the top of a text le, and then enter the paragraph style tags for each paragraph. If, when preparing a le for import into PageMaker, you entered “<heading>” then enter “<ParaStyle:heading>” for InDesign. What Tags Can Contain Tag Structure Paragraph Style Tags Real_World_Adobe_InDesign_CS4b.pdf 248Real_World_Adobe_InDesign_CS4b.pdf 248 08/04/2009 05:54:42 p.m.08/04/2009 05:54:42 p.m.       Here’s an example (very simple) text le marked up with Page- Maker paragraph tags: <heading 1>TimeTravelTickets <subhead>Travel through time to experience the greatest artistic performances in history! <para>We are pleased to announce our Summer, 2007 series. Here’s the same text, marked up with InDesign tags: <ASCII-WIN> <DefineParaStyle:heading><DefineParaStyle:subhead><DefineParaStyle:para> <ParaStyle:heading>TimeTravelTickets <ParaStyle:subhead>Travel through time to experience the greatest artistic performances in history! <ParaStyle:para>We are pleased to announce our Summer, 2007 series. A few things to note about converting PageMaker paragraph style tags to InDesign tagged text:  While you do not need to include the <DefineParagraphStyle> tags in the heading of the le, it’s a good idea to do so. If you don’t, and then import the tagged text le into a document that does not contain the styles referred to in the tagged text le, InDesign will not associate the paragraphs with the style.  While PageMaker paragraph style tags don’t require that you tag each paragraph, you should tag each paragraph in the InDesign version of the le. Em Soware (www.emsoware.com) has created XTags, an InDesign import/export lter pair that supports not only QuarkXPress’ native set of tags, but adds additional tags. Aer Words In academic circles, debate continues on whether we’re born with the ability to understand language, or whether it’s something we’re taught. We don’t know the answer, and, most of the time, we don’t even know which side of the argument we want to be on. What we do know is that language is the most important technology humans have developed. In this chapter, we’ve shown how to get words into InDesign, how to organize them in your publications, and how to get them out again. Next stop—typesetting with InDesign! What About XPress Tags? Real_World_Adobe_InDesign_CS4b.pdf 249Real_World_Adobe_InDesign_CS4b.pdf 249 08/04/2009 05:54:42 p.m.08/04/2009 05:54:42 p.m.  Ole’s tale: “Late night. e pale glow from the monochrome monitor of my Compugraphic phototypesetter. e smell of the oce stan- dard ‘French Vanilla’ coee—warming, now, for several hours and resembling nothing so much as battery acid. e gentle snoring of one of the sta writers, who is curled up in the warmth of the unit that holds the lmstrips containing the fonts I’m using to set his story. “ese are the things I think of when I hear the word ‘typeset- ting’—they’re memories from my job at Seattle’s free rock and roll newspaper e Rocket, circa 1982. Desktop publishing didn’t exist yet, and digital (as opposed to photo) typesetting systems—with their WYSIWYG displays—were rare. e codes and characters I saw on my screen wouldn’t look anything like type until they were printed, one character at a time, on a strip of photographic lm and developed. I could set just about any kind of type using that machine, provided the characters would t on a piece of lm not more than seven inches wide, and provided I didn’t need to use characters from more than six fonts.” When desktop publishing appeared, we found that it couldn’t do everything Ole could do with his Compugraphic—but that being able to see what our type would look like before we printed it more than made up for any deciencies. ese days, page layout programs are far more capable than Ole’s trusty EditWriter. Does that mean, however, that there’s no more room for improvement? For surprising new features? Is typesetting “done”? Ty pe  4 Real_World_Adobe_InDesign_CS4b.pdf 250Real_World_Adobe_InDesign_CS4b.pdf 250 08/04/2009 05:54:43 p.m.08/04/2009 05:54:43 p.m. [...]... dictionary InDesign uses to hyphenate and check the spelling of the text (see Figure 4-16) Because language is a character-level attribute, you Real_ World_ Adobe_ InDesign_ CS4b.pdf 264 08/04/2009 05:54:45 p.m 252 real world adobe indesign cs4 Figure 4-14 Skewing Text Select some text Enter a value in the Skew field Figure 4-15 Real and Fake Italic Characters Note the differences in character shapes InDesign. .. characters of different fonts With InDesign s Optical kerning method, we get both ▶ Optical The Optical kerning method considers the composed shapes of the characters and applies kerning to even out spacing differences between characters Real_ World_ Adobe_ InDesign_ CS4b.pdf 260 08/04/2009 05:54:45 p.m 248 real world adobe indesign cs4 In general, the kerning applied by InDesign when you use the Optical... decrease the size by pressing Command-Shift- . delet- ing a return character and, potentially, paragraph formatting. Simple Searches Made Better with GREP Real_ World_ Adobe_ InDesign_ CS4b.pdf 24 2Real_ World_ Adobe_ InDesign_ CS4b.pdf 242 08/04/2009. Started with Tagged Text Real_ World_ Adobe_ InDesign_ CS4b.pdf 24 7Real_ World_ Adobe_ InDesign_ CS4b.pdf 247 08/04/2009 05:54:42 p.m.08/04/2009 05:54:42 p.m.  .   InDesign s tags can specify. enter “<ParaStyle:heading>” for InDesign. What Tags Can Contain Tag Structure Paragraph Style Tags Real_ World_ Adobe_ InDesign_ CS4b.pdf 24 8Real_ World_ Adobe_ InDesign_ CS4b.pdf 248 08/04/2009 05:54:42

Ngày đăng: 01/07/2014, 13:20

Mục lục

  • Contents

  • Introduction

  • CHAPTER 1 Workspace

    • Layout and Story Windows

    • Managing Multiple Windows

    • InDesign’s Panels

    • Using the Tools Panel

    • Other Panels

    • Context Menus

    • Keyboard Shortcuts

    • Customizing Menus

    • Customizing the Control Panel

    • Saving and Loading Workspaces

    • Setting Preferences

    • Setting Defaults

    • Publication Navigation

    • Place Icons

    • Managing InDesign’s Plug-Ins

    • On with the Tour

    • CHAPTER 2 Page Layout

      • Creating a New Publication

      • Opening Publications

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan