/// Synopsis: Returns the intermediate elements that make up a quote. /// /// Discussion: Style changes affect the entire render. Link and monospace /// affect everything inside typographical quotes. The actual link tag is /// innermost so its text can be replaced easily by a topic title or an /// or object (perhaps surrounded by an ). /// /// From innermost to outermost, the quoted text is wrapped in: /// link-placeholder, term, code, typographical quotes, bib, b, i, u, term formatting, em /// define method quote-elements (owner :: , quote :: ) => (outer-quote-elem :: ) let specs = check-quote-specifiers(quote); let interior = if (member?(#"sic", specs)) concatenate(quote.open-quote, quote.quoted-content, quote-close-quote) else quote.quoted-content end if; let link-target = if (instance?(specs.last, )) specs.last else interior end; let last-owned = #f; if (member?(#"qv", specs) | member?(#"toc", specs)) let link = make() link.text := interior; link.target := link-target; interior := link; last-owned := link; end if; if (member?(#"term", specs)) let term = make(); term.text := interior interior := term; if (last-owned) last-owned.element-owner := term end; last-owned := term; end if; if (member?(#"code", specs)) let code = make(); code.text := interior; if (last-owned) last-owned.element-owner := code end; last-owned := code; end if; if (member?(#"q", specs)) interior := vector("‘", interior, "’"); end if; if (member?(#"qq", specs)) interior := vector("“", interior, "”"); end if; if (member?(#"bib", specs)) let cite = make(); cite.text := interior; interior := cite; if (last-owned) last-owned.element-owner := cite end; last-owned := cite; end if; if (member?(#"b", specs)) let bold = make(); bold.text := interior; interior := bold; if (last-owned) last-owned.element-owner := bold end; last-owned := bold; end if; if (member?(#"i", specs)) let ital = make(); ital.text := interior; interior := ital; if (last-owned) last-owned.element-owner := ital end; last-owned := ital; end if; if (member?(#"u", specs)) let ul = make(); ul.text := interior; interior := ul; if (last-owned) last-owned.element-owner := ul end; last-owned := ul; end if; if (member?(#"term", specs)) let style = make(); style.text := interior; interior := style; if (last-owned) last-owned.element-owner := style end; last-owned := style; end if; if (member?(#"em", specs)) let em = make(); em.text := interior; interior := em; if (last-owned) last-owned.element-owner := em end; last-owned := em; end if; if (last-owned) last-owned.element-owner := owner end; last-owned end method;