Changed css and removed some log
This commit is contained in:
parent
2ad4ca2991
commit
8c9cc80a85
6 changed files with 31 additions and 29 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,3 +5,4 @@ my_book.tex
|
|||
tmp/
|
||||
site/
|
||||
svgsite/
|
||||
include/.sass-cache
|
||||
|
|
53
Rakefile
53
Rakefile
|
@ -78,6 +78,31 @@ task :html do
|
|||
|
||||
attr_accessor :filelist
|
||||
|
||||
def initialize
|
||||
|
||||
eval File.new('config_html.rb','r').read
|
||||
|
||||
@prefilters=[]
|
||||
@prefilters<<=MarkdownMacros.new
|
||||
@prefilters<<=MarkdownPostMacros.new
|
||||
|
||||
@postfilters=[]
|
||||
html_template=HTMLTemplate.new
|
||||
html_template.template=@general_template
|
||||
html_template.title=@title
|
||||
html_template.subtitle=@subtitle
|
||||
html_template.author=@author
|
||||
html_template.html_headers=@html_headers
|
||||
html_template.homeURL="index.html"
|
||||
@postfilters<<=Links.new
|
||||
@postfilters<<=html_template
|
||||
@postfilters<<=MathJax.new
|
||||
|
||||
@filelist=Dir.glob("content/**/*.md").sort.map do |fic|
|
||||
[ fic, fic.sub(/^content\//,"site/").sub(/.md$/,".html") ]
|
||||
end
|
||||
end
|
||||
|
||||
# take a string from kramdown
|
||||
# returns LaTeX after filter
|
||||
def compile_text(tmp)
|
||||
|
@ -86,7 +111,8 @@ task :html do
|
|||
end
|
||||
|
||||
# compile to latex
|
||||
tmp=Kramdown::Document.new(tmp, :latex_headers => %w(chapter section subsection paragraph subparagraph subsubparagraph)).to_html
|
||||
# puts tmp
|
||||
tmp=Kramdown::Document.new(tmp).to_html
|
||||
|
||||
# post filters
|
||||
@postfilters.each{ |f| tmp=f.run(tmp) }
|
||||
|
@ -127,31 +153,6 @@ task :html do
|
|||
fic.close
|
||||
end
|
||||
|
||||
def initialize
|
||||
|
||||
eval File.new('config_html.rb','r').read
|
||||
|
||||
@prefilters=[]
|
||||
@prefilters<<=MarkdownMacros.new
|
||||
@prefilters<<=MarkdownPostMacros.new
|
||||
|
||||
@postfilters=[]
|
||||
html_template=HTMLTemplate.new
|
||||
html_template.template=@general_template
|
||||
html_template.title=@title
|
||||
html_template.subtitle=@subtitle
|
||||
html_template.author=@author
|
||||
html_template.html_headers=@html_headers
|
||||
html_template.homeURL="index.html"
|
||||
@postfilters<<=Links.new
|
||||
@postfilters<<=html_template
|
||||
@postfilters<<=MathJax.new
|
||||
|
||||
@filelist=Dir.glob("content/**/*.md").sort.map do |fic|
|
||||
[ fic, fic.sub(/^content\//,"site/").sub(/.md$/,".html") ]
|
||||
end
|
||||
end
|
||||
|
||||
def run
|
||||
i=-1
|
||||
@filelist.each do |doublon|
|
||||
|
|
|
@ -29,7 +29,7 @@ class MarkdownPostMacros
|
|||
|
||||
def run (content)
|
||||
content.gsub(/^POSTMACRO\((\w[a-zA-Z0-9_]*)\) = LATEX: ((.|\n)*?) HTML: ((.|\n)*?) ENDMACRO/m) do |m|
|
||||
puts %{ mkd macro %#{$1}\t [:latex] => #{$2} [:html] => #{$4}}
|
||||
# puts %{ mkd macro %#{$1}\t [:latex] => #{$2} [:html] => #{$4}}
|
||||
@macro[$1.intern]='{::nomarkdown type="latex"}'+$2+'{:/nomarkdown}{::nomarkdown type="html"}'+$4+'{:/nomarkdown}'
|
||||
""
|
||||
end.gsub(/((\\)?)%(\w[a-zA-Z0-9_]*)/) do |m|
|
||||
|
|
|
@ -56,7 +56,7 @@ pre {
|
|||
|
||||
pre, code {
|
||||
font-family: monaco, monospace;
|
||||
font-size: 0.7em; }
|
||||
font-size: 0.8em; }
|
||||
|
||||
p code {
|
||||
font-family: monospace;
|
||||
|
|
|
@ -128,7 +128,7 @@ pre
|
|||
pre, code
|
||||
font:
|
||||
family: monaco, monospace
|
||||
size: .7em
|
||||
size: .8em
|
||||
|
||||
p code
|
||||
font:
|
||||
|
|
BIN
krambook.pdf
BIN
krambook.pdf
Binary file not shown.
Loading…
Reference in a new issue