Changeset 698781
- Timestamp:
- 04/16/2013 09:38:57 PM (13 years ago)
- File:
-
- 1 edited
-
latex-everything/tags/1.2/readme.txt (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
latex-everything/tags/1.2/readme.txt
r582773 r698781 25 25 1. This plugin requires `pdflatex` and `pdftk` installed. You can check for 26 26 these by executing `which pdflatex` and `which pdftk` on your host. 27 2. Upload latex fold to the /wp-content/plugins/ directory 27 2. This plugin also requires you to know at least enough about Wordpress to 28 cut-and-paste code into your theme. 29 2. Upload this plugin to the /wp-content/plugins/ directory. 28 30 3. Activate the plugin Latex for WordPress through the 'Plugins' menu in 29 WordPress. 30 4. Link to the pdf version of a post by putting the following into The Loop: 31 WordPress. Behind the scenes it will generate PDFs for your posts using a 32 default Latex template. 33 4. Link to the PDF version of a post by putting the following into [The Loop][the-loop]: 31 34 `<a href="<?php the_latex_url( 'single_post', get_the_ID() ) ?>">PDF Version</a>` 32 35 5. For more advanced usage (user-defined templates and generating Latex 33 documents for other things) see the Frequently Asked Questions. 36 documents for pages, categories and others) see the [Frequently Asked Questions][faq]. 37 38 [the-loop]: http://codex.wordpress.org/The_Loop 39 "Documentation for The Loop in WordPress." 40 [faq]: http://wordpress.org/extend/plugins/latex-everything/faq/ 41 "FAQ for Latex Everything." 34 42 35 43 == Frequently Asked Questions == … … 38 46 39 47 If something isn't working, check this FAQ for a relevant answer. If there isn't one, 40 create a new topic in the [plugin forum](http://wordpress.org/tags/latex-everything?forum_id=10#postform) 41 and the author will try to get back to you. 48 create a new topic in the [plugin forum][forum] and the author will try to get back to you. 49 50 [forum]: http://wordpress.org/tags/latex-everything?forum_id=10#postform 51 "The forum where questions can be asked about Latex Everything." 42 52 43 53 = How do I typeset things besides posts? = … … 82 92 The arguments you give depend on the type of PDF document you're requesting: 83 93 84 For a `single_post` PDF: 85 `the_latex_url( 'single_post', (int) $post_id )` 94 For a `single_post` PDF: 95 96 the_latex_url( 'single_post', (int) $post_id ) 86 97 87 98 For a `post_type` PDF: 88 `the_latex_url( 'post_type', (string) $post_type )` 99 100 the_latex_url( 'post_type', (string) $post_type ) 89 101 90 102 For a `term` PDF: 91 `the_latex_url( 'term', (int) $term_id, (string) $taxonomy)` 103 104 the_latex_url( 'term', (int) $term_id, (string) $taxonomy) 92 105 93 Here's how you would use them in The Loop. 94 `<a href="<?php the_latex_url( 'single_post', get_the_ID() ) ?>">PDF of this post</a>` 95 `<a href="<?php the_latex_url( 'post_type', get_post_type() ) ?>">PDF of all posts</a>` 96 `<?php foreach( get_the_category() as $category ) : ?>` 97 `<a href="<?php the_latex_url( 'term', $category->cat_ID, 'category' ) ?>">PDF of a category</a>` 98 `<?php endforeach; ?>` 106 Here's how you would use them in The Loop. 107 108 <a href="<?php the_latex_url( 'single_post', get_the_ID() ) ?>">PDF of this post</a> 109 <a href="<?php the_latex_url( 'post_type', get_post_type() ) ?>">PDF of all posts</a> 110 <?php foreach( get_the_category() as $category ) : ?> 111 <a href="<?php the_latex_url( 'term', $category->cat_ID, 'category' ) ?>">PDF of a category</a> 112 <?php endforeach; ?> 99 113 100 114 NB: These don't automatically figure out which post you're on while in The Loop, … … 102 116 103 117 If you are going to use these functions in a theme, check they exist and produce 104 a url first: 105 `<?php if( function_exists('get_latex_url')` 106 ` && $latex_url = get_latex_url( 'single_post', get_the_ID() ) ): ?>` 107 `<a href="<?php echo $latex_url ?>">PDF</a>` 108 `<?php endif; // get_latex_permalink ?>` 118 a url first: 119 120 <?php if( function_exists('get_latex_url') 121 && $latex_url = get_latex_url( 'single_post', get_the_ID() ) ): ?> 122 <a href="<?php echo $latex_url ?>">PDF</a> 123 <?php endif; // get_latex_permalink ?> 109 124 110 125 = How do I use my own Latex Templates? = … … 115 130 116 131 For a `single_post` PDF: 117 `latex-single-<post_type>-<post id>.php`118 `latex-single-<post_type>-<post slug>.php`119 `latex-single-<post_type>.php`120 `latex-single.php`121 `latex.php`122 132 123 For a `post_type` PDF: 124 `latex-post-type-<post type name>.pdf` 125 `latex-post-type.pdf` 126 `latex.pdf` 133 latex-single-<post_type>-<post id>.php 134 latex-single-<post_type>-<post slug>.php 135 latex-single-<post_type>.php 136 latex-single.php 137 latex.php 127 138 128 For a `term` PDF: 129 `latex-term-<taxonomy>-<term id>.pdf` 130 `latex-term-<taxonomy>-<term slug>.pdf` 131 `latex-term-<taxonomy>.pdf` 132 `latex-term.pdf` 133 `latex.pdf` 139 140 For a `post_type` PDF: 141 142 latex-post-type-<post type name>.pdf 143 latex-post-type.pdf 144 latex.pdf 145 146 For a `term` PDF: 147 148 latex-term-<taxonomy>-<term id>.pdf 149 latex-term-<taxonomy>-<term slug>.pdf 150 latex-term-<taxonomy>.pdf 151 latex-term.pdf 152 latex.pdf 134 153 135 154 Look at `default-latex-template.php` in the plugin directory for guidance as to … … 140 159 The plugin has been built with the intention of being extensible. The internals 141 160 have documentation in comments, and if you want to know how to do something that 142 isn't obvious, create a new topic in the [plugin forum] (http://wordpress.org/tags/latex-everything?forum_id=10#postform)161 isn't obvious, create a new topic in the [plugin forum][forum] 143 162 and the author will try to get back to you. 163 164 [forum]: http://wordpress.org/tags/latex-everything?forum_id=10#postform 165 "The forum where questions can be asked about Latex Everything." 144 166 145 167 == Screenshots ==
Note: See TracChangeset
for help on using the changeset viewer.