-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/tiarno/plastex
Conflicts: plasTeX/Base/LaTeX/Index.py
- Loading branch information
Showing
8 changed files
with
60 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env python | ||
|
||
import locale | ||
import string | ||
|
||
def stringletters(): | ||
encoding = locale.getlocale()[1] | ||
if encoding: | ||
return unicode(string.letters, encoding) | ||
else: | ||
return unicode(string.letters) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
import locale | ||
import unittest | ||
from plasTeX.TeX import TeX | ||
|
||
class Longtables(unittest.TestCase): | ||
|
||
def runDocument(self, content): | ||
""" | ||
Compile a document with the given content | ||
Arguments: | ||
content - string containing the content of the document | ||
Returns: TeX document | ||
""" | ||
tex = TeX() | ||
tex.disableLogging() | ||
tex.input(ur'''\document{article}\begin{document}%s\end{document}''' % content) | ||
return tex.parse() | ||
|
||
def testString(self): | ||
# Bad character encoding | ||
locale.setlocale(locale.LC_ALL, "en_GB.iso8859-1") | ||
out = self.runDocument(u"é") | ||
|
||
if __name__ == '__main__': | ||
unittest.main() | ||
|