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 (
commit 418116fa7bd14d96ff71ab1cbce1fe26fd54064f
tree 3e93bc9ed7fd03a3eba452f2f2bae51dc1de4ec4
parent 425dcb712cab6a417817fd91d232bda19d732407
tree 3e93bc9ed7fd03a3eba452f2f2bae51dc1de4ec4
parent 425dcb712cab6a417817fd91d232bda19d732407
rtex / README_RAILS.rdoc
RTex Rails plugin
Installation
sudo gem install rtex rtex --install /path/to/rails/app
Dependencies
- Rails >= 2.0.1
Usage
Create files with rtex or +pdf.rtex+ extensions (eg, +index.rtex+, +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.






