@@ -169,6 +169,11 @@ class LaTeX(ScannerBase):
169
169
'addsectionbib' : 'BIBINPUTS' ,
170
170
'makeindex' : 'INDEXSTYLE' ,
171
171
'usepackage' : 'TEXINPUTS' ,
172
+ 'usetheme' : 'TEXINPUTS' ,
173
+ 'usecolortheme' : 'TEXINPUTS' ,
174
+ 'usefonttheme' : 'TEXINPUTS' ,
175
+ 'useinnertheme' : 'TEXINPUTS' ,
176
+ 'useoutertheme' : 'TEXINPUTS' ,
172
177
'lstinputlisting' : 'TEXINPUTS' }
173
178
env_variables = SCons .Util .unique (list (keyword_paths .values ()))
174
179
two_arg_commands = ['import' , 'subimport' ,
@@ -193,6 +198,7 @@ def __init__(self, name, suffixes, graphics_extensions, *args, **kwargs) -> None
193
198
| addglobalbib
194
199
| addsectionbib
195
200
| usepackage
201
+ | use(?:|color|font|inner|outer)theme(?:\s*\[[^\]]+\])?
196
202
)
197
203
\s*{([^}]*)} # first arg
198
204
(?: \s*{([^}]*)} )? # maybe another arg
@@ -362,6 +368,9 @@ def scan(self, node, subdir: str='.'):
362
368
if inc_type in self .two_arg_commands :
363
369
inc_subdir = os .path .join (subdir , include [1 ])
364
370
inc_list = include [2 ].split (',' )
371
+ elif re .match ('use(|color|font|inner|outer)theme' , inc_type ):
372
+ inc_list = [re .sub ('use' , 'beamer' , inc_type ) + _ + '.sty' for _ in
373
+ include [1 ].split (',' )]
365
374
else :
366
375
inc_list = include [1 ].split (',' )
367
376
for inc in inc_list :
@@ -411,7 +420,7 @@ def scan_recurse(self, node, path=()):
411
420
if n is None :
412
421
# Do not bother with 'usepackage' warnings, as they most
413
422
# likely refer to system-level files
414
- if inc_type != 'usepackage' :
423
+ if inc_type != 'usepackage' or re . match ( "use(|color|font|inner|outer)theme" , inc_type ) :
415
424
SCons .Warnings .warn (
416
425
SCons .Warnings .DependencyWarning ,
417
426
"No dependency generated for file: %s "
0 commit comments