revealing 1.2.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.overcommit.yml +33 -0
- data/.rubocop.yml +17 -2
- data/.ruby-version +1 -1
- data/.travis.yml +2 -14
- data/README.markdown +4 -4
- data/Rakefile +1 -1
- data/lib/revealing/cli.rb +37 -13
- data/lib/revealing/tasks.rb +1 -1
- data/lib/revealing/tasks/assets.rake +1 -1
- data/lib/revealing/tasks/reveal.js.rake +1 -1
- data/lib/revealing/version.rb +1 -1
- data/revealing.gemspec +4 -1
- data/templates/.gitignore +2 -0
- data/templates/{init/Gemfile → Gemfile} +0 -0
- data/templates/{init/README.markdown → README.markdown} +1 -0
- data/templates/{init/Rakefile → Rakefile} +0 -0
- data/templates/{mathjax/config.js → headers/mathjax.js} +0 -0
- data/templates/{init/metadata.yml → metadata.yml} +0 -0
- data/templates/{init/src → src}/index.markdown +0 -0
- data/tools/pandoc-ditaa-inline/README.markdown +30 -0
- data/tools/pandoc-ditaa-inline/ditaa-inline.lua +51 -0
- data/tools/pandoc-ditaa-inline/examples/README.markdown +25 -0
- data/tools/pandoc-ditaa-inline/examples/example.html +58 -0
- data/tools/pandoc-ditaa-inline/examples/example.markdown +25 -0
- data/tools/pandoc-ditaa-inline/examples/example.png +0 -0
- data/tools/pandoc-ditaa-inline/lib/ditaa-0.11.0-standalone.jar +0 -0
- metadata +63 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b180ab4da6a2867654ca51da49884705aa5b079ef79a262541bb0c183025134
|
4
|
+
data.tar.gz: 9056ac5328a69df0094da47bed70835fc0e6acf5a16638e4528fa845f73a1902
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5543fd86c1184fe32409bf3ad00c9f21e6f0fee19aa7c591dd150ad793c69574c9dbacd865d75a387094c4689c2d98864ea5cf270f0e24d69e5fad076bff5cee
|
7
|
+
data.tar.gz: daf22681dc8e97435648e39c1d13eeedb3e7063439cbf9a6a07c066ca9155aff4aa115984f8d0e6f4d9e034ab6cc1957e7dd198c2718c4aafbb5a59ec5e1946b
|
data/.overcommit.yml
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# Extend the default configuration defined in:
|
2
|
+
# https://github.com/brigade/overcommit/blob/master/config/default.yml
|
3
|
+
|
4
|
+
PreCommit:
|
5
|
+
BundleCheck:
|
6
|
+
enabled: true
|
7
|
+
LocalPathsInGemfile:
|
8
|
+
enabled: true
|
9
|
+
RakeTarget:
|
10
|
+
enabled: true
|
11
|
+
targets:
|
12
|
+
- rubocop
|
13
|
+
- spec:unit
|
14
|
+
TrailingWhitespace:
|
15
|
+
enabled: true
|
16
|
+
|
17
|
+
PostCheckout:
|
18
|
+
BundleInstall:
|
19
|
+
enabled: true
|
20
|
+
|
21
|
+
PostMerge:
|
22
|
+
BundleInstall:
|
23
|
+
enabled: true
|
24
|
+
|
25
|
+
PostRewrite:
|
26
|
+
BundleInstall:
|
27
|
+
enabled: true
|
28
|
+
|
29
|
+
PrePush:
|
30
|
+
RakeTarget:
|
31
|
+
enabled: true
|
32
|
+
targets:
|
33
|
+
- default
|
data/.rubocop.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
AllCops:
|
2
|
-
TargetRubyVersion: 2.
|
2
|
+
TargetRubyVersion: 2.7
|
3
3
|
Include:
|
4
4
|
- '**/Gemfile'
|
5
5
|
- '**/Rakefile'
|
@@ -18,5 +18,20 @@ Metrics/BlockLength:
|
|
18
18
|
Exclude:
|
19
19
|
- spec/**/*
|
20
20
|
|
21
|
-
|
21
|
+
Layout/LineLength:
|
22
22
|
Max: 180
|
23
|
+
|
24
|
+
Layout/SpaceAroundMethodCallOperator: { Enabled: true }
|
25
|
+
Lint/RaiseException: { Enabled: true }
|
26
|
+
Lint/StructNewOverride: { Enabled: true }
|
27
|
+
Style/ExponentialNotation: { Enabled: true }
|
28
|
+
Style/HashEachMethods: { Enabled: true }
|
29
|
+
Style/HashTransformKeys: { Enabled: true }
|
30
|
+
Style/HashTransformValues: { Enabled: true }
|
31
|
+
Layout/EmptyLinesAroundAttributeAccessor: { Enabled: true }
|
32
|
+
Lint/DeprecatedOpenSSLConstant: { Enabled: true }
|
33
|
+
Lint/MixedRegexpCaptureTypes: { Enabled: true }
|
34
|
+
Style/RedundantFetchBlock: { Enabled: true }
|
35
|
+
Style/RedundantRegexpCharacterClass: { Enabled: true }
|
36
|
+
Style/RedundantRegexpEscape: { Enabled: true }
|
37
|
+
Style/SlicingWithRange: { Enabled: true }
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
2.7.1
|
data/.travis.yml
CHANGED
@@ -1,17 +1,5 @@
|
|
1
1
|
---
|
2
2
|
dist: xenial
|
3
3
|
language: ruby
|
4
|
-
|
5
|
-
|
6
|
-
directories:
|
7
|
-
- /home/travis/.rvm/
|
8
|
-
before_install:
|
9
|
-
- gem update --system
|
10
|
-
- gem install bundler
|
11
|
-
addons:
|
12
|
-
apt:
|
13
|
-
update: true
|
14
|
-
packages:
|
15
|
-
- pandoc
|
16
|
-
- gpp
|
17
|
-
- graphicsmagick
|
4
|
+
rvm:
|
5
|
+
- 2.7.1
|
data/README.markdown
CHANGED
@@ -37,18 +37,18 @@ Unique features:
|
|
37
37
|
|
38
38
|
# TODO
|
39
39
|
|
40
|
-
1.
|
41
|
-
1. Treat mathjax config as yet another header file
|
40
|
+
1. Pandoc >= 2.9.3 is [required for reveal.js >= 4.0](https://github.com/jgm/pandoc/issues/6451#issuecomment-642470350)
|
42
41
|
1. Expose customization of
|
43
42
|
* highlight-style
|
44
43
|
* theme
|
45
44
|
* slideNumber
|
46
45
|
* history
|
47
46
|
1. Provide a docker image so that we can run without installing everything
|
47
|
+
1. Add guard-livereload to the generated project
|
48
|
+
1. Performance: pandoc-ditaa-inline filter could write files to cache dir and read it from there via SHA
|
49
|
+
- still keep the SVG inline, but do not call ditaa again if unchanged
|
48
50
|
1. Consider [mermaid-filter](https://github.com/raghur/mermaid-filter)
|
49
51
|
1. Allow self-hosted mathjax (copy to target)
|
50
52
|
1. Charts using [vega-lite](https://vega.github.io/vega-lite/usage/embed.html)
|
51
|
-
1. Add guard-livereload to the generated project
|
52
|
-
1. PDF output
|
53
53
|
1. Make the initial set of files more meaningful (e.g. add the project name, `git config user.name` etc.)
|
54
54
|
1. Web interface for live editing
|
data/Rakefile
CHANGED
data/lib/revealing/cli.rb
CHANGED
@@ -5,6 +5,7 @@ require_relative 'prerequisite'
|
|
5
5
|
module Revealing
|
6
6
|
PREREQUISITES = [
|
7
7
|
Prerequisite.new('curl'),
|
8
|
+
Prerequisite.new('java'),
|
8
9
|
Prerequisite.new('gm', 'graphicsmagick'),
|
9
10
|
Prerequisite.new('gpp'),
|
10
11
|
Prerequisite.new('pandoc'),
|
@@ -17,13 +18,29 @@ module Revealing
|
|
17
18
|
|
18
19
|
desc 'doctor', 'Checks whether your system is fit for revealing.'
|
19
20
|
def doctor
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
21
|
+
anything_missing = false
|
22
|
+
missing_tools = PREREQUISITES.reject(&:available?)
|
23
|
+
|
24
|
+
if missing_tools.any?
|
25
|
+
anything_missing = true
|
26
|
+
warn 'Error: The following required tools are not available:'
|
27
|
+
missing_tools.each do |tool|
|
28
|
+
warn " * #{tool} - install it with `#{tool.install_hint}`"
|
25
29
|
end
|
26
30
|
end
|
31
|
+
|
32
|
+
missing_files = target_files_in(Pathname.getwd).reject(&:exist?)
|
33
|
+
|
34
|
+
if missing_files.any?
|
35
|
+
anything_missing = true
|
36
|
+
warn 'Error: The following files do not exist:'
|
37
|
+
missing_files.each do |missing|
|
38
|
+
warn " * #{missing.relative_path_from(Pathname.getwd)}"
|
39
|
+
end
|
40
|
+
warn 'Consider running `revealing init` to create them.'
|
41
|
+
end
|
42
|
+
|
43
|
+
exit 1 if anything_missing
|
27
44
|
end
|
28
45
|
|
29
46
|
desc 'init [DIRECTORY]', 'initialize a new revealing project in DIRECTORY. Defaults to the current working directory.'
|
@@ -31,11 +48,9 @@ module Revealing
|
|
31
48
|
project_directory = Pathname(directory)
|
32
49
|
project_directory.mkdir unless project_directory.exist?
|
33
50
|
|
34
|
-
templates_directory = Pathname(__dir__) / '../../templates/init'
|
35
|
-
|
36
51
|
# FileUtils.cp_r overwrites the target if it exists, but we want to preserve it
|
37
52
|
# and print information about what happened
|
38
|
-
|
53
|
+
template_files.zip(target_files_in(project_directory)).each do |src, target|
|
39
54
|
if target.exist?
|
40
55
|
warn "#{target} exists; skipping"
|
41
56
|
else
|
@@ -46,13 +61,22 @@ module Revealing
|
|
46
61
|
end
|
47
62
|
end
|
48
63
|
|
64
|
+
desc 'version', 'Prints version information'
|
65
|
+
def version
|
66
|
+
puts "revealing #{Revealing::VERSION}"
|
67
|
+
end
|
68
|
+
map %w(-V --version) => :version
|
69
|
+
|
49
70
|
private
|
50
71
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
72
|
+
TEMPLATES_DIR = Pathname(__dir__) / '../../templates'
|
73
|
+
|
74
|
+
def template_files
|
75
|
+
TEMPLATES_DIR.glob("**/*", File::FNM_DOTMATCH).select(&:file?)
|
76
|
+
end
|
77
|
+
|
78
|
+
def target_files_in(dir)
|
79
|
+
template_files.map{|f| dir / f.relative_path_from(TEMPLATES_DIR)}
|
56
80
|
end
|
57
81
|
end
|
58
82
|
end
|
data/lib/revealing/tasks.rb
CHANGED
@@ -51,9 +51,9 @@ file TARGET_FILE => [ TARGET_DIR, REVEAL_JS_TARGET_DIR, GPP_FILE, DIRTY_FILE, ME
|
|
51
51
|
--variable history=true
|
52
52
|
--variable revealjs-url=#{REVEAL_JS}
|
53
53
|
--mathjax=https://cdnjs.cloudflare.com/ajax/libs/mathjax/#{MATH_JAX_VERSION}/MathJax.js?config=TeX-AMS_CHTML-full
|
54
|
-
--include-in-header=#{__dir__ + '/../../templates/mathjax/config.js'}
|
55
54
|
"--metadata-file=#{METADATA_FILE.to_path}"
|
56
55
|
#{HEADERS.map { |h| "--include-in-header=#{h}" }.join("\n")}
|
56
|
+
--lua-filter #{__dir__}/../../tools/pandoc-ditaa-inline/ditaa-inline.lua
|
57
57
|
#{GPP_FILE}
|
58
58
|
).split("\n").join(' ')
|
59
59
|
end
|
@@ -26,7 +26,7 @@ refute_duplicate_basename(RESIZABLE_ASSETS)
|
|
26
26
|
RESIZED_ASSETS.zip(RESIZABLE_ASSETS).each do |target, source|
|
27
27
|
desc "Resize #{source} to #{target}"
|
28
28
|
file target => source do
|
29
|
-
sh "gm convert #{source} -geometry '1920x1080>' #{target}"
|
29
|
+
sh "gm convert '#{source}' -geometry '1920x1080>' '#{target}'"
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
data/lib/revealing/version.rb
CHANGED
data/revealing.gemspec
CHANGED
@@ -24,18 +24,21 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
25
|
spec.require_paths = ['lib']
|
26
26
|
|
27
|
-
spec.add_dependency 'rake'
|
28
27
|
spec.add_dependency 'bundler'
|
29
28
|
spec.add_dependency 'git-dirty'
|
29
|
+
spec.add_dependency 'rake'
|
30
30
|
spec.add_dependency 'thor'
|
31
31
|
|
32
32
|
spec.add_development_dependency 'aruba'
|
33
33
|
spec.add_development_dependency 'guard'
|
34
34
|
spec.add_development_dependency 'guard-bundler'
|
35
35
|
spec.add_development_dependency 'guard-rspec'
|
36
|
+
spec.add_development_dependency 'nokogiri'
|
37
|
+
spec.add_development_dependency 'overcommit'
|
36
38
|
spec.add_development_dependency 'pry'
|
37
39
|
spec.add_development_dependency 'pry-byebug'
|
38
40
|
spec.add_development_dependency 'rspec'
|
41
|
+
spec.add_development_dependency 'rspec-collection_matchers'
|
39
42
|
spec.add_development_dependency 'rubocop'
|
40
43
|
end
|
41
44
|
# rubocop:enable Metrics/BlockLength
|
File without changes
|
@@ -6,6 +6,7 @@ This is the source of New Presentation. It was generated with [`revealing`](http
|
|
6
6
|
|
7
7
|
* Images are resized for the web using [`graphicsmagick`](http://www.graphicsmagick.org/)
|
8
8
|
* `#include` and other [`gpp`](https://logological.org/gpp) features allow organizing the sources of complex presentations
|
9
|
+
* Fenced code blocks marked as `ditaa` will be converted to SVG
|
9
10
|
* Files in the `headers` folder are included verbatim in the HTML `<head>` section
|
10
11
|
* MathJax is included and configured to render SVG. To use a specific version, set the environment variable `MATH_JAX_VERSION` to one of of the versions provided by [CDNJS](https://cdnjs.com/libraries/mathjax).
|
11
12
|
* reveal.js is downloaded and unzipped at build time. Set the environment variable `REVEAL_JS_VERSION` to customize which version to use (must be one of the [released versions](https://github.com/hakimel/reveal.js/releases)). If `REVEAL_JS_DIR` is set, the files from this directory are used.
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Pandoc Filter for DITAA
|
2
|
+
|
3
|
+
Turns inline DITAA diagrams into SVG. Needs a local installation of ditaa, e.g. `brew install ditaa`.
|
4
|
+
|
5
|
+
# Example
|
6
|
+
|
7
|
+
Given this markdown document (note the DITAA block) saved as `example.markdown`
|
8
|
+
|
9
|
+
```markdown
|
10
|
+
The following graph shows two boxes, connected:
|
11
|
+
|
12
|
+
```ditaa
|
13
|
+
+-----+ +-----+
|
14
|
+
| A |-->| B |
|
15
|
+
+-----+ +-----+
|
16
|
+
```
|
17
|
+
|
18
|
+
As you can see, ditaa renders that quite pretty. It's turned into an embedded SVG.
|
19
|
+
|
20
|
+
```
|
21
|
+
|
22
|
+
The following command turns the DITAA block into SVG, embedded in the HTML:
|
23
|
+
|
24
|
+
```command
|
25
|
+
$ pandoc --lua-filter ditaa-inline.lua --out example.html example.markdown
|
26
|
+
```
|
27
|
+
|
28
|
+
The result looks like this:
|
29
|
+
|
30
|
+

|
@@ -0,0 +1,51 @@
|
|
1
|
+
-- https://github.com/Donearm/scripts/blob/master/lib/dirname.lua
|
2
|
+
local function dirname(str)
|
3
|
+
if str:match(".-/.-") then
|
4
|
+
return string.gsub(str, "(.*/)(.*)", "%1")
|
5
|
+
else
|
6
|
+
return '.'
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
local function convertToSVG(text, scale)
|
11
|
+
return pandoc.pipe(
|
12
|
+
"java",
|
13
|
+
{
|
14
|
+
"-Djava.awt.headless=true",
|
15
|
+
"-jar", dirname(PANDOC_SCRIPT_FILE) .. '/' .. "lib/ditaa-0.11.0-standalone.jar",
|
16
|
+
"-",
|
17
|
+
"-",
|
18
|
+
"--svg",
|
19
|
+
"--scale", scale
|
20
|
+
},
|
21
|
+
text
|
22
|
+
)
|
23
|
+
end
|
24
|
+
|
25
|
+
-- These formats accept embedded SVG
|
26
|
+
local SUPPORTED_FORMATS = {
|
27
|
+
['html'] = true, ['html5'] = true, ['html4'] = true, ['slideous'] = true,
|
28
|
+
['slidy'] = true, ['dzslides'] = true, ['revealjs'] = true, ['s5'] = true
|
29
|
+
}
|
30
|
+
|
31
|
+
function CodeBlock(block)
|
32
|
+
if not (block.classes[1] == "ditaa") then
|
33
|
+
return -- keeps the block's text as literal code block
|
34
|
+
end
|
35
|
+
|
36
|
+
if not SUPPORTED_FORMATS[FORMAT] then
|
37
|
+
io.stderr:write(string.format("Warning: Cannot convert DITAA block to SVG for format %s. Keeping literal value.\n", FORMAT))
|
38
|
+
return
|
39
|
+
end
|
40
|
+
|
41
|
+
local scale = block.attributes["scale"] or "1.0"
|
42
|
+
|
43
|
+
success, result = pcall(convertToSVG, block.text, scale)
|
44
|
+
|
45
|
+
if not success then
|
46
|
+
io.stderr:write(string.format("Error - DITAA block could not converted:\n%s\n", result.output))
|
47
|
+
else
|
48
|
+
-- io.stderr:write("DITAA block converted successfully\n")
|
49
|
+
return pandoc.Para({pandoc.RawInline("html", result)})
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# Example
|
2
|
+
|
3
|
+
Given this markdown document (note the DITAA block) saved as `example.markdown`:
|
4
|
+
|
5
|
+
```markdown
|
6
|
+
The following graph shows two boxes, connected:
|
7
|
+
|
8
|
+
```ditaa
|
9
|
+
+-----+ +-----+
|
10
|
+
| A |-->| B |
|
11
|
+
+-----+ +-----+
|
12
|
+
```
|
13
|
+
|
14
|
+
As you can see, ditaa renders that quite pretty. It's turned into an embedded SVG.
|
15
|
+
```
|
16
|
+
|
17
|
+
The following command turns the DITAA block into SVG, embedded in the HTML:
|
18
|
+
|
19
|
+
```command
|
20
|
+
$ pandoc --lua-filter ditaa-inline.lua --out example.html example.markdown
|
21
|
+
```
|
22
|
+
|
23
|
+
The result looks like this:
|
24
|
+
|
25
|
+

|
@@ -0,0 +1,58 @@
|
|
1
|
+
<p>The following graph shows two boxes, connected:</p>
|
2
|
+
<p><?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
3
|
+
<svg
|
4
|
+
xmlns='http://www.w3.org/2000/svg'
|
5
|
+
width='210'
|
6
|
+
height='98'
|
7
|
+
shape-rendering='geometricPrecision'
|
8
|
+
version='1.0'>
|
9
|
+
<defs>
|
10
|
+
<filter id='f2' x='0' y='0' width='200%' height='200%'>
|
11
|
+
<feOffset result='offOut' in='SourceGraphic' dx='5' dy='5' />
|
12
|
+
<feGaussianBlur result='blurOut' in='offOut' stdDeviation='3' />
|
13
|
+
<feBlend in='SourceGraphic' in2='blurOut' mode='normal' />
|
14
|
+
</filter>
|
15
|
+
</defs>
|
16
|
+
<g stroke-width='1' stroke-linecap='square' stroke-linejoin='round'>
|
17
|
+
<rect x='0' y='0' width='210' height='98' style='fill: #ffffff'/>
|
18
|
+
<path stroke='gray' fill='gray' filter='url(#f2)' d='M25.0 35.0 L25.0 63.0 L85.0 63.0 L85.0 35.0 z' />
|
19
|
+
<path stroke='gray' fill='gray' filter='url(#f2)' d='M125.0 63.0 L185.0 63.0 L185.0 35.0 L125.0 35.0 z' />
|
20
|
+
<path stroke='#000000' stroke-width='1,000000' stroke-linecap='round' stroke-linejoin='round' fill='white' d='M25.0 35.0 L25.0 63.0 L85.0 63.0 L85.0 35.0 z' />
|
21
|
+
<path stroke='#000000' stroke-width='1,000000' stroke-linecap='round' stroke-linejoin='round' fill='white' d='M125.0 63.0 L185.0 63.0 L185.0 35.0 L125.0 35.0 z' />
|
22
|
+
<path stroke='none' stroke-width='1,000000' stroke-linecap='round' stroke-linejoin='round' fill='#000000' d='M110.0 42.0 L120.0 49.0 L110.0 56.0 z' />
|
23
|
+
<path stroke='#000000' stroke-width='1,000000' stroke-linecap='round' stroke-linejoin='round' fill='none' d='M115.0 49.0 L95.0 49.0 ' />
|
24
|
+
<text x='52' y='54' font-family='Courier' font-size='15' stroke='none' fill='#000000' ><![CDATA[A ]]></text>
|
25
|
+
<text x='153' y='54' font-family='Courier' font-size='15' stroke='none' fill='#000000' ><![CDATA[B ]]></text>
|
26
|
+
</g>
|
27
|
+
</svg></p>
|
28
|
+
<p>The <code>scale</code> attribute can be set so that the generated image is scaled by this factor. This requires the use of <a href="https://pandoc.org/MANUAL.html#extension-fenced_code_attributes">fenced code attributes</a>, where the class is written as <code>.ditaa</code>.</p>
|
29
|
+
<p>This is the same image as before, but scaled by factor <code>1.5</code>:</p>
|
30
|
+
<p><?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
31
|
+
<svg
|
32
|
+
xmlns='http://www.w3.org/2000/svg'
|
33
|
+
width='315'
|
34
|
+
height='147'
|
35
|
+
shape-rendering='geometricPrecision'
|
36
|
+
version='1.0'>
|
37
|
+
<defs>
|
38
|
+
<filter id='f2' x='0' y='0' width='200%' height='200%'>
|
39
|
+
<feOffset result='offOut' in='SourceGraphic' dx='5' dy='5' />
|
40
|
+
<feGaussianBlur result='blurOut' in='offOut' stdDeviation='3' />
|
41
|
+
<feBlend in='SourceGraphic' in2='blurOut' mode='normal' />
|
42
|
+
</filter>
|
43
|
+
</defs>
|
44
|
+
<g stroke-width='1' stroke-linecap='square' stroke-linejoin='round'>
|
45
|
+
<rect x='0' y='0' width='315' height='147' style='fill: #ffffff'/>
|
46
|
+
<path stroke='gray' fill='gray' filter='url(#f2)' d='M37.0 52.0 L37.0 94.0 L127.0 94.0 L127.0 52.0 z' />
|
47
|
+
<path stroke='gray' fill='gray' filter='url(#f2)' d='M187.0 94.0 L277.0 94.0 L277.0 52.0 L187.0 52.0 z' />
|
48
|
+
<path stroke='#000000' stroke-width='1,500000' stroke-linecap='round' stroke-linejoin='round' fill='white' d='M37.0 52.0 L37.0 94.0 L127.0 94.0 L127.0 52.0 z' />
|
49
|
+
<path stroke='#000000' stroke-width='1,500000' stroke-linecap='round' stroke-linejoin='round' fill='white' d='M187.0 94.0 L277.0 94.0 L277.0 52.0 L187.0 52.0 z' />
|
50
|
+
<path stroke='none' stroke-width='1,500000' stroke-linecap='round' stroke-linejoin='round' fill='#000000' d='M165.0 63.0 L180.0 73.0 L165.0 84.0 z' />
|
51
|
+
<path stroke='#000000' stroke-width='1,500000' stroke-linecap='round' stroke-linejoin='round' fill='none' d='M172.0 73.0 L142.0 73.0 ' />
|
52
|
+
<text x='79' y='82' font-family='Courier' font-size='22' stroke='none' fill='#000000' ><![CDATA[A ]]></text>
|
53
|
+
<text x='230' y='82' font-family='Courier' font-size='22' stroke='none' fill='#000000' ><![CDATA[B ]]></text>
|
54
|
+
</g>
|
55
|
+
</svg></p>
|
56
|
+
<p>Other blocks are left untouched:</p>
|
57
|
+
<div class="sourceCode" id="cb1"><pre class="sourceCode ruby"><code class="sourceCode ruby"><a class="sourceLine" id="cb1-1" title="1">puts <span class="st">"olleH"</span>.reverse</a></code></pre></div>
|
58
|
+
<p>That’s it!</p>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
The following graph shows two boxes, connected:
|
2
|
+
|
3
|
+
```ditaa
|
4
|
+
+-----+ +-----+
|
5
|
+
| A |-->| B |
|
6
|
+
+-----+ +-----+
|
7
|
+
```
|
8
|
+
|
9
|
+
The `scale` attribute can be set so that the generated image is scaled by this factor. This requires the use of [fenced code attributes](https://pandoc.org/MANUAL.html#extension-fenced_code_attributes), where the class is written as `.ditaa`.
|
10
|
+
|
11
|
+
This is the same image as before, but scaled by factor `1.5`:
|
12
|
+
|
13
|
+
```{.ditaa scale=1.5}
|
14
|
+
+-----+ +-----+
|
15
|
+
| A |-->| B |
|
16
|
+
+-----+ +-----+
|
17
|
+
```
|
18
|
+
|
19
|
+
Other blocks are left untouched:
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
puts "olleH".reverse
|
23
|
+
```
|
24
|
+
|
25
|
+
That's it!
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: revealing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steffen Uhlig
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: git-dirty
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
@@ -122,6 +122,34 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: nokogiri
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: overcommit
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
125
153
|
- !ruby/object:Gem::Dependency
|
126
154
|
name: pry
|
127
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,6 +192,20 @@ dependencies:
|
|
164
192
|
- - ">="
|
165
193
|
- !ruby/object:Gem::Version
|
166
194
|
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: rspec-collection_matchers
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
167
209
|
- !ruby/object:Gem::Dependency
|
168
210
|
name: rubocop
|
169
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -190,6 +232,7 @@ extensions: []
|
|
190
232
|
extra_rdoc_files: []
|
191
233
|
files:
|
192
234
|
- ".gitignore"
|
235
|
+
- ".overcommit.yml"
|
193
236
|
- ".rspec"
|
194
237
|
- ".rubocop.yml"
|
195
238
|
- ".ruby-version"
|
@@ -207,12 +250,20 @@ files:
|
|
207
250
|
- lib/revealing/tasks/reveal.js.rake
|
208
251
|
- lib/revealing/version.rb
|
209
252
|
- revealing.gemspec
|
210
|
-
- templates
|
211
|
-
- templates/
|
212
|
-
- templates/
|
213
|
-
- templates/
|
214
|
-
- templates/
|
215
|
-
- templates/
|
253
|
+
- templates/.gitignore
|
254
|
+
- templates/Gemfile
|
255
|
+
- templates/README.markdown
|
256
|
+
- templates/Rakefile
|
257
|
+
- templates/headers/mathjax.js
|
258
|
+
- templates/metadata.yml
|
259
|
+
- templates/src/index.markdown
|
260
|
+
- tools/pandoc-ditaa-inline/README.markdown
|
261
|
+
- tools/pandoc-ditaa-inline/ditaa-inline.lua
|
262
|
+
- tools/pandoc-ditaa-inline/examples/README.markdown
|
263
|
+
- tools/pandoc-ditaa-inline/examples/example.html
|
264
|
+
- tools/pandoc-ditaa-inline/examples/example.markdown
|
265
|
+
- tools/pandoc-ditaa-inline/examples/example.png
|
266
|
+
- tools/pandoc-ditaa-inline/lib/ditaa-0.11.0-standalone.jar
|
216
267
|
homepage:
|
217
268
|
licenses:
|
218
269
|
- MIT
|
@@ -232,7 +283,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
232
283
|
- !ruby/object:Gem::Version
|
233
284
|
version: '0'
|
234
285
|
requirements: []
|
235
|
-
rubygems_version: 3.
|
286
|
+
rubygems_version: 3.1.4
|
236
287
|
signing_key:
|
237
288
|
specification_version: 4
|
238
289
|
summary: Rake tasks to for reveal.js presentations
|