falkorlib 0.5.9 → 0.6.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2cd2f105fc9bbcfcc463e110499aa7938a756312
4
- data.tar.gz: bb50021761bb6939f3195417c0ab04ff581fb475
3
+ metadata.gz: 36f55fff2b9f80d42204efee707a47d60b9a03f3
4
+ data.tar.gz: 8f9dce581e2d500160ad1c9bff297bb299e8ee1f
5
5
  SHA512:
6
- metadata.gz: 9e46f190a151cc567fd57fb4d053a119b9343b0ef80059edba6a24c77cc17af1dc6206287de725e3455289a38c7558941fce3f7a34916da5a2e5fb8ab4e3f4b6
7
- data.tar.gz: db45288ddb4b4708f2c85befed715a2f4e0b7d38960f94cb7165e7b50668115aaf1251dab65a3d4061a2864bf774b32f5b25df02b3b0f6aa9fa3c3866bd7d384
6
+ metadata.gz: 9aed6566b4f204a14bfe7c5e2da999eecaa499474253a7be66632e0296d7cf1c7c79b7dd479e3d41c9d2450e0bcfcba1372b3a9cd8834d16799be91236b6d13d
7
+ data.tar.gz: 66e5b3b0f5d87830e5a9084b48e9ffe5c39cd2084bb9f581d7793a96ce5fcdf4709d0b6390eb5dd9e3cf65be28e6a886e7417cefc4949038ac58e3b3e3024f1f
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- falkorlib (0.5.9)
4
+ falkorlib (0.6.0)
5
5
  artii (>= 2.1)
6
6
  awesome_print (~> 1.2)
7
7
  configatron (~> 3.2)
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  ################################################################################
3
- # Time-stamp: <Dim 2015-03-29 22:25 svarrette>
3
+ # Time-stamp: <Tue 2015-06-16 10:03 svarrette>
4
4
  ################################################################################
5
5
  # Interface for the main Bootstrapping operations
6
6
  #
@@ -26,6 +26,15 @@ module FalkorLib #:nodoc:
26
26
  :width => 80,
27
27
  :hostname => "`hostname -f`",
28
28
  },
29
+ :latex => {
30
+ :name => '',
31
+ :author => "#{ENV['GIT_AUTHOR_NAME']}",
32
+ :mail => "#{ENV['GIT_AUTHOR_EMAIL']}",
33
+ :title => 'Title',
34
+ :subtitle => '',
35
+ :image => 'images/logo_ULHPC.pdf',
36
+ :logo => 'images/logo_UL.pdf'
37
+ },
29
38
  :metadata => {
30
39
  :name => '',
31
40
  :type => [],
@@ -340,7 +349,7 @@ module FalkorLib
340
349
  ###### motd ######
341
350
  # Generate a new motd (Message of the Day) file
342
351
  # Supported options:
343
- # * :force [boolean] force action
352
+ # * :force [boolean] force action
344
353
  ##
345
354
  def motd(dir = Dir.pwd, options = {})
346
355
  config = FalkorLib::Config::Bootstrap::DEFAULTS[:motd].merge!(options)
@@ -354,7 +363,7 @@ module FalkorLib
354
363
  end # motd
355
364
 
356
365
 
357
-
366
+
358
367
  ###### readme ######
359
368
  # Bootstrap a README file for various context
360
369
  # Supported options:
@@ -460,6 +469,144 @@ module FalkorLib
460
469
  #
461
470
  end # readme
462
471
 
472
+ ###### rootlink ######
473
+ # Create a symlink '.root' targeting the relative path to the git root directory
474
+ # Supported options:
475
+ # * :name [string] name of the symlink ('.root' by default)
476
+ ##
477
+ def rootlink(dir = Dir.pwd, options = {})
478
+ raise FalkorLib::ExecError "Not used in a Git repository" unless FalkorLib::Git.init?
479
+ path = normalized_path(dir)
480
+ relative_path_to_root = (Pathname.new( FalkorLib::Git.rootdir(dir) ).relative_path_from Pathname.new( File.realpath(path)))
481
+ FalkorLib::Common.error "Already at the root directory of the Git repository" if "#{relative_path_to_root}" == "."
482
+ target = options[:name] ? options[:name] : '.root'
483
+ unless File.exists?( File.join(path, target))
484
+ warning "creating the symboling link '#{target}' which points to '#{relative_path_to_root}'" if options[:verbose]
485
+ # Format: ln_s(old, new, options = {}) -- Creates a symbolic link new which points to old.
486
+ #FileUtils.ln_s "#{relative_path_to_root}", "#{target}"
487
+ Dir.chdir( path ) do
488
+ run %{ ln -s #{relative_path_to_root} #{target} }
489
+ end
490
+ FalkorLib::Git.add(File.join(path, target), "Add symlink to the root directory as .root")
491
+ end
492
+ end # rootlink
493
+
494
+ ###### latex ######
495
+ # Bootstrap a LaTeX sub-project within a given repository
496
+ # Supported options:
497
+ # * :force [boolean] force action
498
+ ##
499
+ def latex(dir = Dir.pwd, type = :beamer, options = {})
500
+ ap options if options[:debug]
501
+ path = normalized_path(dir)
502
+ config = FalkorLib::Config::Bootstrap::DEFAULTS[:latex].clone
503
+ # initiate the repository if needed
504
+ unless File.directory?( path )
505
+ warn "The directory '#{path}' does not exists and will be created"
506
+ really_continue? unless options[:force]
507
+ run %{ mkdir -p #{path} }
508
+ end
509
+ repo(path, options) unless FalkorLib::Git.init?(path)
510
+ rootdir = FalkorLib::Git.rootdir(path)
511
+ info "Initiate a LaTeX project from the Git root directory: '#{rootdir}'"
512
+ really_continue? unless options[:force]
513
+ relative_path_to_root = (Pathname.new( FalkorLib::Git.rootdir(dir) ).relative_path_from Pathname.new( File.realpath(path))).to_s
514
+ config[:name] = options[:name] ? options[:name] : ask("\tEnter the name of the #{type} project: ", File.basename(path))
515
+ raise FalkorLib::ExecError "Empty project name" if config[:name].empty?
516
+ default_project_dir = (Pathname.new( File.realpath(path) ).relative_path_from Pathname.new( FalkorLib::Git.rootdir(dir))).to_s
517
+ if relative_path_to_root == '.'
518
+ default_project_dir = case type
519
+ when :article
520
+ "articles/#{Time.now.year}/#{config[:name]}"
521
+ when :beamer
522
+ "slides/#{Time.now.year}/#{config[:name]}/"
523
+ when :bookchapter
524
+ "chapters/#{config[:name]}"
525
+ else
526
+ "#{config[:name]}"
527
+ end
528
+ else
529
+ default_project_dir += "/#{config[:name]}" unless default_project_dir =~ /#{config[:name]}$/
530
+ end
531
+ project_dir = ask("\tLaTeX Project directory (relative to the Git root directory)", default_project_dir)
532
+ raise FalkorLib::ExecError "Empty project directory" if project_dir.empty?
533
+ subdir = File.join(rootdir, project_dir)
534
+ if File.exists?(File.join(subdir, '.root'))
535
+ warn "The directory '#{project_dir}' seems to have been already initialized"
536
+ really_continue? unless options[:force]
537
+ end
538
+ FalkorLib::GitFlow.start('feature', config[:name], rootdir) if FalkorLib::GitFlow.init?(rootdir)
539
+ # === prepare Git submodules ===
540
+ info " ==> prepare the relevant Git submodules"
541
+ submodules = {}
542
+ submodules['Makefiles'] = { :url => 'https://github.com/Falkor/Makefiles.git',
543
+ :branch => 'devel'
544
+ } if [ :article, :beamer, :bookchapter].include?(type)
545
+ submodules['beamerthemeFalkor'] = { :url => 'https://github.com/Falkor/beamerthemeFalkor' } if type == :beamer
546
+ FalkorLib::Git.submodule_init(rootdir, submodules)
547
+ info "bootstrapping the #{type} project '#{project_dir}'"
548
+ # Create the project directory
549
+ Dir.chdir( rootdir ) do
550
+ run %{ mkdir -p #{project_dir}/images } unless File.directory?("#{subdir}/images")
551
+ end
552
+ info "populating '#{project_dir}'"
553
+ rootlink(subdir, { :verbose => true} )
554
+ # Prepare the links from the sub-module files
555
+ [ 'Makefile', '_style.sty', '.gitignore', 'beamerthemeFalkor.sty' ].each do |f|
556
+ next if (f =~ /beamer/) and (type != :beamer)
557
+ submoduledir = (f =~ /beamer/) ? 'beamerthemeFalkor' : 'Makefiles/latex'
558
+ dst = "#{FalkorLib.config[:git][:submodulesdir]}/#{submoduledir}/#{f}"
559
+ Dir.chdir( subdir ) do
560
+ run %{ ln -s .root/#{dst} #{f} } unless File.exist?( File.join(subdir, f) )
561
+ end
562
+ end
563
+ # Bootstrap the directory
564
+ templatedir = File.join( FalkorLib.templates, 'latex', "#{type}")
565
+ unless File.exists?( File.join(subdir, "#{config[:name]}.tex"))
566
+ info "gathering information for the LaTeX templates"
567
+ prefix = case type
568
+ when :article
569
+ 'Article '
570
+ when :beamer
571
+ 'Slides '
572
+ when :bookchapter
573
+ 'Book Chapter '
574
+ else
575
+ ''
576
+ end
577
+ config.each do |k,v|
578
+ next if k == :name
579
+ config[k.to_sym] = ask( "\t" + sprintf("%-20s", "#{prefix}#{k.capitalize}"), v)
580
+ end
581
+ init_from_template(templatedir, subdir, config, {:no_interaction => true,
582
+ :no_commit => true })
583
+ # Rename the main file
584
+ Dir.chdir( subdir ) do
585
+ run %{ mv main.tex #{config[:name]}.tex }
586
+ end
587
+ end
588
+ # Create the trash directory
589
+ trash(subdir)
590
+
591
+ # populate the images/ directory
592
+ baseimages = File.join( FalkorLib.templates, 'latex', 'images')
593
+ images_makefile_src = "#{FalkorLib.config[:git][:submodulesdir]}/Makefiles/generic/Makefile.insubdir"
594
+ images = File.join(subdir, 'images')
595
+ info "populating the image directory"
596
+ Dir.chdir( images ) do
597
+ run %{ rsync -avzu #{baseimages}/ . }
598
+ run %{ ln -s ../.root .root } unless File.exists?(File.join(images, '.root'))
599
+ run %{ ln -s .root/#{images_makefile_src} Makefile } unless File.exists?(File.join(images, 'Makefile'))
600
+ end
601
+
602
+
603
+ # default_project_dir = case type
604
+ # when :beamer
605
+ # "slides/#{Time.new.yea}"
606
+ # end
607
+ end # project
608
+
609
+
463
610
  ###
464
611
  # Select the forge (gforge, github, etc.) hosting the project sources
465
612
  ##
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  ################################################################################
3
- # Time-stamp: <Lun 2015-03-09 12:03 svarrette>
3
+ # Time-stamp: <Mon 2015-06-15 18:15 svarrette>
4
4
  ################################################################################
5
5
 
6
6
  require 'thor'
@@ -21,20 +21,9 @@ module FalkorLib
21
21
  #......................................
22
22
  desc "rootdir [options]", "Create a symlink '.root' which targets the root of the repository"
23
23
  def rootdir(dir = Dir.pwd)
24
- raise FalkorLib::ExecError "Not used in a Git repository" unless FalkorLib::Git.init?
25
- path = normalized_path(dir)
26
- relative_path_to_root = Pathname.new( FalkorLib::Git.rootdir(dir) ).relative_path_from Pathname.new( File.realpath(path))
27
- FalkorLib::Common.error "Already at the root directory of the Git repository" if "#{relative_path_to_root}" == "."
28
- target = options[:name] ? options[:name] : '.root'
29
- unless File.exists?( File.join(path, target))
30
- warning "creating the symboling link '#{target}' which points to '#{relative_path_to_root}'" if options[:verbose]
31
- # Format: ln_s(old, new, options = {}) -- Creates a symbolic link new which points to old.
32
- FileUtils.ln_s "#{relative_path_to_root}", "#{target}"
33
- end
24
+ FalkorLib::Bootstrap.rootlink(dir, options)
34
25
  end # rootdir
35
26
 
36
-
37
-
38
27
 
39
28
 
40
29
  end # class Link
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  ################################################################################
3
- # Time-stamp: <Dim 2015-03-29 17:52 svarrette>
3
+ # Time-stamp: <Tue 2015-06-16 09:05 svarrette>
4
4
  ################################################################################
5
5
 
6
6
  require 'thor'
@@ -57,6 +57,14 @@ By default, NAME is '.' meaning that the repository will be initialized in the c
57
57
  FalkorLib::Bootstrap.repo(name, options)
58
58
  end # repo
59
59
 
60
+ ###### slides ######
61
+ #......................................
62
+ desc "slides [options]", "Bootstrap LaTeX Beamer slides"
63
+ method_option :name, :aliases => '-n', :desc => 'Name of the LaTeX project'
64
+ #___________________
65
+ def slides(path = Dir.pwd)
66
+ FalkorLib::Bootstrap.latex(path, :beamer, options)
67
+ end # slides
60
68
 
61
69
  ###### trash ######
62
70
  desc "trash PATH", "Add a Trash directory"
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  ################################################################################
3
- # Time-stamp: <Dim 2015-03-29 18:47 svarrette>
3
+ # Time-stamp: <Tue 2015-06-16 09:33 svarrette>
4
4
  ################################################################################
5
5
 
6
6
  require "falkorlib"
@@ -362,13 +362,14 @@ module FalkorLib #:nodoc:
362
362
  ## Show the difference between a `content` string and an destination file (using Diff algorithm).
363
363
  # Obviosuly, if the outfile does not exists, no difference is proposed.
364
364
  # Supported options:
365
- # :no_interaction [boolean]: do not interact
365
+ # :no_interaction [boolean]: do not interact
366
366
  # :json_pretty_format [boolean]: write a json content, in pretty format
367
- #
367
+ # :no_commit [boolean]: do not (offer to) commit the changes
368
368
  # return 0 if nothing happened, 1 if a write has been done
369
369
  def show_diff_and_write(content, outfile, options = {
370
370
  :no_interaction => false,
371
371
  :json_pretty_format => false,
372
+ :no_commit => false,
372
373
  })
373
374
  if File.exists?( outfile )
374
375
  ref = File.read( outfile )
@@ -393,7 +394,7 @@ module FalkorLib #:nodoc:
393
394
  File.open("#{outfile}", "w+") do |f|
394
395
  f.write content
395
396
  end
396
- if FalkorLib::Git.init?(File.dirname(outfile))
397
+ if FalkorLib::Git.init?(File.dirname(outfile)) and ! options[:no_commit]
397
398
  do_commit = options[:no_interaction] ? 'yes' : ask( cyan(" ==> commit the changes (Y|n)"), 'Yes')
398
399
  FalkorLib::Git.add(outfile, "update content of '#{File.basename(outfile)}'") if do_commit =~ /y.*/i
399
400
  end
@@ -406,8 +407,10 @@ module FalkorLib #:nodoc:
406
407
  # :no_interaction [boolean]: do not interact
407
408
  # :srcdir [string]: source directory, make the `src` file relative to that directory
408
409
  # :outfile [string]: alter the outfile name (File.basename(src) by default)
410
+ # :no_commit [boolean]: do not (offer to) commit the changes
409
411
  def write_from_template(src,dstdir,options = {
410
412
  :no_interaction => false,
413
+ :no_commit => false,
411
414
  :srcdir => '',
412
415
  :outfile => ''
413
416
  })
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  ################################################################################
3
- # Time-stamp: <Sam 2015-01-24 19:33 svarrette>
3
+ # Time-stamp: <Tue 2015-06-16 10:12 svarrette>
4
4
  ################################################################################
5
5
  # Interface for the main Git operations
6
6
  #
@@ -54,8 +54,8 @@ module FalkorLib #:nodoc:
54
54
  end
55
55
 
56
56
  ## Check the availability of a given git command
57
- def command?(cmd, path = Dir.pwd)
58
- cg = MiniGit::Capturing.new(path)
57
+ def command?(cmd)
58
+ cg = MiniGit::Capturing.new()
59
59
  cmd_list = cg.help :a => true
60
60
  # typical run:
61
61
  # usage: git [--version] [--help] [-C <path>] [-c name=value]
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  ################################################################################
3
- # Time-stamp: <Tue 2015-05-26 19:03 svarrette>
3
+ # Time-stamp: <Tue 2015-06-16 10:12 svarrette>
4
4
  ################################################################################
5
5
  # Interface for the main Puppet Module operations
6
6
  #
@@ -156,7 +156,7 @@ module FalkorLib #:nodoc:
156
156
  info "Initialize RVM"
157
157
  init_rvm(moduledir)
158
158
  unless FalkorLib::Git.init?(moduledir)
159
- init_gitflow = command?('git-flow')
159
+ init_gitflow = FalkorLib::Git.command?('flow')
160
160
  warn "Git #{init_gitflow ? '[Flow]' : ''} is not initialized in #{moduledir}."
161
161
  a = ask("Proceed to git-flow initialization (Y|n)", 'Yes')
162
162
  return if a =~ /n.*/i
@@ -19,7 +19,7 @@ module FalkorLib #:nodoc:
19
19
  # MAJOR: Defines the major version
20
20
  # MINOR: Defines the minor version
21
21
  # PATCH: Defines the patch version
22
- MAJOR, MINOR, PATCH = 0, 5, 9
22
+ MAJOR, MINOR, PATCH = 0, 6, 0
23
23
 
24
24
  module_function
25
25
 
@@ -2,7 +2,7 @@
2
2
  #########################################
3
3
  # puppet_modules_spec.rb
4
4
  # @author Sebastien Varrette <Sebastien.Varrette@uni.lu>
5
- # Time-stamp: <Fri 2015-05-15 23:24 svarrette>
5
+ # Time-stamp: <Tue 2015-06-16 10:12 svarrette>
6
6
  #
7
7
  # @description Check the Puppet Modules operations
8
8
  #
@@ -0,0 +1,21 @@
1
+ (TeX-add-style-hook
2
+ "main.tex"
3
+ (lambda ()
4
+ (add-to-list 'LaTeX-verbatim-environments-local "semiverbatim")
5
+ (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperref")
6
+ (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperimage")
7
+ (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperbaseurl")
8
+ (add-to-list 'LaTeX-verbatim-macros-with-braces-local "nolinkurl")
9
+ (add-to-list 'LaTeX-verbatim-macros-with-braces-local "url")
10
+ (add-to-list 'LaTeX-verbatim-macros-with-braces-local "path")
11
+ (add-to-list 'LaTeX-verbatim-macros-with-delims-local "url")
12
+ (add-to-list 'LaTeX-verbatim-macros-with-delims-local "path")
13
+ (TeX-run-style-hooks
14
+ "latex2e"
15
+ "_content"
16
+ "beamer"
17
+ "beamer10"
18
+ "_style")
19
+ (LaTeX-add-counters
20
+ "finalframe")))
21
+
@@ -0,0 +1,247 @@
1
+ # A section in Markdow level 1
2
+
3
+ ## A subsection in Markdown level 2
4
+
5
+ ### Frametitle on level 3
6
+
7
+ _Note_: These examples are translated from the example of Romain Vimont
8
+
9
+ * see the [`mdbeamer` repository on Github](https://github.com/rom1v/mdbeamer)
10
+
11
+ #### Block on level 4
12
+
13
+ * item 1 in a block
14
+ * item 2 in a block
15
+ - sub item 1
16
+
17
+ ### More on Blocks
18
+
19
+ \blockbegin{A First Block}
20
+
21
+ inside the __block__ in *Markdown*
22
+
23
+ \blockend
24
+
25
+ Comments below the first block.
26
+
27
+ #### A second block
28
+
29
+ * inside the second block
30
+
31
+
32
+ ### Why?
33
+
34
+ * the source code is more readable
35
+ - sub item 1
36
+ - sub item 2
37
+ * sub sub item 1
38
+ * sub sub item 2
39
+ * The syntax _is_ more **convenient**
40
+ - Strikeout: This ~~is deleted text.~~
41
+ - Superscripts and subscripts:
42
+ * H~2~O is a liquid
43
+ * 2^10^ is 1024.
44
+ * [Write me!](mailto:sebastien.varrette@uni.lu)
45
+
46
+ ### Code block
47
+
48
+ Indented code blocks
49
+
50
+ if (a > 3) {
51
+ moveShip(5 * gravity, DOWN);
52
+ }
53
+
54
+ Fenced code blocks
55
+
56
+ ~~~java
57
+ public static void main(String... args) {
58
+ System.out.println("Hello world!");
59
+ }
60
+ ~~~
61
+
62
+ ~~~{.c}
63
+ int main(int argc, char *argv[]) {
64
+ printf("Hello world!\n");
65
+ return 0;
66
+ }
67
+ ~~~
68
+
69
+ ### Lists
70
+
71
+ * item one
72
+ * item two
73
+
74
+ <!-- -->
75
+
76
+ * another list item 1
77
+ * another list item 2
78
+
79
+
80
+ ### Enumerate list
81
+
82
+ 1. clone the repository
83
+ 2. install `pandoc`
84
+ 3. Install the dependencies
85
+ a. `texlive-latex-base`
86
+ b. `latex-beamer`
87
+ 4. Install a reader `Skim`
88
+
89
+ ### Citations and appearance
90
+
91
+ This is from [*Mitch Resnick*](https://en.wikipedia.org/wiki/Mitchel_Resnick).
92
+
93
+ > If you learn to read, you can then read to learn.\
94
+ > If you learn to code, you can then code to learn.[^ted]
95
+
96
+ [^ted]: \tiny<http://www.ted.com/talks/mitch_resnick_let_s_teach_kids_to_code.html>
97
+
98
+ Now a step-by-step appearance:
99
+
100
+ > - first
101
+ > - then
102
+ > - finally
103
+
104
+ ### More appearance
105
+
106
+ A first paragraph
107
+
108
+ . . .
109
+
110
+ Then another.
111
+
112
+ . . .
113
+
114
+ Now some formatting:
115
+
116
+ | There exists 2 types of persons:
117
+ | those who understand recursivity and
118
+ | those who don't understand that there exists 2 types of persons:
119
+ | those who understand recursivity and
120
+ | those who don't understand that there exists 2 types of persons:
121
+ | ...
122
+
123
+
124
+
125
+ ### \LaTeX /Beamer Special
126
+
127
+ Some elements __do not__ exist in Pandoc Markdown.
128
+ In this case, you shall simply use \LaTeX.
129
+
130
+ \begin{alertblock}{Alert}
131
+ That's an alertblock
132
+ \end{alertblock}
133
+
134
+ \begin{exampleblock}{Example}
135
+ That's an exampleblock
136
+ \end{exampleblock}
137
+
138
+ ### Maths \& Tables
139
+
140
+ With some Formulaes:
141
+
142
+ $$
143
+ \frac{\pi}{4}=\int_0^1 \sqrt{1-x^2}\mathrm dx
144
+ $$
145
+
146
+ And now some table
147
+
148
+ | Test | col2 | col3 |
149
+ |--------|------|------|
150
+ | item 1 | 14 | 28 |
151
+ | item 2 | 1 | 1 |
152
+ | | | |
153
+
154
+ ### Images
155
+
156
+ The classical markdown syntax `![](<path/to/image>)` does not allow any control on the size
157
+
158
+ So you probaby wish to do it in \LaTeX\ directly
159
+
160
+ \centerline{\includegraphics[width=4em]{logo_ULHPC.pdf}}
161
+
162
+ A normal (left aligned) text afterward
163
+
164
+ ### Columns (with markdown inside)
165
+
166
+ To permit the usage of Markdown within a beamer columns environment, you have to use the following commands:
167
+
168
+ ~~~latex
169
+ \columnsbegin{<width>}
170
+ ...
171
+ \column{<width>}
172
+ ...
173
+ \columnsend
174
+ ~~~
175
+
176
+ \columnsbegin{.5\textwidth}
177
+
178
+ Some text on the left column
179
+
180
+ * item 1
181
+ * item 2
182
+ - sub item 1
183
+
184
+ \column{.5\textwidth}
185
+
186
+ Text on the right column
187
+
188
+ 1. enum 1
189
+ 2. enum 2
190
+ a. sub enum 1
191
+
192
+ \columnsend
193
+
194
+ ### Columns w. blocks w. Markdown inside
195
+
196
+ \columnsbegin{.5\textwidth}
197
+
198
+ \blockbegin{A Block in A Column}
199
+
200
+ * item 1
201
+ * item 2
202
+ - sub item 1
203
+ * item 3
204
+ - sub item 1
205
+ - sub item 2
206
+
207
+ \blockend
208
+
209
+ \column{.5\textwidth}
210
+
211
+ Inside a column environment:
212
+
213
+ * the `block` environment raise an error
214
+ * instead, use the following commands:
215
+
216
+ ~~~latex
217
+ \blockbegin{Title}
218
+ ...
219
+ \blockend
220
+ ~~~
221
+
222
+ \columnsend
223
+
224
+ * This allows to use the Markdown syntax **in** the block.
225
+ - only required with the `\columnsbegin ... \columnsend` construction
226
+
227
+
228
+ ### Links
229
+
230
+ \scriptsize
231
+
232
+ Links on description environment:
233
+
234
+ pandoc
235
+ ~ <http://johnmacfarlane.net/pandoc/demo/example9/pandocs-markdown.html>
236
+
237
+ beamer
238
+ ~ <http://johnmacfarlane.net/pandoc/demo/example9/producing-slide-shows-with-pandoc.html>
239
+
240
+ In french
241
+ ~ <http://enacit1.epfl.ch/markdown-pandoc/>
242
+
243
+ See [UL HPC website].
244
+
245
+ [UL HPC website]: http://hpc.uni.lu
246
+
247
+
@@ -0,0 +1,123 @@
1
+ % =============================================================================
2
+ % File: <%= config[:name] %>.tex --
3
+ % Author(s): <%= config[:author] %> (<%= config[:mail] %>)
4
+ % Time-stamp: <Tue 2015-06-16 09:22 svarrette>
5
+ %
6
+ % Copyright (c) <%= Time.now.year %> <%= config[:author] %><Sebastien.Varrette@uni.lu>
7
+ %
8
+ % For more information:
9
+ % - LaTeX: http://www.latex-project.org/
10
+ % - Beamer: https://bitbucket.org/rivanvx/beamer/
11
+ % - LaTeX symbol list:
12
+ % http://www.ctan.org/tex-archive/info/symbols/comprehensive/symbols-a4.pdf
13
+ % =============================================================================
14
+
15
+ \documentclass{beamer}
16
+ % \documentclass[draft]{beamer}
17
+ \usepackage{_style}
18
+
19
+ % The key part to use my theme -- if you precise nothing, the image that
20
+ % illustrate the slides is assumed to be images/slides_image.jpg
21
+ \usetheme[image=<%= config[:image] %>]{Falkor}
22
+
23
+ % Not integrated in my theme as not everybody wants that
24
+ \AtBeginSection[]
25
+ {
26
+ \frame{
27
+ \frametitle{Summary}
28
+ {\scriptsize\tableofcontents[currentsection]}
29
+ }
30
+ }
31
+
32
+ \graphicspath{{images/}} % Add this directory to the searched paths for graphics
33
+
34
+
35
+ %%%%%%%%%% Header %%%%%%%%%%%%
36
+ \title{<%= config[:title] %>}
37
+ \subtitle{<%= config[:subtitle] %>}
38
+
39
+ \author{<%= config[:author] %>}
40
+ \institute[PCOG Research unit]{
41
+ Parallel Computing and Optimization Group (\href{http://pcog.uni.lu}{PCOG}),
42
+ University of Luxembourg (\href{http://www.uni.lu}{UL}), Luxembourg
43
+ }
44
+
45
+ % Mandatory to **declare** a logo to be placed on the bottom right -- normally the
46
+ % university logo. ADAPT ACCORDINGLY:
47
+ \pgfdeclareimage[height=0.8cm]{logo}{<%= config[:logo] %>}
48
+
49
+ \date{}
50
+
51
+ %%%%%%%%%%%%% Body %%%%%%%%%%%%%%%
52
+ \begin{document}
53
+
54
+ \begin{frame}
55
+ \vspace{2.5em}
56
+ \titlepage
57
+ \end{frame}
58
+
59
+ % ......
60
+ \frame{
61
+ \frametitle{Summary}
62
+ {\scriptsize
63
+ \tableofcontents
64
+ }
65
+ }
66
+
67
+ % ========================
68
+ \input{_content.md} % Markdown content
69
+ % ========================
70
+
71
+ % ======================== END =========================
72
+ \section*{Thank you for your attention...}
73
+ \frame{
74
+ \frametitle{Questions?}
75
+ % ~~~~~~~~~~~~~~
76
+ \begin{columns}
77
+ \column{0.5\textwidth}
78
+ % \emph{Contact}\\
79
+ {\tiny
80
+ \emph{<%= config[:author] %>}\\
81
+ ~~~~ \textit{mail:} \href{mailto:<%= config[:mail] %>}{<%= config[:mail] %>}\\
82
+ ~~~~ Office E-007\\
83
+ ~~~~ Campus Kirchberg\\
84
+ ~~~~ 6, rue Coudenhove-Kalergi\\
85
+ ~~~~ L-1359 Luxembourg
86
+
87
+ }
88
+ \column{0.5\textwidth}
89
+ % \scalebox{8}{\emph{?}}
90
+ \includegraphics[width=1.5in]{question.jpg}
91
+ \end{columns}
92
+ % Below is the table of content over 2 columns
93
+ \vfill
94
+ \begin{multicols}{2}
95
+ {\tiny \tableofcontents}
96
+ \end{multicols}
97
+
98
+ }
99
+
100
+ \newcounter{finalframe}
101
+ \setcounter{finalframe}{\value{framenumber}}
102
+
103
+ % %.......
104
+ % \frame{
105
+ % \frametitle{}
106
+ % \vfill
107
+ % \centering \LARGE Appendix\footnote{notice the slide number below...}
108
+ % \vfill
109
+ % }
110
+
111
+ \setcounter{framenumber}{\value{finalframe}}
112
+
113
+ \end{document}
114
+
115
+ % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
116
+ % eof
117
+ %
118
+ % Local Variables:
119
+ % mode: latex
120
+ % mode: flyspell
121
+ % mode: visual-line
122
+ % TeX-master: "<%= config[:name] %>.tex"
123
+ % End:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: falkorlib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.9
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastien Varrette
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-02 00:00:00.000000000 Z
11
+ date: 2015-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -414,6 +414,12 @@ files:
414
414
  - templates/Rakefile/footer_rakefile.erb
415
415
  - templates/Rakefile/header_rakefile.erb
416
416
  - templates/Rakefile/rakefile_gitflow.erb
417
+ - templates/latex/beamer/.texinfo/main.tex.el
418
+ - templates/latex/beamer/_content.md.erb
419
+ - templates/latex/beamer/main.tex.erb
420
+ - templates/latex/images/logo_UL.pdf
421
+ - templates/latex/images/logo_ULHPC.pdf
422
+ - templates/latex/images/question.jpg
417
423
  - templates/motd/motd.erb
418
424
  - templates/puppet/modules/.gitignore
419
425
  - templates/puppet/modules/.pmtignore