Skip to content
Browse files

Basic manual/faq (webby) site

  • Loading branch information...
1 parent 6dd96a7 commit 743635b21adcd72a5ab267785e24486cea6922e5 @bruce committed
View
2 README_RAILS.rdoc
@@ -11,7 +11,7 @@
== Usage
-Create files with +rtex+ or +pdf.rtex+ extensions (eg, +index.rtex+, +index.pdf.rtex+) using standard LaTeX markup.
+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+
View
6 lib/rtex/version.rb
@@ -34,7 +34,7 @@ class Version
def self.[](major, minor, tiny)
new(major, minor, tiny)
end
-
+
attr_reader :major, :minor, :tiny
# Create a new Version object with the given components.
@@ -66,12 +66,14 @@ def to_a
MAJOR = 1
MINOR = 99
TINY = 0
+
+ DESCRIPTION = '2.0 Preview 1'
# The current version as a Version instance
CURRENT = new(MAJOR, MINOR, TINY)
# The current version as a String
STRING = CURRENT.to_s
-
+
end
end
View
15 site/content/contact/index.txt
@@ -0,0 +1,15 @@
+---
+title: Contact Us
+extension: html
+filter:
+- textile
+---
+
+
+h2. Version 2.0 Branch
+
+This is the Rails 2 compatible branch, includes the standalone @rtex@ executable, and is maintained by "Bruce Williams":http://codefluency.com (github: "bruce":http://github.com/bruce, email: _bruce at codefluency dot com_).
+
+h2. Version 1.0 Branch (Rails 1 compatible)
+
+This is the Rails 1 compatible branch and is maintained by Wiebe Cazemier (@contact info pending@).
View
38 site/content/contribute/index.txt
@@ -0,0 +1,38 @@
+---
+title: Contribute to RTeX
+extension: html
+filter:
+ - erb
+ - textile
+---
+
+Like any open source project, RTeX depends on the participation of the community to keep it up to date, relevant, and as usable as possible.
+
+h2. Where?
+
+The "RTeX source":http://github.com/bruce/rtex is hosted on "GitHub":http://github.com. Please contribute using GitHub if possible.
+
+h2. How to submit changes
+
+Here's the different ways you can send us changes (in descending order of desirability):
+
+* Fork the project in GitHub and send a pull request
+* Clone the project somewhere else, and "ask us":/contact to pull your changes from your publically accessible URL
+* Send us a git patch
+* Send us a manual patch (please note originating commit) if you don't use git
+* Send us an email detailing your changes
+* Scribble vague changes on a napkin and send COD
+
+h2. Get them accepted
+
+To get your changes accepted as fast as possible, the following really help:
+
+* Including a good reason for the change
+* Including good tests (failing before, passing after)
+* Making the code as backwards-compatible as possible
+* Using _generally accepted_ Ruby code conventions (yes, we know this is subjective)
+* Including good documentation
+
+<a id='docs' name='docs'></a>
+Note we _do_ accept documentation-only changes (even to this website, stored in @site/@ in the source!).
+
View
52 site/content/css/site.css
@@ -16,12 +16,16 @@ color:
---
body {
+ margin: 0;
font-family: Verdana, "Bitstream Vera Sans", sans-serif;
}
/* Headings
* --------------------------------------------------------------------- */
-h1,h2,h3,h4,h5,h6 { color: <%= @page.color['header'] %>; }
+#header, h1,h2,h3,h4,h5,h6 {
+ font-family: "Georgia", "Times New Roman", serif;
+ color: <%= @page.color['header'] %>;
+}
/* Text Elements
* --------------------------------------------------------------------- */
@@ -29,16 +33,60 @@ a { color: <%= @page.color['link'] %>; }
a:hover { color: <%= @page.color['link-hover'] %>; }
blockquote { color: <%= @page.color['blockquote'] %>; }
+a img { border: 0; }
+dt { font-weight: normal; }
+#license {
+ font-family: "Georgia", "Times New Roman", serif;
+ background: none;
+ border: 0;
+}
+
+#legacy {
+ font-size: 0.9em;
+ background: #ffffcc;
+ padding: 0;
+ text-align: center;
+ border-bottom: 1px #FFF5CC solid;
+ margin-bottom: 1em;
+}
+
+#legacy p {
+ padding: 4px;
+ margin: 0;
+}
+
pre {
+ font-family: monospace;
background: <%= @page.color['box-bg'] %>;
- border: 1px solid <%= @page.color['border'] %>;
+ padding: 1em;
+ font-size: 1.1em;
}
+em { background: none; }
+
hr {
background: <%= @page.color['highlight'] %>;
color: <%= @page.color['highlight'] %>;
}
+#menu {
+ padding: 1em;
+ height: 100%;
+ font-size: 1.1em;
+ font-family: "Georgia", "Times New Roman", serif;
+}
+
+#release { height: 20px; padding: 0 0 0 1em; background: #e6e6e6; }
+#release * {
+ line-height: 20px;
+ vertical-align: middle;
+}
+#release dt {
+
+ float: left;
+ margin-right: 1em;
+}
+
/* Tables
* --------------------------------------------------------------------- */
table {
View
50 site/content/download/index.txt
@@ -0,0 +1,50 @@
+---
+title: Download
+extension: html
+filter:
+- erb
+- textile
+---
+
+The current stable version is *<%= stable_version %>*.
+
+The easiest (and recommended) way to install RTeX is by using "Rubygems":http://rubygems.org.
+
+ sudo gem install rtex
+
+For details on installation and use, see the "Manual":/manual.
+
+h2. Development
+
+Unstable code is available on the RTeX project's "GitHub page":http://github.com/bruce/rtex. If RTeX doesn't meet your needs or you find a bug, please "contribute":/contribute!
+
+h2. License
+
+Use it, change it, charge for it, give credit (more details below).
+
+<pre id='license'>
+(The MIT License)
+
+Copyright (c) 2006-2008 Bruce Williams, Wiebe Cazemier
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+</pre>
View
59 site/content/faq/index.txt
@@ -0,0 +1,59 @@
+---
+title: Frequently Asked Questions
+extension: html
+filter:
+ - erb
+ - textile
+---
+
+h2. What is RTeX?
+
+RTeX is a Ruby library (and web framework plugin) used to generate PDF documents on-the-fly using the "LaTeX typesetting system":http://www.latex-project.org/.
+
+h2. Is this a Rails plugin?
+
+Yes. No. Well, kinda.
+
+RTeX is a general-purpose Ruby library that _just happens_ to also act as Rails plugin. In the future it's intended to be used out-of-the-box with other frameworks as well. You can see the "Development Roadmap":/roadmap for some details on planned support.
+
+For details on how to install this _kinda_ Rails plugin into your app, see the "associated Manual page":/manual/install.html#rails.
+
+h2. Why _isn't_ this _just_ a Rails plugin?
+
+Because there's more to Ruby than Rails, and dependency resolution is a Good Thing. Rails 2.1 is set to support gem plugins by default, so installation should be even easier "in the future":/roadmap.
+
+h2. Why not use PDF::Writer, or _Some Other Library_
+
+PDF::Writer is a great library, and in many cases may be exactly what you need.
+
+Where RTeX really shines is when you have to do more advanced layout or typesetting that would be too tedious or error-prone to do manually in PDF::Writer.
+
+RTeX is simple Ruby wrapper on top of the very robust LaTeX project, which has been in development for over 20 years and is used for professional publishing the world-over. This is a complex wheel that has been long [and well] implemented; all RTeX does is allow you to use it more easily from Ruby and as a filter (in standalone-mode).
+
+h2(#latex). Isn't LaTeX hard to learn?
+
+Not really; just think of it as a markup language. While there are certainly some specialized areas (mathematical formulas, references, graphics layout, etc), the basic set of commands is easy to learn in a sitting.
+
+I'd recommend reading the _single-page_ "introduction by Mike Unwalla":http://www.techscribe.co.uk/ta/latex-introduction.pdf first, and then moving on to the "other guides":http://www.latex-project.org/guides/ that the LaTeX project provides. You'll pick it up!
+
+h2. What are RTeX's dependencies?
+
+Ruby 1.8, Rubygems, and a "LaTeX":http://www.latex-project.org/ distribution including the @pdflatex@ executable. Rails is obviously a dependency if attempting to use it as a plugin.
+
+h2. What if the documents I want to generate are too large to generate on-demand?
+
+Built-in support for this is being looked at as possibility for a "future release":/roadmap. In the meantime, the @rtex@ standalone executable can be happily used outside of Rails to process a backlog of documents... but at the moment you'll need to handle the queue processing yourself.
+
+Keep in mind LaTeX processes fairly lengthy documents well within the limits of a normal request (certainly faster than PDF::Writer). YMMV.
+
+h2. How do I request a feature or submit a bug?
+
+Feel free to "contact":/contact the maintainers.
+
+h2. I've fixed a bug or added an enhancement, how do I submit it?
+
+Please contribute through "normal channels":/contribute if possible.
+
+h2. What if I have a different question?
+
+See the "contact":/contact page and pass it along!
View
BIN site/content/images/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
14 site/content/index.txt
@@ -1,18 +1,10 @@
---
-title: Home Page
filter:
- erb
- textile
---
-p(title). <%= @page.title %>
+h2. Welcome
-Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc congue ipsum vestibulum libero. Aenean vitae justo. Nam eget tellus. Etiam convallis, est eu lobortis mattis, lectus tellus tempus felis, a ultricies erat ipsum at metus.
-
-h2. Litora Sociis
-
-Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi et risus. Aliquam nisl. Nulla facilisi. Cras accumsan vestibulum ante. Vestibulum sed tortor. Praesent tempus fringilla elit. Ut elit diam, sagittis in, nonummy in, gravida non, nunc. Ut orci. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Nam egestas, orci eu imperdiet malesuada, nisl purus fringilla odio, quis commodo est orci vitae justo. Aliquam placerat odio tincidunt nulla. Cras in libero. Aenean rutrum, magna non tristique posuere, erat odio eleifend nisl, non convallis est tortor blandit ligula. Nulla id augue.
-
-bq. Nullam mattis, odio ut tempus facilisis, metus nisl facilisis metus, auctor consectetuer felis ligula nec mauris. Vestibulum odio erat, fermentum at, commodo vitae, ultrices et, urna. Mauris vulputate, mi pulvinar sagittis condimentum, sem nulla aliquam velit, sed imperdiet mi purus eu magna. Nulla varius metus ut eros. Aenean aliquet magna eget orci. Class aptent taciti sociosqu ad litora.
-
-Vivamus euismod. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse vel nibh ut turpis dictum sagittis. Aliquam vel velit a elit auctor sollicitudin. Nam vel dui vel neque lacinia pretium. Quisque nunc erat, venenatis id, volutpat ut, scelerisque sed, diam. Mauris ante. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec mattis. Morbi dignissim sollicitudin libero. Nulla lorem.
+RTeX is a Ruby library (and web framework plugin) used to generate PDF documents on-the-fly using the "LaTeX typesetting system":http://www.latex-project.org/.
+RTeX is maintained by Bruce Williams (creator, maintaining the v2, Rails 2 compatible branch) and Wiebe Cazemier (maintaining the v1, Rails 1 compatible branch). See the "contact":/contact page to reach them.
View
19 site/content/manual/index.txt
@@ -0,0 +1,19 @@
+---
+title: RTeX Manual
+extension: html
+distry: true
+filter:
+ - erb
+ - textile
+---
+
+This is a _growing_ set of documentation; please bear with us as it is expanded!
+
+h2. Topics
+
+<ol>
+ <% @pages.find(:limit => :all, :in_directory => 'manual', :sort_by => :position) do |p| %>
+ <% next if p == @page %>
+ <li><a href='<%= p.url %>'><%= p.title %></a></li>
+ <% end %>
+</ol>
View
26 site/content/manual/install.txt
@@ -0,0 +1,26 @@
+---
+title: Installing RTeX
+extension: html
+position: 1
+filter:
+ - erb
+ - textile
+---
+
+h2(#gem). Installing the RTeX Rubygem
+
+The easiest (and recommended) way to install RTeX is by using "Rubygems":http://rubygems.org.
+
+ sudo gem install rtex
+
+The standalone executable, @rtex@, should not be available. For information on using the standalone executable, see the "RTeX Executable":/manual/rtex_executable page.
+
+h2(#rails). Installing the Rails plugin
+
+If you'd like to use RTeX as a Rails template handler, install it with:
+
+ rtex --install /path/to/your/app
+
+It's also possible to unpack the entire gem to @vendor/plugins/rtex@, but it's not recommended.
+
+For information on how to use RTeX from within your Rails application, see the "Rails page":/manual/rails.html.
View
90 site/content/manual/rails.txt
@@ -0,0 +1,90 @@
+---
+title: RTeX as a Rails plugin
+extension: html
+position: 2
+filter:
+ - erb
+ - textile
+---
+
+RTeX can be used as a "Template Handler," similar to "HAML":http://haml.hamptoncatlin.com/ or "Markaby":http://markaby.rubyforge.org/, but with PDFs being output.
+
+_Please note that much of this information is also available within @README_RAILS.rdoc@ inside the RTeX gem (and plugin, once installed into an app)._
+
+h2. Rails Version Dependency
+
+* >= 2.0.1
+
+h2. 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@
+
+For information on learning LaTeX, see the related "FAQ entry":/faq/#latex.
+
+h3. Example
+
+With the following:
+
+h4. app/controllers/items_controller.rb
+
+<pre>
+<notextile>
+ def index
+ @items = Item.find(:all)
+ end
+</notextile>
+</pre>
+
+h4. app/views/items/index.pdf.rtex
+
+<pre>
+<notextile>
+ \section*{Items}
+ \begin{itemize}
+ &lt;%= render :partial => @items %&gt;
+ \end{itemize}
+</notextile>
+</pre>
+
+h4. app/views/items/_item.pdf.rtex
+
+<pre>
+<notextile>
+ \item &lt;%=l item.name %&gt; \\
+</notextile>
+</pre>
+
+h4. app/layouts/application.pdf.rtex
+
+<pre>
+<notextile>
+ \documentclass[12pt]{article}
+ \begin{document}
+ &lt;%= yield %&gt;
+ \end{document}
+</notextile>
+</pre>
+
+If you hit @http://the.server.url/items.pdf@, you end up with a nice PDF listing of items.
+
+_Note: This documentation "needs":/contribute/#docs significantly more complex/complete examples_
+
+h3. Customizing Options
+
+Note you can set certain options for RTeX by passing additional options to @render@. Here is a short list:
+
+<dl>
+ <dt>@:filename@</dt><dd>The name of the PDF the user will be prompted to download (otherwise it uses a filename based on the URL)</dd>
+ <dt>@:preprocess@ and @:preprocessor@</dt><dd>Whether to run the raw source through a preprocessor, and the executable to use (for generating TOCs, etc). Defaults are @false@ and @'latex'@, respectively.</dd>
+ <dt>@:processor@</dt><dd>The executable used for final generation (default: @'pdflatex'@); note this must currently produce a PDF file.</dd>
+ <dt>@:shell_redirect@</dt><dd>Additional string to be tacked onto system calls, generally used to redirect STDERR to keep logs clean, ie @'> /dev/null 2>&1'@) (default @nil@)</dd>
+ <dt>@:tmpdir@</dt><dd>The temporary directory to use (default @RAILS_ROOT/tmp@)
+</dl>
+
+
+
+
+
View
15 site/content/roadmap/index.txt
@@ -0,0 +1,15 @@
+---
+title: Development Roadmap
+extension: html
+filter:
+ - erb
+ - textile
+---
+
+Here are some basic guidelines on the list of features and target releases.
+
+* Support for merb: 2.1
+* Support for sinatra: 2.1
+* Add queuing/offload support for asynchronous processing/notification: ?
+
+Have more ideas? "Contact":/contact us.
View
4,070 site/design/RTeX Logo.ai
2,088 additions, 1,982 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
39 site/layouts/default.rhtml
@@ -22,34 +22,41 @@ filter: erb
<link rel="stylesheet" href="/css/site.css" type="text/css" media="screen, projection" />
</head>
<body>
+
+<div id='legacy'>
+ <p><strong>RTeX has been updated for Rails 2.</strong> If you're looking for the v1 branch (Rails 1 compatible) RTeX documentation, <a href='/v1'>go here</a>.
+</div>
<div class="container">
<div class="column span-20 prepend-2 append-2 first last" id="header">
- <p class="title">A New Website</p>
- <hr>
+ <a href='/'><img src='/images/logo.png' alt='RTeX'/></a>
</div>
<div class="column span-15 prepend-2 first">
+ <dl id='release'>
+ <dt>Current Version:</dt>
+ <dd>
+ <a href='/download'><%= stable_version %></a>
+ </dd>
+ </dl>
+ <% if @page.title %>
+ <h1><%= @page.title %></h1>
+ <% end %>
<%= @content %>
</div>
- <div class="column span-5 append-2 last">
- <h4>Sidebar</h4>
- <p>Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Cras ornare mattis nunc. Mauris venenatis, pede sed aliquet vehicula, lectus tellus pulvinar neque, non cursus sem nisi vel augue. </p>
-
- <div class="box">
- <p class="last">Mauris a lectus. Aliquam erat volutpat. Phasellus ultrices mi a sapien. Nunc rutrum egestas lorem. Duis ac sem sagittis elit tincidunt gravida.</p>
- </div>
-
- <p class="quiet">Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Cras ornare mattis nunc. Mauris venenatis, pede sed aliquet vehicula, lectus tellus pulvinar neque, non cursus sem nisi vel augue.</p>
-
- <h5>Incremental leading</h5>
- <p class="incr">Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Cras ornare mattis nunc. Mauris venenatis, pede sed aliquet vehicula, lectus tellus pulvinar neque, non cursus sem nisi vel augue. sed aliquet vehicula, lectus tellus.</p>
- </div>
+ <ul id='menu' class="column span-5 append-2 last">
+ <li><a href='/faq'>FAQ</a></li>
+ <li><a href='/download'>Download</a></li>
+ <li><a href='/manual'>Manual</a></li>
+ <li><a href='/roadmap'>Development Roadmap</a></li>
+ <li><a href='/contribute'>Contribute!</a></li>
+ <li><a href='/contact'>Contact</a></li>
+ </ul>
<div class="column span-20 prepend-2 append-2 first last" id="footer">
- <hr />
+ <hr/>
<p>This website was created with <a href="http://webby.rubyforge.org">Webby</a></p>
</div>
View
9 site/lib/variables.rb
@@ -0,0 +1,9 @@
+require File.dirname(__FILE__) << "/../../lib/rtex/version"
+
+def stable_version
+ if defined?(RTeX::Version::DESCRIPTION)
+ RTeX::Version::STRING + " (#{RTeX::Version::DESCRIPTION})"
+ else
+ RTeX::Version::STRING
+ end
+end

0 comments on commit 743635b

Please sign in to comment.
Something went wrong with that request. Please try again.