diff --git a/crates/citefind/README.md b/crates/citefind/README.md index 5e8cc85..191551c 100644 --- a/crates/citefind/README.md +++ b/crates/citefind/README.md @@ -235,10 +235,15 @@ Society since 1900` survives, which is why the imprint is asked for narrowly based himself principally on the Bible` and `Dewey remarks that we experience most things as temporal` are what a page of endnotes is mostly made of. A title read off markup is taken at its word; a title guessed at by cutting the -entry at its sentence stops is not, and where the entry gave up nothing else -— no author, no identifier, no container — that guess has to be a noun -phrase. A finite verb is what separates the remark from `Quaestiones -Parisienses`. +entry at its sentence stops is not, and where the entry named no author and +no identifier, that guess has to be a noun phrase. A finite verb is what +separates the remark from `Quaestiones Parisienses`. + +The commonest note of all remarks first and cites second — `As Lewis White +Beck has rightly put it. See his Early German Philosophy (Cambridge, Mass., +1969), p. 439.` — so what follows the remark is read as the container and +would otherwise vouch for it. It does not: reading that entry as a work with +a container stored the remark and lost the book. **Take a siglum for a work.** `H, 272`, `FR,120-122`, `GNO`. The key that expands the abbreviation is a page of its own that the entry does not carry, diff --git a/crates/citefind/src/parse.rs b/crates/citefind/src/parse.rs index b53d055..d1073ee 100644 --- a/crates/citefind/src/parse.rs +++ b/crates/citefind/src/parse.rs @@ -624,10 +624,14 @@ pub fn one(text: &str, marker: Option<&str>) -> Option { // than no answer, because it is stored and looks settled. if guessed && out.authors.is_empty() && out.ids.is_empty() { let refused = out.title.as_deref().is_some_and(|title| { - // A siglum is not the name of a work whatever else the entry - // gave up; a remark is only recognisable as one when nothing - // else was read, because a container vouches for the rest. - SIGLUM.is_match(title) || (out.container.is_none() && PREDICATE.is_match(title)) + // Neither a siglum nor a remark is the name of a work, whatever + // else came off the entry. A container does not vouch for the + // title here: the commonest note of all remarks first and cites + // second — `As Lewis White Beck has rightly put it. See his + // Early German Philosophy (Cambridge, Mass., 1969), p. 439.` — + // and reading that as a work with a container stored the remark + // and lost the book. + SIGLUM.is_match(title) || PREDICATE.is_match(title) }); if refused { out.title = None; @@ -2235,6 +2239,21 @@ mod tests { } } + #[test] + fn a_note_that_remarks_first_and_cites_second_keeps_neither_as_a_title() { + // The remark opened the note and the citation followed it, so the + // second sentence became a container and vouched for the first. + // Nothing in this names a work the record can carry. + let read = one( + "As Lewis White Beck has rightly put it. See his Early German \ + Philosophy (Cambridge, Mass., 1969), p. 439.", + None, + ) + .expect("a record"); + assert_eq!(read.title, None); + assert_eq!(read.pages.as_deref(), Some("439")); + } + #[test] fn a_title_the_entry_marked_up_is_taken_at_its_word() { // The other side of the same bar, and why it is drawn at the guess