• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2091
  • 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 ArmannssonDesigner Commented:
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
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
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 ArmannssonDesigner Commented:
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 ArmannssonDesigner Commented:
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 ArmannssonDesigner Commented:
I tested this over and over and it works amazingly well. Only does the text in the paragraph style of choice.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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