LaTeX "Trouble with Vector Symbols in Drafts - What to do?"

AI Thread Summary
The discussion centers on the proper use of the vector symbol in LaTeX, specifically addressing the command \vec. A user expresses confusion over receiving a red underline for the command \vec{2.5}, despite it displaying correctly in preview. It is clarified that the red underline is likely due to the spellchecker in the editor, which may not recognize LaTeX commands. The conversation emphasizes that when using \vec, braces are necessary for multi-character inputs, while single characters do not require them. The focus remains on the correct application of LaTeX syntax rather than the mathematical validity of using 2.5 as a vector.
Janosh89
Messages
61
Reaction score
19
Can anyone help? What is the convention for inserting the vector symbol?
I have a draft with -(\vec{2.5})^2 which displays correctly in preview
##-(\vec{2.5})^2\\##
why is vec troublesome and underlined in red?? Should I ignore!
I realize that I'm not using a variable.
 
Physics news on Phys.org
Janosh89 said:
Can anyone help? What is the convention for inserting the vector symbol?
I have a draft with -(\vec{2.5})^2 which displays correctly in preview
##-(\vec{2.5})^2\\##
why is vec troublesome and underlined in red?? Should I ignore!
I realize that I'm not using a variable.
What you have is how this command is used. I don't see any red underlining.

##\vec x## - Raw script \vec x
##\vec {x_1}## - Raw script \vec{x_1}
The braces, { }, used in the 2nd example are not required in this and most other commands when what follows the command is a single character. If there are two or more characters, you have to use braces to indicate what is included.

Before anyone else jumps into comment about 2.5 not being a vector, this post is about LaTeX use, not vectors per se.
 
  • Like
Likes blue_leaf77 and Janosh89
Thanks for the full description, Mark44
 
The red underlining is probably the spellchecker doing that in the editor. Those are not very sophisticated when it comes to anything that is not a word of the English language.
 
  • Like
Likes Janosh89 and jim mcnamara

Similar threads

Back
Top