gpt4 book ai didi

r - 在 PDF 中的书面答案的问题下方添加空格

转载 作者:行者123 更新时间:2023-12-04 01:43:56 25 4
gpt4 key购买 nike

我们只有笔试(纸笔),我们只有短/中型字符串答案。在我们目前的考试中,我们提出问题,并在下面留一些空白(这取决于答案的预期长度)。

当我从 R/exams 导出 PDF 时,如何灵活地在问题下方添加空白?

最佳答案

我之前在 R-Forge 上问过这个问题,这是 Achim Zeileis 的回答:

  1. The easiest way to add enough white space below a question is to include some LaTeX command for this either in the exercise itself or (probably easier/better) in the LaTeX template. You could, for example, add a \vspace*{8cm} or a \newpage at the end of every exercise. For illustration I attach a plain-page.tex template that has:

    \newenvironment{question}{\item \textbf{Problem}\newline}{\newpage}

    where the \item ... \newline is added in the beginning of each exercise and \newpage at the end. Check out

    exams2pdf(c("tstat", "deriv"), template = "plain-page.tex")

    to see what it does. In case you want to have different amounts of white space for different questions, you should probably put a \vspace*{} into the exercises. There would be further fine-tuning options but maybe the solution above works well enough for you. Please keep asking otherwise.

https://r-forge.r-project.org/forum/message.php?msg_id=45361&group_id=1337(您需要创建一个帐户才能查看。)

附件中的代码如下:

\documentclass[a4paper]{article}

\usepackage{a4wide,color,Sweave,url,amsmath,booktabs,longtable,verbatim}
\newenvironment{question}{\item \textbf{Problem}\newline}{\newpage}
\newenvironment{solution}{\comment}{\endcomment}
\newenvironment{answerlist}{\renewcommand{\labelenumi}
{(\alph{enumi})}\begin{enumerate}}{\end{enumerate}}

\begin{document}
\begin{enumerate}
%% \exinput{exercises}
\end{enumerate}
\end{document}

关于r - 在 PDF 中的书面答案的问题下方添加空格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56132401/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com