[Tex/LaTex] What package does \phantom belong to

texstudio

I am trying to get TexStudio to autocomplete "\phantom" — right now the only option it displays is "\phantomsection" and even if I don't press enter and type out all of "\phantom" as soon as I type a "{" it autocompletes to "\phantomsection" which causes me to waste a lot of time deleting the unnecessary "section".

I can also type a space (to end auto-complete) then backspace and then add "{" but this is also inefficient, especially considering I have never used \phantomsection and probably will continue not to do so in the near future.

I want to know what package \phantom is in so I can add it to the TexStudio autocompletion (see here) — I had also considered trying to remove \phantomsection from the autocomplete suggestion in TexStudio, but that seems to require mucking around too much in the source code, and since I am only a novice or at best intermediate in my LaTeX knowledge, I would prefer not doing that (so as to avoid breaking something and losing even more productive time fixing what I broke).

I am aware that this is a dumb "problem", but I would be very grateful for any suggestions nevertheless, since I lose a lot of time to this every time I want to use \phantom.

Best Answer

TeXstudio has a strange behavior with auto-completion: it does auto-suggestion and completion at the same time. It is frustrating to me as well but you can press ESC button at the end of typing to prevent TeXstudio from auto-completing the phrase.

Another solution would be to use TeXMaker (program that TeXstudio was forked from) and create User Tags (menu User->User Tags->Edit tags). Define \phantom as a tag that you can insert by pressing e.g. Shift+F1 (for first user tag).

Related Question