{"id":16413,"date":"2012-01-12T21:20:55","date_gmt":"2012-01-12T21:20:55","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/latex-everything\/"},"modified":"2013-09-20T16:40:59","modified_gmt":"2013-09-20T16:40:59","slug":"latex-everything","status":"publish","type":"plugin","link":"https:\/\/twd.wordpress.org\/plugins\/latex-everything\/","author":5659112,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.3","stable_tag":"1.3","tested":"3.4.2","requires":"3.0","requires_php":"","requires_plugins":"","header_name":"Latex Everything","header_author":"Divinenephron (Devon Buchanan)","header_description":"","assets_banners_color":"","last_updated":"2013-09-20 16:40:59","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/wordpress.org\/extend\/plugins\/latex-everything","header_author_uri":"http:\/\/divinenephron.co.uk","rating":5,"author_block_rating":0,"active_installs":10,"downloads":8408,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"1.2":"<p>This version changes the URL at which new PDFs are written. This will not affect\nexisting PDFs or updates to them, which will remain at their current URL.<\/p>","1.1":"<p>This version fixes a bug where PDFs for custom post types would not be generated.<\/p>","1.0":"<p>First stable version.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"2"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","1.2","1.3"],"block_files":[],"assets_screenshots":{"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1539231","resolution":"2","location":"plugin"},"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1539231","resolution":"1","location":"plugin"}},"screenshots":{"1":"The options page.","2":"The default generated output."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[2264,6566,1764],"plugin_category":[50],"plugin_contributors":[88527],"plugin_business_model":[],"class_list":["post-16413","plugin","type-plugin","status-publish","hentry","plugin_tags-attachment","plugin_tags-latex","plugin_tags-pdf","plugin_category-media","plugin_contributors-divinenephron","plugin_committers-divinenephron"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/latex-everything.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/latex-everything\/trunk\/screenshot-1.png?rev=1539231","caption":"The options page."},{"src":"https:\/\/ps.w.org\/latex-everything\/trunk\/screenshot-2.png?rev=1539231","caption":"The default generated output."}],"raw_content":"<!--section=description-->\n<p>Latex Everything can produce PDF documents of everything on your site with\nLatex. Or at least everything worth putting into a PDF.<\/p>\n\n<p>Latex Everything can make PDF documents from individual posts and groups of\nposts like categories, tags and custom taxonomy terms. The plugins contains\neverything a theme needs to define its own Latex templates, and link to the PDFs\nproduced.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>This plugin requires <code>pdflatex<\/code> and <code>pdftk<\/code> installed. You can check for\nthese by executing <code>which pdflatex<\/code> and <code>which pdftk<\/code> on your host.<\/li>\n<li>This plugin also requires you to know at least enough about Wordpress to\ncut-and-paste code into your theme.<\/li>\n<li>Upload this plugin to the \/wp-content\/plugins\/ directory.<\/li>\n<li>Activate the plugin Latex for WordPress through the 'Plugins' menu in\nWordPress. Behind the scenes it will generate PDFs for your posts using a\ndefault Latex template.<\/li>\n<li>Link to the PDF version of a post by putting the following into <a href=\"http:\/\/codex.wordpress.org\/The_Loop\" title=\"Documentation for The Loop in WordPress.\">The Loop<\/a>:<br \/>\n        &lt;a href=&quot;\"&gt;PDF Version<\/a><\/li>\n<li>For more advanced usage (user-defined templates and generating Latex\ndocuments for pages, categories and others) see the <a href=\"http:\/\/wordpress.org\/extend\/plugins\/latex-everything\/faq\/\" title=\"FAQ for Latex Everything.\">Frequently Asked Questions<\/a>.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>Why isn't this working?<\/dt>\n<dd><p>If something isn't working, check this FAQ for a relevant answer. If there isn't one,\ncreate a new topic in the <a href=\"http:\/\/wordpress.org\/tags\/latex-everything?forum_id=10#postform\" title=\"The forum where questions can be asked about Latex Everything.\">plugin forum<\/a> and the author will try to get back to you.<\/p><\/dd>\n<dt>How do I typeset things besides posts?<\/dt>\n<dd><p>Go to <code>Settings-&gt;Reading<\/code>. There is a \"Latex Everything\" section where you can\nchoose which documents Latex Everything creates. By default only \"Single Posts\"\noption is selected, but you can typeset other post types (including custom ones),\ndocuments containing every post in a category (or other taxonomies), and\ndocuments containing every post of a specific post type.<\/p>\n\n<p>There are in fact three broad types of document Latex Everything produces:<\/p>\n\n<ul>\n<li><code>single_post<\/code> -- Each document contains a single post (this can be a page or a\ncustom post type).<\/li>\n<li><code>post_type<\/code> -- Each document contains every post of a particular type (e.g. a\npost, a page, or a custom post type).<\/li>\n<li><code>term<\/code> -- Each post contains every post belonging to a specific term (e.g. a\ncategory, tag, or term in a custom taxonomy).<\/li>\n<\/ul>\n\n<p>You need to know what sort of document you're looking for when getting its url.<\/p><\/dd>\n<dt>When are the PDF files generated?<\/dt>\n<dd><p>PDF files that contain a post are updated when it is saved. PDF files are also\ngenerated in bulk after the plugin is activated (this uses WP-Cron, so it takes\na while). If you have a large number of posts and want to generate PDF files for\nall of them, deactivate and reactivate the plugin, then wait.<\/p><\/dd>\n<dt>How do I link to the generated documents?<\/dt>\n<dd><p>Functions have been provided to link to the generated PDFs.<\/p>\n\n<ul>\n<li><code>the_latex_url( $type, $arg1, [$arg2])<\/code> -- Prints a direct link to the PDF.<\/li>\n<li><code>get_latex_url( $type, $arg1, [$arg2])<\/code> -- Returns a direct link to the PDF.<\/li>\n<li><code>the_latex_permalink( $type, $arg1, [$arg2])<\/code> -- Prints a link to the\nattachment page.<\/li>\n<li><code>get_latex_permalink( $type, $arg1, [$arg2])<\/code> -- Returns a link to the\nattachment page.<\/li>\n<li><code>get_latex_attachment_id( $type, $arg1, [$arg])<\/code> -- Returns the id of the\nattachment.<\/li>\n<\/ul>\n\n<p>The arguments you give depend on the type of PDF document you're requesting:<\/p>\n\n<p>For a <code>single_post<\/code> PDF:<\/p>\n\n<pre><code>the_latex_url( 'single_post', (int) $post_id )\n<\/code><\/pre>\n\n<p>For a <code>post_type<\/code> PDF:<\/p>\n\n<pre><code>the_latex_url( 'post_type', (string) $post_type )\n<\/code><\/pre>\n\n<p>For a <code>term<\/code> PDF:<\/p>\n\n<pre><code>the_latex_url( 'term', (int) $term_id, (string) $taxonomy)\n<\/code><\/pre>\n\n<p>Here's how you would use them in The Loop.<\/p>\n\n<pre><code>&lt;a href=\"&lt;?php the_latex_url( 'single_post', get_the_ID() ) ?&gt;\"&gt;PDF of this post&lt;\/a&gt;\n&lt;a href=\"&lt;?php the_latex_url( 'post_type', get_post_type() ) ?&gt;\"&gt;PDF of all posts&lt;\/a&gt;\n&lt;?php foreach( get_the_category() as $category ) : ?&gt;\n&lt;a href=\"&lt;?php the_latex_url( 'term', $category-&gt;cat_ID, 'category' ) ?&gt;\"&gt;PDF of a category&lt;\/a&gt;\n&lt;?php endforeach; ?&gt;\n<\/code><\/pre>\n\n<p>NB: These don't automatically figure out which post you're on while in The Loop,\nyou must always give all of the arguments<\/p>\n\n<p>If you are going to use these functions in a theme, check they exist and produce\na url first:<\/p>\n\n<pre><code>&lt;?php if( function_exists('get_latex_url')\n          &amp;&amp; $latex_url = get_latex_url( 'single_post', get_the_ID() ) ): ?&gt;\n&lt;a href=\"&lt;?php echo $latex_url ?&gt;\"&gt;PDF&lt;\/a&gt;\n&lt;?php endif; \/\/ get_latex_permalink ?&gt;\n<\/code><\/pre><\/dd>\n<dt>How do I use my own Latex Templates?<\/dt>\n<dd><p>Latex Everything has a default template inside the plugin directory, but it only\nfalls back on that if it doesn't find templates in the theme directory. The\nplugin searches for templates in the same way that Wordpress does.<\/p>\n\n<p>For a <code>single_post<\/code> PDF:<\/p>\n\n<pre><code>latex-single-&lt;post_type&gt;-&lt;post id&gt;.php \nlatex-single-&lt;post_type&gt;-&lt;post slug&gt;.php \nlatex-single-&lt;post_type&gt;.php \nlatex-single.php \nlatex.php \n<\/code><\/pre>\n\n<p>For a <code>post_type<\/code> PDF:<\/p>\n\n<pre><code>latex-post-type-&lt;post type name&gt;.pdf\nlatex-post-type.pdf\nlatex.pdf\n<\/code><\/pre>\n\n<p>For a <code>term<\/code> PDF:<\/p>\n\n<pre><code>latex-term-&lt;taxonomy&gt;-&lt;term id&gt;.pdf\nlatex-term-&lt;taxonomy&gt;-&lt;term slug&gt;.pdf\nlatex-term-&lt;taxonomy&gt;.pdf\nlatex-term.pdf\nlatex.pdf\n<\/code><\/pre>\n\n<p>Look at <code>default-latex-template.php<\/code> in the plugin directory for guidance as to\nhow to make your own.<\/p><\/dd>\n<dt>How can I extend this?<\/dt>\n<dd><p>The plugin has been built with the intention of being extensible. The internals\nhave documentation in comments, and if you want to know how to do something that\nisn't obvious, create a new topic in the <a href=\"http:\/\/wordpress.org\/tags\/latex-everything?forum_id=10#postform\" title=\"The forum where questions can be asked about Latex Everything.\">plugin forum<\/a>\nand the author will try to get back to you.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.2<\/h4>\n\n<ul>\n<li>Changed the URL at which the PDFs for new posts and post types are saved. This\nprevents the PDF for a post entitled \"Post\" being overwritten by the PDF for\nthe post type \"Post\". Existing PDFs and updates to them will stay at their\ncurrent URL.<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Fixed a bug where PDFs for custom post types would not be generated.<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>First released version.<\/li>\n<\/ul>","raw_excerpt":"Produce PDF documents of everything on your site with Latex.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/16413","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=16413"}],"author":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/divinenephron"}],"wp:attachment":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=16413"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=16413"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=16413"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=16413"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=16413"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=16413"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}