I got some problems when writing the Angström sign, an A with a circle over it. There are three different version to create this sign in latex (source: https://de.wikipedia.org/wiki/%C3%85):
1) The commands \AA and \aa (text mode) are not known to the autocompletion but they are compiled correctly.
2) The same is for the alternative variant to draw the A with a dot over it: \r{A} or \r{a}. The \r command is not know and if you want to type \r{ the autocompletion corrects it automatically to \raisetag{.
3) And the third variant to write these signs is in math mode: $\mathring{A}$ and $\mathring{a}$. The mathring command is not known to the autocompletion, too.
I think adding these variants will make all Dans and all astronomers happy =)
Greetings
Lukas
Le vendredi 10/01/14 à 10h09,
"Lukas" tfrdidi@users.sf.net a écrit :
If it is for units, I strongly advise the siunitx package:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{siunitx}
\begin{document}
\begin{itemize}
\item $\SI{1}{\angstrom} = \SI{e-10}{\metre}$
\item $\SI{1}{\astronomicalunit} = \SI{0.014959787e23}{\angstrom}$
\end{itemize}
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Greetings.
Denis
Maybe I did not explained my problem correctly.
I do not use a special package for these signs. The following Latex document is a valid Latex document (created by the assistant for a new document and extended with the 6 A-commands) and build by TexStudio corretly:
\documentclass[11pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[left=2.00cm, right=2.00cm, top=2.00cm, bottom=2.00cm]{geometry}
\begin{document}
\AA
\aa
\r{A}
\r{a}
$\mathring{A}\mathring{a}$
\end{document}
But none of the 6 commands is supported by the autocompletion as I explained it in my first post.
Furthermore the \r-commands and mathring-commands are highlighted red by TexStudio (see attachment). At least these false highlights should be corrected, I think.
Greetings
Lukas
Le mardi 14/01/14 à 11h26,
"Lukas" tfrdidi@users.sf.net a écrit :
No, you were perfectly clear.
With the following MCE, the "\angstrom" are not highlighted and are
subject to autocompletion. Hence my answer was for the "astronomers"
part: they should be happy :)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{siunitx}
\begin{document}
\begin{itemize}
\item $\SI{1}{\angstrom} = \SI{e-10}{\metre}$
\item $\SI{1}{\astronomicalunit} = \SI{0.014959787e23}{\angstrom}$
\end{itemize}
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
About Danish people, I guess they don't type å nor Å with commands, but
directly with their keyboard and use other input encoding (preferably
'utf8') than 'latin1'.
Greetings.
Denis
Okay, now I get it. But this are only workarounds for the problem. I know TexStudio scans some source files to search for commands which are shown in the auto completion.
Is there a way to manually add commands which are not found by this scan? Or better to add the Latex source where \AA is mapped to \r{A}?
Yes there is a way. Create/edit a *.cwl.
To do this I suggest reading the FAQ on "Why does TeXstudio mark a command as unrecognized?", "Why does a command not show up in the completion?" and "How does TXS know about valid commands?"
Then edit or generate the appropriate .cwl file according to the "Description of the cwl format" in the manual of TexStudio.
fixed in repository