Added new --offline option for slidy.
Added slidy/slidy.min.{css,js}.
This commit is contained in:
parent
5fd1389263
commit
c5ed016616
7 changed files with 59 additions and 19 deletions
27
README
27
README
|
@ -393,6 +393,11 @@ For further documentation, see the `pandoc(1)` man page.
|
|||
default (one item at a time). The normal default is for lists to be
|
||||
displayed all at once.
|
||||
|
||||
`--offline`
|
||||
: causes all the CSS and javascript needed for a Slidy or S5 slide show
|
||||
to be included in the output, so that the slide show will work even
|
||||
when no internet connection is available.
|
||||
|
||||
`--xetex`
|
||||
: creates LaTeX outut suitable for processing by XeTeX.
|
||||
|
||||
|
@ -1327,18 +1332,11 @@ block. Each section (with a level-one header) produces a single slide.
|
|||
page; S5 is not smart enough to produce multiple pages.)
|
||||
|
||||
The S5 file produced by pandoc with the `-s/--standalone`
|
||||
option embeds the javascript and CSS required to show the slides. Thus
|
||||
it does not depend on any additional files: you can send the HTML file
|
||||
to others, and they will be able to view the slide show just by opening
|
||||
it. However, if you intend to produce several S5 slide shows, and you
|
||||
are displaying them on your own website, it is better to keep the S5
|
||||
javascript and CSS files separate from the slide shows themselves, so
|
||||
that they may be cached. The best approach in this case is to use pandoc
|
||||
without the `-s` option to produce the body of the S5 document, which
|
||||
can then be inserted into an HTML template that links to the javascript
|
||||
and CSS files required by S5. (See the instructions on the S5 website.)
|
||||
Alternatively, you may use `-s` together with the `--template` option to
|
||||
specify a custom template.
|
||||
option embeds a link to javascripts and CSS files, which are
|
||||
assumed to be available at the relative path `ui/default`.
|
||||
If the `--offline` option is specified, the scripts and CSS
|
||||
will be included directly in the generated file, so that it
|
||||
may be used offline.
|
||||
|
||||
You can change the style of the slides by putting customized CSS files
|
||||
in `$DATADIR/s5/default`, where `$DATADIR` is the user data directory
|
||||
|
@ -1378,6 +1376,11 @@ To produce the slide show, simply type
|
|||
|
||||
pandoc -w slidy -s eating.txt > eating.html
|
||||
|
||||
As before, you may use the `--offline` option to include all
|
||||
necessary scripts and stylesheets in the generated HTML file.
|
||||
By default, links to the scripts and stylesheets at
|
||||
`w3.org` will be inserted.
|
||||
|
||||
Incremental lists
|
||||
-----------------
|
||||
|
||||
|
|
|
@ -144,6 +144,11 @@ should pipe input and output through `iconv`:
|
|||
-i, \--incremental
|
||||
: Make list items in Slidy or S5 display incrementally (one by one).
|
||||
|
||||
\--offline
|
||||
: Include all the CSS and javascript needed for a Slidy or S5 slide
|
||||
show in the output, so that the slide show will work even when no
|
||||
internet connection is available.
|
||||
|
||||
\--xetex
|
||||
: Create LaTeX outut suitable for processing by XeTeX.
|
||||
|
||||
|
|
|
@ -59,6 +59,9 @@ Data-Files:
|
|||
s5/default/opera.css,
|
||||
s5/default/outline.css,
|
||||
s5/default/print.css,
|
||||
-- data for slidy writer
|
||||
slidy/slidy.min.css,
|
||||
slidy/slidy.min.js,
|
||||
-- documentation
|
||||
README, INSTALL, COPYRIGHT, BUGS, changelog
|
||||
Extra-Source-Files:
|
||||
|
|
1
slidy/slidy.min.css
vendored
Normal file
1
slidy/slidy.min.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
body{margin:0;padding:0;width:100%;height:100%;color:black;background-color:white;font-family:"Gill Sans MT","Gill Sans",GillSans,sans-serif;font-size:14pt;}.hidden{display:none;visibility:hidden;}div.toolbar{position:fixed;z-index:200;top:auto;bottom:0;left:0;right:0;height:1.2em;text-align:right;padding-left:1em;padding-right:1em;font-size:60%;color:red;background:#f0f0f0;}div.background{display:none;}div.handout{margin-left:20px;margin-right:20px;}div.slide.titlepage{text-align:center;}div.slide.titlepage.h1{padding-top:40%;}div.slide{z-index:20;margin:0;padding-top:0;padding-bottom:0;padding-left:20px;padding-right:20px;border-width:0;clear:both;top:0;bottom:0;left:0;right:0;line-height:120%;background-color:transparent;}div.slide+div[class].slide{page-break-before:always;}div.slide h1{padding-left:0;padding-right:20pt;padding-top:4pt;padding-bottom:4pt;margin-top:0;margin-left:0;margin-right:60pt;margin-bottom:.5em;display:block;font-size:160%;line-height:1.2em;background:transparent;}div.toc{position:absolute;top:auto;bottom:4em;left:4em;right:auto;width:60%;max-width:30em;height:30em;border:solid thin black;padding:1em;background:#f0f0f0;color:black;z-index:300;overflow:auto;display:block;visibility:visible;}div.toc-heading{width:100%;border-bottom:solid 1px #b4b4b4;margin-bottom:1em;text-align:center;}pre{font-size:80%;font-weight:bold;line-height:120%;padding-top:.2em;padding-bottom:.2em;padding-left:1em;padding-right:1em;border-style:solid;border-left-width:1em;border-top-width:thin;border-right-width:thin;border-bottom-width:thin;border-color:#95ABD0;color:#00428C;background-color:#E4E5E7;}li pre{margin-left:0;}@media print{div.slide{display:block;visibility:visible;position:relative;border-top-style:solid;border-top-width:thin;border-top-color:black;}div.slide pre{font-size:60%;padding-left:.5em;}div.handout{display:block;visibility:visible;}}blockquote{font-style:italic;}img{background-color:transparent;}p.copyright{font-size:smaller;}.center{text-align:center;}.footnote{font-size:smaller;margin-left:2em;}a img{border-width:0;border-style:none;}a:visited{color:navy;}a:link{color:navy;}a:hover{color:red;text-decoration:underline;}a:active{color:red;text-decoration:underline;}a{text-decoration:none;}.navbar a:link{color:white;}.navbar a:visited{color:yellow;}.navbar a:active{color:red;}.navbar a:hover{color:red;}ul{list-style-type:square;}ul ul{list-style-type:disc;}ul ul ul{list-style-type:circle;}ul ul ul ul{list-style-type:disc;}li{margin-left:.5em;margin-top:.5em;}li li{font-size:85%;font-style:italic;}li li li{font-size:85%;font-style:normal;}div dt{margin-left:0;margin-top:1em;margin-bottom:.5em;font-weight:bold;}div dd{margin-left:2em;margin-bottom:.5em;}p,pre,ul,ol,blockquote,h2,h3,h4,h5,h6,dl,table{margin-left:1em;margin-right:1em;}p.subhead{font-weight:bold;margin-top:2em;}.smaller{font-size:smaller;}.bigger{font-size:130%;}td,th{padding:.2em;}ul{margin:.5em 1.5em .5em 1.5em;padding:0;}ol{margin:.5em 1.5em .5em 1.5em;padding:0;}ul{list-style-type:square;}ul ul{list-style-type:disc;}ul ul ul{list-style-type:circle;}ul ul ul ul{list-style-type:disc;}ul li{list-style:square;margin:.1em 0 .6em 0;padding:0;line-height:140%;}ol li{margin:.1em 0 .6em 1.5em;padding:0;line-height:140%;list-style-type:decimal;}li ul li{font-size:85%;font-style:italic;list-style-type:disc;background:transparent;padding:0;}li li ul li{font-size:85%;font-style:normal;list-style-type:circle;background:transparent;padding:0;}li li li ul li{list-style-type:disc;background:transparent;padding:0;}li ol li{list-style-type:decimal;}li li ol li{list-style-type:decimal;}ol.outline li:hover{cursor:pointer;}ol.outline li.nofold:hover{cursor:default;}ul.outline li:hover{cursor:pointer;}ul.outline li.nofold:hover{cursor:default;}ol.outline{list-style:decimal;}ol.outline ol{list-style-type:lower-alpha;}ol.outline li.nofold{padding:0 0 0 20px;background:transparent url(nofold-dim.gif) no-repeat 0 .5em;}ol.outline li.unfolded{padding:0 0 0 20px;background:transparent url(fold-dim.gif) no-repeat 0 .5em;}ol.outline li.folded{padding:0 0 0 20px;background:transparent url(unfold-dim.gif) no-repeat 0 .5em;}ol.outline li.unfolded:hover{padding:0 0 0 20px;background:transparent url(fold.gif) no-repeat 0 .5em;}ol.outline li.folded:hover{padding:0 0 0 20px;background:transparent url(unfold.gif) no-repeat 0 .5em;}ul.outline li.nofold{padding:0 0 0 20px;background:transparent url(nofold-dim.gif) no-repeat 0 .5em;}ul.outline li.unfolded{padding:0 0 0 20px;background:transparent url(fold-dim.gif) no-repeat 0 .5em;}ul.outline li.folded{padding:0 0 0 20px;background:transparent url(unfold-dim.gif) no-repeat 0 .5em;}ul.outline li.unfolded:hover{padding:0 0 0 20px;background:transparent url(fold.gif) no-repeat 0 .5em;}ul.outline li.folded:hover{padding:0 0 0 20px;background:transparent url(unfold.gif) no-repeat 0 .5em;}a.titleslide{font-weight:bold;font-style:italic;}
|
1
slidy/slidy.min.js
vendored
Normal file
1
slidy/slidy.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -144,6 +144,7 @@ data Opt = Opt
|
|||
, optNumberSections :: Bool -- ^ Number sections in LaTeX
|
||||
, optSectionDivs :: Bool -- ^ Put sections in div tags in HTML
|
||||
, optIncremental :: Bool -- ^ Use incremental lists in Slidy/S5
|
||||
, optOffline :: Bool -- ^ Make slideshow accessible offline
|
||||
, optXeTeX :: Bool -- ^ Format latex for xetex
|
||||
, optSmart :: Bool -- ^ Use smart typography
|
||||
, optHTMLMathMethod :: HTMLMathMethod -- ^ Method to print HTML math
|
||||
|
@ -185,6 +186,7 @@ defaultOpts = Opt
|
|||
, optNumberSections = False
|
||||
, optSectionDivs = False
|
||||
, optIncremental = False
|
||||
, optOffline = False
|
||||
, optXeTeX = False
|
||||
, optSmart = False
|
||||
, optHTMLMathMethod = PlainMath
|
||||
|
@ -317,6 +319,11 @@ options =
|
|||
(\opt -> return opt { optIncremental = True }))
|
||||
"" -- "Make list items display incrementally in Slidy/S5"
|
||||
|
||||
, Option "" ["offline"]
|
||||
(NoArg
|
||||
(\opt -> return opt { optOffline = True }))
|
||||
"" -- "Make slide shows include all the needed js and css"
|
||||
|
||||
, Option "" ["xetex"]
|
||||
(NoArg
|
||||
(\opt -> return opt { optXeTeX = True }))
|
||||
|
@ -652,6 +659,7 @@ main = do
|
|||
, optNumberSections = numberSections
|
||||
, optSectionDivs = sectionDivs
|
||||
, optIncremental = incremental
|
||||
, optOffline = offline
|
||||
, optXeTeX = xetex
|
||||
, optSmart = smart
|
||||
, optHTMLMathMethod = mathMethod
|
||||
|
@ -735,11 +743,18 @@ main = do
|
|||
refs <- if null biblioFile then return [] else readBiblioFile biblioFile biblioFormat
|
||||
#endif
|
||||
|
||||
variables' <- if writerName' == "s5" && standalone'
|
||||
then do
|
||||
inc <- s5HeaderIncludes datadir
|
||||
return $ ("header-includes", inc) : variables
|
||||
else return variables
|
||||
variables' <- case (writerName', standalone', offline) of
|
||||
("s5", True, True) -> do
|
||||
inc <- s5HeaderIncludes datadir
|
||||
return $ ("header-includes", inc) : variables
|
||||
("slidy", True, True) -> do
|
||||
slidyJs <- readDataFile datadir $
|
||||
"slidy" </> "slidy.min.js"
|
||||
slidyCss <- readDataFile datadir $
|
||||
"slidy" </> "slidy.min.css"
|
||||
return $ ("slidy-js", slidyJs) :
|
||||
("slidy-css", slidyCss) : variables
|
||||
_ -> return variables
|
||||
|
||||
variables'' <- case mathMethod of
|
||||
LaTeXMathML Nothing -> do
|
||||
|
|
|
@ -20,16 +20,28 @@ $endif$
|
|||
$for(css)$
|
||||
<link rel="stylesheet" href="$css$" type="text/css" />
|
||||
$endfor$
|
||||
$if(slidy-css)$
|
||||
<style type="text/css">
|
||||
$slidy-css$
|
||||
</style>
|
||||
$else$
|
||||
<link rel="stylesheet" type="text/css" media="screen, projection, print"
|
||||
href="http://www.w3.org/Talks/Tools/Slidy/slidy.css" />
|
||||
href="http://www.w3.org/Talks/Tools/Slidy/slidy.css" />
|
||||
$endif$
|
||||
$if(math)$
|
||||
$math$
|
||||
$endif$
|
||||
$for(header-includes)$
|
||||
$header-includes$
|
||||
$endfor$
|
||||
$if(slidy-js)$
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$slidy-js$
|
||||
</script>
|
||||
$else$
|
||||
<script src="http://www.w3.org/Talks/Tools/Slidy/slidy.js.gz"
|
||||
charset="utf-8" type="text/javascript"></script>
|
||||
charset="utf-8" type="text/javascript"></script>
|
||||
$endif$
|
||||
</head>
|
||||
<body>
|
||||
$for(include-before)$
|
||||
|
|
Loading…
Reference in a new issue