在 Latex 中我有一个简单的公式并在下面描述它的变量:
\[
P_{ij} = \begin{cases}
1, & \text{if } \indent R_{ij} - O_{ij}\indent< 0\\
0, & \text{if } \indent R_{ij} - O_{ij} \indent $\geq$ 0
\end{cases}
with:
\]
\\
\textit{R_{i}} = \text{Pre chat score given by person \textit{i} to question \textit{j}}
\noindent \textit{O_{i}} = \text{Post chat score given by person \textit{i} to question \textit{j}}
\\
\\
\noindent \textit{j} \in $\{\textit{Questions on Suicidal Ideation or Risk Factors (See Table 1)}\}$
\noindent \textit{i} \in $\{\textit{Everyone that contacts 113, talks with a counselor and fills out both the pre- as well as the postchat questions}\}$
\\
但是,在我添加第二部分(以“with”开头)后,我论文中的所有文本突然都变成了斜体。我可以对我的代码进行哪些更改来撤消此问题?
我尝试在不同的变量周围放置美元符号,但这会使我的文本完全消失。
\]
\\
$\textit{R_{i}} = \text{Pre chat score given by person \textit{i} to question \textit{j}} $
$\noindent \textit{O_{i}} = \text{Post chat score given by person \textit{i} to question \textit{j}}$
\\
\\
$\noindent \textit{j} \in \{\textit{Questions on Suicidal Ideation or Risk Factors (See Table 1)}\}$
\noindent \textit{i} \in \{\textit{Everyone that contacts 113, talks with a counselor and fills out both the pre- as well as the postchat questions}\}$
\\
答案1
你可能有一个\textit{}
不平衡的问题,或者数学输入和输出的问题。但在我看来,主要问题是这不是 LaTeX;你正在尝试进行可视化编辑(说你希望输出如何看)而不是语义编辑(说出你的文本是)。这是我的提议(尽管我不确定这些\in
……)
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\begin{document}
\[
P_{ij} = \begin{cases}
1, & \text{if $R_{ij} - O_{ij} < 0$}\\
0, & \text{if $R_{ij} - O_{ij} \geq 0$}
\end{cases}
\]
with:
\begin{tabular}{cp{0.8\linewidth}}
$R_{i}$:& Pre chat score given by person $i$ to question $j$ \\
$O_{i}$:& Post chat score given by person $i$ to question $j$ \\
$j \in$ & Questions on Suicidal Ideation or Risk Factors (See Table 1) \\
$i \in$ &Everyone that contacts 113, talks with a counselor and fills out both the pre- as well as the postchat questions\\
\end{tabular}
\end{document}