r'''
Find an available font to mimic LaTeX, and return its name.

def find_latex_font_serif():
  r'''
Find an available font to mimic LaTeX, and return its name.
  '''

  import os, re
  import matplotlib.font_manager

  name = lambda font: os.path.splitext(os.path.split(font)[-1])[0].split(' - ')[0]

  fonts = matplotlib.font_manager.findSystemFonts(fontpaths=None, fontext='ttf')

  matches = [
    r'.*Computer\ Modern\ Roman.*',
    r'.*CMU\ Serif.*',
    r'.*CMU.*',
    r'.*Times.*',
    r'.*DejaVu.*',
    r'.*Serif.*',
  ]

  for match in matches:
    for font in fonts:
      if re.match(match,font):
        return name(font)

  return None