From: Timo Heister Date: Thu, 30 Mar 2017 15:11:01 +0000 (-0400) Subject: add @dealiiTutorialDOI{} macro for tutorial programs X-Git-Tag: v9.0.0-rc1~1752^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b669ea7c8fc2fc8227408ee9f4a671d66d79d09e;p=dealii.git add @dealiiTutorialDOI{} macro for tutorial programs --- diff --git a/doc/doxygen/scripts/filter b/doc/doxygen/scripts/filter index a8b75467e8..6ecf2a2891 100755 --- a/doc/doxygen/scripts/filter +++ b/doc/doxygen/scripts/filter @@ -75,7 +75,29 @@ while (<>) # "file :", which doxygen doesn't recognize: s#file:[ \t]*$#file :#g; - + # handle tutorial DOIs of the form @dealiiTutorialDOI{link,imglink} + # and @dealiiTutorialDOI{link} + if (m/(\@dealiiTutorialDOI\{([^\}]+)\})/) + { + @args = split(',', $2, 2); + $doi = @args[0]; + $url = "https://doi.org/" . $doi; + $imgurl = @args[1] || ''; + $text = "\@note If you use this program as a basis for your own work, please consider citing it in your list of references. The initial version of this work was contributed to the deal.II project by the authors listed in the following citation: "; + # Note: We need to wrap the html in @htmlonly @endhtmlonly because doxygen + # will remove the embedded img tag completely otherwise. Don't ask me why. + $text = $text . "\@htmlonly "; + if (length($imgurl) > 0) + { + $text = $text . "\"$doi\"/"; + } + else + { + $text = $text . "$doi"; + } + $text = $text . " \@endhtmlonly"; + s/(\@dealiiTutorialDOI\{([^\}]+)\})/$text/; + } # Handle commands such as @dealiiVideoLecture{20.5,33} by expanding it # into a note with some text diff --git a/examples/step-56/doc/intro.dox b/examples/step-56/doc/intro.dox index 39eb323ff8..41b57dd210 100644 --- a/examples/step-56/doc/intro.dox +++ b/examples/step-56/doc/intro.dox @@ -11,6 +11,8 @@ the programme Melt in the Mantle where work on this tutorial was undertaken. This work was supported by EPSRC grant no EP/K032208/1. +@dealiiTutorialDOI{10.5281/zenodo.400995,https://zenodo.org/badge/DOI/10.5281/zenodo.400995.svg} +

Introduction