Solved

InDesign CC straight quotes

Posted on 2014-04-01
7
1,335 Views
Last Modified: 2014-04-08
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
Comment
Question by:lvmllc
  • 4
  • 2
7 Comments
 
LVL 22

Expert Comment

by:Sigurdur Armannsson
ID: 39969680
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
 
LVL 34

Expert Comment

by:Dan Craciun
ID: 39969861
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
 

Author Comment

by:lvmllc
ID: 39970307
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 34

Expert Comment

by:Dan Craciun
ID: 39970340
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
 
LVL 22

Expert Comment

by:Sigurdur Armannsson
ID: 39970781
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
 
LVL 22

Accepted Solution

by:
Sigurdur Armannsson earned 400 total points
ID: 39970787
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
 
LVL 22

Expert Comment

by:Sigurdur Armannsson
ID: 39971024
I tested this over and over and it works amazingly well. Only does the text in the paragraph style of choice.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The ability to automatically add page numbers to a layout is one of the many easy, convenient features InDesign has to offer. There are many reasons why you would want to automatically generate page numbers in your next project, so whether it’s a ma…
Have you ever wanted to create graphical elements directly in inDesign? This tutorial will teach you how to have an image bound within text using the pathfinder tool in inDesign CS6. This technique will help decrease the amount of time spent opening…
Learn how to automatically add page numbers in your next InDesign project. This can be very helpful in multi-page books and magazines that you are designing. Make sure your Pages window visible.:  In the document you wish to add page numbers to. Act…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now