I'm still having "\textbf{" substituted when I type "\text{". I have "\usepackage{amsmath}" in a personal style file which is invoked in my main source file. But I do see that if I directly invoke "\usepackage{amsmath}", "\text{" works correctly even without unchecking "complete common prefix".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
well, it is personal taste how to encapsulate the general settings of a document.
txs (and many tutorials follow that concept) assumes a master document with preamble, which contains then the text or the includes.
To ease reuse, templates can easily be used.
Apart from that, txs directly reads all included files (if the apropriate options are enabled), thus it understands \usepackage in subfiles.
If a usepackage is used, it assumes a system package which is scanned. The package is found via the kpsewhich command.
Local style files are usually not scanned as they might change.
So the recommendation of best practice with txs is:
1) use templates
2) put all used packages into your preamble
3) if necessary include subfiles to separate chapters etc.
as mentioned ealier, there are ways to circumvent txs behavior. In your case, you could generate a cwl-file for your personal style-file (see manual).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Perhaps having an option to scan local style files would make sense as an enhancement. I see how using a template can do everything I want but I find it aesthetically displeasing -- the whole reason I have a personal style file is so that I can keep my preamble as uncluttered as possible. Should I file a request for an enhancement?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
you could create a feaure request but i doubt that it will be implemented soon.
By the way, you might already have the result of the scan on your computer (in ~/.config/texstudio)
Please check ...
In your case, if the cwl-file is not already present (but probably incomplete), generate it manually.
It is not complicated nor very laborious.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Has there been some reversion in 2.12.18? Even though I have amsmath.cwl enabled in completion, \text{ now autocompletes as \textbf{} again. Nothing in my configuration has changed.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Which mode are you using for completion (typical, favourite,fuzzy,all ) ?
Am 08.01.20 um 20:54 schrieb kozimodo:
Has there been some reversion in 2.12.18? Even though I have
amsmath.cwl enabled in completion, \text{ now autocompletes as
\textbf{} again. Nothing in my configuration has changed.
Status: works-for-me Group: Labels: autocomplete \text Created: Wed Jul 29, 2015 02:28 PM UTC by Anonymous Last Updated: Sat Aug 01, 2015 09:45 PM UTC Owner: nobody
When using the "\text" command with amsmath, texstudio autocompletes
"\text{" with "\textbf{text}".
works fine here.
do you use "most used" completer tab ?
Maybe you should deactivate "complete common prefix" ...
I can't seem to find where that is. Is it one of the "completion files"?
the completer has three tabs: typical/most used/all
If you don't know what I am talking about, you probably have not changed it in the configuration
"complete common prefix" is an option under options/completion/complete common prefix
Do have a line "\usepackage{amsmath}" in your latex source file ?
I'm still having "\textbf{" substituted when I type "\text{". I have "\usepackage{amsmath}" in a personal style file which is invoked in my main source file. But I do see that if I directly invoke "\usepackage{amsmath}", "\text{" works correctly even without unchecking "complete common prefix".
personal style files, meaning local stored style files, are not processed by txs.
Use "\input{my_style.tex}"
I used "\input{mystyle.sty}" but that still did not work. mystyle.sty is in "~/texmf/tex/latex/personal/".
Last edit: kozimodo 2015-07-30
you need to put it in your work directory (or wherever your tex source file is)
Alternatively ayou could generate a cwl-file of your own, see manual.
But wouldn't that defeat the purpose of having a style file that is used in all of your documents?
well, it is personal taste how to encapsulate the general settings of a document.
txs (and many tutorials follow that concept) assumes a master document with preamble, which contains then the text or the includes.
To ease reuse, templates can easily be used.
Apart from that, txs directly reads all included files (if the apropriate options are enabled), thus it understands \usepackage in subfiles.
If a usepackage is used, it assumes a system package which is scanned. The package is found via the kpsewhich command.
Local style files are usually not scanned as they might change.
So the recommendation of best practice with txs is:
1) use templates
2) put all used packages into your preamble
3) if necessary include subfiles to separate chapters etc.
as mentioned ealier, there are ways to circumvent txs behavior. In your case, you could generate a cwl-file for your personal style-file (see manual).
Perhaps having an option to scan local style files would make sense as an enhancement. I see how using a template can do everything I want but I find it aesthetically displeasing -- the whole reason I have a personal style file is so that I can keep my preamble as uncluttered as possible. Should I file a request for an enhancement?
you could create a feaure request but i doubt that it will be implemented soon.
By the way, you might already have the result of the scan on your computer (in ~/.config/texstudio)
Please check ...
In your case, if the cwl-file is not already present (but probably incomplete), generate it manually.
It is not complicated nor very laborious.
Yes, it was quite straightforward to add the text command to mystyle.cwl and enable it. Thank you!
you could also make use of #include:... since amsmath.cwl (and many others) is already provided by txs
Beautiful! Many thanks!
Has there been some reversion in 2.12.18? Even though I have amsmath.cwl enabled in completion, \text{ now autocompletes as \textbf{} again. Nothing in my configuration has changed.
Works for me.
Which mode are you using for completion (typical, favourite,fuzzy,all ) ?
Am 08.01.20 um 20:54 schrieb kozimodo:
Related
Bugs:
#1395I'm using typical.
please continue on github with reporting the error.
A screencast of the problem may be helpful.
Related
Bugs:
#1395