我正在使用 R Studio 中的 knit 函数制作使用 Latex 的文档,因此我不知道这是否是正确的论坛。正如您在下面的代码中看到的那样,我使用了\setstretch{1}
。但是,在我的 RMD YAML 中我有
输出:pdf_document:toc:TRUE toc_depth:4 fontsize:12pt linestretch:1.5
表格后面的文本\setstretch{1}
的行距也是 1,而不是 1.5。有人知道我该如何修复它吗?
\setstretch{1}
%% Set up counters for questions
%%
\newcounter{qnumber}
\setcounter{qnumber}{0}
\newcommand*\tickbox{{\Large$\Box$}}%
\newcommand*\yesno
{\begin{tabular}[t]{@{}c@{~~}c@{}}Yes&No\\\tickbox&\tickbox\end{tabular}}%
%% we now define the questions
\newcommand{\question}[1]{%
\refstepcounter{qnumber}\hfill Q.\theqnumber\hfill\hfill
& #1
& \small\yesno
\\
\addlinespace
}
\begin{longtable}{c p{10cm} c}
\toprule
Nr.&Would you get vaccinated in this situation? & \\
\midrule
\endhead
\bottomrule
\endfoot
\question{Now, one year later, a vaccine is available. If you and enough people in Econotopia get vaccinated, fewer people will die and restrictions will be repealed. Therefore, your actions will have an effect.}
\question{Because a lot of people took the vaccine, the authorities in Econotopia are introducing a system where vaccinated people will be able to go to restaurants, small concerts and be allowed to work from the office and meet physically at school.}
\question{To get more people vaccinated, the authorities are now offering 100€ if you get vaccinated.}
\question{Until now, also unvaccinated people have had the same rights of freedom as vaccinated people if they got tested for the virus 2 times a week. The authorities are now removing this possibility. Therefore, if you are not vaccinated, you cannot go to for example concerts, restaurants, or being able to go to your school or your job physically.}
\question{Due to a new wave of hospitalization, the authorities in Econotopia introduce more powerful means to get more people vaccinated. Therefore, in addition to not having the same freedom as vaccinated people, you must pay a monthly fee of 50€ if you do not get the vaccine.}
\question{On the news, the anchor can tell that the side effects from the vaccine can cause death for some people. Therefore, by getting vaccinated you have risks from the side effects as well as the risks from getting the virus.}
\end{longtable}