Git Product home page Git Product logo

tasks's People

Contributors

cgnieder avatar jashandeep-sohi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

tasks's Issues

How to modify the decimal separator of the tasks package?

By default, the decimal separator of the tasks package is the period. In French, it is the comma. How to make the following code display a comma while keeping the period in the source code?

In other words, the following code

\documentclass{article}
\usepackage{tasks}
\usepackage[french]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\begin{document}
\begin{tasks}[item-format=\ensuremath](1)
\task 0.6\times0.7=0.42
\task 0.05\times0.1=0.005
\task 0.07\times0.08=0.0056
\end{tasks}
\end{document}

looks like this:

sans virgule

and not as this:

avec virgule

Same question on https://tex.stackexchange.com here:
[How to modify the decimal separator of the tasks package?](https://tex.stackexchange.com/q/686861/138900)

Add an option for switching the entire tasks environment to math mode.

On of the motivations of creating the tasks packages seems to be (from the manual):

The reason for the tasks environment is an unwritten agreement in German maths textbooks
(exspecially in (junior) high school textbooks) to organize exercises in columns counting horizontally > rather than vertically. That is what tasks primarily is for. If you don’t need this feature
you’re better off using traditional LATEX lists and the enumitem package for customization.

Now such exercises often consist of only math formulas (for example calculating some integrals or derivatives) without text. Then you have to enter mathmode for every task. With regard to the quoted aim of the package, I think it would be a good idea to have an option such that the whole task environment operates in mathmode (similar as you can have matrices of math nodes in tikz).

Here is an example of a similar environment called brqalign, which was created by David Carlisle in response of one of my questions:

http://tex.stackexchange.com/a/51543/4011

\strut at end of task should only be inserted if not in vertical mode

In #5 a \strut was added to ensure even spacing, but this strut is wrong if for some reason the task ends in a \par. In such a case a strut will generate a full extra line!

One should probably check for hmode and insert the strut only then, or if in vmode only add a vertical space of the difference between a s strut decender and \prevdepth.

Unexpected linebreak

The second list has an unexpected linebreak (\large seems to be necessary for reproducing the issue...)

\documentclass{article}
\usepackage[textwidth=18cm]{geometry}
\usepackage{tasks}

\begin{document}
\large

\fbox{%
\begin{minipage}{15cm}
  \begin{tasks}(3)
    \task sadf 
    \task asdf
    \task adsf
  \end{tasks}
\end{minipage}}

\fbox{%
\begin{minipage}{16cm}
  \begin{tasks}(3)
    \task sadf 
    \task asdf
    \task adsf
  \end{tasks}
\end{minipage}}

\fbox{%
\begin{minipage}{17cm}
  \begin{tasks}(3)
    \task sadf 
    \task asdf
    \task adsf
  \end{tasks}
\end{minipage}}

\end{document}
´´´

label-align=center not functional?

Do I misunderstand something or is center not working?


\documentclass{article}
\pagestyle{empty}
\setlength\textwidth{250.0pt}

\usepackage{tasks}
\settasks{debug,label-width=3pc,item-indent=4pc}

\begin{document}
\begin{tasks}[label-align=left](3)
  \task One \task Two \task Go
  \task \dotfill \task* \dotfill    \end{tasks}
\begin{tasks}[label-align=center](3)
  \task One \task Two \task Go
  \task \dotfill \task* \dotfill    \end{tasks}
\begin{tasks}[label-align=right](3)
  \task One \task Two \task Go
  \task \dotfill \task* \dotfill    \end{tasks}
\end{document}

Gives me

bildschirmfoto 2018-11-12 um 22 57 36

Add a possibility to count custom labels

I am referring to issue #23 which fixed the behavior of counting custom labels. I use custom labels to replace empty checkboxes with checked checkboxes in xsim solutions. Here's the code snippet I use for my multiple choice questions:

% Multiple choice
\NewTasksEnvironment[label=\faSquareO~\Alph*), label-width=27pt]{choices}[\choice]
\newcommand*\correct{\IfInsideSolutionTF{\StrSubstitute{\thetask}{\faSquareO}{\faCheckSquareO}}{\thetask}}

So, for example I have tasks A) B) C) D) from which B and C are correct (\choice[\correct]). With the current version 1.3a this results in the labeling: A) A) A) B) because B and C would get a custom label.

To allow such a use case I suggest adding the option "count-custom-labels". I forked the project and added this option. Is this something you would like to see in the package / do you accept pull requests? Link to the commit: Commit 0a5265d. Note that I just started getting into the expl3 syntax, the code would be cleaner if there's a possibility to combine the two if statements using logical operators?!

feature request: provide \task!(<cols>)[<label>]

A possibly common use case is to start a new row of tasks. Right now this can be achieved with

... \task*[]  % ensure that the row ends
\task bla bla \task more bla bla

but this doesn't seem to be really nice. Instead

   \task!(1)   bla bla
   \task  more bla bla

start a new row and do a one column task.

Error when using more than 26 tasks with alphabetic counter

I'm using the setting \settasks{counter-format=(tsk[a])} to use the task labels (a), (b), (c), ...

But if I have more that 26 tasks, so it would have to go past (z), I get an error

./main.tex:251: Undefined control sequence.
\GenericError  ...                                
                                                    #4  \errhelp \@err@     ...
l.251         \end{tasks} 

I'm not sure what should come after (z), but I can't imagine it should result in a compile error.

\newpage doesn't work inside tasks environment

As the title says can't break a page inside tasks:

\documentclass{article}
\usepackage{tasks}
\begin{document}
\begin{tasks}
  \task Foo
  \newpage
  \task Bar
\end{tasks}
\end{document}

Expected result: two pages.

Overlapping of lines in the task environment

I use the tasks package to write a book where I have a lot of enums. The experience with the package has been very good so far.

The case is that I changed my OS from Mint to Ubuntu, 20.04.3 LTS, 64 bits, GNOME 3.36.8 and now the new compilations produce from the task environment an output in which the rows of the lists overlap each other, I want say: they are mounted on top of each other.

I have searched for a solution in Google and I have not found it.

Probable incompatibility with bebel greek.

While trying to answer this question using the tasks package, I encountered a possible incompatibility between the tasks package and the babel package with the greek option. The following MWE compiles perfectly fine if the second line is commented out, but yields a bunch or error messages if commented in:

\documentclass{article}
\usepackage[greek]{babel}
\usepackage{tasks}
\begin{document}
\begin{tasks}(2)
  \task 
  \task 
\end{tasks}
\end{document}

Excerpt of the log file:

! Use of \\SaveCounterPatternFrom doesn't match its definition.
\@ifnextchar ... \reserved@d =#1\def \reserved@a {
                                                  #2}\def \reserved@b {#3}\f...
l.8 \end{tasks}
               
If you say, e.g., `\def\a1{...}', then you must always
put `1' after `\a', since control sequence names are
made up of letters only. The macro here has not been
followed by the required stuff, so I'm ignoring it.

! Argument of \@firstoftwo has an extra }.
<inserted text> 
                \par 
l.8 \end{tasks}
               
I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.

Runaway argument?
! Paragraph ended before \@firstoftwo was complete.
<to be read again> 
                   \par 
l.8 \end{tasks}
               
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.

LaTeX Info: Redefining \anw@print on input line 8.
! Extra }, or forgotten \endgroup.
<argument> ...\@currentlabel {\l__tasks_label_tl }
                                                  
l.8 \end{tasks}
               
I've deleted a group-closing symbol because it seems to be
spurious, as in `$x}$'. But perhaps the } is legitimate and
you forgot something else, as in `\hbox{$x}'. In such cases
the way to recover is to insert both the forgotten and the
deleted material, e.g., by typing `I$}'.

LaTeX Info: Redefining \anw@print on input line 8.

Overfull \hbox (0.83313pt too wide) in paragraph at lines 8--8
|\LGR/cmr/m/n/10 aþ) 
 []

! Use of \\SaveCounterPatternFrom doesn't match its definition.
\@ifnextchar ... \reserved@d =#1\def \reserved@a {
                                                  #2}\def \reserved@b {#3}\f...
l.8 \end{tasks}
               
If you say, e.g., `\def\a1{...}', then you must always
put `1' after `\a', since control sequence names are
made up of letters only. The macro here has not been
followed by the required stuff, so I'm ignoring it.

! Argument of \@firstoftwo has an extra }.
<inserted text> 
                \par 
l.8 \end{tasks}
               
I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.

Runaway argument?
! Paragraph ended before \@firstoftwo was complete.
<to be read again> 
                   \par 
l.8 \end{tasks}
               
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.

LaTeX Info: Redefining \anw@print on input line 8.
! Extra }, or forgotten \endgroup.
<argument> ...\@currentlabel {\l__tasks_label_tl }
                                                  
l.8 \end{tasks}
               
I've deleted a group-closing symbol because it seems to be
spurious, as in `$x}$'. But perhaps the } is legitimate and
you forgot something else, as in `\hbox{$x}'. In such cases
the way to recover is to insert both the forgotten and the
deleted material, e.g., by typing `I$}'.

LaTeX Info: Redefining \anw@print on input line 8.

Overfull \hbox (0.83313pt too wide) in paragraph at lines 8--8
|\LGR/cmr/m/n/10 bþ) 
 []


Overfull \hbox (5.83191pt too wide) in paragraph at lines 8--8
 [] \LGR/cmr/m/n/10 þ) [] 
 []

miscalculating width in beamer

From https://tex.stackexchange.com/questions/334763/tasks-package-items-are-in-two-line-with-4-columns-and-4-items

It seems that tasks cannot compute the right width for the tasks with beamer when aspectratio=169 is in effect. - egreg Oct 19 '16 at 14:05

\documentclass[aspectratio=169]{beamer}
\usetheme{Berkeley}
\usepackage{tasks}
\begin{document}
\begin{frame}
\transwipe
1.Which one you want to choose?
\begin{tasks}[counter-format=tsk[A].,debug=true](4)
\task A
\task B
\task C
\task D
\end{tasks}
\end{frame}
\end{document}

possibility to add multiple choice lists again?

In the new version v1.0 the multiple choice style are removed. So my template are broken (it's no problem, i can fix that). Although xsim has the support for multiple choice questions, but not completely like tasks.

So..my questions ist: can you add the multiple choice style to tasks again (or add it to xsim)?

I think that the multiple choice style is useful, especially when you don't use xsim.

Thank you for your work. We use your packages (xsim&tasks) for our exercises in our school (hhgym.de) and love it!

P.S. Why you have removed the multiple choice lists in tasks?

before-skip options has no effect in tasks version 1.2a

\documentclass[12pt,a4paper]{article}
\usepackage{tasks}
\NewTasksEnvironment[%
style=itemize,%
label-offset=1.45ex,%
label-align=right,%
label-width=1ex,%
item-indent=2.45ex,%
column-sep=2ex,%
before-skip=4ex,% No effect!
after-skip=4ex,%
after-item-skip=0ex]{Itemize}[\item](2)
\parindent=0pt
\begin{document}
    Before tasks environment.
    \begin{Itemize}
        \item Hello
        \item World
        \item Hello
        \item World
    \end{Itemize}
    After tasks environment. ``before-skip=4ex'' has no effect!
\end{document}

bug with label-format

Answering a help request on SX and some subsequent email discussion I came across this set of issues:

\documentclass{article}

\usepackage{tasks}

% case
%  0    strange warning message
%  1    results in error
%  2    only this seems to work

\ifcase 0

\settasks{
counter-format =(tsk[A]),
label-format=\bfseries,
label-offset=1em,
label-align=right,
}

\or

\settasks{
label =(\Alph*),
label-format=\bfseries,
label-offset=1em,
label-align=right,
}

\or

\settasks{
label =\textbf{(\Alph*)},
%label-format=\bfseries,
label-offset=1em,
label-align=right,
}
\fi

\begin{document}

 %First question below
 $v \cdot 3uv^{-2}$
 
 \begin{tasks}(2)
  \task $8u^3v$
  \task $3u^5v^3$
  \task $\displaystyle\frac{3u}{v}$
  \task $3u^3v^3$
 \end{tasks}
 
\end{document}

In case 0 you get this error:

Package tasks Warning: You've tried setting option `counter-format' on line
(tasks)                17. However, option `counter-format' is deprecated.
(tasks)                Please use option `' instead. Refer to the manual for
(tasks)                details.

Not really helpful :-) as it is missing the new option name

Case 1 is more problematic, here we get

./counter-format deprecated error.tex:26: LaTeX Error: Missing \begin{document}
.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.26 }
      
? 

Seems that label-format is broken as without it (case 2) it works

Issue with recent version of tasks and numbering of task items

As detailed in https://tex.stackexchange.com/questions/584249/issue-with-recent-version-of-tasks-and-numbering

The behaviour of \task[] has changed, it now produces an unlabeled task, however it increases a step in the enumeration.

\documentclass{article}

\usepackage{tasks}
    \settasks{
    %debug,
    style=enumerate,
    label-format=\bfseries,
    label-align=right,
    label-width=21pt,
    label-offset=6pt,
    item-indent=27pt,
    column-sep=0.5em,}

\begin{document}

\begin{tasks}(2)
\task[] Not numbered
\task[] Not numbered
\task This used to be numbered 1
\task[] Not numbered
\task This used to be numbered 2
\task[] Not numbered
\task This used to be numbered 3
\task[] Not numbered
\end{tasks}

\end{document}

image
**

Errata in tasks v1.4a Manual

Please check on page 9 the text before the last tcolorbox:
current: Now the same list as above but with three columns and a different label:
correct: ...with two columns ...

Vertical skip seems not accurate

When set vertical skips before-skip, after-skip and after-item-skip to be 0pt, these skips seem not precisely 0pt.
Compared with this, when load the package enumitem with option nosep, the vertical skips between items of enumerate are the same with normal main text.

The following is my code.

\documentclass{article}
\usepackage{enumitem,tasks}
\setlist{nosep,leftmargin=*}
\settasks{before-skip=0pt,after-skip=0pt,after-item-skip=0pt}
\begin{document}
\parindent0pt
\fbox{some text}\\
\fbox{some text}
\begin{enumerate}
  \item \fbox{item~1}
  \item \fbox{item~2}
\end{enumerate}
\fbox{some text}
\begin{tasks}
  \task \fbox{item~1}
  \task \fbox{item~2}
\end{tasks}
\fbox{some text}
\end{document}

Below is the result.
Dingtalk_20211123211408

Key undefined

I've discovered the nice tasks package recently and began playing with it. However the
column-sep key appears to be undefined, albeit it is documented. Will it be added soon?

Best regards,

B. Alfonsi

Use of \thetask in the tasks environment is messed up

Use of \thetask in the tasks environment is messed up in the latest version 1.3a, as illustrated in the attached minimal example. With previous version 1.3 the example works just fine.
brokentasks.pdf

\documentclass{article}

\usepackage{tasks}

\newif\ifshowanswers
\showanswersfalse
\showanswerstrue% comment this out if you do not want to show correct answers

\newcommand{\correct}{%
\ifshowanswers
  {\bfseries\thetask}
\else
  \thetask
\fi
}

\begin {document}

A tricky question follows:

\begin{tasks}(1)%
%
\task[\correct] Correct answer 1.
\task Wrong answer 1.
\task Wrong answer 2.
\task Wrong answer 3.
\task[\correct] Correct answer 2.
%
\end{tasks}

\end{document}

An other enviroment in tasks messes with spaces

Having an environment like align* or even your own blank in a separate line of the task, the next task moves away an additional line.

\documentclass{article}
\usepackage{amsmath}
\usepackage{xsim}
\usepackage{tasks}
\begin{document}
	\begin{tasks}
	\task normal Space after that
	\task HUGE gap after  \begin{align*}
		3
	\end{align*}	
	\task works fine with blank in line \blank{a}
	\task filler
	\task messes with blank in separate line
	
	\blank{line}
	\task filler
	\end{tasks}
\end{document}

weird error with simple input file

This simple input file:

\documentclass[11pt, a4paper]{article}
\usepackage{exsheets}
\usepackage[detect-all=true]{siunitx}
\usepackage[version=3]{mhchem}

\begin{document}
\begin{question}{2}
    $c_\ce{Cu} = \SI{386}{J/(kg.K)}$
\end{question}
\end{document}

gives me this weird error, that I honestly can't figure out.

It turns out that the following modification $c_{\ce{Cu}} = \SI{386}{J/(kg.K)}$ instead compiles fine, probably pointing out to some quarrel between tasks.sty and mhchem?

Another clue: this line $c_\text{Cu} = \SI{386}{J/(kg.K)}$ also compiles fine.

It is not so crucial, but I'm reporting as a reference in case someone gets crazy on it like me before isolating the culprit...

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.