Closed ChadBailey closed 2 years ago
Thanks for this.
Can you try the solution at https://tex.stackexchange.com/questions/577250/how-to-use-latexindent-on-windows
I've tried repeatedly to influence change on Miktex, but haven't been successful.
Oh, my mistake, I realise now that you've posted both a problem and a solution, thank you!
If ever you have ideas for improvements to the documentation, do feel free to submit a pull request :)
No problem... sadly I am not fluent enough in MiKTeX, Perl, or LaTeX to really have any business attempting to resolve, but I would imagine the intended behavior is for this to work out of the box from MiKTeX.
If your package is broken in there, I would recommend either getting it fixed or delisting it. Having a broken package on the index doesn't do either side any favors. I wouldn't be quick to jump to that conclusion though, as I did not see anyone else post a similar issue anywhere.
For instance, perhaps this is a rare issue only invoked by a particular set of circumstances and this post along acts as ample documentation to the next poor person who runs into it. Hard to say.
I would recommend at minimum to figure out if the package needs YAML::Tiny
to be declared as a dependency in the latexindent MiKTeX package, then get it declared if so,
If you do not maintain the latexindent MiKTeX package then I would recommend working with the person who is managing the package or request it be removed if you don't know who that is/how they are managing it.
An unknown package maintainer can be a huge security liability - they could one day slip a backdoor into the package without you knowing
At least, this is what I would say in other contexts. I have no idea how package management works with MiKTeX and Perl/LaTeX at large.
Hope that helps!
Github automatically displays this, but in case you missed it I have posted a bug report to MiKTeX at https://github.com/MiKTeX/miktex/issues/1117
I hope this helps your voice be heard. I appreciate the hard work you've done on this tool, I think indentation and linting tools are under appreciated and critical to the workflow of people everywhere.
Please provide the following when posting an issue:
original .tex code
yaml settings
Please paste your YAML settings (if any) here
actual/given output
Error log:
desired or expected output
No error
anything else
Reason I'm 100% new to Perl and LaTeX et all, so I'm surely doing something wrong. I also don't know if this is the fault of latexindent or MiKTeX, so my mistake if this is due to any of those things. I'm only posting to help the would-be newbie who doesn't have a software background.
Background/Setup I installed MiKTeX to manage my LaTeX + utilities, expecting it to be able to supply every package I need for a command line implementation. I'm using Visual Studio Code for editing LaTeX, with the LaTeX Workshop extension. I installed latexindent via the MiKTeX GUI. This works mostly, but I get the error shown above. It appears to not have the Yaml extension as a dependency but I'm unsure.
The exe file being referenced, even after removal of latexindent, is at %LOCALAPPDATA%\Programs\MiKTeX\miktex\bin\x64\latexindent.exe
When attempting to run
latexindent
from the command line it would reference the above file, prompting to reinstall the package resulting in a repeat pattern.Resolution I manually removed %LOCALAPPDATA%\Programs\MiKTeX\miktex\bin\x64\latexindent.exe
Next I downloaded and extracted the .zip file from the latest release to a place folder in my %PATH%
This fully resolved the issue.