From e477b15298a9d985e0138eac26f65819b4b24db1 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Tue, 21 Mar 2017 16:36:41 -0400 Subject: [PATCH] Add @srcref to manual doc/macros.texi (@srcref): Add macro. --- doc/macros.texi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/macros.texi b/doc/macros.texi index 67e494a..c4388b4 100644 --- a/doc/macros.texi +++ b/doc/macros.texi @@ -105,3 +105,18 @@ @strong{Example:} \text\ @noticeend @end macro + + +@c link to source file if URI is known, otherwise display +@c the path to the file +@ifset SRCURI +@macro srcref{path, display} +@url{@value{SRCURI}/\path\, @code{\display\}} +@end macro +@end ifset + +@ifclear SRCURI +@macro srcref{path, display} +@file{\path\} +@end macro +@end ifclear