答案1
基于意见的回答:对于具有人类可读名称或acronyms
(某种程度上)的变量,我更喜欢\text
或\DeclareMathOperator
方法(或\mathit
和\mathrm
,取决于个人喜好)
如果符号使用不止一次,标记宏是更好的方法
\documentclass{article}
\usepackage{mathtools}
\DeclareMathOperator{\pdf}{pdf}
\begin{document}
Original version
$NLL_{k} = - \sum_{j=1}^n \ln(pdf(PD_{k}^{i},skill_{i}^{j}))$
$person_{k}(interest) = \dfrac{1}{n} \sum_{p=1}^n \dfrac{person_{k}(task_{p})}{\alpha_{k}^{i}}$
With \verb!\text!:
\begin{equation}
\text{NLL}_{k} = - \sum_{j=1}^n \ln(\pdf(\text{PD}_{k}^{i},\text{skill}_{i}^{j}))
\end{equation}
$\text{person}_{k}(\text{interest}) = \dfrac{1}{n} \sum\limits_{p=1}^n \dfrac{\text{person}_{k}(\text{task}_{p})}{\alpha_{k}^{i}}$
With \verb!\mathit!:
\begin{equation}
\mathit{NLL}_{k} = - \sum_{j=1}^n \ln(\pdf(\mathit{PD}_{k}^{i},\mathit{skill}_{i}^{j}))
\end{equation}
$\mathit{person}_{k}(\mathit{interest}) = \dfrac{1}{n} \sum\limits_{p=1}^n \dfrac{\mathit{person}_{k}(\mathit{task}_{p})}{\alpha_{k}^{i}}$
\end{document}