Closed Mikachu2333 closed 1 month ago
You can add "-y=defaultIndent: '%INDENT%'"
to your arguments. latexindent
sometimes ignores that setting in yaml
.
You can add
"-y=defaultIndent: '%INDENT%'"
to your arguments.latexindent
sometimes ignores that setting inyaml
.
Sorry for bother, but I mean that whether I set -y=defaultIndent: '%INDENT%'
or not, LaTeX Workshop did not respond and made no change to my tex file.
Although it displayed success, it did not actually modify any of the lines as what I want it to do.
latexindent
sometimes ignores that setting inyaml
.
If it ignores the setting of default indent spaces, at least it should have corrected lines 9 to 10 in my tex file which were indented incorrectly, but it did not complete the task.
I tried your example and it works well on my side, except for the tab indentation. So I figure it should be a local problem. The log message also did not indicate anything wrong.
I tried your example and it works well on my side, except for the tab indentation. So I figure it should be a local problem. The log message also did not indicate anything wrong.
Thanks for timely anster, I'd re-try it with my friends to check it out if it is a local problem.
latexindent
sometimes ignores that setting inyaml
.
Thank you for your tip!
At your prompt, I found that although the yaml file was specified and LaTeX Workshop did not report any error, indeed, the yaml file was not used for not found error, this issue is reffering to the error file locate (It seems that Latex Workshop did not check the file in workfolder path and just ignore the arg.).
The correct setting in the json file should be -l=%DIR%/latexindent.yaml
...
Pre-checks*
Environment*
Operating System: [
Ubuntu 22.04.4 LTS
x64_86
]Visual Studio Code Version: [
1.89.1
(latest)]LaTeX Workshop Version: [
9.20.1
(latest)]TeX Distribution Version: [
TeX Live 2024
(latest)]LatexIndnet Version: [
3.24.1
(latest)]Snap VSCode
1.89.1
The Issue*
When I tried to indent the file with latexWorkshop, it output
successed!
but didn't change the file indeed. And I tried to run the commands in terminal and get correct results.Reproduction Steps
File (dir) Struct:
Context main.tex
Context latexindent.yaml
Context _school_lifefuyanshan.tex
Latexindnet part of VSCode Settings
Expected Behavior
The file
school_life_fuyanshan.tex
should be formatted as the following show.(not 3 tabs but 8 spaces in line 12
column{1} = {cmd=\bfseries},
)Logs
LaTeX Workshop Output*
Developer Tools Console
Anything Else?
I tried the command and it gave correct result.