我是 sdaps 新手,我想编辑下面的标题,该标题由 sdaps 自动生成。我无法使用 latex 编辑此用途。
我想要将描述以及这样的索引号添加到标题中。
我希望你明白我所说的话
这是我的代码。
\documentclass[english,pdf]{sdaps}
\usepackage[utf8]{inputenc}
\author{Menuka Ishan}
\title{My Title }
\begin{document}
\begin{questionnaire}
\begin{choicegroup}{Please write your student ID into the $\sqcup$
and check the corresponding cross.\\ }
\groupaddchoice{\Huge$\Box$}
\groupaddchoice{\Huge$\Box$}
\groupaddchoice{\Huge$\Box$}
\groupaddchoice{\Huge$\Box$}
\groupaddchoice{\Huge$\Box$}
\groupaddchoice{\Huge$\Box$}
\groupaddchoice{\Huge$\Box$}
\groupaddchoice{\Huge$\Box$}
\choiceline{\hfill 0}
\choiceline{\hfill 1}
\choiceline{\hfill 2}
\choiceline{\hfill 3}
\choiceline{\hfill 4}
\choiceline{\hfill 5}
\choiceline{\hfill 6}
\choiceline{\hfill 7}
\choiceline{\hfill 8}
\choiceline{\hfill 9}
\end{choicegroup}
\end{questionnaire}
\end{document}
答案1
从一开始就理解这一点并不容易。
标头由 完成\begin{info}...\end{info}
,而 又在文件中定义sdaps.cls
,用于 的定义questionnaire
。它使用\translate{infotext}
等字符串。
这些字符串在“翻译器”字典中定义,beamer
但不会直接提供,除非安装、构建了整个软件并创建了字典。
translate-sdaps-dictionary-English.dict
如果目前还不可用,则如下:
% This file is auto-generated from gettext translations (.po files).
% The header of the original file follows for reference:
%
% Translations for sdaps LaTeX classes.
% Copyright 2010-2013 Ferdinand Schwenk ([email protected]).
% Copyright 2011-2013 Benjamin Berg ([email protected]).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
%
\ProvidesDictionary{translator-sdaps-dictionary}{English}
\providetranslation{infotext}{This questionnaire is automatically read by a computer program. Please use a pen for filling in your answers.}
\providetranslation{standard-deviation}{Standard-Deviation}
\providetranslation{info-cross}{Check}
\providetranslation{info-correct}{Uncheck to correct}
\providetranslation{answers}{Answers}
\providetranslation{questionnaireid}{Questionnaire-ID:}
\providetranslation{surveyid}{Survey-ID:}
\providetranslation{draft}{draft}
\providetranslation{info-select}{You can check any number of boxes in selection questions.}
\providetranslation{info-mark}{For questions with a range (1--\arabic{markcheckboxcount}) choose the answer the mark that fits best.}
\providetranslation{mean}{Mean}
现在标题 - 信息 - 框:
\begin{info}
\translate{infotext}\\
\if@checkmode@checkcorrect
\begin{tabularx}{\textwidth}{llcX}
\translate{info-cross}: & \checkedbox &\quad & \translate{info-select} \\
\translate{info-correct}: & \correctedbox & & \translate{info-mark} \\
\end{tabularx}
\else
\PackageError{sdaps}{Sorry, there is no help text for the checkmode you have choosen right now! Please pass the noinfo optional argument to the questionnaire environment!}\@ehb %
\fi
\end{info}
基本上,您需要infotext
、、和info-cross
的翻译。info-select
info-mark
info-correct
如果任何预定义的翻译不起作用,请使用
\renewtranslation[⟨options⟩]{⟨key⟩}{⟨translation⟩}
key
要更改的文本在哪里,例如infotext
。有关选项,请参阅beamer
手册。
\documentclass[english]{sdaps}
\usepackage[utf8]{inputenc}
\author{Menuka Ishan}
\title{My Title }
\begin{document}
\begin{questionnaire}
\setcounter{section}{1} % questionnaire sets this to zero internally without this
\begin{choicegroup}{Please write your student ID into the $\sqcup$
and check the corresponding cross.\\ }
\groupaddchoice{\Huge$\Box$}
\groupaddchoice{\Huge$\Box$}
\groupaddchoice{\Huge$\Box$}
\groupaddchoice{\Huge$\Box$}
\groupaddchoice{\Huge$\Box$}
\groupaddchoice{\Huge$\Box$}
\groupaddchoice{\Huge$\Box$}
\groupaddchoice{\Huge$\Box$}
\choiceline{\hfill 0}
\choiceline{\hfill 1}
\choiceline{\hfill 2}
\choiceline{\hfill 3}
\choiceline{\hfill 4}
\choiceline{\hfill 5}
\choiceline{\hfill 6}
\choiceline{\hfill 7}
\choiceline{\hfill 8}
\choiceline{\hfill 9}
\end{choicegroup}
\end{questionnaire}
\end{document}
答案2
嗯,实际上我找到了解决你的问题的部分方法:
只需重新定义您在文档中使用的语言的翻译。例如:
\deftranslation[to=Spanish]{infotext}{查询由计算机程序自动执行。请帮忙,使用一个脚本来完成您的回答。} \deftranslation[to=Spanish]{info-multi}{多个选择} \deftranslation[to=Spanish]{info-single}{Selección única} \deftranslation[to=Spanish]{info-cross}{选择} \deftranslation[to=Spanish]{info-corrected}{Deshacer selección}
注意:传递给 \renewtranslation 和 \deftranslation 的选项对应于翻译包