0

I have defined a few custom commands using \newcommand in order to standardize figure sizes in a paper I am writing. For instance:

\newcommand{\bigfigure}[1]{\includegraphics[width=0.8\linewidth]{#1}}

However when using this command I don't get the handy autocomplete of the path to the image as I would when just using \includegraphics[]{...}. Is there anyway I can enable this feature for my custom commands?

I am using Overleaf as my editor.

Kalveo
  • 1
  • 1
    Welcome to TeX.SE! You should contact the Overleaf support for this. LaTeX can do nothing with the auto-complete feature of editors. –  Mar 22 '19 at 10:48
  • The autocompletion is not something LaTeX (or TeX) does. It is entirely controlled by your editor (Overleaf in this case as combined IDE/TeX system). Usually editors have a hard-coded list of commands that get a 'special' treatment such as having their argument auto-completed as a file name. – moewe Mar 22 '19 at 10:49
  • Very relevant: https://tex.stackexchange.com/q/479076/35864. It seems that at present you can't customise Overleaf's autocomplete, so there is nothing you can do here. – moewe Mar 22 '19 at 10:52
  • 2
    (Disclaimer: I'm a support personnel at Overleaf) Just to confirm that indeed this isn't possible at the moment e.g. saying something like \bigfigure should have the same autocomplete behavior of \includegraphics, sorry! – imnothere Mar 22 '19 at 11:46
  • @LianTzeLim Do you want to write an answer here, or is the question sufficiently similar to be closed as a duplicate of the linked question? – moewe Mar 22 '19 at 11:57
  • 1
    @moewe I think it's similar i.e. autocompletion isn't customisable... – imnothere Mar 22 '19 at 12:05
  • @LianTzeLim OK, voted to close as a duplicate. – moewe Mar 22 '19 at 12:11
  • Instead of this workaround with the new command, you could simply change the default size if figures: https://tex.stackexchange.com/questions/79971/change-default-width-of-images-in-graphicx-package/79974#79974 – samcarter_is_at_topanswers.xyz Mar 22 '19 at 14:30

0 Answers0