isteinbrecher / latex2ai

LaTeX Plugin for Adobe Illustrator
MIT License
147 stars 5 forks source link

LaTeX2AI not working for version2020 #111

Closed zjj0930 closed 1 year ago

zjj0930 commented 1 year ago

My version of AI is 2020. I used the LaTeX2AI for 2021 and placed it where the doc suggests. However, I got an error - Exactly 6 input arguments are expected when I click the button of the plugin in the AI2020. Is this version for 2021 not compatible with AI2020?

isteinbrecher commented 1 year ago

The error occurs during the interaction between the PlugIn and the GUI. One possible issue could be if you have special characters or whitespace characters in your document name or in your Windows user name.

I also uploaded a (not tested) build with Illustrator 2022. Please have a try if this fixes your problem.

LaTeX2AI_b5c0db9_release_Illustrator2020.zip

zjj0930 commented 1 year ago

Thank you. I tried all three versions of LaTeX2AI - 2020 (you uploaded here), 2021, and 2022; however, none of them are valid and the same error occurs. My user name is "zjj_0". The document is a newly created blank one. The following is my OS information:

Operating System: Windows 10 家庭版 64-bit (10.0, Build 19044) (19041.vb_release.191206-1406)
Language: Chinese (Simplified) (Regional Setting: Chinese (Simplified))
System Manufacturer: LENOVO
Processor: Intel(R) Core(TM) i5-6300HQ CPU @ 2.30GHz (4 CPUs), ~2.3GHz
Memory: 16384MB RAM
Available OS Memory: 16212MB RAM
Windows Dir: C:\WINDOWS
User Dir: C:\Users\zjj_0
DirectX Version: DirectX 12
isteinbrecher commented 1 year ago

Try the following version, it is based on the branch 111-debug-forms-error and should give a more detailed error output.

LaTeX2AI_328d8ae_release_Illustrator2020.zip

zjj0930 commented 1 year ago

The version [LaTeX2AI_328d8ae_release_Illustrator2020.zip] returns an error -

Nuber of arguments: 1
Argument 0: "C:\Program Files\Adobe\Adobe Illustrator 2020\Presets\zh_CN\脚本\LaTeX2AI_328d8ae_release_Illustrator2020\LaTeX2AIForms.exe"

I thought the Chinses character "脚本" perhaps causes the error, so I placed the .exe and .aip files into "C:\Program Files\Adobe\Adobe Illustrator 2020\Presets", however, it does not work as well.

isteinbrecher commented 1 year ago

If you place both executable files in a folder without Chinese symbols, which error message do you get? When exactly does this message appear?

zjj0930 commented 1 year ago

I placed both executable files in "E:\" and got the same error -

Nuber of arguments: 1
Argument 0: "E:\LaTeX2AIForms.exe"

when I just clicked and run the .exe file.

So I think it is not related to the Chinese characters.

isteinbrecher commented 1 year ago

Can you exactly specify when this error occurs? Then I can upload a detailed bug tracking version for you.

zjj0930 commented 1 year ago

When I clicked the "LaTeX2AIForms.exe" to start/open/initiate it in AI, the error occurs (I just placed the two files on the desktop and manually opened it), to which the two pics are attached FYI. 1 2

isteinbrecher commented 1 year ago

The LaTeX2aiForms.exe executable is only used from within the plug-in in Illustrator. It is not required to call it by hand. I will clarify this in the README.md with the next release.

Try to remove all LaTeX2AI executable files you placed on your machine and reinstall LaTeX2AI as described here (preferably in a directory path with only ASCII characters). Does the LaTeX2AI Toolbox appear in your version of Illustrator? You can try with the official releases or the one from this comment:

The error occurs during the interaction between the PlugIn and the GUI. One possible issue could be if you have special characters or whitespace characters in your document name or in your Windows user name.

I also uploaded a (not tested) build with Illustrator 2022. Please have a try if this fixes your problem.

LaTeX2AI_b5c0db9_release_Illustrator2020.zip

zjj0930 commented 1 year ago

If I placed it in the plug-in folder in AI, the path will contain Chinese character I mentioned above. Perhaps this error occurs due to the Chinese character, so I try to put it on the desktop to avoid Chinese character. Neither of them works; and the same error - "Nuber of arguments: 1 Argument 0: "E:\LaTeX2AIForms.exe" - occurs for both conditions. The following pictures show the condition that the LaTeX2AI Toolbox appears in my AI. 3

isteinbrecher commented 1 year ago

It seems like you are using the script folder to install the plug-in, this does not work. Place both files (LaTeX2AI.aip and LaTeX2AIForms.exe) into an arbitrary directory with an ASCII path. Then this directory has to be set as the Adobe Illustrator Plugin directory in Illustrator via Edit/Preferences/Plug-ins & Scratch Disks.../Additional Plug-ins Folder. After a restart of Illustrator the following tool panel should appear in Illustrator: Screenshot from 2022-09-05 14-29-24

zjj0930 commented 1 year ago

Thanks for your help. I've changed from AI2020 to AI2021 and followed the instructions you provided. The LaTeX2AI was installed correctly and it can work well except for a newly default doc created because of its Chinese name in the Chinese version of AI2021. The ASCII path requirement in either path or name is not friendly for users of non-English version of AI. It sounds great that the LaTeX2AI can support UTF8. Is this possible in the future?

isteinbrecher commented 1 year ago

Good to hear that LaTeX2AI is now working on your system. Regarding the ASCII paths, there is already an open issue (#100).