GithubHelp home page GithubHelp logo

maxercises's Introduction

maxercises

This is an ad-hoc created package for simplifying the process of creating exercise/solution sheets and exams. The creation of problems/solutions is similar to enumerate, but is based on the more primitive list type, which avoids interference with the normal enumerate behaviour.

The intention is to keep it small, but not minimal. It imports a handful of other packages which the author considers a reasonable starting point.

There is no promise of backward compatibility, so store a copy of the .sty file with each project.

Usage

Copy maxercises.sty and makedocs.sh into your project directory. The script generates three pdfs with exercises, solutions, and both.

Example

A small example is provided in example.tex. Running makedocs.sh yields the three documents example.pdf, exercises.pdf, and solutions.pdf.

Options

The default options are problemsON and solutionsON.

  • exam changes headers and renames "Exercises" to "Problems".
  • problemsOFF hides the problems; problemsON shows them.
  • solutionsOFF hides the solutions; solutionsON shows them.
  • skipnewpage skips the insertion of a new page when a problem follows a solution.

Environments

This package provides two environments: problem and solution. These environments typeset the problems/exercises and solutions automatically. Subproblems are typeset with the command \subproblem (also in the solution environment). This works similarly to the enumerate environment. To add more general information between two subproblems, the command \exitsubproblems can be used.

Example:

\begin{problem}
    Main problem setup.
    \subproblem First subproblem.

	With a second paragraph.
    
    \exitsubproblems
    Additional general details.

    \subproblem Second subproblem
\end{problem}

Gives

Exercise 1.1  Main problem setup.
  (a) First subproblem.
        With a second paragraph.
Additional general details.
  (b) Second subproblem.

Commands

  • \createtitle creates a title and header/footer based on the information provided by the commands below.

Setting information:

  • \setcoursename{value} sets the name of the course.
  • \setcourseiteration{value} sets the current iteration of the course (e.g., Spring 2017).
  • \setlecturer{value} sets the name of the professor/lecturer of the course.
  • \setassistant{value} sets the name of the main teaching assistant.
  • \setinstitution{value} sets the name of the university/institution.
  • \setsheetnumber{value} sets the ordinal number of the exercise sheet. This is ignored if the exam option is set.
  • \setlastupdated{value} sets the last time the document was updated.

Accessing information:

  • \coursename prints the name of the course.
  • \courseiteration prints the current iteration of the course (e.g., Spring 2017).
  • \lecturer prints the name of the professor/lecturer of the course.
  • \assistant prints the name of the main teaching assistant.
  • \institution prints the name of the university/institution.
  • \sheetnumber prints the ordinal number of the exercise sheet.
  • \lastupdated prints the last time the document was updated.

Manipulating the display of problems/solutions

  • \turnONproblems shows problems from this point on, regardless of package options.
  • \turnOFFproblems hides problems from this point on, regardless of package options.
  • \turnONsolutions shows solutions from this point on, regardless of package options.
  • \turnOFFsolutions hides solutions from this point on, regardless of package options.

Page breaks

  • \newpageifproblems inserts \newpage if problems are not hidden.
  • \newpageifnoproblems inserts \newpage if problems are hidden.
  • \newpageifsolutions inserts \newpage if solutions are not hidden.
  • \newpageifnosolutions inserts \newpage if solutions are hidden.

Conditional code

  • \doifproblems{code} evaluates code only if problems are not hidden.
  • \doifsolutions{code} evaluates code only if solutions are not hidden.

Convenience commands

  • \remark inserts a typeset "Remark:" text.
  • \note inserts a typeset "Note:" text.
  • \hint inserts a typeset "Hint:" text.

Additional information

The headers/footers are set using fancyhdr and can be customized using the corresponding syntax.

maxercises's People

Contributors

mreppen avatar

Watchers

 avatar  avatar

maxercises's Issues

Example pdf?

How about having an example pdf in the repo, linked from the readme?

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.