@@ -1870,28 +1870,23 @@ def generateLanguageDoc(self):
1870
1870
1871
1871
# Define templates for HTML table parts of the documentation.
1872
1872
htmlTableTpl = '''
1873
- \\ htmlonly
1874
- </p>
1875
- <table align="center" cellspacing="0" cellpadding="0" border="0">
1876
- <tr bgcolor="#000000">
1877
- <td>
1878
- <table cellspacing="1" cellpadding="2" border="0">
1879
- <tr bgcolor="#4040c0">
1880
- <td ><b><font size="+1" color="#ffffff"> Language </font></b></td>
1881
- <td ><b><font size="+1" color="#ffffff"> Maintainer </font></b></td>
1882
- <td ><b><font size="+1" color="#ffffff"> Contact address </font>
1883
- <font size="-2" color="#ffffff">(replace the at and dot)</font></b></td>
1884
- <td ><b><font size="+1" color="#ffffff"> Status </font></b></td>
1873
+ \\ latexonly
1874
+ \\ footnotesize
1875
+ \\ endlatexonly
1876
+ <table align="center" class=doxtable cellspacing="1" cellpadding="2">
1877
+ <tr>
1878
+ <th >Language</th>
1879
+ <th >Maintainer</th>
1880
+ <th >Contact address (replace the at and dot)</th>
1881
+ <th >Status</td>
1885
1882
</tr>
1886
1883
<!-- table content begin -->
1887
1884
%s
1888
1885
<!-- table content end -->
1889
- </table>
1890
- </td>
1891
- </tr>
1892
1886
</table>
1893
- <p>
1894
- \\ endhtmlonly
1887
+ \\ latexonly
1888
+ \\ normalsize
1889
+ \\ endlatexonly
1895
1890
'''
1896
1891
htmlTableTpl = textwrap .dedent (htmlTableTpl )
1897
1892
htmlTrTpl = '\n <tr bgcolor="#ffffff">%s\n </tr>'
@@ -1963,85 +1958,16 @@ def generateLanguageDoc(self):
1963
1958
1964
1959
# The last element contains the readable form of the status.
1965
1960
bgcolor = self .getBgcolorByReadableStatus (obj .readableStatus )
1966
- lst .append (htmlTdStatusColorTpl % (bgcolor , obj .readableStatus ))
1961
+ lst .append (htmlTdStatusColorTpl % (bgcolor , obj .readableStatus . replace ( "." , " \\ ." ) ))
1967
1962
1968
1963
# Join the table data to one table row.
1969
1964
trlst .append (htmlTrTpl % ('' .join (lst )))
1970
1965
1971
1966
# Join the table rows and insert into the template.
1972
1967
htmlTable = htmlTableTpl % ('' .join (trlst ))
1973
1968
1974
- # Define templates for LaTeX table parts of the documentation.
1975
- latexTableTpl = r'''
1976
- \latexonly
1977
- \footnotesize
1978
- \begin{longtable}{|l|l|l|l|}
1979
- \hline
1980
- {\bf Language} & {\bf Maintainer} & {\bf Contact address} & {\bf Status} \\
1981
- \hline
1982
- %s
1983
- \hline
1984
- \end{longtable}
1985
- \normalsize
1986
- \endlatexonly
1987
- '''
1988
- latexTableTpl = textwrap .dedent (latexTableTpl )
1989
- latexLineTpl = '\n ' + r' %s & %s & {\tt\tiny %s} & %s \\'
1990
-
1991
- # Loop through transl objects in the order of sorted readable names
1992
- # and add generate the content of the LaTeX table.
1993
- trlst = []
1994
- for name , obj in self .langLst :
1995
- # For LaTeX, more maintainers for the same language are
1996
- # placed on separate rows in the table. The line separator
1997
- # in the table is placed explicitly above the first
1998
- # maintainer. Prepare the arguments for the LaTeX row template.
1999
- maintainers = []
2000
- if obj .classId in self .__maintainersDic :
2001
- maintainers = self .__maintainersDic [obj .classId ]
2002
-
2003
- lang = obj .langReadable
2004
- maintainer = None # init
2005
- email = None # init
2006
- if obj .status == 'En' :
2007
- # Check whether there is the coupled non-English.
2008
- classId = obj .classId [:- 2 ]
2009
- if classId in self .__translDic :
2010
- langNE = self .__translDic [classId ].langReadable
2011
- maintainer = 'see the %s language' % langNE
2012
- email = '~'
2013
-
2014
- if not maintainer and (obj .classId in self .__maintainersDic ):
2015
- lm = [ m [0 ] for m in self .__maintainersDic [obj .classId ] ]
2016
- maintainer = maintainers [0 ][0 ]
2017
- email = maintainers [0 ][1 ]
2018
-
2019
- status = obj .readableStatus
2020
-
2021
- # Use the template to produce the line of the table and insert
2022
- # the hline plus the constructed line into the table content.
2023
- # The underscore character must be escaped.
2024
- trlst .append ('\n \\ hline' )
2025
- s = latexLineTpl % (lang , maintainer , email , status )
2026
- s = s .replace ('_' , '\\ _' )
2027
- trlst .append (s )
2028
-
2029
- # List the other maintainers for the language. Do not set
2030
- # lang and status for them.
2031
- lang = '~'
2032
- status = '~'
2033
- for m in maintainers [1 :]:
2034
- maintainer = m [0 ]
2035
- email = m [1 ]
2036
- s = latexLineTpl % (lang , maintainer , email , status )
2037
- s = s .replace ('_' , '\\ _' )
2038
- trlst .append (s )
2039
-
2040
- # Join the table lines and insert into the template.
2041
- latexTable = latexTableTpl % ('' .join (trlst ))
2042
-
2043
1969
# Put the HTML and LaTeX parts together and define the dic item.
2044
- tplDic ['informationTable' ] = htmlTable + ' \n ' + latexTable
1970
+ tplDic ['informationTable' ] = htmlTable
2045
1971
2046
1972
# Insert the symbols into the document template and write it down.
2047
1973
f = xopen (fDocName , 'w' )
0 commit comments