Created
February 13, 2020 05:11
-
-
Save kauplan/973d5037e2cc0f8edb474bd0960c2dcc to your computer and use it in GitHub Desktop.
「@<href>{URL, TEXT}」を「TEXT\footnote{\url{URL}}」に変換する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ReVIEW::LATEXBuilder.class_eval do | |
def compile_href(url, label) | |
if /\A[a-z]+:/ =~ url | |
if label | |
#macro('href', escape_url(url), escape(label)) # original | |
escape(label) + macro('footnote', macro('url', escape_url(url))) | |
else | |
macro('url', escape_url(url)) | |
end | |
else | |
macro('ref', url) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment