• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

find and replace in a GREP style

Participant ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

Hi,

I was wondering if there is a way to replace a hyphen by another character, using a GREP style?

What I want to do is basically replace " - " by " ~ " in all instances, in a certain paragraph style. I could do it by find&replace at the end of my lay-out work, but I was wondering if there is no more automated way, using a Grep Style (or something else)

Thanks for thinking along

Vanessa

Views

2.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 03, 2017 Feb 03, 2017

OutlineG wrote:

What I want to do is basically replace " - " by " ~ " in all instances, in a certain paragraph style. I could do it by find&replace at the end of my lay-out work, but I was wondering if there is no more automated way, using a Grep Style (or something else)

Vanessa

Is there a reason that

• Find dash -

• Change to tilde ~

• when it is a specific paragraph style does not work?

Or AutoCorrect as you are typing?

GREP styles will allow you to assign a character style — not actual text.

A GR

...

Votes

Translate

Translate
Advisor ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

This isn't yet native (as far as I'm aware) and I have been wanting them to make this an official part of the GREP Paragraph Styles for a little while myself.

I can only suggest you add this as a feature request Feature Request/Bug Report Form

I will have a look and see if there's an add on or script that can help in the meantime.

Alternatively - Why is it exactly that it needs to be "~" rather than "-"?


Could you use another font perhaps that simulates this or something?

Forgive my questions.

Best,

EW

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

It's just a design issue - my art director thinks it's nicer this way - but there are a LOT of those hyphens in the description text...

it needs to stay in the font too, do...

Would be a great feature - and fairly simply to add, I would think

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

Hi,

Did you mean "Dash", or changing style of automatic Hyphens?

If you can use the Find/Replace feature, I guess you meant dash.

So, you can easily use a Grep rule if you find a suitable font which has a "tilde-like" dash.

See example below using Goggle Font called "Mr de Haviland"

test.jpg

Now, my first thought went to Autocorrect, as I remembered a great article about Autocorrect and Glyphs (http://indesignsecrets.com/stand-autocorrect-on-its-ear.php ). Although it would't change the auto-hyphen issue.

<wordpair misspelled="&#x002D;" corrected="&#x007E;" />

However, we face the problem of Autocorrect feature applying only to entire words.

"Bla - Bla" could easily be changed to "Bla ~ Bla" but not "Bla-bla"

I'd be curious about hearing a solution to that issue... If someone has one...

Vinny

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

it's indeed a dash I meant, not the hyphenation of words...

A different font would work, but I would prefer being able to use the styleguide / initial font...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

I had a nice idea guys:

GREP it with a char-style, give that char no color, but with underlining in a given color. That could work…
Youll have to emulate the style of your "-"

Bildschirmfoto 2017-02-03 um 14.33.19.png

Bildschirmfoto 2017-02-03 um 14.33.25.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

Hi DBLjan, I think the OP wants it the other way around: change - to ~

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

I would prefer being able to use the styleguide / initial font...

Hmmm, in that case, I have no other idea than the Autocorrect feature, assuming someone can come up with an idea on how to disable the "entire word" problem.

I'm sure an XML magician could solve that out...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

Just had a brainwave!

What if we don't focus on InDesign as the source of the problem and instead focus on the Keyboard for using the straight tilde rather than the wavy...

With this in mind...and I haven't got time to test this...

I propose the use of a key remapping software to temporarily change the output of the tilde key - having looked at these articles:

Map Any Key to Any Key on Windows 10, 8, 7, or Vista

SharpKeys - Home

What does everyone think? Could this work for now?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

If we're going to accept the dificult way, then you could alter your hyphen character in a tilde in a duplicate font using BirdFont (€15).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

The font edit is a nice way, thou font editors were very expensive. But there are others. And even an OSclassic open-source project.

We had a font, the CEO liked. But he didnt like the 7 not having a stroke. Till I joined our company, my fellow collegues were using the linetool all over 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Feb 06, 2017 Feb 06, 2017

Copy link to clipboard

Copied

Hi

Did you come up with a solution to your question?

By the way, while going back through this thread, I was wondering if I made myself clear enough about the Grep rule I suggested above:

the special font only applies to dashes, not text. If you work with a serif font, the difference between suggested Goggle font and your tilde will be very slight.. What is the font in use?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

OutlineG wrote:

What I want to do is basically replace " - " by " ~ " in all instances, in a certain paragraph style. I could do it by find&replace at the end of my lay-out work, but I was wondering if there is no more automated way, using a Grep Style (or something else)

Vanessa

Is there a reason that

• Find dash -

• Change to tilde ~

• when it is a specific paragraph style does not work?

Or AutoCorrect as you are typing?

GREP styles will allow you to assign a character style — not actual text.

A GREP search would work, but would be more cumbersome than a text search.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

Hi all,

with IndyFont by Jongware and Marc Autret one could easily build a one character font.

And then a GREP style is possible.

Indiscripts :: IndyFont

Indiscripts :: Getting Started with IndyFont Pro

IndyFont is an InDesign-only solution.

And if you need a one character font only you can get away with the free version:

IndyFont's TRY version offers most of the features of the PRO release, except it will only allow to export a single character per font.

Regards,
Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

With a grep style … and sun-glasses! Just type a dash! …

Capture d’écran 2017-02-03 à 18.46.48.png

Underlining!  LOL!

(^/)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Feb 06, 2017 Feb 06, 2017

Copy link to clipboard

Copied

Also Obi - You've been very helpful in the past

But I'm having a little trouble understanding how you achieved this?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 10, 2017 Feb 10, 2017

Copy link to clipboard

Copied

Obi-wan Kenobi​

Am I on the right track?

Move the Offset a little more and create a character style.

But do you make the dash invisible or delete it or replace it with a fixed space?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 10, 2017 Feb 10, 2017

Copy link to clipboard

Copied

Hi Jane,

You're right! The dash has "no color"! … but the underlining has "a" color, e.g. as black! not "(Text Color)" [that is, actually, "no color"]!

Simple! Aha! [ Sorry!  ]

My previous post was just for fun! (not a very serious way!) I've done better in a recent past!

[Off] A little tired!

(^/)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 10, 2017 Feb 10, 2017

Copy link to clipboard

Copied

Of course, the invisible dash—I think I've got it now!

And then it's easy to apply the Character style to the dash with GREP. Brilliant solution, Obi-wan Kenobi!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 10, 2017 Feb 10, 2017

Copy link to clipboard

Copied

😉

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Feb 11, 2017 Feb 11, 2017

Copy link to clipboard

Copied

LATEST

No, no, no, NO!!!

I don't care if the art director likes the wavy underline instead of a hyphen or en dash (and I hope he/she does), but PLEASE do NOT pretend that it is an actual tilde.

Here is the tilde followed by the wavy line underline applied to an en dash or a hyphen.

It's easy to see that the tilde is a different width as well as a different sine wave.

It's a fun exercise to try to get the wavy line to appear magically under the hyphen, but it is NOT typographically correct!

Tilde for hyphen.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 06, 2017 Feb 06, 2017

Copy link to clipboard

Copied

Thanks for all your input, a lot of suggestions were offered here!

As I want to keep my lay-out as clean as possible, I'm not too fond of a different font, and key mapping goes a bit too far for me now... I guess I'll do a simple find and replace a couple of times...

and add a feature request

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines