public
Description: Ruby LaTeX to PDF preprocessor (and Rails plugin)
Homepage: http://rtex.rubyforge.org
Clone URL: git://github.com/bruce/rtex.git
Search Repo:
Click here to lend your support to: rtex and make a donation at www.pledgie.com !
bruce (author)
Tue May 06 18:31:53 -0700 2008
commit  4c3a42bdcd10d2af8f4c19b8db22b6b0b08c9719
tree    9f9ab7614ca6ac85c9efda9ad857fe64578c21f3
parent  2cd1e38c9af08c525d80710fa165e451b0dd5411
rtex / site / content / manual / executable.txt
100644 61 lines (43 sloc) 1.632 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
title: Using the `rtex' Executable
extension: html
position: 2
filter:
  - erb
  - textile
---
 
RTeX includes an executable, @rtex@ that is automatically installed along with the Rubygem.
 
h2. Basic Usage
 
Basic help information is available using the @--help@ option:
 
  rtex --help
  USAGE: rtex [OPTIONS]
    -l, --layout LAYOUT Path to layout file (use <%= yield %>)
    -o, --output OUTFILE Output to file (defaults to STDOUT)
    -f, --filter FILTER Filter input (supported: textile)
                           (Wraps in a basic `article' document; use --layout to customize)
        --no-pdf Don't generate PDF (just output TeX)
    -i, --install PATH Install as plugin into Rails app at PATH
    -h, --help Show this message
    
h2. Quick Examples
 
h3. Generate a quick PDF from Textile content
 
   rtex -o output.pdf -f textile input.textile
   
You could also use it as a filter.
 
  cat input.textile | rtex -f textile > output.pdf
   
h3. Converting Textile content to PDF with a custom layout
 
In @pretty.tex.erb@ (you can name this whatever you'd like)
 
<% uv :lang => 'latex' do %>
  \documentstyle[11pt]{article}
  \begin{document}
  \title{My Pretty Stationary}
  \author{Jon Johnston\\
    Nameless, Inc.}
  \maketitle
  <quote-erb><%= yield %></quote-erb>
  \end{document}
<% end %>
 
Then, the command:
 
  rtex -o output.pdf -l pretty.tex.erb -t textile input.textile
  
Again, you can use it as a filter
 
  cat input.textile | rtex -f textile -l pretty.tex.erb > output.pdf
  
h3. Creating your own filters
 
More documentation needed, please "contribute":/contribute.