Debian Codegraph @

texmf-dist/doc/latex/hideproofs/README.md

raw
1
2 # Hide Proofs LaTeX Package
3
4 Define a starred proof environment `proof*` that hides its contents unless the document is marked as `final`.
5
6 ## Overview
7
8 This package introduces an alternate proof environment, `proof*`, which conditionally hides or shows its contents based on the document mode (`draft`, `final`, or default). This is useful for omitting formal proofs from draft versions while retaining them in final documents.
9 The motivation for this package is to reduce the clutter in large files by omitting long proofs, allowing authors to focus their attention on results or proofs that are currently works in-progress.
10
11 Issues and feature requests can be submitted on GitHub at [github.com/pwintz/hideproofs](https://github.com/pwintz/hideproofs).
12
13 ## Features
14
15 - Defines a `proof*` environment with optional argument.
16 - Automatically hides proofs in non-final documents (configurable).
17 - Customizable hidden message and styling.
18
19 ## Usage
20
21 ### Basic Example
22
23 ```latex
24 \documentclass{article}
25 \usepackage{hideproofs}
26
27 \begin{document}
28
29 \begin{proof*}
30 This proof will be hidden unless the document is in final mode.
31 \end{proof*}
32
33 \end{document}
34 ```
35
36
37 ## Package options
38 | Key | Type | Description | Default |
39 | --------------- | ------ | ----------------------------------------------------------- | -------------------------- |
40 | `hideInDraft` | bool | Hide proofs in draft mode. | `true` |
41 | `hideInFinal` | bool | Hide proofs in final mode. | `false` |
42 | `hideInDefault` | bool | Hide proofs in default mode (neither draft nor final). | `true` |
43 | `show` | bool | Always show proofs, regardless of mode. | `false` |
44 | `hide` | bool | Always hide proofs, regardless of mode. | `false` |
45 | `message` | string | Text shown in place of hidden proof. | `Proof hidden.` |
46 | `color` | string | Color of the hidden message (if `color` package is loaded). | `blue` |
47
48
49 ## Optional Argument to Change "Proof." Header
50
51 The `proof*` environment matches the behavior of the `proof` environment for using an optional argument to change the proof heading from "proof.":
52 ```latex
53 \begin{proof*}[Proof Sketch]
54 This labeled proof will be hidden unless visible.
55 \end{proof*}
56 ```
57
58 ## Change Log
59
60 ### v1.0 (2025/06/15)
61 Initial version
62
63 ## License
64 The `hideproofs` package is licensed under the [LaTeX Project Public License](https://www.latex-project.org/lppl/).
65
66
67
68
69 # Development
70
71 ## Packaging and Uploading `hideproofs` to CTAN
72
73 We are using the `makedtx` tool to package the documentation and `.sty` files into a `.dtx` file.
74 Often, `makedtx` is packaged with your LaTeX installation, so it does not need to be installed separately.
75 Run
76 ```bash
77 makedtx --version
78 ```
79 to check it is installed.
80 To build the `.dtx` file, run
81 ```bash
82 makedtx -src "hideproofs\.sty=>hideproofs.sty" -doc hideproofs-doc.tex hideproofs
83 ```
84 In the `-src` argument, the left-hand side of `=>` is a regular expression indicating the source file (hence the need to escape `\.`) and the right-hand side is the output file.