exercises

所属分类:数学计算
开发工具:TeX
文件大小:0KB
下载次数:0
上传日期:2023-03-20 09:27:45
上 传 者sh-1993
说明:  数学和编程练习集。
(Collection of math and programming exercises.)

文件列表:
LICENSE (35149, 2023-03-20)
database/ (0, 2023-03-20)
database/0_MathBasics/ (0, 2023-03-20)
database/0_MathBasics/BinomialCoefficient/ (0, 2023-03-20)
database/0_MathBasics/BinomialCoefficient/build/ (0, 2023-03-20)
database/0_MathBasics/BinomialCoefficient/build/print.pdf (86575, 2023-03-20)
database/0_MathBasics/BinomialCoefficient/meta.json (932, 2023-03-20)
database/0_MathBasics/BinomialCoefficient/solution.tex (276, 2023-03-20)
database/0_MathBasics/BinomialCoefficient/task.tex (352, 2023-03-20)
database/0_MathBasics/ComplexNumbers/ (0, 2023-03-20)
database/0_MathBasics/ComplexNumbers/build/ (0, 2023-03-20)
database/0_MathBasics/ComplexNumbers/build/print.pdf (79402, 2023-03-20)
database/0_MathBasics/ComplexNumbers/meta.json (844, 2023-03-20)
database/0_MathBasics/ComplexNumbers/solution.tex (276, 2023-03-20)
database/0_MathBasics/ComplexNumbers/task.tex (275, 2023-03-20)
database/0_MathBasics/Induction/ (0, 2023-03-20)
database/0_MathBasics/Induction/build/ (0, 2023-03-20)
database/0_MathBasics/Induction/build/print.pdf (88497, 2023-03-20)
database/0_MathBasics/Induction/meta.json (874, 2023-03-20)
database/0_MathBasics/Induction/solution.tex (482, 2023-03-20)
database/0_MathBasics/Induction/task.tex (112, 2023-03-20)
database/0_MathBasics/InductionProof/ (0, 2023-03-20)
database/0_MathBasics/InductionProof/build/ (0, 2023-03-20)
database/0_MathBasics/InductionProof/build/print.pdf (118785, 2023-03-20)
database/0_MathBasics/InductionProof/meta.json (2021, 2023-03-20)
database/0_MathBasics/InductionProof/solution.tex (1267, 2023-03-20)
database/0_MathBasics/InductionProof/task.tex (344, 2023-03-20)
database/0_MathBasics/Induction_1/ (0, 2023-03-20)
database/0_MathBasics/Induction_1/build/ (0, 2023-03-20)
database/0_MathBasics/Induction_1/build/print.pdf (95667, 2023-03-20)
database/0_MathBasics/Induction_1/meta.json (867, 2023-03-20)
database/0_MathBasics/Induction_1/solution.tex (480, 2023-03-20)
database/0_MathBasics/Induction_1/task.tex (105, 2023-03-20)
database/0_MathBasics/Induction_2/ (0, 2023-03-20)
database/0_MathBasics/Induction_2/build/ (0, 2023-03-20)
database/0_MathBasics/Induction_2/build/print.pdf (95124, 2023-03-20)
database/0_MathBasics/Induction_2/meta.json (1057, 2023-03-20)
database/0_MathBasics/Induction_2/solution.tex (644, 2023-03-20)
... ...

# Exercises - The main purpose of this repository is to collect exercises (pairs of *task* and *solution*). - Overview: - [Database](https://github.com/cvollmann-teaching/exercises/blob/master/#database) - [Worksheet Generator](https://github.com/cvollmann-teaching/exercises/blob/master/#worksheet-generator) - [License](https://github.com/cvollmann-teaching/exercises/blob/master/#license) - [Acknowledgement](https://github.com/cvollmann-teaching/exercises/blob/master/#acknowledgement) - [To Do](https://github.com/cvollmann-teaching/exercises/blob/master/#to-do) ## Database The directory `database` is a collection of exercises. An exercise itself is a directory with the following structure: ```shell |-- EXERCISE_NAME | |-- build | | `-- print.pdf | |-- meta.json | |-- solution.tex | `-- task.tex ``` or for an exercise, where the solution is just (Python) code: ```shell |-- EXERCISE_NAME | |-- build | | `-- print.pdf | | `-- solution.tex | |-- meta.json | |-- solution.py | `-- task.tex ``` - the user has to provide at least `task.tex` and `solution.tex (.py, .ipynb)` - `meta.json` is optional - the subdirectory `build/` and its content is automatically created by the programs - `task.tex`: - contains the task - try to avoid your own commands (e.g., rather write `\mathbb{R}` instead of `\R`) - `solution.tex` or `build/solution.tex` or `solution.py` or `solution.ipynb` - contains the solution to the task - if the solution just contains code, which is written in `solution.py` or `solution.ipynb`, then the `solution.tex` is auto-generated (simply inputs the code as listing) and thus located in the directory `build/` ## Worksheet Generator - based on the database with the defined structure of an exercise one can write a simple LaTex template engine which collects some exercises from the database and puts them into a worksheet - the provided example in `worksheet_generator` is quick and dirty; in its core it simply consists of the following two components 1. a latex command `\exercises{}...{}` in `latex_src/exercisecommand.sty` (should rather be an environment or existing package) 2. some python functions, which take the selected exercises and generate - `exercises.tex` (list of exercise commands `\exercises{}...{}`) - `table.tex` (point table, if specified) ### Usage 1. **Template**: Create a template, say `sheet.tex` (or simply copy `worksheet_generator/examples/templates/sheet.tex`) - in the preamble - you have to write `\usepackage{exercisecommand}` - import any usepackages which may be needed to properly compile your selected exercises (e.g., `amsmath,amsthm,amssymb,...`) - in the document body you can input the following three **auto-generated** files: - `\input{newcommands}` - some arbitrarily many variables that you would like to use in your template (e.g., `\Lecturer`, `\Semester`) - you inform the code about your newcommands in the JSON file in the next step - `\input{table}` - contains a table with exercise numbers and specified Points - `\input{exercises}` - the selected exercises 2. **Config**: create a config JSON file, say `sheets.json` ```json { "SHEET_NAME_1": { "exercises_database": "PATH TO DIRECTORY DATABASE", "build_directory": "WHERE YOUR OUTPUT IS PLACED", "template": { "filename": "PATH TO YOUR TEMPLATE .tex-FILE", "symlink": false, "newcommands": { "COMMAND_NAME": "COMMAND" } }, "table": true, "exercises": { "REL. PATH FROM exercise_database TO EXERCISE-DIR": { "Points": "5", "tags": "Python" }, "REL. PATH FROM exercise_database TO EXERCISE-DIR": { "Points": "10", "Header": false } } }, "SHEET_NAME_2": { "...": "..." } } ``` 3. **Run**: - execute `worksheet_create.py sheets.json` - find the output in `build_directory/*` - by default three versions of `exercises.tex` are generated, this results in three versions of your sheet - `SHEET_NAME-plain.pdf` (just the tasks) - `SHEET_NAME-inclass.pdf` (the tasks with empty space (squared) after each task to develop the solution in class) - `SHEET_NAME-solution.pdf` (the tasks with solutions) - also the LaTex-source will be copied to modify the sheet later on if necessary ### Examples - some examples can be found in `worksheet_generator/examples` - copy them and adapt to your needs # License The Latex code and the Python sample programs are licensed under [GPL-3.0](https://github.com/cvollmann-teaching/exercises/blob/master/LICENSE) and the content of the exercises is licensed under [CC-BY-SA 4.0](https://github.com/cvollmann-teaching/exercises/blob/master/https://creativecommons.org/licenses/by-sa/4.0/). # Acknowledgement - [Manuel Klar](https://github.com/cvollmann-teaching/exercises/blob/master/https://github.com/cagau) has contributed all exercises in `exercises/database/Python_Intro_de/` - [Dominik Annen](https://github.com/cvollmann-teaching/exercises/blob/master/https://github.com/annendominik) has translated handwritten solutions into LaTex and also added new exercises. # To Do - data base editor - data base - set reasonable meta in sidecar files meta.json

近期下载者

相关文件


收藏者