// Copied from https://github.com/typst/templates // // MIT No Attribution // // Permission is hereby granted, free of charge, to any person obtaining a copy of this // software and associated documentation files (the "Software"), to deal in the Software // without restriction, including without limitation the rights to use, copy, modify, // merge, publish, distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // unequivocal-ams/template/main.typ // Sizes used across the template. #letscript-size=7.97224pt #letfootnote-size=8.50012pt #letsmall-size=9.24994pt #letnormal-size=10.00002pt #letlarge-size=11.74988pt // Workaround for the lack of an `std` scope. #letstd-bibliography= bibliography // This function gets your whole document as its `body` and formats // it as an article in the style of the American Mathematical Society. #letams-article( // The article's title. title:[Paper title], // An array of authors. For each author you can specify a name, // department, organization, location, and email. Everything but // but the name is optional. authors:(), // Your article's abstract. Can be omitted if you don't have one. abstract:none, // The article's paper size. Also affects the margins. paper-size:"us-letter", // The result of a call to the `bibliography` function or `none`. bibliography:none, // The document's content. body, )={ // Formats the author's names in a list with commas and a // final "and". letnames= authors.map(author => author.name) letauthor-string=if authors.len()==2{ names.join(" and ") }else{ names.join(", ", last:", and ") } // Set document metadata. setdocument(title: title, author: names) // Set the body font. AMS uses the LaTeX font. settext(size: normal-size, font:"New Computer Modern") // Configure the page. setpage( paper: paper-size, // The margins depend on the paper size. margin:if paper-size !="a4"{ ( top: (116pt / 279mm) * 100%, left: (126pt / 216mm) * 100%, right: (128pt / 216mm) * 100%, bottom: (94pt / 279mm) * 100%, ) }else{ ( top: 117pt, left: 118pt, right: 119pt, bottom: 96pt, ) }, // The page header should show the page number and list of // authors, except on the first page. The page number is on // the left for even pages and on the right for odd pages. header-ascent:14pt, header: locate(loc =>{ leti= counter(page).at(loc).first() if i ==1{return} settext(size: script-size) grid( columns:(6em,1fr,6em), if calc.even(i)[#i], align(center, upper( if calc.odd(i){ title }else{ author-string } )), if calc.odd(i){ align(right)[#i]} ) }), // On the first page, the footer should contain the page number. footer-descent:12pt, footer: locate(loc =>{ leti= counter(page).at(loc).first() if i ==1{ align(center, text(size: script-size,[#i])) } }) ) // Configure headings. setheading(numbering:"1.") show heading: it =>{ // Create the heading numbering. letnumber=if it.numbering !=none{ counter(heading).display(it.numbering) h(7pt, weak:true) } // Level 1 headings are centered and smallcaps. // The other ones are run-in. settext(size: normal-size, weight:400) if it.level ==1{ setalign(center) settext(size: normal-size) smallcaps[ #v(15pt, weak:true) #number #it.body #v(normal-size, weak:true) ] counter(figure.where(kind:"theorem")).update(0) }else{ v(11pt, weak:true) number letstyled=if it.level ==2{ strong }else{ emph } styled(it.body +[. ]) h(7pt, weak:true) } } // Configure lists and links. setlist(indent:24pt, body-indent:5pt) setenum(indent:24pt, body-indent:5pt) show link:settext(font:"New Computer Modern Mono") // Configure equations. show math.equation:setblock(below:8pt, above:9pt) show math.equation:settext(weight:400) // Configure citation and bibliography styles. setstd-bibliography(style:"springer-mathphys", title:[References]) show figure: it =>{ show: pad.with(x:23pt) setalign(center) v(12.5pt, weak:true) // Display the figure's body. it.body // Display the figure's caption. if it.has("caption"){ // Gap defaults to 17pt. v(if it.has("gap"){ it.gap }else{17pt}, weak:true) smallcaps(it.supplement) if it.numbering !=none{ [] it.counter.display(it.numbering) } [. ] it.caption.body } v(15pt, weak:true) } // Theorems. show figure.where(kind:"theorem"): it => block(above:11.5pt, below:11.5pt,{ strong({ it.supplement if it.numbering !=none{ [] counter(heading).display() it.counter.display(it.numbering) } [.] }) emph(it.body) }) // Display the title and authors. v(35pt, weak:true) align(center, upper({ text(size: large-size, weight:700, title) v(25pt, weak:true) text(size: footnote-size, author-string) })) // Configure paragraph properties. setpar(first-line-indent:1.2em, justify:true, leading:0.58em) show par:setblock(spacing:0.58em) // Display the abstract if abstract !=none{ v(20pt, weak:true) settext(script-size) show: pad.with(x:35pt) smallcaps[Abstract. ] abstract } // Display the article's contents. v(29pt, weak:true) body // Display the bibliography, if any is given. if bibliography !=none{ show std-bibliography:settext(footnote-size) show std-bibliography: pad.with(x:0.5pt) bibliography } // The thing ends with details about the authors. show: pad.with(x:11.5pt) setpar(first-line-indent:0pt) settext(script-size) for author in authors { letkeys=("department","organization","location") letdept-str= keys .filter(key => key in author) .map(key => author.at(key)) .join(", ") smallcaps(dept-str) linebreak() if"email"in author [ _Email address:_#link("mailto:"+ author.email)\ ] if"url"in author [ _URL:_#link(author.url) ] v(12pt, weak:true) } } // The ASM template also provides a theorem function. #lettheorem(body, numbered:true)= figure( body, kind:"theorem", supplement:[Theorem], numbering:if numbered {"1"}, ) // And a function for a proof. #letproof(body)= block(spacing:11.5pt,{ emph[Proof.] []+ body h(1fr) box(scale(160%, origin: bottom + right, sym.square.stroked)) }) // unequivocal-ams/lib.typ #import"@preview/unequivocal-ams:0.1.0": ams-article, theorem, proof #show: ams-article.with( title:[Mathematical Theorems], authors:( ( name: "Ralph Howard", department: [Department of Mathematics], organization: [University of South Carolina], location: [Columbia, SC 29208], email: "howard@math.sc.edu", url: "www.math.sc.edu/~howard" ), ), abstract: lorem(100), bibliography: bibliography("refs.bib"), ) Call me Ishmael. Some years ago --- never mind how long precisely --- having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world. It is a way I have of driving off the spleen, and regulating the circulation. Whenever I find myself growing grim about the mouth; whenever it is a damp, drizzly November in my soul; whenever I find myself involuntarily pausing before coffin warehouses, and bringing up the rear of every funeral I meet; and especially whenever my hypos get such an upper hand of me, that it requires a strong moral principle to prevent me from deliberately stepping into the street, and methodically knocking people's hats off --- then, I account it high time to get to sea as soon as I can. This is my substitute for pistol and ball. With a philosophical flourish Cato throws himself upon his sword; I quietly take to the ship. There is nothing surprising in this. If they but knew it, almost all men in their degree, some time or other, cherish very nearly the same feelings towards the ocean with me. There now is your insular city of the Manhattoes, belted round by wharves as Indian isles by coral reefs - commerce surrounds it with her surf. Right and left, the streets take you waterward. Its extreme down-town is the battery, where that noble mole is washed by waves, and cooled by breezes, which a few hours previous were out of sight of land. Look at the crowds of water-gazers there. Anyone caught using formulas such as or will fail. The binomial theorem is
A favorite sum of most mathematicians is
Likewise a popular integral is
#theorem[ The square of any real number is non-negative. ] #proof[ Any real number satisfies , , or . If , then . If then as a positive time a positive is positive we have . If then and so by what we have just done . So in all cases . ] = Introduction This is a new section. You can use tables like . #figure( table( columns:(1fr,auto,auto), inset:5pt, align: horizon, [],[*Area*],[*Parameters*], [*Cylinder*], , [: height \ : outer radius \ : inner radius], [*Tetrahedron*], , [: edge length] ), caption:"Solids", ) == Things that need to be done Prove theorems. = Background #lorem(40)