]> git.lyx.org Git - lyx.git/blobdiff - lib/doc/doc_toc.py
UserGuide.lyx updates: - revise descriptions of Branches and Nomenclature
[lyx.git] / lib / doc / doc_toc.py
index b47b0ec557a47f0a9e226703d0c077dd61adc451..aa83b494075d554ec8a6874ee467f7abe8a0068b 100755 (executable)
@@ -1,7 +1,7 @@
 #! /usr/bin/env python
-# -*- coding: iso-8859-1 -*-
+# -*- coding: utf-8 -*-
 # This file is part of the LyX Documentation
-# Copyright (C) 2004 José Matos <jamatos@lyx.org>
+# Copyright (C) 2004 José Matos <jamatos@lyx.org>
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
-# This script creates a "master table of contents" for a set of LyX docs.
+# This script is called by the script depend.py to create a "master table of contents"
+# for a set of LyX docs.
 # It does so by going through the files and printing out all of the
 # chapter, section, and sub(sub)section headings out. (It numbers the
 # sections sequentially; hopefully noone's using Section* in the docs.)
+# It is called using this syntax:
+# depend.py doc_toc.py SetOfDocuments
+# where SetOfDocuments is a set of documents
 
 import sys
 import os
@@ -113,7 +117,7 @@ def build_toc(output, documents, lang=None):
                 lang = dir
     file = LyX.NewFile(output = output)
     data = info[lang]
-    file.set_header(language = data[0], language_quotes = data[1], inputencoding = "utf-8")
+    file.set_header(language = data[0], language_quotes = data[1], inputencoding = "auto")
     file.language = data[0]
     file.encoding = "utf-8"
     body = [ LyX.Paragraph('Title', [data[3]])]