Plugin Directory

Changeset 698347


Ignore:
Timestamp:
04/16/2013 08:28:10 AM (13 years ago)
Author:
divinenephron
Message:

Changed the readme formatting and installation instructions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • latex-everything/trunk/readme.txt

    r582773 r698347  
    25251. This plugin requires `pdflatex` and `pdftk` installed. You can check for
    2626these by executing `which pdflatex` and `which pdftk` on your host.
    27 2. Upload latex fold to the /wp-content/plugins/ directory
     272. This plugin also requires you to know at least enough about Wordpress to
     28cut-and-paste code into your theme.
     292. Upload this plugin to the /wp-content/plugins/ directory.
    28303. 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: 
     31WordPress. Behind the scenes it will generate PDFs for your posts using a
     32default Latex template.
     334. Link to the PDF version of a post by putting the following into [The Loop][the-loop]: 
    3134        `<a href="<?php the_latex_url( 'single_post', get_the_ID() ) ?>">PDF Version</a>`
    32355. For more advanced usage (user-defined templates and generating Latex
    33 documents for other things) see the Frequently Asked Questions.
     36documents 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."
    3442
    3543== Frequently Asked Questions ==
     
    3846
    3947If 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.
     48create 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."
    4252
    4353= How do I typeset things besides posts? =
     
    8292The arguments you give depend on the type of PDF document you're requesting:
    8393
    84 For a `single_post` PDF: 
    85     `the_latex_url( 'single_post', (int) $post_id )`
     94For a `single_post` PDF:
     95
     96    the_latex_url( 'single_post', (int) $post_id )
    8697
    8798For a `post_type` PDF: 
    88     `the_latex_url( 'post_type', (string) $post_type )`
     99   
     100    the_latex_url( 'post_type', (string) $post_type )
    89101
    90102For a `term` PDF: 
    91     `the_latex_url( 'term', (int) $term_id, (string) $taxonomy)`
     103   
     104    the_latex_url( 'term', (int) $term_id, (string) $taxonomy)
    92105
    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; ?>` 
     106Here'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; ?>
    99113
    100114NB: These don't automatically figure out which post you're on while in The Loop,
     
    102116
    103117If 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 ?>` 
     118a 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 ?>
    109124
    110125= How do I use my own Latex Templates? =
     
    115130
    116131For 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` 
    122132
    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
    127138
    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
     140For a `post_type` PDF:
     141
     142    latex-post-type-<post type name>.pdf
     143    latex-post-type.pdf
     144    latex.pdf
     145
     146For 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
    134153
    135154Look at `default-latex-template.php` in the plugin directory for guidance as to
     
    140159The plugin has been built with the intention of being extensible. The internals
    141160have 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)
     161isn't obvious, create a new topic in the [plugin forum][forum]
    143162and 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."
    144166
    145167== Screenshots ==
Note: See TracChangeset for help on using the changeset viewer.