<commit_before>= 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 <tt>config/environment.rb</tt>:
  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:

  # In config/initializers/mime_types.rb (or environment.rb in older Rails)
  Mime::Type.register "application/pdf", :pdf

  # app/controllers/items_controller.rb
  def index
    @items = Item.find(:all)
    respond_to do |format|
      format.html # We support the normal HTML view as well
      format.pdf
    end
  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 +http://the.server.url/items.pdf+, you end up with a nice PDF listing of items.

Obviously a simplistic example.
<commit_msg>Update docs.<commit_after>= RTeX for Rails

== Installation

  sudo gem install rtex
  
Rails 2.0.X, 2.1+ in vendor/plugins (not recommended):
  rtex --install /path/to/rails/app
  
Or, as a Rails 2.1+ gem dependency, just add the following
to your <tt>config/environment.rb</tt>:
  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:

  # In config/initializers/mime_types.rb (or environment.rb in older Rails)
  Mime::Type.register "application/pdf", :pdf

  # app/controllers/items_controller.rb
  def index
    @items = Item.find(:all)
    respond_to do |format|
      format.html # We support the normal HTML view as well
      format.pdf
    end
  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 @http://the.server.url/items.pdf@, you end up with a nice PDF listing of items.

Obviously a simplistic example.

{'fraction_non_alphanumeric': 0.13175675675675674, 'fraction_numerical': 0.008258258258258258, 'mean_word_length': 3.183673469387755, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1600517', 'n_tokens_mistral': 978, 'n_tokens_neox': 919, 'n_words': 253}