RedCloth 4.2.3-x86-mswin32-60 → 4.2.4.pre2-x86-mswin32-60
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of RedCloth might be problematic. Click here for more details.
- data/.gitignore +25 -0
- data/.rspec +1 -0
- data/.rvmrc +1 -0
- data/CHANGELOG +6 -1
- data/Gemfile +2 -0
- data/Gemfile.lock +33 -0
- data/README +18 -9
- data/Rakefile +7 -254
- data/doc/textile_reference.html +631 -0
- data/lib/redcloth.rb +8 -7
- data/lib/redcloth/formatters/latex_entities.yml +8 -8
- data/lib/redcloth/version.rb +6 -5
- data/redcloth.gemspec +48 -0
- data/spec/benchmark_spec.rb +15 -0
- data/spec/fixtures/code.yml +6 -6
- data/spec/fixtures/table.yml +2 -2
- data/spec/fixtures/textism.yml +3 -3
- data/spec/fixtures/threshold.yml +3 -3
- data/spec/spec_helper.rb +26 -32
- data/tasks/compile.rake +47 -0
- data/tasks/gems.rake +38 -0
- data/tasks/ragel_extension_task.rb +127 -0
- data/tasks/release.rake +15 -0
- data/tasks/rspec.rake +11 -0
- data/tasks/rvm.rake +43 -0
- data/test/ragel_profiler.rb +73 -0
- data/test/validate_fixtures.rb +74 -0
- metadata +129 -47
- data/RedCloth.gemspec +0 -35
- data/ext/redcloth_scan/extconf.rb +0 -9
- data/lib/redcloth_scan.so +0 -0
- data/spec/differs/inline.rb +0 -48
- data/spec/spec.opts +0 -3
data/.gitignore
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
*.log
|
2
|
+
*.rbc
|
3
|
+
*.sw?
|
4
|
+
.bundle
|
5
|
+
.DS_Store
|
6
|
+
coverage
|
7
|
+
doc/rdoc/*
|
8
|
+
ext/redcloth_scan/*.bundle
|
9
|
+
ext/redcloth_scan/*.class
|
10
|
+
ext/redcloth_scan/*.jar
|
11
|
+
ext/redcloth_scan/*.java
|
12
|
+
ext/redcloth_scan/*.so
|
13
|
+
ext/redcloth_scan/*.[co]
|
14
|
+
ext/redcloth_scan/extconf.rb
|
15
|
+
ext/redcloth_scan/Makefile
|
16
|
+
ext/redcloth_scan/redcloth_*.rb
|
17
|
+
lib/*.bundle
|
18
|
+
lib/*.jar
|
19
|
+
lib/*.so
|
20
|
+
lib/**/*.so
|
21
|
+
lib/redcloth_scan.rb
|
22
|
+
pkg
|
23
|
+
rdoc
|
24
|
+
release
|
25
|
+
tmp
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm --create use default@redcloth
|
data/CHANGELOG
CHANGED
@@ -1,8 +1,13 @@
|
|
1
|
+
=== *edge*
|
2
|
+
|
3
|
+
* Switch to bundler and rake-compiler for gem management/compilation
|
4
|
+
* Fix invalid YAML for Ruby 1.9.2 [Aaron Patterson]
|
5
|
+
|
1
6
|
=== 4.2.3 / March 1, 2010
|
2
7
|
|
3
8
|
* Allow quotes in styles so you can do things like listing font-families. [Jason Garber]
|
4
9
|
* Fix uninitialized constant Gem::Specification::PLATFORM_CROSS_TARGETS in Rails [Jason Garber]
|
5
|
-
* Allow uppercase letters in class and ID attributes
|
10
|
+
* Allow uppercase letters in class and ID attributes [Jason Garber]
|
6
11
|
* Fix compatibility with newer Echoe, by using full-name for Platform [Flameeyes]
|
7
12
|
* Fixes for PPC/PPC64 [Flameeyes]
|
8
13
|
* Added a modified copy of 'Textile Reference' to a doc folder [codesponge]
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
RedCloth (4.2.4.pre2)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: http://rubygems.org/
|
8
|
+
specs:
|
9
|
+
diff-lcs (1.1.2)
|
10
|
+
rake (0.8.7)
|
11
|
+
rake-compiler (0.7.1)
|
12
|
+
rake (>= 0.8.3, < 0.9)
|
13
|
+
rspec (2.1.0)
|
14
|
+
rspec-core (~> 2.1.0)
|
15
|
+
rspec-expectations (~> 2.1.0)
|
16
|
+
rspec-mocks (~> 2.1.0)
|
17
|
+
rspec-core (2.1.0)
|
18
|
+
rspec-expectations (2.1.0)
|
19
|
+
diff-lcs (~> 1.1.2)
|
20
|
+
rspec-mocks (2.1.0)
|
21
|
+
rvm (1.1.0)
|
22
|
+
|
23
|
+
PLATFORMS
|
24
|
+
java
|
25
|
+
ruby
|
26
|
+
|
27
|
+
DEPENDENCIES
|
28
|
+
RedCloth!
|
29
|
+
diff-lcs
|
30
|
+
rake (~> 0.8.7)
|
31
|
+
rake-compiler (~> 0.7.1)
|
32
|
+
rspec (~> 2.1)
|
33
|
+
rvm
|
data/README
CHANGED
@@ -26,19 +26,28 @@ If you just want to use RedCloth, you do NOT need to build/compile it. It is
|
|
26
26
|
compiled from C sources automatically when you install the gem on the ruby
|
27
27
|
platform. Precompiled binary gems are provided for JRuby and Win32 platforms.
|
28
28
|
|
29
|
-
RedCloth can be compiled with <tt>rake compile</tt>. Ragel 6.3 or greater
|
30
|
-
|
31
|
-
|
29
|
+
RedCloth can be compiled with <tt>rake compile</tt>. Ragel 6.3 or greater is
|
30
|
+
needed to build, compile, and package RedCloth. Again, Ragel is NOT needed to
|
31
|
+
simply use RedCloth.
|
32
32
|
|
33
33
|
=== Supported platforms
|
34
34
|
|
35
35
|
By default, the rake compile task builds a native C Ruby extension that works
|
36
|
-
with Ruby 1.8 or 1.9
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
36
|
+
with Ruby 1.8 or 1.9 or a Java extension for JRuby 1.3. A pure Ruby version
|
37
|
+
can also be generated, but not easily because the parser it produces is slow
|
38
|
+
and incompatible with Ruby 1.9. The JRuby and pure-Ruby extensions don't
|
39
|
+
support multi-byte characters. The RedCloth::EXTENSION_LANGUAGE constant
|
40
|
+
indicates in which language your copy of RedCloth is compiled.
|
41
|
+
|
42
|
+
=== Compiling gems
|
43
|
+
|
44
|
+
To compile MRI, JRuby, and win32 gems, you need rvm and rake-compiler. These
|
45
|
+
and other dependencies can be installed with bundler. Then rake build:all
|
46
|
+
takes care of compiling and packaging all gems.
|
47
|
+
|
48
|
+
# gem install bundler
|
49
|
+
# bundle install
|
50
|
+
# rake build:all
|
42
51
|
|
43
52
|
== Bugs
|
44
53
|
|
data/Rakefile
CHANGED
@@ -1,257 +1,10 @@
|
|
1
|
-
|
1
|
+
# encoding: utf-8
|
2
2
|
require 'rubygems'
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
require 'bundler'
|
4
|
+
Bundler.setup
|
5
|
+
Bundler::GemHelper.install_tasks
|
6
|
+
ENV['RUBYOPT'] = nil # Necessary to prevent Bundler from *&^%$#ing up rake-compiler.
|
6
7
|
|
7
|
-
|
8
|
-
p.summary = RedCloth::DESCRIPTION
|
9
|
-
p.author = "Jason Garber"
|
10
|
-
p.email = 'redcloth-upwards@rubyforge.org'
|
11
|
-
p.clean_pattern += ['ext/redcloth_scan/**/*.{bundle,so,obj,pdb,lib,def,exp,c,o,xml,class,jar,java}', 'lib/*.{bundle,so,o,obj,pdb,lib,def,exp,jar}', 'ext/redcloth_scan/**/redcloth_*.rb', 'lib/redcloth_scan.rb', 'ext/redcloth_scan/Makefile']
|
12
|
-
p.url = "http://redcloth.org"
|
13
|
-
p.project = "redcloth"
|
14
|
-
p.rdoc_pattern = ['README', 'COPING', 'CHANGELOG', 'lib/**/*.rb', 'doc/**/*.rdoc']
|
15
|
-
p.ignore_pattern = /^(pkg|site|projects|doc|log)|CVS|\.log/
|
16
|
-
p.ruby_version = '>=1.8.4'
|
17
|
-
p.extension_pattern = nil
|
18
|
-
p.development_dependencies = [] # remove echoe from development dependencies
|
19
|
-
|
20
|
-
if Echoe::Platform.gcc?
|
21
|
-
p.platform = 'x86-mswin32-60'
|
22
|
-
elsif Echoe::Platform.java?
|
23
|
-
p.platform = 'universal-java'
|
24
|
-
elsif RUBY_PLATFORM == 'pureruby'
|
25
|
-
p.platform = 'ruby'
|
26
|
-
end
|
27
|
-
|
28
|
-
if RUBY_PLATFORM =~ /mingw|mswin|java/
|
29
|
-
p.need_tar_gz = false
|
30
|
-
elsif RUBY_PLATFORM == 'pureruby'
|
31
|
-
p.need_gem = false
|
32
|
-
else
|
33
|
-
p.need_zip = true
|
34
|
-
p.need_tar_gz = true
|
35
|
-
p.extension_pattern = ["ext/**/extconf.rb"]
|
36
|
-
end
|
8
|
+
require 'rake/clean'
|
37
9
|
|
38
|
-
|
39
|
-
case RUBY_PLATFORM
|
40
|
-
when /mingw/
|
41
|
-
self.files += ['lib/redcloth_scan.so']
|
42
|
-
when /java/
|
43
|
-
self.files += ['lib/redcloth_scan.jar']
|
44
|
-
when 'pureruby'
|
45
|
-
self.files += ['lib/redcloth_scan.rb']
|
46
|
-
else
|
47
|
-
self.files += %w[attributes inline scan].map {|f| "ext/redcloth_scan/redcloth_#{f}.c"}
|
48
|
-
end
|
49
|
-
|
50
|
-
self.require_paths << "lib/case_sensitive_require"
|
51
|
-
end
|
52
|
-
|
53
|
-
end
|
54
|
-
|
55
|
-
def move_extensions
|
56
|
-
Dir["ext/**/*.{bundle,so,jar}"].each { |file| mv file, "lib/" }
|
57
|
-
end
|
58
|
-
|
59
|
-
def java_classpath_arg # myriad of ways to discover JRuby classpath
|
60
|
-
begin
|
61
|
-
cpath = Java::java.lang.System.getProperty('java.class.path').split(File::PATH_SEPARATOR)
|
62
|
-
cpath += Java::java.lang.System.getProperty('sun.boot.class.path').split(File::PATH_SEPARATOR)
|
63
|
-
jruby_cpath = cpath.compact.join(File::PATH_SEPARATOR)
|
64
|
-
rescue => e
|
65
|
-
end
|
66
|
-
unless jruby_cpath
|
67
|
-
jruby_cpath = ENV['JRUBY_PARENT_CLASSPATH'] || ENV['JRUBY_HOME'] &&
|
68
|
-
FileList["#{ENV['JRUBY_HOME']}/lib/*.jar"].join(File::PATH_SEPARATOR)
|
69
|
-
end
|
70
|
-
jruby_cpath ? "-cp \"#{jruby_cpath}\"" : ""
|
71
|
-
end
|
72
|
-
|
73
|
-
ext = "ext/redcloth_scan"
|
74
|
-
|
75
|
-
case RUBY_PLATFORM
|
76
|
-
when /mingw/
|
77
|
-
|
78
|
-
filename = "lib/redcloth_scan.so"
|
79
|
-
file filename => FileList["#{ext}/redcloth_scan.c", "#{ext}/redcloth_inline.c", "#{ext}/redcloth_attributes.c"] do
|
80
|
-
cp "ext/mingw-rbconfig.rb", "#{ext}/rbconfig.rb"
|
81
|
-
Dir.chdir("ext/redcloth_scan") do
|
82
|
-
ruby "-I. extconf.rb"
|
83
|
-
system(PLATFORM =~ /mswin/ ? 'nmake' : 'make')
|
84
|
-
end
|
85
|
-
move_extensions
|
86
|
-
rm "#{ext}/rbconfig.rb"
|
87
|
-
end
|
88
|
-
|
89
|
-
when /java/
|
90
|
-
|
91
|
-
filename = "lib/redcloth_scan.jar"
|
92
|
-
file filename => FileList["#{ext}/RedclothScanService.java", "#{ext}/RedclothInline.java", "#{ext}/RedclothAttributes.java"] do
|
93
|
-
sources = FileList["#{ext}/**/*.java"].join(' ')
|
94
|
-
sh "javac -target 1.5 -source 1.5 -d #{ext} #{java_classpath_arg} #{sources}"
|
95
|
-
sh "jar cf lib/redcloth_scan.jar -C #{ext} ."
|
96
|
-
move_extensions
|
97
|
-
end
|
98
|
-
|
99
|
-
when /pureruby/
|
100
|
-
filename = "lib/redcloth_scan.rb"
|
101
|
-
file filename => FileList["#{ext}/redcloth_scan.rb", "#{ext}/redcloth_inline.rb", "#{ext}/redcloth_attributes.rb"] do |task|
|
102
|
-
|
103
|
-
sources = task.prerequisites.join(' ')
|
104
|
-
sh "cat #{sources} > #{filename}"
|
105
|
-
end
|
106
|
-
|
107
|
-
else
|
108
|
-
filename = "#{ext}/redcloth_scan.#{Config::CONFIG['DLEXT']}"
|
109
|
-
file filename => FileList["#{ext}/redcloth_scan.c", "#{ext}/redcloth_inline.c", "#{ext}/redcloth_attributes.c"]
|
110
|
-
end
|
111
|
-
|
112
|
-
task :compile => [:remove_other_platforms, filename]
|
113
|
-
|
114
|
-
def ragel(target_file, source_file)
|
115
|
-
host_language = case target_file
|
116
|
-
when /java$/
|
117
|
-
"J"
|
118
|
-
when /rb$/
|
119
|
-
"R"
|
120
|
-
else
|
121
|
-
"C"
|
122
|
-
end
|
123
|
-
preferred_code_style = case host_language
|
124
|
-
when "R"
|
125
|
-
"F1"
|
126
|
-
when "C"
|
127
|
-
"T0"
|
128
|
-
else
|
129
|
-
nil
|
130
|
-
end
|
131
|
-
code_style = preferred_code_style ? " -" + (@code_style || preferred_code_style) : ""
|
132
|
-
ensure_ragel_version(target_file) do
|
133
|
-
sh %{ragel #{source_file} -#{host_language}#{code_style} -o #{target_file}}
|
134
|
-
end
|
135
|
-
end
|
136
|
-
|
137
|
-
# Make sure the .c files exist if you try the Makefile, otherwise Ragel will have to generate them.
|
138
|
-
file "#{ext}/Makefile" => ["#{ext}/extconf.rb", "#{ext}/redcloth_scan.c","#{ext}/redcloth_inline.c","#{ext}/redcloth_attributes.c","#{ext}/redcloth_scan.o","#{ext}/redcloth_inline.o","#{ext}/redcloth_attributes.o"]
|
139
|
-
|
140
|
-
# Ragel-generated C files
|
141
|
-
file "#{ext}/redcloth_scan.c" => ["#{ext}/redcloth_scan.c.rl", "#{ext}/redcloth_scan.rl", "#{ext}/redcloth_common.c.rl", "#{ext}/redcloth_common.rl", "#{ext}/redcloth.h"] do
|
142
|
-
ragel "#{ext}/redcloth_scan.c", "#{ext}/redcloth_scan.c.rl"
|
143
|
-
end
|
144
|
-
file "#{ext}/redcloth_inline.c" => ["#{ext}/redcloth_inline.c.rl", "#{ext}/redcloth_inline.rl", "#{ext}/redcloth_common.c.rl", "#{ext}/redcloth_common.rl", "#{ext}/redcloth.h"] do
|
145
|
-
ragel "#{ext}/redcloth_inline.c", "#{ext}/redcloth_inline.c.rl"
|
146
|
-
end
|
147
|
-
file "#{ext}/redcloth_attributes.c" => ["#{ext}/redcloth_attributes.c.rl", "#{ext}/redcloth_attributes.rl", "#{ext}/redcloth_common.c.rl", "#{ext}/redcloth_common.rl", "#{ext}/redcloth.h"] do
|
148
|
-
ragel "#{ext}/redcloth_attributes.c", "#{ext}/redcloth_attributes.c.rl"
|
149
|
-
end
|
150
|
-
|
151
|
-
# Ragel-generated Java files
|
152
|
-
file "#{ext}/RedclothScanService.java" => ["#{ext}/redcloth_scan.java.rl", "#{ext}/redcloth_scan.rl", "#{ext}/redcloth_common.java.rl", "#{ext}/redcloth_common.rl"] do
|
153
|
-
ragel "#{ext}/RedclothScanService.java", "#{ext}/redcloth_scan.java.rl"
|
154
|
-
end
|
155
|
-
file "#{ext}/RedclothInline.java" => ["#{ext}/redcloth_inline.java.rl", "#{ext}/redcloth_inline.rl", "#{ext}/redcloth_common.java.rl", "#{ext}/redcloth_common.rl", "#{ext}/redcloth_scan.java.rl"] do
|
156
|
-
ragel "#{ext}/RedclothInline.java", "#{ext}/redcloth_inline.java.rl"
|
157
|
-
end
|
158
|
-
file "#{ext}/RedclothAttributes.java" => ["#{ext}/redcloth_attributes.java.rl", "#{ext}/redcloth_attributes.rl", "#{ext}/redcloth_common.java.rl", "#{ext}/redcloth_common.rl", "#{ext}/redcloth_scan.java.rl"] do
|
159
|
-
ragel "#{ext}/RedclothAttributes.java", "#{ext}/redcloth_attributes.java.rl"
|
160
|
-
end
|
161
|
-
|
162
|
-
# Ragel-generated pureruby files
|
163
|
-
file "#{ext}/redcloth_scan.rb" => ["#{ext}/redcloth_scan.rb.rl", "#{ext}/redcloth_scan.rl", "#{ext}/redcloth_common.rb.rl", "#{ext}/redcloth_common.rl"] do
|
164
|
-
ragel "#{ext}/redcloth_scan.rb", "#{ext}/redcloth_scan.rb.rl"
|
165
|
-
end
|
166
|
-
file "#{ext}/redcloth_inline.rb" => ["#{ext}/redcloth_inline.rb.rl", "#{ext}/redcloth_inline.rl", "#{ext}/redcloth_common.rb.rl", "#{ext}/redcloth_common.rl"] do
|
167
|
-
ragel "#{ext}/redcloth_inline.rb", "#{ext}/redcloth_inline.rb.rl"
|
168
|
-
end
|
169
|
-
file "#{ext}/redcloth_attributes.rb" => ["#{ext}/redcloth_attributes.rb.rl", "#{ext}/redcloth_attributes.rl", "#{ext}/redcloth_common.rb.rl", "#{ext}/redcloth_common.rl"] do
|
170
|
-
ragel "#{ext}/redcloth_attributes.rb", "#{ext}/redcloth_attributes.rb.rl"
|
171
|
-
end
|
172
|
-
|
173
|
-
|
174
|
-
#### Optimization
|
175
|
-
|
176
|
-
# C/Ruby code styles
|
177
|
-
RAGEL_CODE_GENERATION_STYLES = {
|
178
|
-
'T0' => "Table driven FSM (default)",
|
179
|
-
'T1' => "Faster table driven FSM",
|
180
|
-
'F0' => "Flat table driven FSM",
|
181
|
-
'F1' => "Faster flat table-driven FSM"
|
182
|
-
}
|
183
|
-
# C only code styles
|
184
|
-
RAGEL_CODE_GENERATION_STYLES.merge!({
|
185
|
-
'G0' => "Goto-driven FSM",
|
186
|
-
'G1' => "Faster goto-driven FSM",
|
187
|
-
'G2' => "Really fast goto-driven FSM"
|
188
|
-
}) if RUBY_PLATFORM !~ /pureruby/
|
189
|
-
|
190
|
-
desc "Find the fastest code generation style for Ragel"
|
191
|
-
task :optimize do
|
192
|
-
require 'test/ragel_profiler'
|
193
|
-
results = []
|
194
|
-
|
195
|
-
RAGEL_CODE_GENERATION_STYLES.each do |style, name|
|
196
|
-
@code_style = style
|
197
|
-
profiler = RagelProfiler.new(style + " " + name)
|
198
|
-
|
199
|
-
# Hack to get everything to invoke again. Could use #execute, but then it
|
200
|
-
# doesn't execute prerequisites the second+ time
|
201
|
-
Rake::Task.tasks.each {|t| t.instance_eval "@already_invoked = false" }
|
202
|
-
|
203
|
-
Rake::Task['clobber'].invoke
|
204
|
-
|
205
|
-
profiler.measure(:compile) do
|
206
|
-
Rake::Task['compile'].invoke
|
207
|
-
end
|
208
|
-
profiler.measure(:test) do
|
209
|
-
Rake::Task['test'].invoke
|
210
|
-
end
|
211
|
-
profiler.ext_size(filename)
|
212
|
-
|
213
|
-
end
|
214
|
-
puts RagelProfiler.results
|
215
|
-
end
|
216
|
-
|
217
|
-
|
218
|
-
#### Custom testing tasks
|
219
|
-
|
220
|
-
require 'rubygems'
|
221
|
-
require 'spec/rake/spectask'
|
222
|
-
Rake::Task[:default].prerequisites.clear
|
223
|
-
Spec::Rake::SpecTask.new do |t|
|
224
|
-
t.spec_opts = ["--options #{File.dirname(__FILE__) + '/spec/spec.opts'}"]
|
225
|
-
t.spec_files = FileList['spec/**/*_spec.rb']
|
226
|
-
end
|
227
|
-
|
228
|
-
task :default => :spec
|
229
|
-
task :spec => [:ensure_diff_lcs, :compile]
|
230
|
-
|
231
|
-
task :ensure_diff_lcs do
|
232
|
-
# A little insurance against rake on JRuby not passing the error from load-diff-lcs.rb
|
233
|
-
begin
|
234
|
-
require 'diff/lcs'
|
235
|
-
rescue LoadError
|
236
|
-
begin
|
237
|
-
require 'rubygems' unless ENV['NO_RUBYGEMS']
|
238
|
-
require 'diff/lcs'
|
239
|
-
rescue LoadError
|
240
|
-
raise "You must gem install diff-lcs to run the specs."
|
241
|
-
end
|
242
|
-
end
|
243
|
-
end
|
244
|
-
|
245
|
-
task :remove_other_platforms do
|
246
|
-
Dir["lib/redcloth_scan.{bundle,so,jar,rb}"].each { |file| rm file }
|
247
|
-
end
|
248
|
-
|
249
|
-
def ensure_ragel_version(name)
|
250
|
-
@ragel_v ||= `ragel -v`[/(version )(\S*)/,2].split('.').map{|s| s.to_i}
|
251
|
-
if @ragel_v[0] > 6 || (@ragel_v[0] == 6 && @ragel_v[1] >= 3)
|
252
|
-
yield
|
253
|
-
else
|
254
|
-
STDERR.puts "Ragel 6.3 or greater is required to generate #{name}."
|
255
|
-
exit(1)
|
256
|
-
end
|
257
|
-
end
|
10
|
+
Dir['tasks/**/*.rake'].each { |rake| load File.expand_path(rake) }
|
@@ -0,0 +1,631 @@
|
|
1
|
+
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
5
|
+
<head>
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
|
+
<title>Textile Reference</title>
|
8
|
+
<style type="text/css">
|
9
|
+
BODY {
|
10
|
+
margin: 10px 30px;
|
11
|
+
}
|
12
|
+
TABLE {
|
13
|
+
font-family: georgia, serif;
|
14
|
+
font-size: 11pt;
|
15
|
+
padding: 15px;
|
16
|
+
}
|
17
|
+
TH {
|
18
|
+
border-bottom: solid 1px black;
|
19
|
+
font-size: 24pt;
|
20
|
+
font-weight: bold;
|
21
|
+
padding-top: 30px;
|
22
|
+
}
|
23
|
+
H1 {
|
24
|
+
font-size: 42pt;
|
25
|
+
}
|
26
|
+
H4 {
|
27
|
+
color: #666;
|
28
|
+
background-color: #fee;
|
29
|
+
border: solid 1px #caa;
|
30
|
+
margin: 10px 0px 5px 0px;
|
31
|
+
padding: 5px;
|
32
|
+
}
|
33
|
+
P {
|
34
|
+
margin: 10px 15px 5px 15px;
|
35
|
+
}
|
36
|
+
TD.sections {
|
37
|
+
background: black;
|
38
|
+
color: white;
|
39
|
+
font-family: georgia, serif;
|
40
|
+
font-weight: bold;
|
41
|
+
font-size: 9pt;
|
42
|
+
padding: 5px;
|
43
|
+
}
|
44
|
+
TD.sections A { color: #CCEEFF; }
|
45
|
+
TD.sections A:link { color: #CCEEFF; }
|
46
|
+
TD.sections A:visited { color: #CCEEFF; }
|
47
|
+
TD.sections A:active { color: #EEEEEE; }
|
48
|
+
TD.sections A:hover { color: #EEEEEE; }
|
49
|
+
|
50
|
+
TD.example1 PRE {
|
51
|
+
background-color: #B30;
|
52
|
+
color: white;
|
53
|
+
font-family: georgia, serif;
|
54
|
+
font-weight: bold;
|
55
|
+
font-size: 9pt;
|
56
|
+
padding: 5px;
|
57
|
+
}
|
58
|
+
TD.example2 P {
|
59
|
+
border: solid 1px #DDD;
|
60
|
+
background-color: #EEE;
|
61
|
+
font-family: georgia, serif;
|
62
|
+
font-size: 9pt;
|
63
|
+
padding: 5px;
|
64
|
+
}
|
65
|
+
TD.example3 {
|
66
|
+
border: solid 1px #EED;
|
67
|
+
background-color: #FFE;
|
68
|
+
padding: 5px;
|
69
|
+
}
|
70
|
+
.big {
|
71
|
+
font-size: 15pt;
|
72
|
+
}
|
73
|
+
#big-red {
|
74
|
+
font-size: 15pt;
|
75
|
+
color: red
|
76
|
+
}
|
77
|
+
</style>
|
78
|
+
<script type="text/javascript">
|
79
|
+
function quickRedReference() {
|
80
|
+
window.open(
|
81
|
+
"quick.html",
|
82
|
+
"redRef",
|
83
|
+
"height=600,width=550,channelmode=0,dependent=0," +
|
84
|
+
"directories=0,fullscreen=0,location=0,menubar=0," +
|
85
|
+
"resizable=0,scrollbars=1,status=1,toolbar=0"
|
86
|
+
);
|
87
|
+
}
|
88
|
+
</script>
|
89
|
+
</head>
|
90
|
+
<body>
|
91
|
+
<table>
|
92
|
+
<tr><th colspan='3'><h1>A Textile Reference</h1></th></tr>
|
93
|
+
<tr><td class='sections' colspan='3'>Sections: <a href='#writing-in-textile'>Writing in Textile</a> | <a href='#quick-block-modifiers'>Quick Block Modifiers</a> | <a href='#quick-phrase-modifiers'>Quick Phrase Modifiers</a> | <a href='#attributes'>Attributes</a> | <a href='#lists'>Lists</a> | <a href='#external-references'>External References</a> | <a href='#tables'>Tables</a></td></tr>
|
94
|
+
<tr><td class='explain' colspan='3'>
|
95
|
+
<p>Textile is a simple text markup. Simple symbols mark words’ emphasis. Blocks of text can be easily tagged as headers, quotes, or lists. A Textile document can then be converted to <acronym title="Hypertext Markup Language">HTML</acronym> for viewing on the web.</p>
|
96
|
+
</td></tr>
|
97
|
+
<tr><td class='explain' colspan='3'>
|
98
|
+
<p>You can try Textile out on the <a href="http://www.textism.com/tools/textile/">Textile home page</a>.
|
99
|
+
Textile is also available as <a href="http://github.com/codesponge/redcloth/">RedCloth</a> for Ruby or <a href="http://dealmeida.net/projects/textile">PyTextile</a> for Python.</p>
|
100
|
+
</td></tr>
|
101
|
+
<tr><td class='explain' colspan='3'>
|
102
|
+
<p>Also refer to the <a href="javascript:quickRedReference();"><strong>Quick Reference</strong></a> for this guide.</p>
|
103
|
+
<p>Note: This file was originally authored by _why, this version has been modified by codesponge(billychamp) to fix broken links. The examples that use github.com used to point to hobix.com
|
104
|
+
The broken links in the image examples have not (yet) been replaced.
|
105
|
+
</p>
|
106
|
+
|
107
|
+
</td></tr>
|
108
|
+
<tr><td class='explain' colspan='3'>
|
109
|
+
<h4>Reading the Examples</h4>
|
110
|
+
</td></tr>
|
111
|
+
<tr><td class='explain' colspan='3'>
|
112
|
+
<p>In each section below, examples are provided to clearly illustrate. In each example, the Textile example is followed by the raw <span class="caps">HTML</span> it is translated into, followed by how the <span class="caps">HTML</span> appears in the browser.</p>
|
113
|
+
</td></tr>
|
114
|
+
<tr><td class='example1' valign='top'><pre>Textile example</pre></td><td>→</td><td class='example2'><p>Converted to HTML</p></td></tr><tr><td colspan='2'></td><td class='example3'>Browser-view</td></tr>
|
115
|
+
<tr><th colspan='3'><a name='writing-in-textile'><small>1.</small></a><br />Writing in Textile</th></tr>
|
116
|
+
<tr><td class='explain' colspan='3'>
|
117
|
+
<p>Textile looks for paragraphs in your text. Paragraphs are separated by one blank line. Every paragraph is translated as an <span class="caps">HTML</span> paragraph.</p>
|
118
|
+
</td></tr>
|
119
|
+
<tr><td class='example1' valign='top'><pre>A single paragraph.<br /><br />Followed by another.</pre></td><td>→</td><td class='example2'><p><p>A single paragraph.</p><br /><br /> <p>Followed by another.</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>A single paragraph.</p>
|
120
|
+
|
121
|
+
<p>Followed by another.</p></td></tr>
|
122
|
+
<tr><td class='explain' colspan='3'>
|
123
|
+
<h4>Using <span class="caps">HTML</span> in Textile</h4>
|
124
|
+
</td></tr>
|
125
|
+
<tr><td class='explain' colspan='3'>
|
126
|
+
<p>You can certainly use <span class="caps">HTML</span> tags inside your Textile documents. <span class="caps">HTML</span> will only be escaped if it’s found in a <code>pre</code> or <code>code</code> block.</p>
|
127
|
+
</td></tr>
|
128
|
+
<tr><td class='example1' valign='top'><pre>I am <b>very</b> serious.<br /><br /><pre><br /> I am <b>very</b> serious.<br /></pre></pre></td><td>→</td><td class='example2'><p><p>I am <b>very</b> serious.</p><br /><br /><br /><pre><br /> I am &lt; b&gt; very&lt;/b&gt; serious.<br /></pre></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>I am <b>very</b> serious.</p>
|
129
|
+
|
130
|
+
|
131
|
+
<pre>
|
132
|
+
I am <b>very</b> serious.
|
133
|
+
</pre></td></tr>
|
134
|
+
<tr><td class='explain' colspan='3'>
|
135
|
+
<h4>Line Breaks</h4>
|
136
|
+
</td></tr>
|
137
|
+
<tr><td class='explain' colspan='3'>
|
138
|
+
<p>Line breaks are converted to <span class="caps">HTML</span> breaks.</p>
|
139
|
+
</td></tr>
|
140
|
+
<tr><td class='example1' valign='top'><pre>I spoke.<br />And none replied.</pre></td><td>→</td><td class='example2'><p><p>I spoke.<br />And none replied.</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>I spoke.
|
141
|
+
And none replied.</p></td></tr>
|
142
|
+
<tr><td class='explain' colspan='3'>
|
143
|
+
<p>Line breaks can be disabled in RedCloth by turning on <code>fold_lines</code>.</p>
|
144
|
+
</td></tr>
|
145
|
+
<tr><td class='explain' colspan='3'>
|
146
|
+
<h4>Entities</h4>
|
147
|
+
</td></tr>
|
148
|
+
<tr><td class='explain' colspan='3'>
|
149
|
+
<p>Single- and double-quotes around words or phrases are converted to curly quotations, much easier on the eye.</p>
|
150
|
+
</td></tr>
|
151
|
+
<tr><td class='example1' valign='top'><pre>"Observe!"</pre></td><td>→</td><td class='example2'><p><p>&#8220; Observe!&#8221;</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>“Observe!”</p></td></tr>
|
152
|
+
<tr><td class='explain' colspan='3'>
|
153
|
+
<p>Double hyphens are replaced with an em-dash.</p>
|
154
|
+
</td></tr>
|
155
|
+
<tr><td class='example1' valign='top'><pre>Observe -- very nice!</pre></td><td>→</td><td class='example2'><p><p>Observe&#8212; very nice!</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>Observe—very nice!</p></td></tr>
|
156
|
+
<tr><td class='explain' colspan='3'>
|
157
|
+
<p>Single hyphens are replaced with en-dashes.</p>
|
158
|
+
</td></tr>
|
159
|
+
<tr><td class='example1' valign='top'><pre>Observe - tiny and brief.</pre></td><td>→</td><td class='example2'><p><p>Observe &#8211; tiny and brief.</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>Observe – tiny and brief.</p></td></tr>
|
160
|
+
<tr><td class='explain' colspan='3'>
|
161
|
+
<p>Triplets of periods become an ellipsis.</p>
|
162
|
+
</td></tr>
|
163
|
+
<tr><td class='example1' valign='top'><pre>Observe...</pre></td><td>→</td><td class='example2'><p><p>Observe&#8230;</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>Observe…</p></td></tr>
|
164
|
+
<tr><td class='explain' colspan='3'>
|
165
|
+
<p>The letter ‘x’ becomes a dimension sign when used alone.</p>
|
166
|
+
</td></tr>
|
167
|
+
<tr><td class='example1' valign='top'><pre>Observe: 2 x 2.</pre></td><td>→</td><td class='example2'><p><p>Observe: 2&#215; 2.</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>Observe: 2×2.</p></td></tr>
|
168
|
+
<tr><td class='explain' colspan='3'>
|
169
|
+
<p>Conversion of trademark and copyright symbols.</p>
|
170
|
+
</td></tr>
|
171
|
+
<tr><td class='example1' valign='top'><pre>one(TM), two(R), three(C).</pre></td><td>→</td><td class='example2'><p><p>one&#8482;, two&#174;, three&#169;.</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>one™, two®, three©.</p></td></tr>
|
172
|
+
<tr><td colspan='5' style='border-bottom: solid 1px #eee;'></td></tr>
|
173
|
+
<tr><th colspan='3'><a name='quick-block-modifiers'><small>2.</small></a><br />Quick Block Modifiers</th></tr>
|
174
|
+
<tr><td class='explain' colspan='3'>
|
175
|
+
<p>Blocks of text default to being treated as paragraphs. But modifers can be affixed to the beginning of a block to change its treatment.</p>
|
176
|
+
</td></tr>
|
177
|
+
<tr><td class='explain' colspan='3'>
|
178
|
+
<h4>Headers</h4>
|
179
|
+
</td></tr>
|
180
|
+
<tr><td class='explain' colspan='3'>
|
181
|
+
<p>To make an entire paragraph into a Header, place “h<em>n</em>.” at its beginning, where <em>n</em> is a number from 1-6.</p>
|
182
|
+
</td></tr>
|
183
|
+
<tr><td class='example1' valign='top'><pre>h1. Header 1</pre></td><td>→</td><td class='example2'><p><h1>Header 1</h1></p></td></tr><tr><td colspan='2'></td><td class='example3'><h1>Header 1</h1></td></tr>
|
184
|
+
<tr><td class='example1' valign='top'><pre>h2. Header 2</pre></td><td>→</td><td class='example2'><p><h2>Header 2</h2></p></td></tr><tr><td colspan='2'></td><td class='example3'><h2>Header 2</h2></td></tr>
|
185
|
+
<tr><td class='example1' valign='top'><pre>h3. Header 3</pre></td><td>→</td><td class='example2'><p><h3>Header 3</h3></p></td></tr><tr><td colspan='2'></td><td class='example3'><h3>Header 3</h3></td></tr>
|
186
|
+
<tr><td class='explain' colspan='3'>
|
187
|
+
<h4>Block Quotes</h4>
|
188
|
+
</td></tr>
|
189
|
+
<tr><td class='explain' colspan='3'>
|
190
|
+
<p>To make an entire paragraph into a block quotation, place “bq.” before it.</p>
|
191
|
+
</td></tr>
|
192
|
+
<tr><td class='example1' valign='top'><pre>An old text<br /><br />bq. A block quotation.<br /><br />Any old text</pre></td><td>→</td><td class='example2'><p><p>An old text</p><br /><br /> <blockquote><br /> <p>A block quotation.</p><br /> </blockquote><br /><br /> <p>Any old text</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>An old text</p>
|
193
|
+
|
194
|
+
<blockquote>
|
195
|
+
<p>A block quotation.</p>
|
196
|
+
</blockquote>
|
197
|
+
|
198
|
+
<p>Any old text</p></td></tr>
|
199
|
+
<tr><td class='explain' colspan='3'>
|
200
|
+
<h4>Footnotes</h4>
|
201
|
+
</td></tr>
|
202
|
+
<tr><td class='explain' colspan='3'>
|
203
|
+
<p>Numeric references within text to footnotes appear between square brackets.</p>
|
204
|
+
</td></tr>
|
205
|
+
<tr><td class='example1' valign='top'><pre>This is covered elsewhere[1].</pre></td><td>→</td><td class='example2'><p><p>This is covered elsewhere<sup><a href="#fn1">1</a></sup>.</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>This is covered elsewhere<sup><a href="#fn1">1</a></sup>.</p></td></tr>
|
206
|
+
<tr><td class='explain' colspan='3'>
|
207
|
+
<p>To create the footnote that corresponds to its reference within the text, begin a new paragraph with fn and the footnote’s number, followed by a dot and a space.</p>
|
208
|
+
</td></tr>
|
209
|
+
<tr><td class='example1' valign='top'><pre>fn1. Down here, in fact.</pre></td><td>→</td><td class='example2'><p><p id="fn1"><sup>1</sup> Down here, in fact.</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p id="fn1"><sup>1</sup> Down here, in fact.</p></td></tr>
|
210
|
+
<tr><td colspan='5' style='border-bottom: solid 1px #eee;'></td></tr>
|
211
|
+
<tr><th colspan='3'><a name='quick-phrase-modifiers'><small>3.</small></a><br />Quick Phrase Modifiers</th></tr>
|
212
|
+
<tr><td class='explain' colspan='3'>
|
213
|
+
<h4>Structural Emphasis</h4>
|
214
|
+
</td></tr>
|
215
|
+
<tr><td class='explain' colspan='3'>
|
216
|
+
<p>Emphasis to text is added by surrounding a phrase with underscores. In <span class="caps">HTML</span>, this often appears as <em>italics</em>.</p>
|
217
|
+
</td></tr>
|
218
|
+
<tr><td class='example1' valign='top'><pre>I _believe_ every word.</pre></td><td>→</td><td class='example2'><p><p>I <em>believe</em> every word.</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>I <em>believe</em> every word.</p></td></tr>
|
219
|
+
<tr><td class='explain' colspan='3'>
|
220
|
+
<p>Strength can be give to text by surrounding with asterisks. In <span class="caps">HTML</span>, this strength appears as <strong>bold</strong>.</p>
|
221
|
+
</td></tr>
|
222
|
+
<tr><td class='example1' valign='top'><pre>And then? She *fell*!</pre></td><td>→</td><td class='example2'><p><p>And then? She <strong>fell</strong>!</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>And then? She <strong>fell</strong>!</p></td></tr>
|
223
|
+
<tr><td class='explain' colspan='3'>
|
224
|
+
<p>Both italics and bold can be forced by doubling the underscores or asterisks.</p>
|
225
|
+
</td></tr>
|
226
|
+
<tr><td class='example1' valign='top'><pre>I __know__.<br />I **really** __know__.</pre></td><td>→</td><td class='example2'><p><p>I <i>know</i>.<br />I <b>really</b> <i>know</i>.</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>I <i>know</i>.
|
227
|
+
I <b>really</b> <i>know</i>.</p></td></tr>
|
228
|
+
<tr><td class='explain' colspan='3'>
|
229
|
+
<p>Use double question marks to indicate <em>citation</em>. The title of a book, for instance.</p>
|
230
|
+
</td></tr>
|
231
|
+
<tr><td class='example1' valign='top'><pre>??Cat's Cradle?? by Vonnegut</pre></td><td>→</td><td class='example2'><p><p><cite>Cat&#8217; s Cradle</cite> by Vonnegut</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p><cite>Cat’s Cradle</cite> by Vonnegut</p></td></tr>
|
232
|
+
<tr><td class='explain' colspan='3'>
|
233
|
+
<p>Code phrases can be surrounded by at-symbols.</p>
|
234
|
+
</td></tr>
|
235
|
+
<tr><td class='example1' valign='top'><pre>Convert with @r.to_html@</pre></td><td>→</td><td class='example2'><p><p>Convert with <code>r.to_html</code></p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>Convert with <code>r.to_html</code></p></td></tr>
|
236
|
+
<tr><td class='explain' colspan='3'>
|
237
|
+
<p>To indicate a passage which has been deleted, surround the passage with hypens.</p>
|
238
|
+
</td></tr>
|
239
|
+
<tr><td class='example1' valign='top'><pre>I'm -sure- not sure.</pre></td><td>→</td><td class='example2'><p><p>I&#8217; m <del>sure</del> not sure.</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>I’m <del>sure</del> not sure.</p></td></tr>
|
240
|
+
<tr><td class='explain' colspan='3'>
|
241
|
+
<p>Pluses around a passage indicate its insertion.</p>
|
242
|
+
</td></tr>
|
243
|
+
<tr><td class='example1' valign='top'><pre>You are a +pleasant+ child.</pre></td><td>→</td><td class='example2'><p><p>You are a <ins>pleasant</ins> child.</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>You are a <ins>pleasant</ins> child.</p></td></tr>
|
244
|
+
<tr><td class='explain' colspan='3'>
|
245
|
+
<p>To superscript a phrase, surround with carets.</p>
|
246
|
+
</td></tr>
|
247
|
+
<tr><td class='example1' valign='top'><pre>a ^2^ + b ^2^ = c ^2^</pre></td><td>→</td><td class='example2'><p><p>a <sup>2</sup> + b <sup>2</sup> = c <sup>2</sup></p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>a <sup>2</sup> + b <sup>2</sup> = c <sup>2</sup></p></td></tr>
|
248
|
+
<tr><td class='explain' colspan='3'>
|
249
|
+
<p>To subscript, surround with tildes.</p>
|
250
|
+
</td></tr>
|
251
|
+
<tr><td class='example1' valign='top'><pre>log ~2~ x</pre></td><td>→</td><td class='example2'><p><p>log <sub>2</sub> x</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>log <sub>2</sub> x</p></td></tr>
|
252
|
+
<tr><td class='explain' colspan='3'>
|
253
|
+
<h4><span class="caps">HTML</span>-Specific</h4>
|
254
|
+
</td></tr>
|
255
|
+
<tr><td class='explain' colspan='3'>
|
256
|
+
<p>Lastly, if you find yourself needing to customize the style of a passage, use percent symbols to translate the passage as an <span class="caps">HTML</span> span.</p>
|
257
|
+
</td></tr>
|
258
|
+
<tr><td class='example1' valign='top'><pre>I'm %unaware% of most soft drinks.</pre></td><td>→</td><td class='example2'><p><p>I&#8217; m <span>unaware</span> of most soft drinks.</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>I’m <span>unaware</span> of most soft drinks.</p></td></tr>
|
259
|
+
<tr><td class='explain' colspan='3'>
|
260
|
+
<p>This way, you can apply style settings, as described in the next section to arbitrary phrases.</p>
|
261
|
+
</td></tr>
|
262
|
+
<tr><td class='example1' valign='top'><pre>I'm %{color:red}unaware%<br />of most soft drinks.</pre></td><td>→</td><td class='example2'><p><p>I&#8217; m <span style="color:red;">unaware</span><br />of most soft drinks.</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>I’m <span style="color:red;">unaware</span>
|
263
|
+
of most soft drinks.</p></td></tr>
|
264
|
+
<tr><td colspan='5' style='border-bottom: solid 1px #eee;'></td></tr>
|
265
|
+
<tr><th colspan='3'><a name='attributes'><small>4.</small></a><br />Attributes</th></tr>
|
266
|
+
<tr><td class='explain' colspan='3'>
|
267
|
+
<p>Tailoring Textile to suit your needs is quite easy. Attributes allow you to provide <acronym title="Cascading Style Sheets">CSS</acronym> information about any phrase.</p>
|
268
|
+
</td></tr>
|
269
|
+
<tr><td class='explain' colspan='3'>
|
270
|
+
<h4>Block Attributes</h4>
|
271
|
+
</td></tr>
|
272
|
+
<tr><td class='explain' colspan='3'>
|
273
|
+
<p>A block can be tagged with a <span class="caps">CSS</span> class by circling the class in parentheses and placing it just before the period which marks the block.</p>
|
274
|
+
</td></tr>
|
275
|
+
<tr><td class='example1' valign='top'><pre>p(example1). An example</pre></td><td>→</td><td class='example2'><p><p class="example1">An example</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p class="example1">An example</p></td></tr>
|
276
|
+
<tr><td class='explain' colspan='3'>
|
277
|
+
<p>An element ID can be given by prefixing the ID with a pound symbol and using it in place of the class.</p>
|
278
|
+
</td></tr>
|
279
|
+
<tr><td class='example1' valign='top'><pre>p(#big-red). Red here</pre></td><td>→</td><td class='example2'><p><p id="big-red">Red here</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p id="big-red">Red here</p></td></tr>
|
280
|
+
<tr><td class='explain' colspan='3'>
|
281
|
+
<p>Class and ID can be combined by placing the class first.</p>
|
282
|
+
</td></tr>
|
283
|
+
<tr><td class='example1' valign='top'><pre>p(example1#big-red2). Red here</pre></td><td>→</td><td class='example2'><p><p class="example1" id="big-red2">Red here</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p class="example1" id="big-red2">Red here</p></td></tr>
|
284
|
+
<tr><td class='explain' colspan='3'>
|
285
|
+
<p>Style settings can be provided directly by surrounding them in curly braces.</p>
|
286
|
+
</td></tr>
|
287
|
+
<tr><td class='example1' valign='top'><pre>p{color:blue;margin:30px}. Spacey blue</pre></td><td>→</td><td class='example2'><p><p style="color:blue; margin:30px;">Spacey blue</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p style="color:blue;margin:30px;">Spacey blue</p></td></tr>
|
288
|
+
<tr><td class='explain' colspan='3'>
|
289
|
+
<p>Language designations can be given between angel brackets.</p>
|
290
|
+
</td></tr>
|
291
|
+
<tr><td class='example1' valign='top'><pre>p[fr]. rouge</pre></td><td>→</td><td class='example2'><p><p lang="fr">rouge</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p lang="fr">rouge</p></td></tr>
|
292
|
+
<tr><td class='explain' colspan='3'>
|
293
|
+
<h4>Phrase Attributes</h4>
|
294
|
+
</td></tr>
|
295
|
+
<tr><td class='explain' colspan='3'>
|
296
|
+
<p>All block attributes can be applied to phrases as well by placing them just inside the opening modifier.</p>
|
297
|
+
</td></tr>
|
298
|
+
<tr><td class='example1' valign='top'><pre>I seriously *{color:red}blushed*<br />when I _(big)sprouted_ that<br />corn stalk from my<br />%[es]cabeza%.</pre></td><td>→</td><td class='example2'><p><p>I seriously <strong style="color:red;">blushed</strong><br />when I <em class="big">sprouted</em> that<br />corn stalk from my<br /><span lang="es">cabeza</span>.</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>I seriously <strong style="color:red;">blushed</strong>
|
299
|
+
when I <em class="big">sprouted</em> that
|
300
|
+
corn stalk from my
|
301
|
+
<span lang="es">cabeza</span>.</p></td></tr>
|
302
|
+
<tr><td class='explain' colspan='3'>
|
303
|
+
<h4>Block Alignments</h4>
|
304
|
+
</td></tr>
|
305
|
+
<tr><td class='explain' colspan='3'>
|
306
|
+
<p>Text inside blocks can be aligned in four basic ways.</p>
|
307
|
+
</td></tr>
|
308
|
+
<tr><td class='example1' valign='top'><pre>p<. align left</pre></td><td>→</td><td class='example2'><p><p style="text-align:left;">align left</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p style="text-align:left;">align left</p></td></tr>
|
309
|
+
<tr><td class='example1' valign='top'><pre>p>. align right</pre></td><td>→</td><td class='example2'><p><p style="text-align:right;">align right</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p style="text-align:right;">align right</p></td></tr>
|
310
|
+
<tr><td class='example1' valign='top'><pre>p=. centered</pre></td><td>→</td><td class='example2'><p><p style="text-align:center;">centered</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p style="text-align:center;">centered</p></td></tr>
|
311
|
+
<tr><td class='example1' valign='top'><pre>p<>. justified</pre></td><td>→</td><td class='example2'><p><p style="text-align:justify;">justified</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p style="text-align:justify;">justified</p></td></tr>
|
312
|
+
<tr><td class='explain' colspan='3'>
|
313
|
+
<p>Indentation can also be specified by provide a single left paren for every 1em to the left. A single right paren for every 1em to the right.</p>
|
314
|
+
</td></tr>
|
315
|
+
<tr><td class='example1' valign='top'><pre>p(. left ident 1em</pre></td><td>→</td><td class='example2'><p><p style="padding-left:1em;">left ident 1em</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p style="padding-left:1em;">left ident 1em</p></td></tr>
|
316
|
+
<tr><td class='example1' valign='top'><pre>p((. left ident 2em</pre></td><td>→</td><td class='example2'><p><p style="padding-left:2em;">left ident 2em</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p style="padding-left:2em;">left ident 2em</p></td></tr>
|
317
|
+
<tr><td class='example1' valign='top'><pre>p))). right ident 3em</pre></td><td>→</td><td class='example2'><p><p style="padding-right:3em;">right ident 3em</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p style="padding-right:3em;">right ident 3em</p></td></tr>
|
318
|
+
<tr><td class='explain' colspan='3'>
|
319
|
+
<h4>Combining Alignments</h4>
|
320
|
+
</td></tr>
|
321
|
+
<tr><td class='explain' colspan='3'>
|
322
|
+
<p>Identation may be coupled with alignment.</p>
|
323
|
+
</td></tr>
|
324
|
+
<tr><td class='example1' valign='top'><pre>h2()>. Bingo.</pre></td><td>→</td><td class='example2'><p><h2 style="padding-left:1em; padding-right:1em; text-align:right;">Bingo.</h2></p></td></tr><tr><td colspan='2'></td><td class='example3'><h2 style="padding-left:1em;padding-right:1em;text-align:right;">Bingo.</h2></td></tr>
|
325
|
+
<tr><td class='explain' colspan='3'>
|
326
|
+
<p>And, furthermore, coupled with language settings and <span class="caps">CSS</span> styles.</p>
|
327
|
+
</td></tr>
|
328
|
+
<tr><td class='example1' valign='top'><pre>h3()>[no]{color:red}. Bingo</pre></td><td>→</td><td class='example2'><p><h3 style="color:red; padding-left:1em; padding-right:1em; text-align:right;" lang="no">Bingo</h3></p></td></tr><tr><td colspan='2'></td><td class='example3'><h3 style="color:red;padding-left:1em;padding-right:1em;text-align:right;" lang="no">Bingo</h3></td></tr>
|
329
|
+
<tr><td class='explain' colspan='3'>
|
330
|
+
<h4><span class="caps">HTML</span> in Textile</h4>
|
331
|
+
</td></tr>
|
332
|
+
<tr><td class='explain' colspan='3'>
|
333
|
+
<p>Textile is designed for quickening the simple markups. For more complex formatting, you are encouraged to break out into <span class="caps">HTML</span>.</p>
|
334
|
+
</td></tr>
|
335
|
+
<tr><td class='explain' colspan='3'>
|
336
|
+
<p>For example, long code blocks belong between <code>pre</code> and <code>code</code> tags. Please also indent your code inside the tags to be sure that all Textile processors out there will ignore the contents.</p>
|
337
|
+
</td></tr>
|
338
|
+
<tr><td class='example1' valign='top'><pre><pre><br /><code><br /> a.gsub!( /</, '' )<br /></code><br /></pre><br /></pre></td><td>→</td><td class='example2'><p><pre><br /><code><br /> a.gsub!( /&lt;/, '' )<br /></code><br /></pre></p></td></tr><tr><td colspan='2'></td><td class='example3'><pre>
|
339
|
+
<code>
|
340
|
+
a.gsub!( /</, '' )
|
341
|
+
</code>
|
342
|
+
</pre></td></tr>
|
343
|
+
<tr><td class='explain' colspan='3'>
|
344
|
+
<p>You may also choose to surround sections with <code>div</code> tags to separate your document into sections. <a href="http://www.instiki.org/">Instiki</a> uses this technique to float a sidebar to the right.</p>
|
345
|
+
</td></tr>
|
346
|
+
<tr><td class='example1' valign='top'><pre><div style="float:right;"><br /><br />h3. Sidebar<br /><br />"GitHub":http://github.com/<br />"Ruby":http://ruby-lang.org/<br /><br /></div><br /><br />The main text of the<br />page goes here and will <br />stay to the left of the <br />sidebar.<br /></pre></td><td>→</td><td class='example2'><p><div style="float:right;"><br /> <h3>Sidebar</h3><br /><br /> <p><a href="http://hobix.com/">GitHub</a><br /><a href="http://ruby-lang.org/">Ruby</a></p><br /><br /><br /></div><br /> <p>The main text of the<br />page goes here and will <br />stay to the left of the <br />sidebar.</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><div style="float:right;">
|
347
|
+
<h3>Sidebar</h3>
|
348
|
+
|
349
|
+
<p><a href="http://github.com/">GitHub</a>
|
350
|
+
<a href="http://ruby-lang.org/">Ruby</a></p>
|
351
|
+
|
352
|
+
|
353
|
+
</div>
|
354
|
+
<p>The main text of the
|
355
|
+
page goes here and will
|
356
|
+
stay to the left of the
|
357
|
+
sidebar.</p></td></tr>
|
358
|
+
<tr><td colspan='5' style='border-bottom: solid 1px #eee;'></td></tr>
|
359
|
+
<tr><th colspan='3'><a name='lists'><small>5.</small></a><br />Lists</th></tr>
|
360
|
+
<tr><td class='explain' colspan='3'>
|
361
|
+
<h4>Numeric Lists</h4>
|
362
|
+
</td></tr>
|
363
|
+
<tr><td class='explain' colspan='3'>
|
364
|
+
<p>To make a numbered list, place each item in its own paragraph, preceded by ”#”.</p>
|
365
|
+
</td></tr>
|
366
|
+
<tr><td class='example1' valign='top'><pre># A first item<br /># A second item<br /># A third</pre></td><td>→</td><td class='example2'><p><ol><br /> <li>A first item</li><br /> <li>A second item</li><br /> <li>A third</li><br /> </ol></p></td></tr><tr><td colspan='2'></td><td class='example3'><ol>
|
367
|
+
<li>A first item</li>
|
368
|
+
<li>A second item</li>
|
369
|
+
<li>A third</li>
|
370
|
+
</ol></td></tr>
|
371
|
+
<tr><td class='explain' colspan='3'>
|
372
|
+
<p>These lists may be nested by increasing the number of pound symbols preceding child entries.</p>
|
373
|
+
</td></tr>
|
374
|
+
<tr><td class='example1' valign='top'><pre># Fuel could be:<br />## Coal<br />## Gasoline<br />## Electricity<br /># Humans need only:<br />## Water<br />## Protein</pre></td><td>→</td><td class='example2'><p><ol><br /> <li>Fuel could be:<br /> <ol><br /> <li>Coal</li><br /> <li>Gasoline</li><br /> <li>Electricity</li><br /> </ol><br /> </li><br /> <li>Humans need only:<br /> <ol><br /> <li>Water</li><br /> <li>Protein</li><br /> </ol></li><br /> </ol></p></td></tr><tr><td colspan='2'></td><td class='example3'><ol>
|
375
|
+
<li>Fuel could be:
|
376
|
+
<ol>
|
377
|
+
<li>Coal</li>
|
378
|
+
<li>Gasoline</li>
|
379
|
+
<li>Electricity</li>
|
380
|
+
</ol>
|
381
|
+
</li>
|
382
|
+
<li>Humans need only:
|
383
|
+
<ol>
|
384
|
+
<li>Water</li>
|
385
|
+
<li>Protein</li>
|
386
|
+
</ol></li>
|
387
|
+
</ol></td></tr>
|
388
|
+
<tr><td class='explain' colspan='3'>
|
389
|
+
<h4>Bulleted Lists</h4>
|
390
|
+
</td></tr>
|
391
|
+
<tr><td class='explain' colspan='3'>
|
392
|
+
<p>Bulleted lists use an asterisk in place of the pound.</p>
|
393
|
+
</td></tr>
|
394
|
+
<tr><td class='example1' valign='top'><pre>* A first item<br />* A second item<br />* A third</pre></td><td>→</td><td class='example2'><p><ul><br /> <li>A first item</li><br /> <li>A second item</li><br /> <li>A third</li><br /> </ul></p></td></tr><tr><td colspan='2'></td><td class='example3'><ul>
|
395
|
+
<li>A first item</li>
|
396
|
+
<li>A second item</li>
|
397
|
+
<li>A third</li>
|
398
|
+
</ul></td></tr>
|
399
|
+
<tr><td class='explain' colspan='3'>
|
400
|
+
<p>These lists may be nested in like manner.</p>
|
401
|
+
</td></tr>
|
402
|
+
<tr><td class='example1' valign='top'><pre>* Fuel could be:<br />** Coal<br />** Gasoline<br />** Electricity<br />* Humans need only:<br />** Water<br />** Protein</pre></td><td>→</td><td class='example2'><p><ul><br /> <li>Fuel could be:<br /> <ul><br /> <li>Coal</li><br /> <li>Gasoline</li><br /> <li>Electricity</li><br /> </ul><br /> </li><br /> <li>Humans need only:<br /> <ul><br /> <li>Water</li><br /> <li>Protein</li><br /> </ul></li><br /> </ul></p></td></tr><tr><td colspan='2'></td><td class='example3'><ul>
|
403
|
+
<li>Fuel could be:
|
404
|
+
<ul>
|
405
|
+
<li>Coal</li>
|
406
|
+
<li>Gasoline</li>
|
407
|
+
<li>Electricity</li>
|
408
|
+
</ul>
|
409
|
+
</li>
|
410
|
+
<li>Humans need only:
|
411
|
+
<ul>
|
412
|
+
<li>Water</li>
|
413
|
+
<li>Protein</li>
|
414
|
+
</ul></li>
|
415
|
+
</ul></td></tr>
|
416
|
+
<tr><td colspan='5' style='border-bottom: solid 1px #eee;'></td></tr>
|
417
|
+
<tr><th colspan='3'><a name='external-references'><small>6.</small></a><br />External References</th></tr>
|
418
|
+
<tr><td class='explain' colspan='3'>
|
419
|
+
<h4>Hypertext Links</h4>
|
420
|
+
</td></tr>
|
421
|
+
<tr><td class='explain' colspan='3'>
|
422
|
+
<p>Basic links are comprised of a phrase which is linked to a <acronym title="Universal Resource Locator">URL</acronym>. Place the descriptive phrase in quotation marks. Follow it immediately by a colon and the <span class="caps">URL</span>.</p>
|
423
|
+
</td></tr>
|
424
|
+
<tr><td class='example1' valign='top'><pre>I searched "Google":http://google.com.</pre></td><td>→</td><td class='example2'><p><p>I searched <a href="http://google.com">Google</a>.</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>I searched <a href="http://google.com">Google</a>.</p></td></tr>
|
425
|
+
<tr><td class='explain' colspan='3'>
|
426
|
+
<p>Notice, the link won’t include any trailing punctuation.</p>
|
427
|
+
</td></tr>
|
428
|
+
<tr><td class='explain' colspan='3'>
|
429
|
+
<h4>Link Aliases</h4>
|
430
|
+
</td></tr>
|
431
|
+
<tr><td class='explain' colspan='3'>
|
432
|
+
<p>If you are using the same link several times in your document, or you’d just like to be a tad more organized, you can use a link alias. Place the <span class="caps">URL</span> anywhere in your document, beginning with its alias in square brackets. Then, use the alias in place of the <span class="caps">URL</span>, using the link format above.</p>
|
433
|
+
</td></tr>
|
434
|
+
<tr><td class='example1' valign='top'><pre>I am crazy about "GitHub":github<br />and "it's":github "all":github I ever<br />"link to":github!<br /><br />[github]http://github.com<br /></pre></td><td>→</td><td class='example2'><p><p>I am crazy about <a href="http://github.com">GitHub</a><br />and <a href="http://github.com">it&#8217; s</a> <a href="http://github.com">all</a> I ever<br /><a href="http://github.com">link to</a>!</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>I am crazy about <a href="http://github.com">GitHub</a>
|
435
|
+
and <a href="http://github.com">it’s</a> <a href="http://github.com">all</a> I ever
|
436
|
+
<a href="http://github.com">link to</a>!</p></td></tr>
|
437
|
+
<tr><td class='explain' colspan='3'>
|
438
|
+
<h4>Embedded Images</h4>
|
439
|
+
</td></tr>
|
440
|
+
<tr><td class='explain' colspan='3'>
|
441
|
+
<p>You can embed an image in your Textile document by surrounding its <span class="caps">URL</span> with exclamation marks.</p>
|
442
|
+
</td></tr>
|
443
|
+
<tr><td class='example1' valign='top'><pre>!http://hobix.com/sample.jpg!</pre></td><td>→</td><td class='example2'><p><p><img src="http://hobix.com/sample.jpg" alt="" /></p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p><img src="http://hobix.com/sample.jpg" alt="" /></p></td></tr>
|
444
|
+
<tr><td class='explain' colspan='3'>
|
445
|
+
<p>URLs may be relative.</p>
|
446
|
+
</td></tr>
|
447
|
+
<tr><td class='explain' colspan='3'>
|
448
|
+
<p>A title for the image can also be provided in parens, just before the closing exclamation.</p>
|
449
|
+
</td></tr>
|
450
|
+
<tr><td class='example1' valign='top'><pre>!openwindow1.gif(Bunny.)!</pre></td><td>→</td><td class='example2'><p><p><img src="openwindow1.gif" title="Bunny." alt="Bunny." /></p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p><img src="openwindow1.gif" title="Bunny." alt="Bunny." /></p></td></tr>
|
451
|
+
<tr><td class='explain' colspan='3'>
|
452
|
+
<p>The title also acts as <strong>alt</strong> text should the image not be found.</p>
|
453
|
+
</td></tr>
|
454
|
+
<tr><td class='explain' colspan='3'>
|
455
|
+
<p>Links can be attached to images with a colon.</p>
|
456
|
+
</td></tr>
|
457
|
+
<tr><td class='example1' valign='top'><pre>!openwindow1.gif!:http://hobix.com/</pre></td><td>→</td><td class='example2'><p><p><a href="http://hobix.com/"><img src="openwindow1.gif" alt="" /></a></p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p><a href="http://hobix.com/"><img src="openwindow1.gif" alt="" /></a></p></td></tr>
|
458
|
+
<tr><td class='explain' colspan='3'>
|
459
|
+
<h4>Image Alignments</h4>
|
460
|
+
</td></tr>
|
461
|
+
<tr><td class='explain' colspan='3'>
|
462
|
+
<p>Alignments can be applied as well to images.</p>
|
463
|
+
</td></tr>
|
464
|
+
<tr><td class='example1' valign='top'><pre>!>obake.gif!<br /><br />And others sat all round the small<br />machine and paid it to sing to them.</pre></td><td>→</td><td class='example2'><p><p style="float:right"><img src="obake.gif" alt="" /></p><br /><br /> <p>And others sat all round the small<br />machine and paid it to sing to them.</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p style="float:right"><img src="obake.gif" alt="" /></p>
|
465
|
+
|
466
|
+
<p>And others sat all round the small
|
467
|
+
machine and paid it to sing to them.</p></td></tr>
|
468
|
+
<tr><td class='explain' colspan='3'>
|
469
|
+
<h4>Acronyms</h4>
|
470
|
+
</td></tr>
|
471
|
+
<tr><td class='explain' colspan='3'>
|
472
|
+
<p>Definitions for acronyms can be provided by following an acronym with its definition in parens.</p>
|
473
|
+
</td></tr>
|
474
|
+
<tr><td class='example1' valign='top'><pre>We use CSS(Cascading Style Sheets).</pre></td><td>→</td><td class='example2'><p><p>We use <acronym title="Cascading Style Sheets">CSS</acronym>.</p></p></td></tr><tr><td colspan='2'></td><td class='example3'><p>We use <acronym title="Cascading Style Sheets">CSS</acronym>.</p></td></tr>
|
475
|
+
<tr><td colspan='5' style='border-bottom: solid 1px #eee;'></td></tr>
|
476
|
+
<tr><th colspan='3'><a name='tables'><small>7.</small></a><br />Tables</th></tr>
|
477
|
+
<tr><td class='explain' colspan='3'>
|
478
|
+
<p>Simple tables can be built by separating fields with pipe characters</p>
|
479
|
+
</td></tr>
|
480
|
+
<tr><td class='example1' valign='top'><pre>| name | age | sex |<br />| joan | 24 | f |<br />| archie | 29 | m |<br />| bella | 45 | f |</pre></td><td>→</td><td class='example2'><p><table><br /> <tr><br /> <td> name </td><br /> <td> age </td><br /> <td> sex </td><br /> </tr><br /> <tr><br /> <td> joan </td><br /> <td> 24 </td><br /> <td> f </td><br /> </tr><br /> <tr><br /> <td> archie </td><br /> <td> 29 </td><br /> <td> m </td><br /> </tr><br /> <tr><br /> <td> bella </td><br /> <td> 45 </td><br /> <td> f </td><br /> </tr><br /> </table></p></td></tr><tr><td colspan='2'></td><td class='example3'><table>
|
481
|
+
<tr>
|
482
|
+
<td> name </td>
|
483
|
+
<td> age </td>
|
484
|
+
<td> sex </td>
|
485
|
+
</tr>
|
486
|
+
<tr>
|
487
|
+
<td> joan </td>
|
488
|
+
<td> 24 </td>
|
489
|
+
<td> f </td>
|
490
|
+
</tr>
|
491
|
+
<tr>
|
492
|
+
<td> archie </td>
|
493
|
+
<td> 29 </td>
|
494
|
+
<td> m </td>
|
495
|
+
</tr>
|
496
|
+
<tr>
|
497
|
+
<td> bella </td>
|
498
|
+
<td> 45 </td>
|
499
|
+
<td> f </td>
|
500
|
+
</tr>
|
501
|
+
</table></td></tr>
|
502
|
+
<tr><td class='explain' colspan='3'>
|
503
|
+
<p>Specify header cells by marking them with an underscore and period.</p>
|
504
|
+
</td></tr>
|
505
|
+
<tr><td class='example1' valign='top'><pre>|_. name |_. age |_. sex |<br />| joan | 24 | f |<br />| archie | 29 | m |<br />| bella | 45 | f |</pre></td><td>→</td><td class='example2'><p><table><br /> <tr><br /> <th>name </th><br /> <th>age </th><br /> <th>sex </th><br /> </tr><br /> <tr><br /> <td> joan </td><br /> <td> 24 </td><br /> <td> f </td><br /> </tr><br /> <tr><br /> <td> archie </td><br /> <td> 29 </td><br /> <td> m </td><br /> </tr><br /> <tr><br /> <td> bella </td><br /> <td> 45 </td><br /> <td> f </td><br /> </tr><br /> </table></p></td></tr><tr><td colspan='2'></td><td class='example3'><table>
|
506
|
+
<tr>
|
507
|
+
<th>name </th>
|
508
|
+
<th>age </th>
|
509
|
+
<th>sex </th>
|
510
|
+
</tr>
|
511
|
+
<tr>
|
512
|
+
<td> joan </td>
|
513
|
+
<td> 24 </td>
|
514
|
+
<td> f </td>
|
515
|
+
</tr>
|
516
|
+
<tr>
|
517
|
+
<td> archie </td>
|
518
|
+
<td> 29 </td>
|
519
|
+
<td> m </td>
|
520
|
+
</tr>
|
521
|
+
<tr>
|
522
|
+
<td> bella </td>
|
523
|
+
<td> 45 </td>
|
524
|
+
<td> f </td>
|
525
|
+
</tr>
|
526
|
+
</table></td></tr>
|
527
|
+
<tr><td class='explain' colspan='3'>
|
528
|
+
<h4>Cell Attributes</h4>
|
529
|
+
</td></tr>
|
530
|
+
<tr><td class='explain' colspan='3'>
|
531
|
+
<p>The period used above marks the end of a cell’s attributes. Other attributes can be applied as well.</p>
|
532
|
+
</td></tr>
|
533
|
+
<tr><td class='example1' valign='top'><pre>|_. attribute list |<br />|<. align left |<br />|>. align right|<br />|=. center |<br />|<>. justify |<br />|^. valign top |<br />|~. bottom |</pre></td><td>→</td><td class='example2'><p><table><br /> <tr><br /> <th>attribute list </th><br /> </tr><br /> <tr><br /> <td style="text-align:left;">align left </td><br /> </tr><br /> <tr><br /> <td style="text-align:right;">align right</td><br /> </tr><br /> <tr><br /> <td style="text-align:center;">center </td><br /> </tr><br /> <tr><br /> <td style="text-align:justify;">justify </td><br /> </tr><br /> <tr><br /> <td style="vertical-align:top;">valign top </td><br /> </tr><br /> <tr><br /> <td style="vertical-align:bottom;">bottom </td><br /> </tr><br /> </table></p></td></tr><tr><td colspan='2'></td><td class='example3'><table>
|
534
|
+
<tr>
|
535
|
+
<th>attribute list </th>
|
536
|
+
</tr>
|
537
|
+
<tr>
|
538
|
+
<td style="text-align:left;">align left </td>
|
539
|
+
</tr>
|
540
|
+
<tr>
|
541
|
+
<td style="text-align:right;">align right</td>
|
542
|
+
</tr>
|
543
|
+
<tr>
|
544
|
+
<td style="text-align:center;">center </td>
|
545
|
+
</tr>
|
546
|
+
<tr>
|
547
|
+
<td style="text-align:justify;">justify </td>
|
548
|
+
</tr>
|
549
|
+
<tr>
|
550
|
+
<td style="vertical-align:top;">valign top </td>
|
551
|
+
</tr>
|
552
|
+
<tr>
|
553
|
+
<td style="vertical-align:bottom;">bottom </td>
|
554
|
+
</tr>
|
555
|
+
</table></td></tr>
|
556
|
+
<tr><td class='explain' colspan='3'>
|
557
|
+
<p>You can also specify colspans with a backslash, followed by the cell width.</p>
|
558
|
+
</td></tr>
|
559
|
+
<tr><td class='example1' valign='top'><pre>|\2. spans two cols |<br />| col 1 | col 2 |</pre></td><td>→</td><td class='example2'><p><table><br /> <tr><br /> <td colspan="2">spans two cols </td><br /> </tr><br /> <tr><br /> <td> col 1 </td><br /> <td> col 2 </td><br /> </tr><br /> </table></p></td></tr><tr><td colspan='2'></td><td class='example3'><table>
|
560
|
+
<tr>
|
561
|
+
<td colspan="2">spans two cols </td>
|
562
|
+
</tr>
|
563
|
+
<tr>
|
564
|
+
<td> col 1 </td>
|
565
|
+
<td> col 2 </td>
|
566
|
+
</tr>
|
567
|
+
</table></td></tr>
|
568
|
+
<tr><td class='explain' colspan='3'>
|
569
|
+
<p>Rowspan is specified by a forward slash, followed by the row height.</p>
|
570
|
+
</td></tr>
|
571
|
+
<tr><td class='example1' valign='top'><pre>|/3. spans 3 rows | a |<br />| b |<br />| c |</pre></td><td>→</td><td class='example2'><p><table><br /> <tr><br /> <td rowspan="3">spans 3 rows </td><br /> <td> a </td><br /> </tr><br /> <tr><br /> <td> b </td><br /> </tr><br /> <tr><br /> <td> c </td><br /> </tr><br /> </table></p></td></tr><tr><td colspan='2'></td><td class='example3'><table>
|
572
|
+
<tr>
|
573
|
+
<td rowspan="3">spans 3 rows </td>
|
574
|
+
<td> a </td>
|
575
|
+
</tr>
|
576
|
+
<tr>
|
577
|
+
<td> b </td>
|
578
|
+
</tr>
|
579
|
+
<tr>
|
580
|
+
<td> c </td>
|
581
|
+
</tr>
|
582
|
+
</table></td></tr>
|
583
|
+
<tr><td class='explain' colspan='3'>
|
584
|
+
<p>All block attributes can be applied to table cells as well.</p>
|
585
|
+
</td></tr>
|
586
|
+
<tr><td class='example1' valign='top'><pre>|{background:#ddd}. Grey cell|</pre></td><td>→</td><td class='example2'><p><table><br /> <tr><br /> <td style="background:#ddd;">Grey cell</td><br /> </tr><br /> </table></p></td></tr><tr><td colspan='2'></td><td class='example3'><table>
|
587
|
+
<tr>
|
588
|
+
<td style="background:#ddd;">Grey cell</td>
|
589
|
+
</tr>
|
590
|
+
</table></td></tr>
|
591
|
+
<tr><td class='explain' colspan='3'>
|
592
|
+
<h4>Table and Row Attributes</h4>
|
593
|
+
</td></tr>
|
594
|
+
<tr><td class='explain' colspan='3'>
|
595
|
+
<p>Table-wide attributes can be applied before the first row of the table. On its own line, followed by a period.</p>
|
596
|
+
</td></tr>
|
597
|
+
<tr><td class='example1' valign='top'><pre>table{border:1px solid black}.<br />|This|is|a|row|<br />|This|is|a|row|</pre></td><td>→</td><td class='example2'><p><table style="border:1px solid black;"><br /> <tr><br /> <td>This</td><br /> <td>is</td><br /> <td>a</td><br /> <td>row</td><br /> </tr><br /> <tr><br /> <td>This</td><br /> <td>is</td><br /> <td>a</td><br /> <td>row</td><br /> </tr><br /> </table></p></td></tr><tr><td colspan='2'></td><td class='example3'><table style="border:1px solid black;">
|
598
|
+
<tr>
|
599
|
+
<td>This</td>
|
600
|
+
<td>is</td>
|
601
|
+
<td>a</td>
|
602
|
+
<td>row</td>
|
603
|
+
</tr>
|
604
|
+
<tr>
|
605
|
+
<td>This</td>
|
606
|
+
<td>is</td>
|
607
|
+
<td>a</td>
|
608
|
+
<td>row</td>
|
609
|
+
</tr>
|
610
|
+
</table></td></tr>
|
611
|
+
<tr><td class='explain' colspan='3'>
|
612
|
+
<p>Attributes can be applied to a single row by supplying the attribute before the row starts, using a <code>table</code> modifier and following it by a period.</p>
|
613
|
+
</td></tr>
|
614
|
+
<tr><td class='example1' valign='top'><pre>|This|is|a|row|<br />{background:#ddd}. |This|is|grey|row|</pre></td><td>→</td><td class='example2'><p><table><br /> <tr><br /> <td>This</td><br /> <td>is</td><br /> <td>a</td><br /> <td>row</td><br /> </tr><br /> <tr style="background:#ddd;"><br /> <td>This</td><br /> <td>is</td><br /> <td>grey</td><br /> <td>row</td><br /> </tr><br /> </table></p></td></tr><tr><td colspan='2'></td><td class='example3'><table>
|
615
|
+
<tr>
|
616
|
+
<td>This</td>
|
617
|
+
<td>is</td>
|
618
|
+
<td>a</td>
|
619
|
+
<td>row</td>
|
620
|
+
</tr>
|
621
|
+
<tr style="background:#ddd;">
|
622
|
+
<td>This</td>
|
623
|
+
<td>is</td>
|
624
|
+
<td>grey</td>
|
625
|
+
<td>row</td>
|
626
|
+
</tr>
|
627
|
+
</table></td></tr>
|
628
|
+
<tr><td colspan='5' style='border-bottom: solid 1px #eee;'></td></tr>
|
629
|
+
</table>
|
630
|
+
</body>
|
631
|
+
</html>
|