1

A famous extension of overleaf is writefull. There are also plugins that make it possible to use grammarly for overleaf: Grammarly and Overleaf: Is there a version of, or options in, detex that can leave some content between the latex marks?

It is also possible to run command line arguments from within the API: There is also an API for using overleaf through web, but it is quite limited.

What I am looking for is means for using the docker command line interface via \write18/Lua.

Specifically, I would like to write a small program that would process a file, and, e.g., replace all sequences of the form Let $i$ by Let~$i$, or better yet, replace LaTeX symbols such as $\alpha$ with their Unicode counterpart.

The problem is that updating the file in docker goes unnoticed by the IDE editor. What is needed is means for telling the IDE that a file has changed on the file system.

One way for doing this is to open another editor in a different window thereby making overleaf believe that it should synchronize the file. There might be others, like doing something within the docker. Perhaps erasing a PDF thereby forcing recompilation.

Yet another resource that might help in dealing with the challenge is this: How to set Overleaf to compile with `lualatex --shell-escape <file>`?.

What I try to do is avoid writing browser extensions, if possible.

1 Answer 1

1

(I'm on support staff at Overleaf.)

Any changes you make to files inside the compile container are ephemeral and don't persist back to the project's input files that you can see in the web editor.

The extensions you mention are not making changes to files in the compile container, they are operating on the client side. So from Overleaf's perspective, an edit made by a browser extension looks just like you were typing in the web editor. This is why these extensions are able to modify project files in a persistent manner.

If you have a script/program that you'd like to run on some of your .tex files to make edits, we'd recommend doing this offline via one of our syncing integrations like Dropbox, Git, or GitHub. You can run your script/program offline and synchronize the changes back to the Overleaf project.

If you don't have access to any of the automatic syncing integrations, you can do this by downloading your .tex file, running your script/program locally, and uploading the modified .tex file back to your Overleaf project manually.

1
  • 10x 4 ans. Brilliant idea: a GitHub extension could do it.
    – Yossi Gil
    Jul 21, 2022 at 0:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .