{"id":19757048,"url":"https://github.com/frougon/examwsolns","last_synced_at":"2026-07-03T19:03:14.427Z","repository":{"id":72872522,"uuid":"185743922","full_name":"frougon/examwsolns","owner":"frougon","description":"Environment for typesetting solutions with the “exam” document class","archived":false,"fork":false,"pushed_at":"2020-08-01T08:24:40.000Z","size":25,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-30T11:56:35.563Z","etag":null,"topics":["exam","latex","latex-package","solutions"],"latest_commit_sha":null,"homepage":null,"language":"TeX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lppl-1.3c","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frougon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-09T06:58:04.000Z","updated_at":"2020-07-31T13:18:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"dd3ce06f-4b2d-4f88-bf82-1aaca6b1eb64","html_url":"https://github.com/frougon/examwsolns","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/frougon/examwsolns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frougon%2Fexamwsolns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frougon%2Fexamwsolns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frougon%2Fexamwsolns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frougon%2Fexamwsolns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frougon","download_url":"https://codeload.github.com/frougon/examwsolns/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frougon%2Fexamwsolns/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35097760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-03T02:00:05.635Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["exam","latex","latex-package","solutions"],"created_at":"2024-11-12T03:17:56.106Z","updated_at":"2026-07-03T19:03:14.407Z","avatar_url":"https://github.com/frougon.png","language":"TeX","funding_links":[],"categories":[],"sub_categories":[],"readme":"# examwsolns — Typesetting solutions with the `exam` class\n\nThe `examwsolns` package provides a `wsolution` environment for the\n`exam` LaTeX document class. This environment can automatically adapt\nthe produced `mdframed` frame to its context (outer, question, part,\nsubpart or subsubpart).\n\n## Package options\n\nThe `examwsolns` package accepts the following options:\n\n- `default-level=current|outer|question|part|subpart|subsubpart` (the default\n  is `current`). When the first argument of a `wsolution` environment is\n  blank, the given level is used to determine the indentation and width of the\n  environment.\n\n- `replace-solution-env`. Using it as `replace-solution-env` or as\n  `replace-solution-env=true` is equivalent. The default is `false`. When\n  `true`, it tells `examwsolns` to redefine the `solution` environment to\n  be identical to `wsolution`.\n\nPackage options can also be specified with:\n\n    \\examwsolnsSetup{\u003coptions\u003e}\n\nFor `replace-solution-env`, this only has effect if done in the preamble\n(the `solution` environment is redefined from the `\\AtBeginDocument`\nhook in order to avoid problems due to package loading order).\n\n## The `wsolution` environment\n\n### Question level\n\nThe `wsolution` environment takes two optional arguments. If the first\nargument is passed and non-empty, it must be an integer in the [0, 4]\nrange and gives the amount of indentation (and thus the width) of the\nproduced `mdframed`;\n\n  - if the value 0 is used, the frame starts at the left margin (what we\n    call `outer` level);\n  - the value 1 corresponds to the `question` level;\n  - the value 2 corresponds to the `part` level;\n  - the value 3 corresponds to the `subpart` level;\n  - the value 4 corresponds to the `subsubpart` level.\n\nIf this first argument is omitted or blank, the `wsolution` environment\ntakes appropriate indentation and width:\n\n  - as indicated by option `default-level` if its value is not `current`;\n  - for the current question level otherwise (which can be any of the five\n    aforementioned levels).\n\n### Options passed to the `mdframed` environment\n\nThe `mdframed` environment is passed the `leftmargin` parameter\naccording to what we just explained, plus additional parameters that\nare:\n\n  - those from the `wsolution` environment's second argument if\n    provided;\n  - else, have been specified with the closest\n    `\\examwsolnsSetMdFramedDefaultArgs` command according to TeX's\n    grouping rules (this command takes one argument: tokens to pass as\n    additional options to `mdframed`);\n  - none if the `wsolution` environment has been used with no second\n    argument and `\\examwsolnsSetMdFramedDefaultArgs` hasn't been called\n    in an accessible scope.\n\n### Pre-text and post-text inside `mdframed`\n\nThe contents of a `wsolution` environment becomes the contents of an\n`mdframed` environment, except that you can have automatic pre-text and\npost-text inserted. For example, if you say\n`\\examwsolnsSetMdFramedPreText{pre-text:}`,\n`\\examwsolnsSetMdFramedPostText{:post-text}` and use, in a scope\nwhere these definitions are visible:\n\n    \\begin{wsolution}Solution text\\end{wsolution}\n\nthen the `mdframed` environment (if printed) will have\n`pre-text:Solution text:post-text` as its contents.\n`\\examwsolnsSetMdFramedPreText` and `\\examwsolnsSetMdFramedPostText`\nobey TeX's scoping rules (they respect groups), just like a `\\def`\ncommand. When used, the `\\examwsolnsSetMdFramedPreText` and\n`\\examwsolnsSetMdFramedPostText` commands override the default values\ndefined in `examwsolns.sty`. These default values are equivalent to\ndoing:\n\n    \\examwsolnsSetMdFramedPreText{%\n      \\textbf{Solution:}\\enspace \\ignorespaces}\n\nand\n\n    \\examwsolnsSetMdFramedPostText{\\unskip}\n\n### Showing or hiding answers\n\n`wsolution` environments are ignored unless the `answers` option has\nbeen passed to the `exam` class (in other words, the `wsolution`\nenvironment respects the `\\ifprintanswers` conditional).\n\n## The five indentation amounts\n\nThe indentation amount from the left margin corresponding to each of the\nfive question levels are accessible via the following `〈dimen〉`\nparameters: `\\examwsolnsOuterIndent`, `\\examwsolnsQuestionIndent`,\n`\\examwsolnsPartIndent`, `\\examwsolnsSubpartIndent` and\n`\\examwsolnsSubsubpartIndent`.\n\n## Examples\n\nYou can find a sample `.tex` file showing how to use `examwsolns` in the\n`examples` subdirectory and a [PDF rendering of that\nfile](https://github.com/frougon/examwsolns/wiki/files/example.pdf).\n\n## History\n\nThe `examwsolns` package was written to answer [this TeX.SE\nquestion][question].\n\n## License\n\nThe `examwsolns` package is distributed under the conditions of the LaTeX\nProject Public License, either version 1.3 of this license or (at your option)\nany later version. See `examwsolns.sty` for the precise licensing information.\nThe `LICENSE` file distributed with `examwsolns` contains the complete text of\nthe LaTeX Project Public License version 1.3.\n\n  [question]: https://tex.stackexchange.com/questions/489374/exam-creating-a-solution-environment-whose-width-is-set-by-an-optional-argument\n  [answer]: https://tex.stackexchange.com/a/489424/73317\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrougon%2Fexamwsolns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrougon%2Fexamwsolns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrougon%2Fexamwsolns/lists"}