Overleaf-Workshop icon indicating copy to clipboard operation
Overleaf-Workshop copied to clipboard

[Feature Request] Advanced Formatter

Open sleepymalc opened this issue 1 year ago • 5 comments

Disclaimer

Please make sure all the items below is checked (i.e., prefixed with "- [x]")

  • [x] The request feature has not been addressed in the feature request list.
  • [x] The design of the feature does not require detailed discussion, or existing discussion with drawn conclusion can be found in Discussions Area at: [paste the link here]

Motivation

Please give strong enough reason(s) why the feature is demanded.

  • A clean formatting is always a good thing to have.
  • The current formatter doesn't seem to be enough

Feature Description

A clear and concise description of what you want to happen under what circumstance.

  • Support some existing formatter like latexindent. This is what LaTeX-Workshop used, so I guess this is possible. Currently the functionality of the default formatter is quite bad, e.g., it doesn't support any indentation fixing.
  • Other formatter like for .bib files.

[Optional] Additional context

Please strike out any inappropriate items below. If you are not aware of the difference, please ignore this section.

  • Applicable Overleaf Edition: Official / Community / Enterprise (Server Pro)
  • Applicable Extension Range: Desktop Extension / Web Extension

sleepymalc avatar May 15 '24 11:05 sleepymalc

@QianrenLi Please have a look at it when you are free.

iamhyc avatar May 15 '24 14:05 iamhyc

I think suddenly my local formatter is working again. Not sure why however.

sleepymalc avatar May 21 '24 07:05 sleepymalc

I also used the local latexindent, but sometimes it failed, and I don't know why.

benlw avatar Jun 19 '24 03:06 benlw

Same question, latexindent does not work anymore.

EasonYWei avatar Jun 22 '24 05:06 EasonYWei

Sorry for the late. In my case, latexindent works with the following steps. Please let me know if this works for you (Take main.tex as an example):

  1. Create a local replica for your project.
  2. Either manually run latexindent.exe -w .\main.tex or install the LaTeXindent extension. If you choose the latter, update the latexindent.executable path to match your local latexindent path. You may also want to set latexindent as the default formatter for better performance.

QianrenLi avatar Aug 12 '24 07:08 QianrenLi