|  | 
| 1 |  | -#import "@preview/codly:0.2.0": * | 
| 2 |  | -#import "@preview/tidy:0.1.0" | 
|  | 1 | +#import "./packages.typ": codly, tidy | 
|  | 2 | +#import codly: * | 
| 3 | 3 | 
 | 
| 4 | 4 | #let docs-template( | 
| 5 |  | -  title: "", subtitle: "", abstract: [], authors: (), url: none, date: none, version: none, body, | 
|  | 5 | +  title: "", | 
|  | 6 | +  subtitle: "", | 
|  | 7 | +  abstract: [], | 
|  | 8 | +  authors: (), | 
|  | 9 | +  url: none, | 
|  | 10 | +  date: none, | 
|  | 11 | +  version: none, | 
|  | 12 | +  body, | 
| 6 | 13 | ) = { | 
| 7 | 14 |   // Set the document's basic properties. | 
| 8 | 15 |   set document(author: authors, title: title) | 
|  | 
| 29 | 36 |   ] | 
| 30 | 37 | 
 | 
| 31 | 38 |   // Author information. | 
| 32 |  | -  pad( | 
| 33 |  | -    top: 0.5em, x: 2em, grid( | 
| 34 |  | -      columns: (1fr,) * calc.min(3, authors.len()), gutter: 1em, ..authors.map(author => align(center, strong(author))), | 
| 35 |  | -    ), | 
| 36 |  | -  ) | 
|  | 39 | +  pad(top: 0.5em, x: 2em, grid( | 
|  | 40 | +    columns: (1fr,) * calc.min(3, authors.len()), | 
|  | 41 | +    gutter: 1em, | 
|  | 42 | +    ..authors.map(author => align(center, strong(author))), | 
|  | 43 | +  )) | 
| 37 | 44 | 
 | 
| 38 | 45 |   v(3cm, weak: true) | 
| 39 | 46 | 
 | 
| 40 | 47 |   // Abstract. | 
| 41 | 48 |   pad( | 
| 42 |  | -    x: 3.8em, top: 1em, bottom: 1.1em, align( | 
|  | 49 | +    x: 3.8em, | 
|  | 50 | +    top: 1em, | 
|  | 51 | +    bottom: 1.1em, | 
|  | 52 | +    align( | 
| 43 | 53 |       center, | 
| 44 | 54 |     )[ | 
| 45 | 55 |       #heading(outlined: false, numbering: none, text(0.85em, smallcaps[Abstract])) | 
|  | 
| 71 | 81 | #let show-module-fn(module, fn, ..args) = { | 
| 72 | 82 |   module.functions = module.functions.filter(f => f.name == fn) | 
| 73 | 83 |   tidy.show-module( | 
| 74 |  | -    module, ..args.pos(), ..args.named(), show-module-name: false, show-outline: false, | 
|  | 84 | +    module, | 
|  | 85 | +    ..args.pos(), | 
|  | 86 | +    ..args.named(), | 
|  | 87 | +    show-module-name: false, | 
|  | 88 | +    show-outline: false, | 
| 75 | 89 |   ) | 
| 76 | 90 | } | 
| 77 | 91 | 
 | 
|  | 
| 104 | 118 |   } | 
| 105 | 119 | 
 | 
| 106 | 120 |   stack( | 
| 107 |  | -    dir: ltr, [/ #term: #t \ #description], align(right, if default != none { [(default: #default)] }), | 
|  | 121 | +    dir: ltr, | 
|  | 122 | +    [/ #term: #t \ #description], | 
|  | 123 | +    align(right, if default != none { [(default: #default)] }), | 
| 108 | 124 |   ) | 
| 109 | 125 | } | 
0 commit comments