@@ -545,6 +545,20 @@ def validate_comma_sep_str(s):
545545 except ValueError :
546546 raise ValueError ('Could not convert all entries to strings' )
547547
548+ def validate_latex_preamble (s ):
549+ 'return a list'
550+ preamble_list = validate_comma_sep_str (s )
551+ if not preamble_list == ['' ]:
552+ verbose .report ("""
553+ *****************************************************************
554+ You have the following UNSUPPORTED LaTeX preamble customizations:
555+ %s
556+ Please do not ask for support with these customizations active.
557+ *****************************************************************
558+ """ % '\n ' .join (preamble_list ), 'helpful' )
559+ return preamble_list
560+
561+
548562class ValidateInStrings :
549563 def __init__ (self , valid , ignorecase = False ):
550564 'valid is a list of legal strings'
@@ -761,7 +775,7 @@ def __call__(self, s):
761775 # text props
762776 'text.color' : ['k' , validate_color ], # black
763777 'text.usetex' : [False , validate_usetex ],
764- 'text.latex.preamble' : ['' , validate_comma_sep_str ],
778+ 'text.latex.preamble' : ['' , validate_latex_preamble ],
765779 'text.dvipnghack' : [False , validate_bool ],
766780 'text.fontstyle' : ['normal' , str ],
767781 'text.fontangle' : ['normal' , str ],
0 commit comments