How can I make the variable for non-Latex user, for example, using the \newcommand{}{}
with parameters?
For example, I want the user change only the word in newcommand description and it will change in whole document automatically?
\newcommand{\R}{My system}
...
\section{Introduction}
Here I would like to introduce \( \R \)
...
\begin{table}[]
\centering
\begin{tabular}{c|c}
\( \R \) & \\
&
\end{tabular}
\caption{Caption}
\label{tab:my_label}
\end{table}
This doesn't work with Russian letters (\usepackage[russian,english]{babel}
and \selectlanguage{russian}
is added and in usage)
Ok, posting the full example where I don't get anything (blank space instead of russian word):
\documentclass{article}
%\documentclass{ICD}
\usepackage[T2A,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{multicol}
%\usepackage[russian,english]{babel}
\usepackage[russian]{babel}
\usepackage{multirow} %для таблиц со слиянием столбцов и строк
\usepackage{amsthm}
\usepackage{array} %для таблиц с заданной шириной столбца
\usepackage{float}
\usepackage[table]{xcolor}
%\setlength{\arrayrulewidth}{1mm}
%\setlength{\tabcolsep}{18pt}
%\renewcommand{\arraystretch}{2.5}
%\newcolumntype{s}{>{\columncolor[HTML]{AAACED}} p{3cm}}
%\arrayrulecolor[HTML]{DB5800}
\ProcessOptions
\begin{document}
%\hoffset = 20pt
%\maketitle
\selectlanguage{russian}
\tableofcontents
\newcommand{\Mysyst}{ \begin{center} \selectlanguage{russian} система \end{center}}
\section{Introduction}
Here I would like to introduce \( \Mysyst \)
...
\begin{table}[]
\centering
\begin{tabular}{c|c}
\( \Mysyst \) & \\
&
\end{tabular}
\caption{Caption}
\label{tab:my_label}
\end{table}
\end{document}
pdflatex
(maybe in LuaLaTeX). In the content, there is no problem. Can you post a full example showing the problem? tex.meta.stackexchange.com/questions/6255/…\R
expands toMy system
and then it's used in math mode --- which clearly ins't. Are you sure you really do not want italics?ñ
in a math formula will also fail.