为了上课,我经常使用\Pointilles
我找到的宏这里。我在此基础上构建了其他宏,允许我创建两个文档:我的书和学生的书。其中一个是\ProfReponseLigne
用于\Pointilles
在学生版中画虚线,在教师版中显示答案。
\Pointilles
为了使两个版本更加一致(垂直空间和对齐),我想保留由其生成并显示答案的虚线。正如这个建议的那样话题为了exam.cls
。
问题 :
- 我如何才能
\ProfReponseLigne
将答案显示在具有相同垂直间距的虚线上? - 或者还有其他方法可以实现相同的目标?(我知道
\blank
命令,但它没有点,我无法使其在solution
环境之外可用。)
目标 :
- 保持两个版本之间相同的垂直间距和行数。
平均能量损失 这是可编译的 MWE 和我目前得到的宏的定义。
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{etoolbox}
\usepackage{multido}
\usepackage{lipsum}
\usepackage{xcolor}
%% Permet de différencier une version prof et une version élève
\newbool{studentversion}
\setbool{studentversion}{true} %true for students' version
%% Extract from : https://tex.stackexchange.com/questions/248451/how-to-create-multiple-dotted-lines
\newcommand{\Pointilles}[2][3]%
{%
\par\nobreak
\noindent\rule{0pt}{1.5\baselineskip} % Provides a larger gap between the preceding paragraph and the dots
\multido{}{#2}{\noindent\makebox[\linewidth]{\rule{0pt}{#1\baselineskip}\dotfill}\\} % ... dotted lines ...
% \medskip % Gap between dots and next paragraph
}
\newcommand{\ProfReponseLigne}[2][1]%
{%
\ifbool{studentversion}%
{%%True (donc version pour étudiant)
\Pointilles[1.5]{#1}
}%
{%%False (donc version pour prof)
\par
\textcolor{red}{$\rightarrow$ #2}\dotfill\vspace{\baselineskip}\\
}
}
\begin{document}
\section{My lessons}
What a wonderful document to exploit :
\begin{quote}
\itshape
\lipsum[1]
\end{quote}
What can we conclude :
\ProfReponseLigne[2]{My very very very very very very very very very very very very long answer.}
\end{document}
编辑 :目前,我正在测试一些依赖于包\dotuline{}
提供的命令的解决方案,但是当我在解决方案内部使用包提供的ulem
命令调用该解决方案时遇到了一些麻烦。\SI{}{}
siunitx
答案1
我记得用户提供的方法古斯布斯这是关于使用钛钾Z 包用于通过内部宏绘制虚线下划线灵魂包裹。
用户古斯布斯将此方法发布为回答“在 LaTeX 中用虚线加下划线而不影响其他文本”的问题。
即兴地,我只能从环境角度提供一种从这种方法中得出的快速而粗糙的解决方法FillInTheBlanksText
。
该环境可用于创建填空文本。该环境采用可选参数,您可以通过逗号分隔的键值列表指定填空文本的外观。
更多详细信息请参阅以下示例的“文档”部分。
请不要忽视“小心”的提示!
请注意,我只是即兴写了这篇作品。
所以:!!! 无担保 – 使用风险自负 !!!
%% FillInTheBlanks.tex
%%
%% Copyright by Ulrich Diez ([email protected])
%% Date: April 08, 2020
%% License: LPPL
%% Format: LaTeX 2e
%% Documentclass: article
%% Required packages: soul, tikz, inputenc
%%
%% !!! No warranties - use at your own risk !!!
%%
\makeatletter
%------------------------------------------------------------------------------
% Code that could be moved to a newly to create LaTeX2e-package but currently
% is nested into a \makeatletter..\makeatother-pair---documentation/user-manual
% is below the code, in the section"Documentation":
%------------------------------------------------------------------------------
\RequirePackage{soul, tikz}%
\usetikzlibrary{calc}%
%------------------------------------------------------------------------------
% Define pgfkeys for
% - the style of the underlining
% - the color of the underlining
% - the color of the (underlined) text
% - the font used for (underlined) text
% - writing text only
% - drawing lines only
% - writing text and drawing lines
\pgfkeys{%
/BlankToFill/Aboveskip/.initial=\parskip,
/BlankToFill/Belowskip/.initial=\parskip,
/BlankToFill/Linestyle/.initial=solid,
/BlankToFill/Linecolor/.initial=black,
/BlankToFill/Textcolor/.initial=blue,
/BlankToFill/Textfontcommand/.initial=\fontsize{17}{23}\itshape,
/BlankToFill/Whitespaceonly/.code=\underlinefalse\visiblelettersfalse,
/BlankToFill/Whitespaceonly/.value forbidden,
/BlankToFill/Textonly/.code=\underlinefalse\visibleletterstrue,
/BlankToFill/Textonly/.value forbidden,
/BlankToFill/Underlinesonly/.code=\underlinetrue\visiblelettersfalse,
/BlankToFill/Underlinesonly/.value forbidden,
/BlankToFill/Underlinedtext/.code=\underlinetrue\visibleletterstrue,
/BlankToFill/Underlinedtext/.value forbidden,
/BlankToFill/UnderlinedtextDefault/.style={/BlankToFill/Underlinedtext},
/BlankToFillDefaults/Aboveskip/.code=\pgfkeys{%
/BlankToFill/Aboveskip/.initial=#1,
},
/BlankToFillDefaults/Aboveskip/.value required,
/BlankToFillDefaults/Belowskip/.code=\pgfkeys{%
/BlankToFill/Belowskip/.initial=#1,
},
/BlankToFillDefaults/Belowskip/.value required,
/BlankToFillDefaults/Linestyle/.code=\pgfkeys{%
/BlankToFill/Linestyle/.initial=#1,
},
/BlankToFillDefaults/Linestyle/.value required,
/BlankToFillDefaults/Linecolor/.code=\pgfkeys{%
/BlankToFill/Linecolor/.initial=#1,
},
/BlankToFillDefaults/Linecolor/.value required,
/BlankToFillDefaults/Textcolor/.code=\pgfkeys{%
/BlankToFill/Textcolor/.initial=#1,
},
/BlankToFillDefaults/Textcolor/.value required,
/BlankToFillDefaults/Textfontcommand/.code=\pgfkeys{%
/BlankToFill/Textfontcommand/.initial=#1,%
},
/BlankToFillDefaults/Textfontcommand/.value required,
/BlankToFillDefaults/Whitespaceonly/.code=\pgfkeys{%
/BlankToFill/UnderlinedtextDefault/.style={/BlankToFill/Whitespaceonly},
},
/BlankToFillDefaults/Whitespaceonly/.value forbidden,
/BlankToFillDefaults/Textonly/.code=\pgfkeys{%
/BlankToFill/UnderlinedtextDefault/.style={/BlankToFill/Textonly},
},
/BlankToFillDefaults/Textonly/.value forbidden,
/BlankToFillDefaults/Underlinesonly/.code=\pgfkeys{%
/BlankToFill/UnderlinedtextDefault/.style={/BlankToFill/Underlinesonly},
},
/BlankToFillDefaults/Underlinesonly/.value forbidden,
/BlankToFillDefaults/Underlinedtext/.code=\pgfkeys{%
/BlankToFill/UnderlinedtextDefault/.style={/BlankToFill/Underlinedtext},
},
/BlankToFillDefaults/Underlinedtext/.value forbidden,
}%
\newcommand\SetFillInTheBlanksTextDefaults[1]{%
\pgfkeys{/BlankToFillDefaults/.cd,#1,}%
}%
%------------------------------------------------------------------------------
% A command for drawing dashed lines from within soul-package via tikz-package:
% The command \dotuline is derived/copied from the command \dashdotuline
% which was written and published by the user "gusbrs"
% (URL: <https://tex.stackexchange.com/users/105447/gusbrs>)
% in her/his answer to the question "Underlining words with dash-dotted line
% without affecting the other text in LaTeX
% (URL: <https://tex.stackexchange.com/a/376364/118714>).
%------------------------------------------------------------------------------
\newlength\LineWidth
\setlength\LineWidth{0.7pt}%
\newlength\baseliney
\setlength\baseliney{-1.5pt}%
\newcommand\highlight@DoHighlight{%
\expandafter\expandafter\expandafter\draw
\expandafter\expandafter\expandafter[%
\pgfkeysvalueof{/BlankToFill/Linestyle}, HLcolor,line width=\LineWidth,opacity=.5%
]%
($(begin highlight)+(0,\baseliney)$) -- ($(end highlight)+(0,\baseliney)$) ;
}%
\newcommand{\highlight@BeginHighlight}{%
\coordinate (begin highlight) at (0,0) ;
}%
\newcommand{\highlight@EndHighlight}{%
\coordinate (end highlight) at (0,0) ;
}%
\newdimen\highlight@previous
\newdimen\highlight@current
\DeclareRobustCommand*\dashdotuline[1][]{%
\tikzset{this highlighter/.style={#1}}%
\SOUL@setup
%
\def\SOUL@preamble{%
\begin{tikzpicture}[overlay, remember picture]%
\highlight@BeginHighlight
\highlight@EndHighlight
\end{tikzpicture}%
}%
%
\def\SOUL@postamble{%
\begin{tikzpicture}[overlay, remember picture]%
\highlight@EndHighlight
\highlight@DoHighlight
\end{tikzpicture}%
}%
%
\def\SOUL@everyhyphen{%
\discretionary{%
\SOUL@setkern\SOUL@hyphkern
\ifvisibleletters\SOUL@sethyphenchar\else\phantom{\SOUL@sethyphenchar}\fi
\tikz[overlay, remember picture] \highlight@EndHighlight ;%
}{}{\SOUL@setkern\SOUL@charkern}%
}%
%
\def\SOUL@everyexhyphen##1{%
\SOUL@setkern\SOUL@hyphkern
\ifvisibleletters\hbox{##1}\else\phantom{\hbox{##1}}\fi
\discretionary{%
\tikz[overlay, remember picture] \highlight@EndHighlight ;%
}{}{\SOUL@setkern\SOUL@charkern}%
}%
%
\def\SOUL@everysyllable{%
\begin{tikzpicture}[overlay, remember picture]
\path let \p0 = (begin highlight), \p1 = (0,0) in \pgfextra
\global\highlight@previous=\y0
\global\highlight@current =\y1
\endpgfextra (0,0) ;
\ifdim\highlight@current < \highlight@previous
\highlight@DoHighlight
\highlight@BeginHighlight
\fi
\end{tikzpicture}%
\ifvisibleletters\the\SOUL@syllable\else\phantom{\the\SOUL@syllable}\fi
\tikz[overlay, remember picture] \highlight@EndHighlight ;%
}%
%
\ifvisibleletters\else
\def\SOUL@underline##1{{%
\setbox\z@\hbox{\phantom{##1}}%
\dimen@=\wd\z@
\dimen@i=\SOUL@uloverlap
\advance\dimen@2\dimen@i
\rlap{%
\null
\kern-\dimen@i
\SOUL@ulcolor{\SOUL@ulleaders\hskip\dimen@}%
}%
\unhcopy\z@
}}%
\fi
\SOUL@
}%
%------------------------------------------------------------------------------
\newif\ifunderline\underlinefalse
\newif\ifvisibleletters\visibleletterstrue
\newcommand\UD@PassFirstToSecond[2]{#2{#1}}%
\newenvironment{FillInTheBlanksText}[1][]{%
\newcommand\BlankToFill[1]{%
\begingroup
\ifunderline
\expandafter\expandafter\expandafter\UD@PassFirstToSecond
\expandafter\expandafter\expandafter{%
\pgfkeysvalueof{/BlankToFill/Linecolor}%
}{\colorlet{HLcolor}}%
\else
\colorlet{HLcolor}{white}%
\fi
\ifvisibleletters
\expandafter\expandafter\expandafter\color
\expandafter\expandafter\expandafter{%
\pgfkeysvalueof{/BlankToFill/Textcolor}%
}%
\fi
\pgfkeysvalueof{/BlankToFill/Textfontcommand}%
\selectfont
\dashdotuline{##1}%
\endgroup
}%
\par
\pgfkeys{/BlankToFill/.cd,UnderlinedtextDefault,#1}%
{%
\pgfkeysvalueof{/BlankToFill/Textfontcommand}%
\selectfont
\vspace{-\parskip}%
\vspace{-\dp\strutbox}%
\vspace{-\lineskip}%
\vspace{\pgfkeysvalueof{/BlankToFill/Aboveskip}}%
\edef\@tempa{%
\baselineskip=\the\baselineskip
\def\noexpand\baselinestretch{\baselinestretch}%
}%
\expandafter}\@tempa\selectfont
\ignorespaces
}{%
\par\vspace{-\parskip}%
{%
\pgfkeysvalueof{/BlankToFill/Textfontcommand}%
\selectfont
\vspace{\pgfkeysvalueof{/BlankToFill/Belowskip}}%
}%
}%
%------------------------------------------------------------------------------
% Documentation:
%
% There is an environment whose name is FillInTheBlanksText .
%
% That environment is intended to provide a scope where you can
% write a fill-in-the-blanks-text.
%
% That environment takes an optional argument where you can
% specify the look of the fill-in-the-blanks-text via a
% comma-separated keyval-list:
%
% ---------------+-------------------------+-----------------------------------
% Key: |Default-Value: |Purpose:
% ---- |-------------- |--------
% ---------------+-------------------------+-----------------------------------
% Linestyle |solid |The style of the underlines.
% | |Possible values:
% | |solid, dotted, densely dotted,
% | |loosely dotted, dashed,
% | |densely dashed, loosely dashed,
% | |dash dot, densely dash dot,
% | |loosely dash dot, dash dot dot,
% | |densely dash dot dot,
% | |loosely dash dot dot
% ---------------+-------------------------+-----------------------------------
% Linecolor |black |The color of the underlines.
% | |Possible values:
% | |All definded colors.(See manual of
% | |tikz-package/xxcolor)
% ---------------+-------------------------+-----------------------------------
% Textfontcommand|\fontsize{17}{23}\itshape|The font for the fill-in-the-
% | |blanks-texts.
% ---------------+-------------------------+-----------------------------------
% Textcolor |blue |The color of the fill-in-the-
% | |blanks-texts.
% | |Possible values:
% | |All definded colors.(See manual of
% | |tikz-package/xxcolor)
% ---------------+-------------------------+-----------------------------------
% Aboveskip |\parskip |The vertical distance between the
% | |bottomline (not baseline) of the
% | |box which forms the last line of
% | |text above the environment and the
% | |topline (not baseline) of the
% | |first line of the environment.
% | |Possible values:
% | |A length. If you use \baselineskip
% | |or \parskip or the like, things
% | |will be calculated with the font in
% | |use for writing the fill-in-the-
% | |blanks-text.
% ---------------+-------------------------+-----------------------------------
% Belowskip |\parskip |The vertical distance between the
% | |bottomline (not baseline) of the
% | |last line of the environment and
% | |the topline (not baseline) of the
% | |box which forms the first line of
% | |text below the environment.
% | |Possible values:
% | |A length. If you use \baselineskip
% | |or \parskip or the like, things
% | |will be calculated with the font in
% | |use for writing the fill-in-the-
% | |blanks-text.
% ---------------+-------------------------+-----------------------------------
% Textonly |[none] |Print only the texts.
% | |Possible values: None.
% ---------------+-------------------------+-----------------------------------
% Underlinesonly |[none] |Print only the underlines.
% | |Possible values: None.
% ---------------+-------------------------+-----------------------------------
% Underlinedtext |[none] |Print both texts and underlines.
% | |Possible values: None.
% ---------------+-------------------------+-----------------------------------
% Whitespaceonly |[none] |Prints neither texts nor underli-
% | |nes. You just get white gaps.
% | |Possible values: None.
% ---------------+-------------------------+-----------------------------------
%
% Within that environment a command \BlankToFill is defined.
%
% That command takes a mandatory argument denoting a phrase of text.
%
% \BlankToFill will process that phrase of text according to the settings
% provisionable in the optional argument of the FillInTheBlanksText-
% environment.
%
% Within the environment all lines of text will have a distance according to
% the Textfontcommand/\fontsize-command specified.
%
% There is also the command
%
% \SetFillInTheBlanksTextDefaults{<key-value-list>}
%
% It serves the purpose of specifying global defaults for the
% FillInTheBlanksText-environment so that you only need to specify an
% optional argument for the FillInTheBlanksText-environment when deviating
% from the defaults.
%
% This way you can, e.g., toggle the defaults in the preamble of your
% document for specifying whether to create a document with underlines
% only or with text also.
%
% The command \begin{FillInTheBlanksText} ends the paragraph LaTeX is about to
% produce when encountering that command.
%
% The command \end{FillInTheBlanksText} ends the paragraph LaTeX is about to
% produce when encountering that command.
%
% !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
% Watch out 1:
% ============
%
% As things provided by the TikZ-package are used for drawing the underlines,
% you need to compile the document at least twice (without deleting auxiliary-
% files between compilations!) until everything matches out. After each
% compilation the .log-file will contain a hint in case another compilation is
% needed.
%
% Watch out 2:
% ============
%
% As the text of the blanks to fill in is produced by means of mechanisms of
% the soul package, all restrictions that apply to text that is to be processed
% by macros of the soul-package apply to the argument of \BlankToFill also.
%
% Watch out 3:
% ============
%
% Be aware that I just wrote this piece of work impromptu.
%
% Therefore: !!! No warranties - use at your own risk !!!
% !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
%------------------------------------------------------------------------------
% End of code that could be moved to a newly to create LaTeX2e-package
\makeatother
%
% Code exhibiting the usage:
%
\documentclass[a4paper]{article}
\usepackage[latin1]{inputenc}
\hyphenation{ph-r-a-se}
\setlength{\parindent}{0pt}
\parskip=\baselineskip
\SetFillInTheBlanksTextDefaults{%
Linestyle=densely dotted,
Linecolor=black,
Textcolor=blue,
Textfontcommand=\fontsize{17}{23}\itshape,
Underlinedtext,
Aboveskip=\dimexpr\baselineskip-\dp\strutbox,
Belowskip=\dimexpr\baselineskip-\dp\strutbox,
}
\begin{document}
%----------- Key Underlinesonly ---------------------------------------
\vspace{-\ht\strutbox}
\noindent\null\cleaders\hrule height 1.2pt\hfill\null
\vspace{-\dp\strutbox}
Key in use with environment \verb|FillInTheBlanksText|:
\verb|Underlinesonly|
\vspace{-\ht\strutbox}
\noindent\null\cleaders\hrule height 1.2pt\hfill\null
\vspace{-\dp\strutbox}
This is not part of a FillInTheBlanksText-environment.
This is not part of a FillInTheBlanksText-environment.
This is not part of a FillInTheBlanksText-environment.
This is not part of a FillInTheBlanksText-environment.
\begin{FillInTheBlanksText}[Underlinesonly]
Text. \BlankToFill{%
This phrase is part of the blank to fill---%
abcdefghijklmnopqrstuvwxyzäöüß.%
}
This phrase is not part of a blank to fill.
This phrase is not part of a blank to fill.
\BlankToFill{%
This phrase is part of the blank to fill---%
abcdefghijklmnopqrstuvwxyzäöüß.%
}
This phrase is not part of a blank to fill.
This phrase is not part of a blank to fill.
\BlankToFill{%
This phrase is part of the blank to fill---%
abcdefghijklmnopqrstuvwxyzäöüß.%
}
Text.
\end{FillInTheBlanksText}
This is not part of a FillInTheBlanksText-environment.
This is not part of a FillInTheBlanksText-environment.
This is not part of a FillInTheBlanksText-environment.
This is not part of a FillInTheBlanksText-environment.
\vspace{-\ht\strutbox}
\noindent\null\cleaders\hrule height 1.2pt\hfill\null
\vspace{-\dp\strutbox}
\textbf{Provide a pattern for all primitive pythagorean triples
\(x^2+y^2=z^2\), \(2\mid x\), \(x>0\), \(y>0\), \(z>0\):}
\begin{FillInTheBlanksText}[Textfontcommand=\fontsize{17}{23}, Underlinesonly]
\BlankToFill{%
\mbox{\makebox[\textwidth][l]{\hfill $x=2st$,\hfill}}\\
\mbox{\makebox[\textwidth][l]{\hfill $y=s^2-t^2$,\hfill}}\\
\mbox{\makebox[\textwidth][l]{\hfill $z=s^2+t^2$,\hfill}}\\
\mbox{\makebox[\textwidth][l]{%
\hfill $s>t>0, \textrm{gcd}(s,t)=1, s\not\equiv t (\textrm{mod }2)$\hfill
}}%
}%
\end{FillInTheBlanksText}
\vspace{-\ht\strutbox}
\noindent\null\cleaders\hrule height 1.2pt\hfill\null
\vspace{-\dp\strutbox}
\newpage %----------- Key Underlinedtext (default)-------------------------------
\vspace{-\ht\strutbox}
\noindent\null\cleaders\hrule height 1.2pt\hfill\null
\vspace{-\dp\strutbox}
Key in use with environment \verb|FillInTheBlanksText|:
\verb|Underlinedtext|
\vspace{-\ht\strutbox}
\noindent\null\cleaders\hrule height 1.2pt\hfill\null
\vspace{-\dp\strutbox}
This is not part of a FillInTheBlanksText-environment.
This is not part of a FillInTheBlanksText-environment.
This is not part of a FillInTheBlanksText-environment.
This is not part of a FillInTheBlanksText-environment.
\begin{FillInTheBlanksText}
Text. \BlankToFill{%
This phrase is part of the blank to fill---%
abcdefghijklmnopqrstuvwxyzäöüß.%
}
This phrase is not part of a blank to fill.
This phrase is not part of a blank to fill.
\BlankToFill{%
This phrase is part of the blank to fill---%
abcdefghijklmnopqrstuvwxyzäöüß.%
}
This phrase is not part of a blank to fill.
This phrase is not part of a blank to fill.
\BlankToFill{%
This phrase is part of the blank to fill---%
abcdefghijklmnopqrstuvwxyzäöüß.%
}
Text.
\end{FillInTheBlanksText}
This is not part of a FillInTheBlanksText-environment.
This is not part of a FillInTheBlanksText-environment.
This is not part of a FillInTheBlanksText-environment.
This is not part of a FillInTheBlanksText-environment.
\vspace{-\ht\strutbox}
\noindent\null\cleaders\hrule height 1.2pt\hfill\null
\vspace{-\dp\strutbox}
\textbf{Provide a pattern for all primitive pythagorean triples
\(x^2+y^2=z^2\), \(2\mid x\), \(x>0\), \(y>0\), \(z>0\):}
\begin{FillInTheBlanksText}[Textfontcommand=\fontsize{17}{23}]
\BlankToFill{%
\mbox{\makebox[\textwidth][l]{\hfill $x=2st$,\hfill}}\\
\mbox{\makebox[\textwidth][l]{\hfill $y=s^2-t^2$,\hfill}}\\
\mbox{\makebox[\textwidth][l]{\hfill $z=s^2+t^2$,\hfill}}\\
\mbox{\makebox[\textwidth][l]{%
\hfill $s>t>0, \textrm{gcd}(s,t)=1, s\not\equiv t (\textrm{mod }2)$\hfill
}}%
}%
\end{FillInTheBlanksText}
\vspace{-\ht\strutbox}
\noindent\null\cleaders\hrule height 1.2pt\hfill\null
\vspace{-\dp\strutbox}
\newpage %----------- Key Textonly ---------------------------------------
\vspace{-\ht\strutbox}
\noindent\null\cleaders\hrule height 1.2pt\hfill\null
\vspace{-\dp\strutbox}
Key in use with environment \verb|FillInTheBlanksText|:
\verb|Textonly|
\vspace{-\ht\strutbox}
\noindent\null\cleaders\hrule height 1.2pt\hfill\null
\vspace{-\dp\strutbox}
This is not part of a FillInTheBlanksText-environment.
This is not part of a FillInTheBlanksText-environment.
This is not part of a FillInTheBlanksText-environment.
This is not part of a FillInTheBlanksText-environment.
\begin{FillInTheBlanksText}[Textonly]
Text. \BlankToFill{%
This phrase is part of the blank to fill---%
abcdefghijklmnopqrstuvwxyzäöüß.%
}
This phrase is not part of a blank to fill.
This phrase is not part of a blank to fill.
\BlankToFill{%
This phrase is part of the blank to fill---%
abcdefghijklmnopqrstuvwxyzäöüß.%
}
This phrase is not part of a blank to fill.
This phrase is not part of a blank to fill.
\BlankToFill{%
This phrase is part of the blank to fill---%
abcdefghijklmnopqrstuvwxyzäöüß.%
}
Text.
\end{FillInTheBlanksText}
This is not part of a FillInTheBlanksText-environment.
This is not part of a FillInTheBlanksText-environment.
This is not part of a FillInTheBlanksText-environment.
This is not part of a FillInTheBlanksText-environment.
\vspace{-\ht\strutbox}
\noindent\null\cleaders\hrule height 1.2pt\hfill\null
\vspace{-\dp\strutbox}
\textbf{Provide a pattern for all primitive pythagorean triples
\(x^2+y^2=z^2\), \(2\mid x\), \(x>0\), \(y>0\), \(z>0\):}
\begin{FillInTheBlanksText}[Textfontcommand=\fontsize{17}{23}, Textonly]
\BlankToFill{%
\mbox{\makebox[\textwidth][l]{\hfill $x=2st$,\hfill}}\\
\mbox{\makebox[\textwidth][l]{\hfill $y=s^2-t^2$,\hfill}}\\
\mbox{\makebox[\textwidth][l]{\hfill $z=s^2+t^2$,\hfill}}\\
\mbox{\makebox[\textwidth][l]{%
\hfill $s>t>0, \textrm{gcd}(s,t)=1, s\not\equiv t (\textrm{mod }2)$\hfill
}}%
}%
\end{FillInTheBlanksText}
\vspace{-\ht\strutbox}
\noindent\null\cleaders\hrule height 1.2pt\hfill\null
\vspace{-\dp\strutbox}
\newpage %----------- Key Whitespaceonly ---------------------------------
\vspace{-\ht\strutbox}
\noindent\null\cleaders\hrule height 1.2pt\hfill\null
\vspace{-\dp\strutbox}
Key in use with environment \verb|FillInTheBlanksText|:
\verb|Whitespaceonly|
\vspace{-\ht\strutbox}
\noindent\null\cleaders\hrule height 1.2pt\hfill\null
\vspace{-\dp\strutbox}
This is not part of a FillInTheBlanksText-environment.
This is not part of a FillInTheBlanksText-environment.
This is not part of a FillInTheBlanksText-environment.
This is not part of a FillInTheBlanksText-environment.
\begin{FillInTheBlanksText}[Whitespaceonly]
Text. \BlankToFill{%
This phrase is part of the blank to fill---%
abcdefghijklmnopqrstuvwxyzäöüß.%
}
This phrase is not part of a blank to fill.
This phrase is not part of a blank to fill.
\BlankToFill{%
This phrase is part of the blank to fill---%
abcdefghijklmnopqrstuvwxyzäöüß.%
}
This phrase is not part of a blank to fill.
This phrase is not part of a blank to fill.
\BlankToFill{%
This phrase is part of the blank to fill---%
abcdefghijklmnopqrstuvwxyzäöüß.%
}
Text.
\end{FillInTheBlanksText}
This is not part of a FillInTheBlanksText-environment.
This is not part of a FillInTheBlanksText-environment.
This is not part of a FillInTheBlanksText-environment.
This is not part of a FillInTheBlanksText-environment.
\vspace{-\ht\strutbox}
\noindent\null\cleaders\hrule height 1.2pt\hfill\null
\vspace{-\dp\strutbox}
\textbf{Provide a pattern for all primitive pythagorean triples
\(x^2+y^2=z^2\), \(2\mid x\), \(x>0\), \(y>0\), \(z>0\):}
\begin{FillInTheBlanksText}[Textfontcommand=\fontsize{17}{23}, Whitespaceonly]
\BlankToFill{%
\mbox{\makebox[\textwidth][l]{\hfill $x=2st$,\hfill}}\\
\mbox{\makebox[\textwidth][l]{\hfill $y=s^2-t^2$,\hfill}}\\
\mbox{\makebox[\textwidth][l]{\hfill $z=s^2+t^2$,\hfill}}\\
\mbox{\makebox[\textwidth][l]{%
\hfill $s>t>0, \textrm{gcd}(s,t)=1, s\not\equiv t (\textrm{mod }2)$\hfill
}}%
}%
\end{FillInTheBlanksText}
\vspace{-\ht\strutbox}
\noindent\null\cleaders\hrule height 1.2pt\hfill\null
\vspace{-\dp\strutbox}
\end{document}
在编译示例生成的 .pdf 文件中,您可以按如下方式检查元素的位置:
- 缩放页面高度以适合显示 .pdf 文件的窗口的高度。
- 将查看模式设置为“单页”和“非连续”。
- 现在,您可以通过在页面之间滚动来玩“虚拟翻书”:
某些元素应该消失/弹出,但任何元素都不应垂直/水平移动。