• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2013
  • Last Modified:

InDesign CC straight quotes

I am working on some training materials for my students and am setting up the worksheet in Indesign. I have typographer quotes turned on in the preferences and use it for where I write directions.  For the code snippets however I want straight quotes.

I know I can go and turn off the typographer quotes and then type the code, but if I have typographer quotes turned on and copy paste code they all become curly. Interesting enough, if I start with curly quotes and then turn off typography quotes and then paste they stay curly.

Is there a way I can set up a style that will always use straight quotes so that if students copy past the code they don't end up getting errors from the curly quotes?

Thanks
0
lvmllc
Asked:
lvmllc
  • 4
  • 2
1 Solution
 
Sigurdur ArmannssonDesignerCommented:
See if this works for you:

Select the text in question.
Go to Find & Change.
Select the GREP tab.

In Find: ~{(.+?)~}  
[This means: Any Double Left Quote – Any Character, one or more, non greedy – Protected. Any Right Double Quote Mark]

In Change to: ~"$1~"
[This means: Straight Quote. The protected content between the Parenthesis. Straight Quote.

Try first Find and if it works then Change all.

Copy and paste to the new source.

If this works, click the hard disk symbol at the top of the Find window to save this command for later use.
0
 
Dan CraciunIT ConsultantCommented:
I don't know how you can do it using styles, but you can use Ctrl+Alt+Shift+' to disable/enable typographer quotes.

So you can press Ctrl+Alt+Shift+', paste your code (preserving the straight quotes), then press Ctrl+Alt+Shift+' again to re-enable typographer's quotes.

HTH,
Dan
0
 
lvmllcAuthor Commented:
sigurarm,
I can sort of make your solution work, but two questions.

If I need to convert all curly single and double quotes to straight single or double can I do this in one search/replace?

Seems strange this can not be applied to a style.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
Dan CraciunIT ConsultantCommented:
As I see it, that preference triggers a script that applies to all styles so it would not make sense to be style dependent.
0
 
Sigurdur ArmannssonDesignerCommented:
Because quotation marks and straight quotes (inch) are individual characters you can not use changes in styles to work on it.

However, you could make a Paragraph style to use on the code text. Using it you could use my solution but add at the bottom of the Find window the name of the style. That way the changes would only happen in text that is marked by that paragraph style. See the picture find by format
0
 
Sigurdur ArmannssonDesignerCommented:
oh, yes, you can do it in one find and change run. Simply Change All. And as I said, filter it by paragraph style

Please use this image. I made a small but vital mistake in the first one. It has to filter the Find Format – not Change to Format.
findchange.jpg
0
 
Sigurdur ArmannssonDesignerCommented:
I tested this over and over and it works amazingly well. Only does the text in the paragraph style of choice.
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now