diff --git a/Documentation/sphinx/load_config.py b/Documentation/sphinx/load_config.py
index 101e6f0b0fcf25fcf0d9f5c1988918bf70c67e2c..eeb394b39e2cc8dc8d8f866a379cf492f5d8b73b 100644
--- a/Documentation/sphinx/load_config.py
+++ b/Documentation/sphinx/load_config.py
@@ -35,7 +35,7 @@ def loadConfig(namespace):
             latex_documents = namespace['latex_documents']
 
             for l in latex_documents:
-                if l[0].find(dir) == 0:
+                if l[0].find(dir + '/') == 0:
                     has = True
                     fn = l[0][len(dir) + 1:]
                     new_latex_docs.append((fn, l[1], l[2], l[3], l[4]))