diff --git a/_config.yml b/_config.yml index 8be87c94347072c163f41348ebbe336f3a64953b..6fb11431d6453f54892b34fbbf0f5932845c45b3 100644 --- a/_config.yml +++ b/_config.yml @@ -44,6 +44,9 @@ scholar: use_raw_bibtex_entry: true bibtex_skip_fields: ['month_numeric'] + bibtex_filters: + - superscript + - latex sort_by: year order: descending diff --git a/_plugins/scholar_superscript_filter.rb b/_plugins/scholar_superscript_filter.rb new file mode 100644 index 0000000000000000000000000000000000000000..21498f8b53344ed28843370f7d592f4c20305a0e --- /dev/null +++ b/_plugins/scholar_superscript_filter.rb @@ -0,0 +1,11 @@ +module Jekyll + class Scholar + class Superscript < BibTeX::Filter + def apply(value) + value.to_s.gsub(/\\textsuperscript\{([^}]+)\}/) { + "<sup>#{$1}</sup>" + } + end + end + end +end