1

When I'm working in a math environment and I want to type something like \sec^2x, as soon as I type the ^ after the \sec, it autocompletes the \sec to \section. Or when I'm working in a tikzpicture environment and I want to type rotate = 90, it will autocomplete rotate = to rotate around x= as soon as I type the =. Is there a way to stop auto completion for specific commands? I don't want to give up the automatically putting the \end{} for whatever environment I'm working in.

Edit: I'm working in TeXstudio version 4.7.2. Some examples are I'm writing out some Pythagorean Identities:

\[\tan^2\theta=\sec^2\theta-1\] 

Or I'm drawing a diagram and want some nodes rotated:

\begin{tikzpicture} \draw (0,0) -- (0,3) -- (3,0) -- (0,0); \node[anchor = south, rotate = 90] at (0,1.5) {Silo}; \node[anchor = south, rotate = -90] at (0,1.5) {50 feet}; \node[anchor = north] at (1.5,0) {Shadow}; \node[anchor = south] at (1.5,0) {$L$}; \node[anchor = south east, xshift = -.4cm] at (3,0) {$\theta$}; \end{tikzpicture} 

I hope this clarifies things.

Full Test Document:

\documentclass{article} \usepackage[utf8]{inputenc} \title{College Precalculus Solutions} \author{Sal Brusco} \date{\today} \usepackage{amsthm} \usepackage{mathtools} \usepackage{xfrac} \usepackage{polynom} % polynomial long and synthetic division \usepackage{xcolor} % highlight equations \usepackage{array} \usepackage{stmaryrd} %for the integer function \llbracket \rrbracket \usepackage{dsfont} %for number sets \mathds{Z} \usepackage{amssymb} %for square \usepackage{parskip} % this adds space between paragraphs \usepackage[top=1in,bottom=1in,left=1in,right=1in]{geometry} \usepackage{enumitem} % numbering \usepackage{amsmath} % aligning expressions and equations \usepackage{fancyhdr} % gets me the heading at the top of each page \usepackage{url} % gets the fancy url in the reference \usepackage{graphicx} % i can put pictures in \usepackage{pgfplots} %graphs \usepackage{multicol} %put stuff in columns with \begin{multicol}{n} \usepackage{multirow} %\multirow{number of rows}{width}{text} \usepackage{cancel} \usepackage{wrapfig}%so that pictures and text can appear side by side with %\begin{wrapfig}{alignment}{image size} % \inputgraphics... %\end{wrapfig} %then text \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{angles,quotes} %triangles \pgfplotsset{compat=1.17} % the following is the header \pagestyle{fancy} \fancyhf{} \setlength{\headheight}{15pt} \fancyhead[L]{\nouppercase{\leftmark}} \fancyhead[R]{\rightmark} \rfoot{Page \thepage} \renewcommand{\headrulewidth}{.5pt} \newcounter{Ex} \newenvironment{Ex}[ 1][]{ \ifdim\pagetotal=0pt \else \rule{3in}{1px} \vspace{-1em} \fi \refstepcounter{Ex} \par\medskip \textbf{Ex~\theEx: #1} \rmfamily}{\medskip} \numberwithin{Ex}{subsection} %puts the subsection number before example number \newcommand{\degs}{^\circ} \newcommand{\infinf}{-\infty,\infty} \newcommand{\done}{\hspace{\fill}$\blacksquare$} \begin{document} Pythagorean Identities: \[\sin^2\theta=1-\cos^2\theta\hspace{1in}\tan^2\theta=\sec^2\theta-1\hspace{1in}1=\csc^2\theta-\cot^2\theta\] \begin{Ex} Picture first. \begin{center} \begin{tikzpicture} \draw (0,0) -- (0,3) -- (3,0) -- (0,0); \node[anchor = south, rotate = 90] at (0,1.5) {Silo}; \node[anchor = south, rotate = -90] at (0,1.5) {50 feet}; \node[anchor = north] at (1.5,0) {Shadow}; \node[anchor = south] at (1.5,0) {$L$}; \node[anchor = south east, xshift = -.4cm] at (3,0) {$\theta$}; \end{tikzpicture} \end{center} Now we have to make a function of $\theta$ that finds $L$. Well we're dealing with the opposite and adjacent, so we use tangent. \begin{align*} \tan\theta &= \dfrac{50}{L}\\ L &= \dfrac{50}{\tan\theta} = L(\theta) \end{align*} Part 1 done. We have the function. Now we just substitute the values into the function. For $10\degs$, $L(10) \approx 283.56$ feet. For $30\degs$, $L(30)\approx 86.60$ feet. For $50\degs$, $L(50)\approx 41.96$ feet. \end{Ex} \end{document} 

enter image description here

enter image description here

15
  • The behavior you're experiencing is related to the auto-completion feature of your LaTeX editor. First, you should probably share which LaTeX editor you use (e.g., TeXstudio, TeXmaker, Overleaf, etc.) since each editor has its own way of handling auto-completion. Commented Jan 4, 2024 at 13:28
  • Can you add a short test document so we can recreate the situation? Commented Jan 4, 2024 at 13:28
  • 2
    @chadoulis The editor is in the title Commented Jan 4, 2024 at 13:29
  • I can't reproduce this when typing a simple test document like this in texstudio: \documentclass{article} \begin{document} \[ \sec^2x \] \end{document} Commented Jan 4, 2024 at 13:40
  • 1
    I guess that the option Complete selected text when non-word character is pressed could be the problem, since you are pressing the ^ key. Commented Jan 4, 2024 at 14:37

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.