Giter Site home page Giter Site logo

josef-friedrich / cloze Goto Github PK

View Code? Open in Web Editor NEW
3.0 6.0 0.0 915 KB

A LuaLaTeX package for creating cloze texts.

Home Page: https://www.ctan.org/pkg/cloze

License: LaTeX Project Public License v1.3c

TeX 72.87% Makefile 0.96% Lua 26.17%
lualatex ctan tex cloze

cloze's People

Contributors

josef-friedrich avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cloze's Issues

Local show/hide option seems to affect whole paragraph / TikZ picture

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}

linecolor and hide

\documentclass{scrbook}
\usepackage[hide, linecolor=red]{cloze}

\begin{document}

Text davor

\cloze{Lücke}

Text danach

\end{document}

cloze

Cloze does not work in math mode

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

openup or spread option

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

\clozenol not transparent

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}

cloze-Versuch.pdf

uline

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

Class scrartcl Error: undefined old font command `\it'. \end

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?

clozebox boxwidth

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)

clozestrike

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.