4

I have a macro \abs{@} for absolute value which I use constantly, but the built-in \abstractname{@} always takes precedence for some reason. So if I ever hit tab (including alt-tab which drives me crazy) when my cursor is inside an \abs expression, \abstractname gets inserted.

I'd like to just remove \abstractname from the auto-complete dictionary, there must be a file I can edit somewhere, right? I'm running Texmaker 4.4.1 in Linux Mint.

I suppose it would also fix my problem if Alt-Tab never activated autocomplete, but I don't imagine that's something I can fix.

If necessary, I could get the source, edit that, and compile from source-- if I had a little guidance.

1 Answers1

3

I figured it out! It actually wasn't too hard. I got the source from https://www.xm1math.net/texmaker/download.html, then edited texmaker-4.4.1/completion/completion.txt to remove the terms I don't want.

After that, compile from source! I've only compiled from source a couple of times, and never for a program I already have installed. I need to check how to do this cleanly, then I should be good to go. I'll update when I figure that part out.

EDIT: Okay, it looks like the right way to do this is to just sudo apt uninstall texmaker and then compile from source. The source for texmaker provides a handy BUILD.sh, but the Qt Toolkit is required to compile texmaker.

So I went to Qt's website, registered, and started installing the open source version of Qt (it's a whopping 11G download!). Once that's done I should be in the clear.

EDIT: I just realized I needed to backup my user-defined autocomplete dictionary. It was easy but I would have been SO SAD if I had forgotten to back this up before uninstalling.

EDIT: Compiling from source is always an error-googling test. I successfully found 4 or 5 missing dependencies so that I could compile, but finally ran up against an error that seems to be a conflict between the old code in TexMaker 4.4.1 and the newest version of Qt (5.14). So I gave up trying to get that to work and instead did the fix to the latest version of TexMaker (5.0.3).

All I did was copy completion.txt to somewhere else and empty out the completion.txt in the source code. That way there are no hard-coded autocomplete entries. Then I modified the contents of that completion file to match the format in my settings backup from earlier, and all the default completion entries were imported as user-defined completion.

Works great, and now I have full control! Also I'm kinda glad I was forced to upgrade to the latest version of TexMaker, the one I had was ancient but I procrastinated upgrading because I didn't want to break my workflow (Math grad school is hard enough as it is!).

  • Hello, I am trying to implement your solution in my case, but I do not see where the file "completion/completion.txt" is located. I have installed TexMaker 5.0.3. – Watson Jan 15 '21 at 13:40
  • OK, I see that you need to download the source from https://www.xm1math.net/texmaker/download.html and not the software itself. But then, I have no idea how to compile from the source on MAC OS X... I don't even know how to install Qt. – Watson Jan 15 '21 at 15:23
  • Is there maybe an easier way to do this using the texmaker.ini file (https://tex.stackexchange.com/questions/273962/in-mac-systems-where-is-located-the-texmaker-ini-file)? – Watson Jan 15 '21 at 16:05
  • If you’ve never compiled software from the source, you’ll need to go down that Google rabbit hole first, and learn about how to use the terminal, etc. – Jolly Llama Jan 17 '21 at 00:45
  • Regarding the ini file: did you read the file and see if it has any of those options? – Jolly Llama Jan 17 '21 at 00:48
  • Thanks for your reply. Regarding the ini file, I see this part (it also has a distinct Editor\UserCompletion= part, containing my own commands). I already tried to remove some auto-completion commands from .ini, but nothing changed :-(. Would you have any idea maybe? – Watson Jan 17 '21 at 09:50
  • (So for instance, you can see \acute at the end of the 4th line of my screenshot, but it does not have \abstractname, strangely. Another problem is that even removing the full paragraph did not work : the original .ini file was re-created as soon as open and close TexMaker). – Watson Jan 17 '21 at 12:15