Consider the following MWE:
Code: Select all
\documentclass{article}
\usepackage[danish]{babel}
\usepackage[T1]{fontenc}
\usepackage{mathtools}
\usepackage{xcolor}
\newcommand{\konst}[1]{\textcolor{blue}{#1}}
\newcommand{\vari}[1]{\textcolor{teal}{#1}}
\begin{document}
\begin{align*}
&\texttt{Table[FullSimplify[\{Cos[1/\vari{n}*Pi]/(Cos[1/\vari{n}*Pi]+1)*\konst{a},}\\
&\hphantom{{}\texttt{Tab}}\texttt{\vari{n}*Sin[(\vari{n}-2)/\vari{n}*Pi]/(8*(Cos[1/\vari{n}*Pi]+1)\^{}2)*\konst{a}\^{}2\}], \{\vari{n}, 3, 5\}]}
\end{align*}
\end{document}
Is there a way to get the `correct' symbol so that I do not have to change the symbol when the code is copied from the PDF file?
Thank you in advance!