Skip to main content

requested_as

Function requested_as 

Source
pub fn requested_as<T>(name: &str, f: impl FnOnce() -> Option<T>) -> Option<T>
Expand description

Run f, a lookup of the document’s name under whatever variants it tries (x.tex, then x): a variant refused on the way is reported, as name, only when the lookup finds nothing (\IfFileExists{/dev/null} tries /dev/null.tex first). An enclosing lookup’s name wins.