Skip to main content
mazdaspeed
Inspiring
November 15, 2024
해결됨

"Mojikumi: line end all 1/2 em + Kinsoku: Hard Kinsoku" is being spontaneously added to Para Styles

  • November 15, 2024
  • 1 답변
  • 3721 조회

Recently, I'm finding "Mojikumi: line end all 1/2 em + Kinsoku: Hard Kinsoku" is being spontaneously added as the last settings in my Para Styles, and I do not have, nor have I ever had, any Asian language installed for InDesign.

 

Whatt's going on here? Does anyone know?

이 주제는 답변이 닫혔습니다.
최고의 답변: Joel Cherney

Joel, thanks for taking time to reply when you are not even at the application. I appreciate it. And I also appreciate Abhisheks prompt replies, as they came within the hour of posting. Fortunately, this problem isn't urgently causing me an issue, but I suspect it may come to that again. 

 

None of my files or ID installations are older than 2020, so I don't suspect that's the issue. The only thing I can think of is the possibility of a Word document from the one editor that I work with, though I've been using her files since 2020 and not had this issue until a couple of months ago.

 

I previously tried the following script that I had ChatGPT write for me, and if failed to run with the following error:

Error Number: 55 

Error String: Object does not support the property or method "KinokuSet"

Line 18:

Source: style.kinokuSet = NothingEnum.NOTHING;

 

The script follows:

 

 

 

// Remove Kinsoku and Mojikumi from all Paragraph Styles in InDesign
(function() {
// Ensure a document is open
if (app.documents.length === 0) {
alert("Please open a document before running this script.");
return;
}

var doc = app.activeDocument;
var paragraphStyles = doc.allParagraphStyles;

// Loop through all paragraph styles
for (var i = 0; i < paragraphStyles.length; i++) {
var style = paragraphStyles[i];

// Only process user-defined paragraph styles (skip defaults)
if (style.name != "[No Paragraph Style]" && style.name != "[Basic Paragraph]") {
style.kinosokuSet = NothingEnum.NOTHING;
style.mojikumi = NothingEnum.NOTHING;
}
}

alert("Kinsoku and Mojikumi settings have been removed from all paragraph styles.");
})();

 

 
I'm attaching an INDD file. BodyBase* is one style that has it turned on.
Thanks again for looking at this.

Thanks, I'll give your test file a shot when I get home. I suspect my own syntax is wrong, but ChatGPT is... way off base. If you actualy want to use AI to write JS, there are better tools. A good large language model has to be well groomed.  

 

Take your script, for example. You didn't retype it, did you? You just copied and pasted the script, right? But you had to rekey the error message because it couldn't be copied out of the JS error dialog? Because it's supposed to be "kinsokuSet" throughout. Not "kinokuSet" or "kinosokuSet". So somebody, in some long-gone forum, keyed in a typo when attempting to write up a script that affects kinsoku, and that error was captured by someone compiling an LLM, and never corrected. 

 

Anyhow, I don't know what else might be wrong here, but later today I'll try both scripts against your sample file and we'll see what we get. I bet that I'm supposed to use the "NothingEnum.NOTHING" that the AI used, instead of my own "KinsokuSet.NOTHING"; I'll give it a shot. 

 

 

 

 

1 답변

Abhishek Rao
Community Manager
Community Manager
November 15, 2024

Hi @stevenp64515577,

 

Thanks for reaching out! To help troubleshoot this issue, could you please provide the following details?  

1. Which version of InDesign are you currently using?  
2. Could you share the details of your OS?  
3. Is this issue specific to one file, or is it occurring across multiple files or even newly created ones?  
4. If possible, could you share a screen recording demonstrating the issue? This will help us better understand what’s happening.  

 

Additionally, was this functionality working correctly for you earlier? Let us know so we can assist you further!  

Looking forward to your response.  

 

Best,
Abhishek Rao  

mazdaspeed
mazdaspeed작성자
Inspiring
November 15, 2024

And another issue for me to replicate this is, that when I need a particular style that I know I've created previously, I go and grab it from an earlier document. I'm sure I've brought the issue back into a working file in this manner. I simply don't have the time to scrub all my files when the only fix is to delete and recreate the style.

 

My biggest issue with this is that I recently tried to move an older file into a newer one with different page and margin sizes, and I got an error related to these settings. At the time, I deleted and recreated the styles so I could complete the task. However, now I'm finding these settings just showing up in various para styles, and I know it's gonna come back to bite me at some point. You guys need to figure out how to scrub these settings with a script or something.

mazdaspeed
mazdaspeed작성자
Inspiring
November 15, 2024

Thanks, I'll give your test file a shot when I get home. I suspect my own syntax is wrong, but ChatGPT is... way off base. If you actualy want to use AI to write JS, there are better tools. A good large language model has to be well groomed.  

 

Take your script, for example. You didn't retype it, did you? You just copied and pasted the script, right? But you had to rekey the error message because it couldn't be copied out of the JS error dialog? Because it's supposed to be "kinsokuSet" throughout. Not "kinokuSet" or "kinosokuSet". So somebody, in some long-gone forum, keyed in a typo when attempting to write up a script that affects kinsoku, and that error was captured by someone compiling an LLM, and never corrected. 

 

Anyhow, I don't know what else might be wrong here, but later today I'll try both scripts against your sample file and we'll see what we get. I bet that I'm supposed to use the "NothingEnum.NOTHING" that the AI used, instead of my own "KinsokuSet.NOTHING"; I'll give it a shot. 

 

 

 

 


Joel, that did it!

I changed the mispelled command and it both executed and removed all the instances of Mojikumi and Kinsoku settings.

Excellent!