Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Problem with Preptext script

Community Beginner ,
Jul 16, 2021 Jul 16, 2021

Copy link to clipboard

Copied

Hello,
I have a problem with the Jongware preptext script.

I import my long text (a book).docx
I pass the script Preptext
I pass the findchangebylist script
I select my text and apply my current text style


But I noticed that despite everything, there is italic text when there should not be.

 

Do you have an idea?


I went to creativepro.com and downloaded the PerfectPrepText script. I started from the beginning, but nothing has changed and I still have extra italics in my text.


Thank you for your help

Best regards,

Anne

TOPICS
Scripting

Views

170

Likes

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

Guru , Jul 19, 2021 Jul 19, 2021
Hello, Thank you.I have an error message.  By @anne-catherineg99181882
You have to select some text, a text frame ar place the cursor into the text. The par style "Footnote" should be defined in the doc.

Likes

Translate

Translate
Guru ,
Jul 16, 2021 Jul 16, 2021

Copy link to clipboard

Copied

Likes

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 ,
Jul 16, 2021 Jul 16, 2021

Copy link to clipboard

Copied

Thank you for this script.
It's better but I still have some made-up italics left in the text.
It's really annoying...
The layout is not made any easier. It must come from somewhere else...

Likes

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 ,
Jul 17, 2021 Jul 17, 2021

Copy link to clipboard

Copied

Could you post/send me by e-mail a file so I could test it? Just a snippet of the text so I could recreate the problem?

Likes

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 ,
Jul 18, 2021 Jul 18, 2021

Copy link to clipboard

Copied

Thank you. It's very nice. I thought I'd figured it out yesterday when I saw a font (Tahoma!) that came up when I imported the file, but in fact even when I changed it I still had letters that were in italics.

 

I'm willing to send you an extract by email (I can't post it here for confidentiality reasons).

Where can I send it to?

Likes

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 ,
Jul 18, 2021 Jul 18, 2021

Copy link to clipboard

Copied

My e-mail: askoldich [at] yahoo [dot] com

Likes

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
Adobe Community Professional ,
Jul 18, 2021 Jul 18, 2021

Copy link to clipboard

Copied

It is not advised to post personal contact details on this public forum.

 

Likes

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 ,
Jul 18, 2021 Jul 18, 2021

Copy link to clipboard

Copied

@Derek Cross Désolée, je n'avais pas vu cette interdiction.

@Kasyan Servetsky  vous pouvez supprimer votre adresse c'est préférable.

 

Likes

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
Adobe Community Professional ,
Jul 18, 2021 Jul 18, 2021

Copy link to clipboard

Copied

Don't worry – use the Private message system.

Derek

Likes

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 ,
Jul 18, 2021 Jul 18, 2021

Copy link to clipboard

Copied

Here’s a step-by-step description of the workflow that works for me. I’ll send you the sample files for each step by e-mail.

The main idea is to get from Word only basic formatting: say, Bold, Italic and Bold Italic, and I don’t want to use any styles imported from Word because the formatting here is total chaos so I create three paragraph styles from scratch — Body, Footnote and Header — set them to Myriad Pro (to have all font styles) and language to French.

  1. I import text preserving formatting, including footnotes, and using typographer’s quotes.
  2. Run the Protect local styling - 1.1.jsx script
  3. Select all the text and apply the ‘Body’ paragraph style
  4. Run the process footnotes.jsx script which applies ‘Footnote’ paragraph style to all footnotes clearing overrides. (The code I will post below.)
  5. Delete all paragraph styles imported from Word — select all unused, then click on Header to deselect it (I will need it later) — replacing with Body (turn on ‘Apply to all’).
    Delete all character styles except for those created by the script — Bold, Italic, and Bold Italic — replacing with ‘None’
  6. Clean up the text a little by GREP find-change: for example, Multiple Return to Single Return and Multiple Space to Single Space. You may want to create other queries to make the text tidy.
  7. Apply the ‘Header’ paragraph style to headers pressing ALT + SHIFT before clicking the style name. This will remove the ‘Bold’ character style. Note: the headers are formatted as Normal style in Word so I have to apply correct styles manually.

 

Note: some text has lost formatting (italics). For example, the word ‘Récit’ on the first page.

2021-07-18_23-08-54.png

Why?

Because Italics is already defined by the Body text paragraph style in Word and the script doesn’t apply a character style if the same formatting is already applied in the paragraph style.

2021-07-18_23-13-05.png

You can read more about this issue here.

Hope it helps!

— Kas

Likes

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 ,
Jul 19, 2021 Jul 19, 2021

Copy link to clipboard

Copied

Hello,

Unfortunately, I noticed that there was still some text in italics. Maybe it's from Word, I don't know but it doesn't work 100%. I thank you for taking the time to help me.

Likes

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 ,
Jul 19, 2021 Jul 19, 2021

Copy link to clipboard

Copied

quote

Hello,

Unfortunately, I noticed that there was still some text in italics. Maybe it's from Word, I don't know but it doesn't work 100%. I thank you for taking the time to help me.


By @anne-catherineg99181882

Could you point where exactly in your test file it happens?

Likes

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 ,
Jul 23, 2021 Jul 23, 2021

Copy link to clipboard

Copied

Bonjour,

J'ai remarqué cela dans le texte que vous m'avez envoyé (test 7)

 

Capture d’écran 2021-07-23 à 10.27.08.png

Et en essayant, j'ai les mêmes résultats 😞 

Je me demande si ce n'est pas tout simplement à cause de Word ? 

Likes

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 ,
Jul 23, 2021 Jul 23, 2021

Copy link to clipboard

Copied

In Word, in this extract on your screenshot, almost all the text (except for ' Un jour ... seront') has the 'Normal' paragraph style and 'Italic' (as local formatting) applied. So the script recreated the same formatting but using the 'Italic' character style. As for me, it works as expected.

I don't understand what's wrong with the text marked on the screenshot?

Likes

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 ,
Jul 23, 2021 Jul 23, 2021

Copy link to clipboard

Copied

LATEST

There is an italic/roman mix when it shouldn't be. For example the first sentence where the "to" is in roman and the rest in italic! In the Word the "to" is in italic.

 

Capture d’écran 2021-07-23 à 17.03.59.png

And there are a lot of them in the book... there must be a problem somewhere, for sure. It's up to me for now to check everything, line by line 🙂

 

I'll try to uninstall/reinstall or go back to an older version of Indesign 🙂

Thanks for everything

Likes

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 ,
Jul 18, 2021 Jul 18, 2021

Copy link to clipboard

Copied

Here's the 'process footnotes' script. Select text (or place the cursor) in a story you want to process.

The ‘Footnote’ paragraph style should be defined in the document.

var scriptName = "Process footnotes";

app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.FAST_ENTIRE_SCRIPT, "\"" + scriptName + "\" Script");

function main() {
	var doc = app.activeDocument;
	var story = app.selection[0].parentStory;
	var footnotes = story.footnotes;
	
	for (var i = 0; i < footnotes.length; i++) {
		var footnote = footnotes[i];
		footnote.texts[0].applyParagraphStyle(doc.paragraphStyles.itemByName("Footnote"), true);
	}
}

 

Likes

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 ,
Jul 19, 2021 Jul 19, 2021

Copy link to clipboard

Copied

Hello,

 

Thank you.

I have an error message.

Capture d’écran 2021-07-19 à 10.12.29.png

Likes

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 ,
Jul 19, 2021 Jul 19, 2021

Copy link to clipboard

Copied

quote

Hello,

 

Thank you.

I have an error message.

Capture d’écran 2021-07-19 à 10.12.29.png


By @anne-catherineg99181882

You have to select some text, a text frame ar place the cursor into the text.
The par style "Footnote" should be defined in the doc.

 

Likes

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