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

Grep: Absatz und erzwungener Zeilenumbruch

Community Beginner ,
Feb 24, 2023 Feb 24, 2023

Copy link to clipboard

Copied

Hallo!

Leider komme ich mit einer einfachen GREP-Formel nicht weiter und wäre für die Hilfe sehr dankbar.

Die Formel lautet: ^\w+

Mein Problem: Diese wird nicht nur auf den Absatz, sondern auch auf den erzwungenen Zeilenumbruch angewandt. Nach jedem erzwungenen Zeilenumbruch, wird ebenfalls auf das erste Wort das entsprechende Zeichenformat angewandt. Die erzwungenen Umbrüche kann ich nicht vermeiden, weil die Texte von Redakteuren bearbeitet werden, und ich keinen Einfluß darauf habe, wie getrennt wird.

Wie muss die Formel lauten, damit das erste Wort im Absatz verändert wird, aber nicht das erste Wort nach einem erzwungenen Zeilenumbruch.

Darüberhinaus weiß vielleicht jemand, wie ich den Punkt nach jedem ersten Wort im Ansatz auch anders definiere. Also das erste Wort in jedem Absatz hat ein Zeichenformat. Der Punkt, der danach kommt hat ein anderes Zeichenformat. Das Problem habe ich mit verschachtelten Zeichenformaten gelöst, mich würde aber sehr interessieren, wie es mit dem GREP funktioniert.

Vielen Dank im Voraus für die Antworten!

TOPICS
Scripting

Views

986

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 24, 2023 Feb 24, 2023

Copy link to clipboard

Copied

Arbeiten die Redakteure mit InCopy/InDesign?

Weshalb kannst du die erzwungenen Zeilenumbrüche nicht entfernen?

Was hindert Dich an der korrekten Silbentrennung?

 

Wenn das gelöst ist, können wir an der Lösung von Sekundärproblemen arbeiten.

 

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 Beginner ,
Feb 24, 2023 Feb 24, 2023

Copy link to clipboard

Copied

Ja, InCopy. Es ist ein größeres Team von Grafikern und Redakteuren. Nicht jeder weiß, wie man eleganter umbrechen kann. Meine Aufgabe ist es die Leute nicht zu schulen sindern eine Stilvorlage zu erstellen, mit der jeder ohne Probleme arbeiten kann. Und hier sehe ich ein Problem.

 

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 24, 2023 Feb 24, 2023

Copy link to clipboard

Copied

Hi @Vikaholzheimer:

 

Reading through your layout requirements, I would have recommended nested styles for this as well—we use GREP for patterns that we can't match through nested line styles. At least, I do.

 

~Barb

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 Beginner ,
Feb 24, 2023 Feb 24, 2023

Copy link to clipboard

Copied

quote

Hi @Vikaholzheimer:

 

Reading through your layout requirements, I would have recommended nested styles for this as well

 

~Barb


By @Barb Binder

Funktioniert entweder für das erste Wort, oder für den Punkt, aber nicht zusammen.

quote

Hi @Vikaholzheimer:

 

 

we use GREP for patterns that we can't match through nested line styles. At least, I do.

 

~Barb


By @Barb Binder

Genau deshalb brauche ich die Formel!

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 Beginner ,
Feb 24, 2023 Feb 24, 2023

Copy link to clipboard

Copied

Es wäre sehr hilfreich, wenn nur Menschen schreiben, die die richtige Formel kennen. Danke!

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 24, 2023 Feb 24, 2023

Copy link to clipboard

Copied

Hi @Vikaholzheimer:

 

My apologies for not starting with this. Google translate said you solved this with nested styles. 

"I solved the problem with nested character formats."

 

As previously stated, I would use two nested styles: One up to the dot. The second through the dot. Matches at the beginning of a paragraph, but not after a forced line break.

 

~Barb

 

2023-02-24_07-05-26.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
Community Beginner ,
Feb 24, 2023 Feb 24, 2023

Copy link to clipboard

Copied

Thank you very much!!!

That was my fould: ....  trough 1 Word

Now it worked!Bildschirm­foto 2023-02-24 um 15.18.20.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
Explorer ,
Feb 24, 2023 Feb 24, 2023

Copy link to clipboard

Copied

Hallo,

du kannst den erzwungenen Zeilenumbruch mit einem negativen Lookbehind von der Suche ausschließen. Dann findest du nur jeweils das erste Wort in einem neuen Absatz:

(?<!\n)^\w+

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 Beginner ,
Feb 24, 2023 Feb 24, 2023

Copy link to clipboard

Copied

Das hat auch geklappt. Vielen Dank!!! Jetzt weiß ich auch, wie man richtig ausschließt, falls ich doch mal GREP brauchen sollte. Nächstes mal frage ich gleich, anstatt zwei Stunden erfolglos an der richtigen Formel zu basteln 🙂 Ich bin glücklich über die schnelle Hilfe.

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 24, 2023 Feb 24, 2023

Copy link to clipboard

Copied

LATEST

We are always happy to help, @Vikaholzheimer.

 

~Barb

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