josef-friedrich / cloze Goto Github PK
View Code? Open in Web Editor NEWA LuaLaTeX package for creating cloze texts.
Home Page: https://www.ctan.org/pkg/cloze
License: LaTeX Project Public License v1.3c
A LuaLaTeX package for creating cloze texts.
Home Page: https://www.ctan.org/pkg/cloze
License: LaTeX Project Public License v1.3c
In the following MWE, cloze texts should generally be hidden due to the global option, but some should be shown as per local options. However, in cases where multiple clozes appear in a paragraph or a TikZ picture, the las local option seems to dictate the behavior of all others.
\documentclass{article}
\usepackage{tikz}
\usepackage{cloze}
\clozehide
\begin{document}
This \cloze{cloze} should be hidden.
This \cloze[show]{cloze} should be shown.
This \cloze{cloze} should be hidden. This \cloze[show]{cloze} should be shown.
This \cloze[show]{cloze} should be shown. This \cloze{cloze} should be hidden.
Cloze inside a TikZ: \tikz[baseline=(C.base)] \node (C) {This \cloze{cloze} should be hidden.};
Cloze inside a TikZ: \tikz[baseline=(C.base)] \node (C) {This \cloze[show]{cloze} should be shown.};
Cloze inside a TikZ: \tikz[baseline=(C.base)] {
\node (C) {This \cloze{cloze} should be hidden.};
\node at (5,0) {This \cloze[show]{cloze} should be shown.};
}
Cloze inside a TikZ: \tikz[baseline=(C.base)] {
\node at (5,0) {This \cloze[show]{cloze} should be shown.};
\node (C) {This \cloze{cloze} should be hidden.};
}
\end{document}
Looking at this package I was wondering if it is worth to provide some kind of "spread" or "openup" option that enlarges the space of a cloze by a particular factor.
Rationale: if you do cloze tests then any participant actually using the text to fill in words will typically use handwriting, but that (if legible) is likely to need more space than the same text in typeset fonts.
Now one could use a larger clozefont to achieve this but then the "solution" document with the text inserted looks less good than one where the word spaces in cloze texts are larger (I think).
Just a thought - frank
Consider the following MWE:
\documentclass{article}
\usepackage{cloze}
\clozeset{hide}
\clozesetfont{}
\begin{document}
One and one is \cloze{two}.
\[1+1=\cloze{2}\]
\end{document}
The word two
is hidden and underlined (great).
The letter 2
is neither hidden nor underlined (not great).
Is this an expected behaviour?
Regards,
-- Louis
The width of the clozebox ist to large:
You create a minipage for the content with width = \linewidth
Then you put this minipage into a fbox, but then this fbox has a width of \linewidth+2*\fboxsep+2*\fboxrule and is to large
You could consider something like to set the minipage width to \linewidth - 2*\fboxrule -2*\fboxsep
(also if the user defines a boxwidth the fbox becomes larger than that because its always the size of just the minipage)
In the following MWE, "package." should be colored red, but it colored black in the resulting pdf.
\documentclass{article}
\usepackage{cloze}
\begin{document}
\color{red} The \cloze{cloze} package.
\end{document}
Why and where does the cloze Package defines a command "\uline" ?
In the documentation there is nothing about this command...
I have conflicts with other macros
You need the Transparent Package just for this line in clozestrike??
{\texttransparent{0}{\clozefont{}#3}}
You could consider instead something like
{\phantom{\clozefont{}#3}}
i have problems with transparent package.
Also there is a problem with \ifclozeshow in \clozestrike, but i dont know where its coming from , some other commands of your package seem to set it to TRUE and i need an extra \clozehide just before using clozestrike.
Also ulem Package seems just to load for the clozestrikeline. That is strange because your whole package is about a Lua-way of of underlining ... there is also a package LuauL which maybe could be "integrated" or "combined"
The clozestrike command is kind of "nice" but it absolutly doesn't fit to rest of this package but does need extra dependencies.
Best whishes!
Example:
% !TeX program = lualatex
% !TeX encoding = UTF-8 Unicode
\documentclass[11pt,parskip=half]{scrartcl}
\usepackage{cloze}
\begin{document}
\begin{clozebox}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.
\end{clozebox}
\end{document}
This example produces the following error: "Class scrartcl Error: undefined old font command `\it'. \end"
My internet research led me to a similar case, see
https://texwelt.de/fragen/26706/fehlermeldung-undefined-old-font-command-was-tun
With \documentclass[enabledeprecatedfontcommands]{scrartcl}
I can avoid the error-message, but this only seems to be a makeshift solution. Is there a better solution?
Beim neuen Makro «\clozenol» scheint der Lückentext bei der Option «hide» nicht transparent, sondern weiss zu sein (siehe angehängtes Beispiel).
Möglicherweise lässt sich auch dies mit einer kleinen Korrektur beheben.
\documentclass{article}
\usepackage[hide]{cloze}
\begin{document}
\colorbox{gray}{\cloze{Lücke}} \qquad \colorbox{gray}{\clozenol{Lücke}}
\end{document}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.