Compare commits

..

No commits in common. "d3caedd813b1ca4379a71eb1b4aa636096d53a04" and "f2f527c451b1b05b393af99b89c528aadb203ce6" have entirely different histories.

3 changed files with 5 additions and 8 deletions

View File

@ -640,7 +640,7 @@ impl<'a> Items<'a> {
self.0.push(entry.into()); self.0.push(entry.into());
} }
/// Iterate over the items. /// Iterate over the items
pub fn iter(&self) -> impl Iterator<Item = &Item<'a>> { pub fn iter(&self) -> impl Iterator<Item = &Item<'a>> {
self.0.iter().map(|item| &**item) self.0.iter().map(|item| &**item)
} }
@ -698,10 +698,6 @@ impl Debug for Items<'_> {
} }
/// A reference to or a boxed item. /// A reference to or a boxed item.
///
/// This is conceptually similar to a [`Cow<'a, Item<'a>>`][std::borrow::Cow],
/// but we box owned items since an [`Item`] is much bigger than
/// a box.
pub enum ItemEntry<'a> { pub enum ItemEntry<'a> {
Ref(&'a Item<'a>), Ref(&'a Item<'a>),
Box(Box<Item<'a>>), Box(Box<Item<'a>>),

View File

@ -592,7 +592,7 @@ impl Works {
/// Context for generating the bibliography. /// Context for generating the bibliography.
struct Generator<'a> { struct Generator<'a> {
/// The routines that are used to evaluate mathematical material in citations. /// The routines that is used to evaluate mathematical material in citations.
routines: &'a Routines, routines: &'a Routines,
/// The world that is used to evaluate mathematical material in citations. /// The world that is used to evaluate mathematical material in citations.
world: Tracked<'a, dyn World + 'a>, world: Tracked<'a, dyn World + 'a>,
@ -609,7 +609,7 @@ struct Generator<'a> {
/// Details about a group of merged citations. All citations are put into groups /// Details about a group of merged citations. All citations are put into groups
/// of adjacent ones (e.g., `@foo @bar` will merge into a group of length two). /// of adjacent ones (e.g., `@foo @bar` will merge into a group of length two).
/// Even single citations will be put into groups of length one. /// Even single citations will be put into groups of length ones.
struct GroupInfo { struct GroupInfo {
/// The group's location. /// The group's location.
location: Location, location: Location,

View File

@ -206,6 +206,7 @@ label exists on the current page:
```typ ```typ
>>> #set page("a5", margin: (x: 2.5cm, y: 3cm)) >>> #set page("a5", margin: (x: 2.5cm, y: 3cm))
#set page(header: context { #set page(header: context {
let page-counter =
let matches = query(<big-table>) let matches = query(<big-table>)
let current = counter(page).get() let current = counter(page).get()
let has-table = matches.any(m => let has-table = matches.any(m =>
@ -217,7 +218,7 @@ label exists on the current page:
#h(1fr) #h(1fr)
National Academy of Sciences National Academy of Sciences
] ]
}) }))
#lorem(100) #lorem(100)
#pagebreak() #pagebreak()