This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
rtex /
| name | age | message | |
|---|---|---|---|
| |
CHANGELOG | ||
| |
Manifest | Sun Aug 17 13:45:41 -0700 2008 | |
| |
README.rdoc | Tue May 06 19:41:25 -0700 2008 | |
| |
README_RAILS.rdoc | Sun Jun 08 11:19:36 -0700 2008 | |
| |
Rakefile | Sun Aug 17 13:45:41 -0700 2008 | |
| |
bin/ | Wed Apr 23 23:38:50 -0700 2008 | |
| |
init.rb | Wed Aug 27 09:20:51 -0700 2008 | |
| |
lib/ | ||
| |
rails/ | Sun Aug 17 13:18:36 -0700 2008 | |
| |
site/ | Sun Jun 08 11:19:36 -0700 2008 | |
| |
test/ | Sat Sep 20 09:31:22 -0700 2008 | |
| |
vendor/ | Wed Apr 23 23:38:50 -0700 2008 |
README_RAILS.rdoc
RTeX Rails plugin
Installation
sudo gem install rtex
Rails 2.0.X, 2.1 in vendor/plugins:
rtex --install /path/to/rails/app
Or, as a Rails 2.1 gem dependency, just add the following to your config/environment.rb:
config.gem 'rtex'
Dependencies
- Rails >= 2.0.1
Usage
Create files +pdf.rtex+ extensions (eg, +index.pdf.rtex+) using standard LaTeX markup.
- Layouts are supported, eg: +application.pdf.rtex+
- Partials are supported, eg: +_item.pdf.rtex+
Example
With the following:
# app/controllers/items_controller.rb
def index
@items = Item.find(:all)
end
# app/views/items/index.pdf.rtex
\section*{Items}
\begin{itemize}
<%= render :partial => @items %>
\end{itemize}
# app/views/items/_item.pdf.rtex
\item <%=l item.name %> \\
# app/layouts/application.pdf.rtex
\documentclass[12pt]{article}
\begin{document}
<%= yield %>
\end{document}
If you hit +the.server.url/items.pdf+, you end up with a nice PDF listing of items.
Obviously a simplistic example.









