Merge branch 'master' of file:///Users/esposito/Documents/krambook

Conflicts:
	Rakefile
	content/02_Install.md
	content/03_Tutorial.md
	include/main.css
	include/main.tex
	krambook.pdf
This commit is contained in:
Yann Esposito (Yogsototh) 2010-12-14 11:39:58 +01:00
commit 1d14b72030
13 changed files with 1001 additions and 176 deletions

1
.gitignore vendored
View file

@ -5,3 +5,4 @@ my_book.tex
tmp/
site/
svgsite/
include/.sass-cache

View file

@ -67,8 +67,9 @@ task :html do
require 'rubygems'
require 'kramdown'
require 'filters/markdown_macros'
require 'filters/mkd_post_latex_macros_to_html'
require 'filters/markdown_postmacros'
require 'filters/html_template'
require 'filters/fix_postmacros'
require 'filters/mathjax'
require 'filters/links'
@ -78,6 +79,31 @@ task :html do
attr_accessor :filelist
def initialize
eval File.new('config_html.rb','r').read
@prefilters=[]
@prefilters<<=MarkdownMacros.new
@prefilters<<=MarkdownPostMacros.new
@prefilters<<=FixPostMacros.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.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 +112,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) }
@ -99,7 +126,9 @@ task :html do
# puts "READ: " + txt
txt.sub!( /<!-- INCLUDES -->/ ) do
@filelist.map do |source,dest|
if File::basename(source) == '00_macros.md'
if File::basename(source) == '00_Macros.md'
""
elsif File::basename(source) =~ /\.hide\./
""
else
%{<div class="block">
@ -120,38 +149,11 @@ task :html do
txt.gsub!(%r{<!-- Title -->},@title)
txt.gsub!(%r{<!-- Subtitle -->},@subtitle)
# puts "AFTER TITLE: " + txt
txt.sub!( %r{<!-- HTML HEADER -->},@html_headers)
# puts "AFTER HTML HEADER: " + txt
fic=File.new("site/index.html","w")
fic.write(txt)
fic.close
end
def initialize
eval File.new('config_html.rb','r').read
@prefilters=[]
@prefilters<<=MarkdownMacros.new
@postfilters=[]
@postfilters<<=MarkdownPostLatexMacrosToHTML.new
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|
@ -161,7 +163,7 @@ task :html do
puts source
# read and compile in LaTeX the .md file
templateindex=2
templateindex=1
if (i+1)<@filelist.size
@postfilters[templateindex].nextURL = '/' + @filelist[i + 1][1].gsub('site/','')
else
@ -199,8 +201,8 @@ task :compile do
require 'rubygems'
require 'kramdown'
require 'filters/markdown_macros'
require 'filters/mkd_post_latex_macros'
require 'filters/star_section'
require 'filters/markdown_postmacros'
require 'filters/fix_postmacros_latex'
class KrambookCompile
require 'config.rb'
@ -233,8 +235,7 @@ task :compile do
end.join("\n")
end.
sub!(%{\\author\{\}},'\author{'+@author+'}').
sub!(%{\\title\{\}},'\title{'+@title+'}').
sub!( /%%# LATEX HEADER FROM config\.rb #%%/,@latex_headers)
sub!(%{\\title\{\}},'\title{'+@title+'}')
fic=File.new("tmp/#{@pdfname}.tex","w")
fic.write(txt)
fic.close
@ -246,10 +247,10 @@ task :compile do
@prefilters=[]
@prefilters<<=MarkdownMacros.new
@prefilters<<=MarkdownPostMacros.new
@prefilters<<=FixPostMacros.new
@postfilters=[]
@postfilters<<=MarkdownPostLatexMacros.new
@postfilters<<=StarSection.new
@filelist=Dir.glob("content/**/*.md").sort.map do |fic|
[ fic, fic.sub(/^content\//,"tmp/").sub(/.md$/,".tex") ]

78
bin/krambook Executable file
View file

@ -0,0 +1,78 @@
#!/usr/bin/env zsh
krambookDir="$(dirname $(dirname $0))"
FORCE=0; [[ $1 = '-f' ]] && { FORCE=1; shift }
(($#<1)) && {
print -- "usage: $0:t [-f] project_name"
exit 1
}>&2
projectName=$1
((FORCE==1)) && {
[[ -e $projectName ]] && { \rm -rf $projectName }
}
[[ -e $projectName ]] && {
print -- "$projectName already exists"
exit 1
}>&2
mkdir $projectName
for fic in $krambookDir/{filters,include,config.ru,Rakefile}; do
cp -r $fic $projectName
(($?)) && {
print -- "something went wrong (tried to copy $fic)"
}>&2
done
mkdir $projectName/{tmp,site,content}
(($?)) && {
print -- "something went wrong creation of 'tmp,site,content' dir"
}>&2
cp $krambookDir/content/00_Macros.md $projectName/content/
>$projectName/content/10_Introduction.md <<END
# Congratulation
You've configured correctly krambook. You can find informations on
[krambook.espozito.com](krambook.espozito.com).
You can use macro writing \%latex which will render as %latex.
- To compile your book to PDF just run \`rake\`
- To compile html website just run \`rake html\`
- To compile svg website from the generated pdf just run \`rake svg\`
END
>$projectName/config.rb <<END
# Use this file to configure some general variables
@title="$projectName"
@author="$USER"
# file name
@pdfname="$projectName"
# Remember not to remove lines begining by %%#
# look at include/template.tex for example
@template_file="include/template.tex"
END
>$projectName/config_html.rb <<END
@title=%{$projectName}
@subtitle=%{Subtitle in config_html.rb}
@author="$USER"
# file name
@pdfname="$projectName"
# Remember to not remove lines begining by %%#
# look at include/template.html for example
@template_file="include/toc_template.html"
@general_template="include/template.html"
END
print -- 'Congratulation, now your next step should be:'
print -- "cd $projectName"
print -- "rake"

15
content/00_Macros.md Normal file
View file

@ -0,0 +1,15 @@
MACRO(markdown) = `markdown` ENDMACRO
MACRO(kramdown) = [`kramdown`](http://kramdown.rubyforge.org) ENDMACRO
MACRO(krambook) = [`krambook`](http://krambook.espozito.com) ENDMACRO
POSTMACRO(beginbox) = LATEX: \medskip\fbox{\colorbox{boxcolor}{\begin{minipage}{.80\linewidth}% HTML: <div class="encadre"> ENDMACRO
POSTMACRO(endbox) = LATEX: \end{minipage}}}\medskip HTML: </div> ENDMACRO
POSTMACRO(tex) = LATEX: \ytex HTML: <span style="text-transform: uppercase">T<sub style="vertical-align: -0.5ex; margin-left: -0.1667em; margin-right: -0.125em; font-size: 1em">e</sub>X</span> ENDMACRO
POSTMACRO(latex) = LATEX: \ylatex HTML: <span style="text-transform: uppercase">L<sup style="vertical-align: 0.15em; margin-left: -0.36em; margin-right: -0.15em; font-size: .85em">a</sup>T<sub style="vertical-align: -0.5ex; margin-left: -0.1667em; margin-right: -0.125em; font-size: 1em">e</sub>X</span> ENDMACRO
POSTMACRO(xelatex) = LATEX: \yxelatex HTML: <span style="text-transform: uppercase">X<sub style="vertical-align: -0.5ex; margin-left: -0.1667em; margin-right: -0.125em; font-size: 1em">&#x018E;</sub>L<sup style="vertical-align: 0.15em; margin-left: -0.36em; margin-right: -0.15em; font-size: .85em">a</sup>T<sub style="vertical-align: -0.5ex; margin-left: -0.1667em; margin-right: -0.125em; font-size: 1em">e</sub>X</span> ENDMACRO

15
filters/fix_postmacros.rb Normal file
View file

@ -0,0 +1,15 @@
# Fix a problem with kramdown
#
# - {::nomarkdown}x{:/nomarkdown}
#
# will render badly
# therefore we will transform all
# of these form adding a return
class FixPostMacros
def run (content)
content.gsub(/(\s*[-+*]) (\{::nomarkdown(.|\n)*?\{:\/nomarkdown\})/m) do |m|
%{#{$1} <span>#{$2}</span>}
end
end
end

View file

@ -0,0 +1,15 @@
# Fix a problem with kramdown
#
# - {::nomarkdown}x{:/nomarkdown}
#
# will render badly
# therefore we will transform all
# of these form adding a return
class FixPostMacros
def run (content)
content.gsub(/(\s*[-+*]) (\{::nomarkdown)/m) do |m|
%{#{$1} {::comment/}#{$2}}
end
end
end

View file

@ -0,0 +1,48 @@
# Add macros to Markdown
#
# Here is a %test.
#
# you could add a macro
# within the markdown file by
#
# POSTMACRO(macro_name) = LATEX: latex code HTML: html code ENDMACRO
#
class MarkdownPostMacros
attr_accessor :macro
def initialize()
super
@macro={}
end
def macro_value_for(ident)
return '%' if ident.nil? or ident==""
ident=ident.intern
return %{%#{ident}} if @macro[ident].nil?
if @macro[ident] =~ /ruby: ((.|n)*)/m
return eval $1
else
return @macro[ident]
end
end
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}}
@macro[$1.intern]='{::nomarkdown type="latex"}'+$2+'{:/nomarkdown}{::nomarkdown type="html"}'+$4+'{:/nomarkdown}'
""
end.gsub(/((\\)?)%(\w[a-zA-Z0-9_]*)/) do |m|
# puts " mkd macro MATCH: 1. #{$1} 2. #{$2} 3. #{$3}"
if $3 != ""
if $1 == ""
macro_value_for($3)
else
'`%'+$3+'`'
end
else
m
end
end
end
end

View file

@ -1,63 +0,0 @@
# Add macros to Markdown
#
# Here is a %test.
#
# you could add a macro like this
#
# filter.macro={
# :latex => %{\LaTeX}
# }
#
# or within the markdown file by
#
# %%% macro_name %%% macro_value %%%
#
class MarkdownPostLatexMacros
attr_accessor :macro
def initialize()
super
@macro={}
end
def macro_value_for(ident)
return '%' if ident.nil? or ident==""
ident=ident.intern
return %{%#{ident}} if @macro[ident].nil?
if @macro[ident] =~ /ruby: ((.|n)*)/m
return eval $1
else
return @macro[ident]
end
end
def run (content)
content.gsub(/^POSTMACRO\((\w(\w|\d|\\_)*)\) = LATEX: ((.|\n)*?) (HTML: (.|\n)*? )?ENDMACRO/m) do |m|
name=$1
value=$3
# puts %{ ADD LATEX MACRO: %#{name}\t=> #{value}}
name.gsub!(/\\_/,'_')
value=value.gsub(/\\textbackslash\{\}/,'\\').
gsub(/\\textbar\{\}/,'|').
gsub(/\\%/,'%').
gsub(/\\_/,'_').
gsub(/\\\{/,'{').
gsub(/\\\}/,'}')
# puts %{ ltx macro %#{name}\t=> #{value}}
@macro[name.intern]=value
""
end.gsub(/((\\textbackslash\{\})?)\\%(\w(\w|\d|\\_)*)/) do |m|
# puts " ltx macro MATCH: #{$3}"
if $3 != ""
if $1 == ""
macro_value_for($3.gsub(/\\_/,'_'))
else
%{\\texttt{\\%#{$3}}}
end
else
m
end
end
end
end

View file

@ -1,72 +0,0 @@
# Add macros to Markdown
#
# Here is a %test.
#
# you could add a macro like this
#
# filter.macro={
# :latex => %{\LaTeX}
# }
#
# or within the markdown file by
#
# %%% macro_name %%% macro_value %%%
#
require "cgi"
class MarkdownPostLatexMacrosToHTML
attr_accessor :macro
def initialize()
super
@macro={}
end
def macro_value_for(ident)
return '%' if ident.nil? or ident==""
ident=ident.intern
return %{%#{ident}} if @macro[ident].nil?
if @macro[ident] =~ /ruby: ((.|n)*)/m
return eval $1
else
return @macro[ident]
end
end
def run (content)
content.gsub(/(^<p>\s*)?POSTMACRO\((\w(\w|\d|\\_)*)\) = LATEX: ((.|\n)*?) (HTML: ((.|\n)*?) )?ENDMACRO((\s|\n)*<\/p>)?/m) do |m|
name=$2
value=CGI::unescapeHTML($7).gsub("&rdquo;",'"')
# puts "SAVE HTML MACRO: #{name} => #{value}"
@macro[name.intern]=value
""
end.gsub(/<p>(\s|\n)*(\\?)%(\w[a-zA-Z0-9_]*)(\s|\n)*<\/p>/m) do |m|
# puts " ltx macro MATCH: #{$3}"
protected=$2
name=$3
if name != ""
if protected == ""
macro_value_for(name)
else
%{<code>%#{name}</code>}
end
else
m
end
end.gsub(/(\\?)%(\w[a-zA-Z0-9_]*)/) do |m|
# puts " ltx macro MATCH: #{$3}"
protected=$1
name=$2
if name != ""
if protected == ""
macro_value_for(name)
else
%{<code>%#{name}</code>}
end
else
m
end
end
end
end

File diff suppressed because one or more lines are too long

View file

@ -22,3 +22,17 @@
\usepackage{fontspec}
\usepackage{mflogo}
\usepackage{enumitem}
% -- Better LaTeX macro
\usepackage{expl3}
\ExplSyntaxOn
\newcommand \latinabbrev [1] {
\peek_catcode:NTF a
{ #1 \@ ~ }
{ #1 \@ }
}
\ExplSyntaxOff
\def\ytex{\latinabbrev{\TeX}}
\def\ylatex{\latinabbrev{\LaTeX}}
\def\yxelatex{\latinabbrev{\XeLaTeX}}

765
include/main_s.css Normal file
View file

@ -0,0 +1,765 @@
$behindColor: #111111
$mainTextColor: $behindColor
$mainBackgroundColor: white
$revealColor: #d50000
$secondRevealColor: #e25f2f
$lighterRevealColor: #ffbe96
$imageBackgroundColor: $mainBackgroundColor
$imageBorderColor: #cccccc
$mainLinkColor: $mainTextColor
$textLinkColor: #555555
$highlightColor: #888888
$highlightBlockColor: #555555
$highlightRevealColor: #e25f2f
$lighterText: #cccccc
$lighterColor: #eeeeee
$lighterColorBorderTop: $lighterText
$lighterColorBorderBottom: $lighterText
$secondTextColor: #666666
$codeBlockColor: $mainBackgroundColor
$codeBlockBackgroundColor: $behindColor
=mainColor
color: $behindColor
background:
color: $mainBackgroundColor
=lightColor
color: $lighterText
a
color: $lighterText
a:hover
color: $lighterRevealColor
=highlight
font:
style: italic
padding: 0.5em 1em
color: $highlightBlockColor
a:hover
color: $revealColor
strong, b, i, em
font:
weight: normal
style: normal
color: $behindColor
=secondColor
color: $behindColor
background:
color: $lighterColor
border:
top: 1px solid $lighterColorBorderTop
bottom: 1px solid $lighterColorBorderBottom
a
color: $secondTextColor
a:hover
color: $secondRevealColor
strong, b, i, em, .nicer
color: $lighterRevealColor
hr
color: $secondTextColor
border:
top: 1px solid $secondTextColor
strong, b, i, em
color: $behindColor
=revealColor
color: $revealColor
=codeColor
background:
color: $codeBlockBackgroundColor
color: $codeBlockColor
table.description tr td
border: 1px solid $lighterColor
.assombris20
background-color: $lighterColor
body
color: $behindColor
background:
color: $mainBackgroundColor
#content
+mainColor
a:hover
text-shadow: 0 0 2px #FAA
a, a:link, a:visited, a:active, a:hover, #clickcomment
text-decoration: none
outline: none
a, a:link, a:visited, a:active, #clickcomment
color: $mainLinkColor
a:hover, #clickcomment:hover
+revealColor
hr
color: $lighterColor
border:
top: 1px solid $lighterColor
bottom: none
left: none
right: none
ul
list-style: square
ol,ul
padding-left: 0
ol li, ul li
margin: 1em 0
ol li ul, ol li ol, ul li ol, ul li ul
margin: 1em 1em
body, h1, h2, h3, h4, #entete, .tag
font-family: Georgia, Palatino, "Century Schoolbook L", "Times New Roman", Times, serif
line-height: 1.4em
pre
+codeColor
padding: 1em
line-height: 1.2em
pre, code
font:
family: monaco, monospace
size: .8em
p code
font:
family: monospace
size: 1em
p
margin-bottom: 1.2em
blockquote
+highlight
abbr,
acronym
font-variant: small-caps
text:
decoration: none
border:
bottom:
width: 0
// -- STYLE --
#titre
letter-spacing: -0.06em
border:
bottom: 4px double $lighterText
top: 4px double $lighterText
#liens .active, #sousliens
+secondColor
border-top: none
// -- FOOTER --
#lastmod
font-size: 0.8em
// --- DYNAMICS --
.nojsbutton
font-size: 2.5em
#clickcomment
cursor: pointer
font-size: 1.2em
// -- TYPOGRAPHY --
.small
font-size: 0.8em
.sc
font-variant: small-caps
.impact, .darkimpact
font-size: 2em
margin: 0 auto 1em auto
line-height: 1.3em
// -- DATES --
h1 > .date
font-size: 0.6em
color: $behindColor
.date
font-size: 0.8em
color: $mainBackgroundColor
border: 1px solid $mainTextColor
text-align: center
width: 4.1em
line-height: 1.5em
display: inline-block
vertical-align: middle
margin-right: 1em
.date .day,
.date .month,
.date .year
display: block
.date .day
color: $behindColor
background-color: $mainBackgroundColor
float: left
width: 1.7em
.date .month
float: right
width: 2.3em
background-color: $behindColor
color: $mainBackgroundColor
.date .year
line-height: 3ex
clear: both
+secondColor
// --- LAYOUTS --
$VPadCorps: 3em
$VMarginCorps: 3em
// ATTENTION DOIT ETRE 0 pour le bon callage
$HMarginCorps: 0
$content_width: 52em
body
text-align: center
font-size: .9em
body > #entete
position: absolute
left: 0
top: 0.5em
width: 100%
min-width: $content_width - 2em
z-index: 8000
padding-bottom: 1em
margin-bottom: $VMarginCorps
body > #content > #entete > #choix > #choixrss > #rss
font-size: 1em
#titre h2
width: 80%
margin-left: auto
margin-right: auto
text-align: center
color: $lighterText
#titre
text-align: center
width: 100%
#titre h1, #titre h2
padding-left: 1em
padding-right: 1em
// le pied de page
#bottom
clear: right
margin-right: 0px
padding: 1.5em
line-height: 1.5em
color: $lighterText
margin-top: 2em
text-align: center
a
color: $lighterText
a:hover
+revealColor
// Les menus
#sousliens
padding: 1em 0
line-height: 2em
#sousliens ul
list-style: none
margin-left: 4em
ul.horizontal li
display: inline
font-size: 0.9em
ul.horizontal
margin-top: 0px
margin-bottom: 0px
#entete
padding-top: 0.1em
border-top: 1px solid $lighterColorBorderTop
border-bottom: 1px solid $lighterColorBorderTop
#liens
width: 100%
padding: 0
clear: both
margin-top: 0.5em
#liens ul
width: 100%
clear: both
padding: 0
margin: 0
$hauteur_menu: 4em
#liens ul li
display: inline-block
height: $hauteur_menu
margin-left: 0.2em
margin-right: 0.2em
width: 23%
#liens ul li a,
#liens ul li span
width: 100%
display: block
line-height: $hauteur_menu
// Un 'helper'
.clear
clear: both
// Le Contenu
#content
line-height: 4em
margin-left: auto
margin-right: auto
margin-top: 0
position: relative
clear: both
width: $content_width
#content > #choix
margin-top: 1em
$contentMargin: 0em
.encadre, .black, .red, .intro, .resume, .shadow
padding:
left: 2em
right: 2em
margin:
top: 2em
bottom: 2em
.encadre, .black, .red, .shadow
+secondColor
.intro, .resume
font-size: 0.9em
+highlight
#afterheader > h1
width: 100%
padding-top: 1.5em
text-align: left
#afterheader
padding-left: $contentMargin
padding-right: $contentMargin
#sousliens
margin:
top: $VMarginCorps
bottom: $VMarginCorps
font-size: 1.2em
letter-spacing: 1px
text-align: left
clear: both
.twilight
line-height: 1.1em
$fontcorps: 1.25
.corps
font-family: Georgia, Palatino, "Century Schoolbook L", "Times New Roman", Times, serif
font-size: #{$fontcorps}em
line-height: 1.6em
text-align: justify
text-align: left
padding: $VPadCorps 3em
margin: 0 $HMarginCorps
border-bottom: 1px $lighterColorBorderBottom solid
clear: both
$corps_width: ($content_width - 2 * $contentMargin) / $fontcorps
$hpadding: 1
.corps img
max-width: 30em
border: 1px solid $imageBorderColor
background-color: $imageBackgroundColor
padding: 0.5em
box-shadow: 0 10px 15px #CCC
img.clean
border: none
// les clear
#address
clear: both
.definitionCell
width: 5em
vertical-align: top
font-weight: bold
text-align: center
.valueCell
text-align: right
.smallblock
float: left
width: 50%
font-size: 1em
font-weight: bold
.largeblock
float: right
width: 70%
font-size: 1em
#blackpage, #nojsredirect
top: 0
left: 0
width: 100%
height: 100%
margin-left: 0
margin-right: 0
margin-top: 0
margin-bottom: 0
position: fixed
text-align: center
#blackpage
color: #666666
padding-top: 10em
background-color: #eeeeee
z-index: 9000
cursor: wait
img
background: none
border: none
a
cursor: pointer
#nojsredirect
z-index: 9001
.nojsbutton
width: 50%
padding: 1em
border: solid 3px white
margin-left: auto
margin-right: auto
margin-top: 2em
z-index: 9002
.file
font-size: 0.8em
text-align: right
padding-right: 1em
margin-right: 0.1
margin-bottom: 0
background: $codeBlockBackgroundColor
a
color: $codeBlockColor
.flush
clear: both
table.description
border-spacing: 5px
border-collapse: separate
margin-right: auto
margin-left: auto
table.description tr td
padding-left: 0.5em
padding-right: 0.5em
padding-top: 0.5ex
padding-bottom: 0.5ex
vertical-align: middle
margin-right: 5px
ul.long li
margin-bottom: 1em
img
display: block
margin-left: auto
margin-right: auto
background: none
border: none
img.left
float: left
max-width: 30%
margin:
right: 1em
img.inside
display: inline
vertical-align: middle
pre
overflow: hidden
.withfile pre
margin-top: 0
overflow: hidden
.navigationprev, .navigationnext
padding: 0px
margin-left: 0.2em
margin-right: 0.2em
margin-bottom: 0
margin-top: $VMarginCorps
width: 45%
.navigation .navigationprev,
.navigation .navigationnext
width: 30%
margin-top: 0
.navigation
height: 4em
border-bottom: $lighterColorBorderBottom solid 1px
.presarticleleft,
.presarticleright
font-size: 1em
.navigationprev
float: left
text-align: left
.navigationnext
float: right
text-align: right
.impact, .darkimpact
text-align: left
width: 66%
padding-left: 0.25em
padding-right: 0.25em
table.impact
text-align: left
table.impact tr td
padding-left: 0.25em
padding-right: 0.25em
#liens
font-size: 1.2em
#iemessage
font-size: 1.2em
.tag
display: inline
cursor: pointer
margin-left: 0.5em
margin-right: 0.5em
.list
margin-top: $VPadCorps
#menuMessage
font:
size: 1.2em
line:
height: 1.5em
width: 100%
text-align: center
#choixrss
float: right
width: 25%
line-height: 2em
#choixlang
line-height: 2em
#choix a
color: $highlightColor
#choix a:hover
color: $revealColor
#choixlang a
display: block
width: 25%
line-height: 4em
text-align: center
#next_before_articles
clear: both
width: 100%
font-size: 1.2em
padding:
top: 1em
bottom: 1em
#previous_articles, #next_articles
color: $highlightColor
font-style: italic
font-size: .8em
#previous_articles
float: left
margin-left: 1em
width: 45%
text-align: left
.previous_article, .next_article
margin-top: 1em
#next_articles
float: right
width: 45%
margin-right: 1em
text-align: right
#clickcomment
margin-left: 0
width: 25%
#rss
font-size: 1.2em
text-align: center
display: block
width: 100%
float: right
padding: 1em 0.1em
.return a
text-align: center
float: right
width: 25%
.corps .return a
color: $lighterColor
padding: 0.1em
line-height: 1.5em
font-size: 1.5em
height: 1.5em
float: left
font-size: 2em
margin-top: -0.5em
margin-left: -2em
width: 1.5em
a.return
color: $lighterColor
padding: 0.1em
line-height: 1.5em
font-size: 1.5em
height: 1.5em
font-size: 2em
width: 1.5em
display: block
&:hover
color: $highlightColor
.corps .return a:hover
color: $revealColor
.footnotes
font-size: 0.8em
.fontnotes ol
margin-left: 0
.typeset img
display: inline
border: none
margin: 0
padding: 0
strong, b, i, em
font-weight: normal
color: $highlightColor
a
color: $mainTextColor
a:hover
color: $revealColor
.corps p
strong, b, i, em
color: $highlightBlockColor
a:hover
strong, b, i, em
color: $highlightRevealColor
a:hover .nicer
color: $lighterRevealColor
.nicer
color: $lighterText
font-family: "Lucida Grande", Tahoma
.block
width: 31%
text-align: left
line-height: 1em
margin-left: 1%
margin-right: 1%
font-size: 0.8em
a
color: $mainTextColor
a:hover
color: $revealColor
.block h3
margin: 0
font-size: 1.3em
.block p
line-height: 1.2em
.left
float: left
.right
float: right
.corps
p a, ul a
color: $textLinkColor
p a:hover, ul a:hover
color: $revealColor
ul.bloglist, .archive ul
list-style-type: none
margin: 0
li
margin-bottom: 1em
.button
cursor: pointer
text-align: center
.disable
visibility: hidden
dt
font-style:italic
color:#666

View file

@ -1,7 +1,18 @@
\include{include/main}
% -- Personal style --
%%# LATEX HEADER FROM config.rb #%%
% -- Comment the following line if you haven't
% -- Hoefler Text font installed on your system
\setmainfont{Hoefler Text}
% colors
\usepackage{color}
\definecolor{italiccolor}{rgb}{0.4,0.4,0.4}
\definecolor{boxcolor}{rgb}{0.96,0.96,0.96}
% Make italic and emphasis text gray
\renewcommand{\textit}[1]{\textcolor{italiccolor}{\it #1}}
\renewcommand{\emph}[1]{\textcolor{italiccolor}{\em #1}}
% -- Redefinition of memoir chapters --
%