=== Plugin Name ===
Contributors: divinenephron
Tags: latex, pdf, attachment
Requires at least: 3.0
Tested up to: 3.8.0
Version: 1.3
Stable tag: 1.3
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Produce PDF documents of everything on your site with Latex.
== Description ==
(As of January 2014 this plugin is unsupported. You can continue
to download and use it, but no further updates will be released.)
Latex Everything can produce PDF documents of everything on your site with
Latex. Or at least everything worth putting into a PDF.
Latex Everything can make PDF documents from individual posts and groups of
posts like categories, tags and custom taxonomy terms. The plugins contains
everything a theme needs to define its own Latex templates, and link to the PDFs
produced.
== Installation ==
1. This plugin requires `pdflatex` and `pdftk` installed. You can check for
these by executing `which pdflatex` and `which pdftk` on your host.
2. This plugin also requires you to know at least enough about Wordpress to
cut-and-paste code into your theme.
2. Upload this plugin to the /wp-content/plugins/ directory.
3. Activate the plugin Latex for WordPress through the 'Plugins' menu in
WordPress. Behind the scenes it will generate PDFs for your posts using a
default Latex template.
4. Link to the PDF version of a post by putting the following into [The Loop][the-loop]:
`PDF Version`
5. For more advanced usage (user-defined templates and generating Latex
documents for pages, categories and others) see the [Frequently Asked Questions][faq].
[the-loop]: http://codex.wordpress.org/The_Loop
"Documentation for The Loop in WordPress."
[faq]: http://wordpress.org/extend/plugins/latex-everything/faq/
"FAQ for Latex Everything."
== Frequently Asked Questions ==
= Why isn't this working? =
If something isn't working, check this FAQ for a relevant answer, or
the [plugin forum][forum]. Since this plugin is now unsupported, if
you've found a bug the original author won't fix it, but you are
welcome to create and distribute your own version of this plugin so
long as you comply with its GPL license.
[forum]: http://wordpress.org/tags/latex-everything?forum_id=10
"The forum where questions have been asked about Latex Everything."
= How do I typeset things besides posts? =
Go to `Settings->Reading`. There is a "Latex Everything" section where you can
choose which documents Latex Everything creates. By default only "Single Posts"
option is selected, but you can typeset other post types (including custom ones),
documents containing every post in a category (or other taxonomies), and
documents containing every post of a specific post type.
There are in fact three broad types of document Latex Everything produces:
* `single_post` -- Each document contains a single post (this can be a page or a
custom post type).
* `post_type` -- Each document contains every post of a particular type (e.g. a
post, a page, or a custom post type).
* `term` -- Each post contains every post belonging to a specific term (e.g. a
category, tag, or term in a custom taxonomy).
You need to know what sort of document you're looking for when getting its url.
= When are the PDF files generated? =
PDF files that contain a post are updated when it is saved. PDF files are also
generated in bulk after the plugin is activated (this uses WP-Cron, so it can take
a while). If you have a large number of posts and want to generate PDF files for
all of them, deactivate and reactivate the plugin, then wait.
= How do I link to the generated documents? =
Functions have been provided to link to the generated PDFs.
* `the_latex_url( $type, $arg1, [$arg2])` -- Prints a direct link to the PDF.
* `get_latex_url( $type, $arg1, [$arg2])` -- Returns a direct link to the PDF.
* `the_latex_permalink( $type, $arg1, [$arg2])` -- Prints a link to the
attachment page.
* `get_latex_permalink( $type, $arg1, [$arg2])` -- Returns a link to the
attachment page.
* `get_latex_attachment_id( $type, $arg1, [$arg])` -- Returns the id of the
attachment.
The arguments you give depend on the type of PDF document you're requesting:
For a `single_post` PDF:
the_latex_url( 'single_post', (int) $post_id )
For a `post_type` PDF:
the_latex_url( 'post_type', (string) $post_type )
For a `term` PDF:
the_latex_url( 'term', (int) $term_id, (string) $taxonomy)
Here's how you would use them in The Loop.
PDF of this post
PDF of all posts
PDF of a category
NB: These don't automatically figure out which post you're on while in The Loop,
you must always give all of the arguments
If you are going to use these functions in a theme, check they exist and produce
a url first:
PDF
= How do I use my own Latex Templates? =
Latex Everything has a default template inside the plugin directory, but it only
falls back on that if it doesn't find templates in the theme directory. The
plugin searches for templates in the same way that Wordpress does.
For a `single_post` PDF:
latex-single--.php
latex-single--.php
latex-single-.php
latex-single.php
latex.php
For a `post_type` PDF:
latex-post-type-.pdf
latex-post-type.pdf
latex.pdf
For a `term` PDF:
latex-term--.pdf
latex-term--.pdf
latex-term-.pdf
latex-term.pdf
latex.pdf
Look at `default-latex-template.php` in the plugin directory for guidance as to
how to make your own.
= How can I extend this? =
If you want to extend Latex Everything, fork it on [Github][github].
[github]: https://github.com/divinenephron/latex-everything
= What do you mean this plugin is unsupported? =
As of January 2014 the original author of this plugin won't release
any more versions of this plugin. You can still download and use the
plugin, but no new features or bugfixes will be made, and it may
become incompatable with, or even break future versions of Wordpress.
The author will also no longer answer questions about how to use the
plugin.
== Screenshots ==
1. The options page.
2. The default generated output.
== Changelog ==
= 1.3 =
* Fixed a bug in the add_controller method.
= 1.2 =
* Changed the URL at which the PDFs for new posts and post types are
saved. This prevents the PDF for a post entitled "Post" being
overwritten by the PDF for the post type "Post". Existing PDFs and
updates to them will stay at their current URL.
= 1.1 =
* Fixed a bug where PDFs for custom post types would not be generated.
= 1.0 =
* First released version.
== Upgrade Notice ==
= 1.3 =
This version fixes a bug in the add_controller method that creates
errors in some version of PHP.
= 1.2 = This version changes the URL at which new PDFs are written.
This will not affect existing PDFs or updates to them, which will
remain at their current URL.
= 1.1 =
This version fixes a bug where PDFs for custom post types would not be generated.
= 1.0 =
First stable version.