Skip to content

Commit

Permalink
Basic manual/faq (webby) site
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruce Williams committed Apr 23, 2008
1 parent 6dd96a7 commit 743635b
Show file tree
Hide file tree
Showing 16 changed files with 2,490 additions and 2,014 deletions.
2 changes: 1 addition & 1 deletion README_RAILS.rdoc
Expand Up @@ -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+
Expand Down
6 changes: 4 additions & 2 deletions lib/rtex/version.rb
Expand Up @@ -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.
Expand Down Expand Up @@ -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
15 changes: 15 additions & 0 deletions 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@).
38 changes: 38 additions & 0 deletions 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!).

52 changes: 50 additions & 2 deletions site/content/css/site.css
Expand Up @@ -16,29 +16,77 @@ 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
* --------------------------------------------------------------------- */
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 {
Expand Down
50 changes: 50 additions & 0 deletions 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>
59 changes: 59 additions & 0 deletions 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!
Binary file added 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.
14 changes: 3 additions & 11 deletions 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.
19 changes: 19 additions & 0 deletions 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>
26 changes: 26 additions & 0 deletions 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.

0 comments on commit 743635b

Please sign in to comment.