Introduction
TeXPrinter is a Java application designed for the sole purpose of printing threads from TeX.SX, a free, community driven Q&A for users of TeX, LaTeX, ConTeXt, and related typesetting systems. TeX.SX is a part of the Stack Exchange network of Q&A websites.
TeXPrint currently can print threads to the following formats:
![]() |
![]() |
| TeX |
The PDF output is provided by the iText library. It's a quick option if you don't intend to customize the output. If the thread has images, they are embedded in the final result.
The TeX option is recommended if you want to format the code the way you like it. It basically uses the article style, the listings package and a pretty straightforward approach. If the thread has images, they are downloaded to the current directory and correctly referenced in the document. Of course, you need to compile it.
Please note that only the main TeX.SX website is supported.
License
TeXPrinter is licensed under the New BSD License. I want to call your attention to the fact that the New BSD License has been verified as a GPL-compatible free software license by the Free Software Foundation, and has been vetted as an open source license by the Open Source Initiative.
That said, this application makes use of the following libraries with their respective licenses:
- iText PDF library: GNU Affero General Public License
- JSoup HTML parser: The MIT License
- MiG Layout: GNU General Public License / BSD License.
- Apache Commons CLI library: The Apache Software License Version 2.0
- Apache Commons Lang library: The Apache Software License Version 2.0
- Apache Commons Codec library: The Apache Software License Version 2.0
- Task Dialog: New BSD License.
Thanks to all these projects and developers involved.
Features and Usage
The first feature I have to mention about TeXPrinter is that this application runs on every major operating system, including Linux, Windows and MacOSX. In other words, the code is platform independent, it will run wherever there's a Java Virtual Machine. I tried to provide screenshots for those operating systems.
Main window
![]() |
![]() |
![]() |
| Linux | Windows | MacOSX |
When runnning the application, this is the first screen you will see. I tried to keep it plain and simple. Just type the TeX.SX question identifier in the textfield and click OK. Please note that the user contributions are licensed under cc-wiki with attribution required. In case you don't know, the question identifier refers to the following pattern: http://tex.stackexchange.com/questions/<ID>/.... In short, the identifier is a bunch of numbers. ![]()
Output format
![]() |
![]() |
![]() |
| Linux | Windows | MacOSX |
If you managed to reach this screen, you are half way done.
It's self-explanatory, just choose the output format you want. Currently you can choose between PDF and TeX for the reasons described in the Introduction section.
Messages
![]() |
![]() |
![]() |
| Linux | Windows | MacOSX |
If nothing went wrong, you will reach this screen. The output format will be written in the current directory. For your convenience, you can include TeXPrinter in your system path and call it from any directory.
![]() |
![]() |
![]() |
| Linux | Windows | MacOSX |
Didn't you read the previous info?
The question identifier expects to be only numbers, unless of course Stack Exchange proves me wrong some day.
![]() |
![]() |
![]() |
| Linux | Windows | MacOSX |
If you type ?, you will see this message with the application version, changelog and license. Please note that TeXPrinter can check if there is a newer version available. Due to security reasons, TeXPrinter won't auto-update itself, you need to download the new version from here. It's just a friendly note.
Error handling
![]() |
![]() |
![]() |
| Linux | Windows | MacOSX |
TeXPrinter is far from being bug-free. I worked hard to fix known bugs, but of course, there might be several bugs that I haven't discovered yet. If you find one of them, TeXPrinter allows you to send me an anonymous error report. It is basically a walkthrough execution plan, no sensible data is sent. It helps me a lot.
Showcase
Some say a picture is worth a thousand words. Then I guess a video may be worth a thousand pictures. The following video shows TeXPrinter in action running on a Fedora 15 machine with GNOME 3. Click the following image to enlarge.
![]() |
| TeXPrinter in action |
The song used in this video is Wired But Disconnected by duckett and it's licensed under Creative Commons Attribution Noncommercial Version 3.0.
Command line
TeXPrinter can also be used from the command line. If you simply type java -jar texprinter.jar in your terminal, it will launch the GUI screen we just saw. To see the CLI options, use the --help flag:
[paulo@sapientia ~]$ java -jar texprinter.jar --help
TeXPrinter - A TeX.SX question printer
Copyright (c) 2011, Paulo Roberto Massa Cereda
All rights reserved.
usage: texprinter [ --question-id ID --output EXT | --version | --help ]
--help print the help message
--output <EXT> the output format ('pdf' or 'tex')
--question-id <ID> the TeX.SX question ID
--version print the application version
[paulo@sapientia ~]$
In the showcase video, you can see TeXPrinter being used from the command line as well as the GUI frontend.
Download
You can download TeXPrinter in the project page hosted on SourceForge.net (those guys are great!). Both executable jar and source code are available for download or even SVN browsing. Alternatively, you can check the source code directly on the project directory also available on GitHub.com. You can fork the project, if you want to.
![]() |
| Download TeXPrinter |
That's it, hope you like this application. Suggestions are always welcome. Don't forget to visit TeX.SX and contribute to our community. You'll see me there somewhere. Thanks for using TeXPrinter!
Project info
This application is platform independent, it will run wherever there's a Java Virtual Machine.
Project status
The current and stable release of TeXPrinter is 2.1 - Awesome Tiramisù. You can find the full source code in the project page on SourceForge.net or also in the project directory on GitHub.com.
Special thanks
To the TeX.SX community and all its staff, moderators and great members. Thanks a lot for supporting my idea.
A special thanks to Martin Scharrer for the ideas of a semi-automatic error report sending mechanism, Joseph Wright for blogging about TeXPrinter and also providing me feedback on it, Enrico Gregorio for suggesting me a better way to define a listings environment, and Bruno Le Floch for making an epic cake and giving name to this version. ![]()
Useful Links
Included code
This application makes use of the well-known Apache Commons family, naming Lang, CLI and Codec, to provide open source implementations of common methods like HTML unescaping and command line parsing. The GUI frontend is powered by the promising Task Dialog library that provides a collection of Swing UI enhancements (it uses MiG Layout on the window layout). The PDF output is provided by the iText PDF library. At last but not least, the HTML parsing is provided by the awesome JSoup HTML parser library. Again, thanks to all these projects and developers involved.
Other projects
- Translate64
Files to their Base64 equivalents - nbRosary
The Holy Rosary in the NetBeans IDE - HowAbout
An online TV guide searcher - Detoxify
Resistence is futile, you will be detoxified - JTelegraph
Annoying modal messages no more! - JAchievement
Display achievements with ease - JCarrierPigeon
Notification features for your application













