1\Preamble{xhtml} 2 3% We don't want to translate font suggestions with ugly wrappers like 4% <span class="cmti-10"> for italic text 5\NoFonts 6 7% Don't output xml version tag 8\Configure{VERSION}{} 9 10\Configure{PROLOG}{DOCTYPE} 11 12% Output HTML5 doctype instead of the default for HTML4 13\Configure{DOCTYPE}{\HCode{<!doctype html>\Hnewline}} 14 15% Custom page opening 16\Configure{HTML}{\HCode{<html lang="en">\Hnewline}}{\HCode{\Hnewline</html>}} 17 18% Set custom page title 19\Configure{TITLE+}{ViennaRNA Tutorial} 20 21% Reset <head>, aka delete all default boilerplate 22%\Configure{@HEAD}{} 23 24% Setup custom <head> content 25\Configure{@HEAD}{ 26 \HCode{ 27 <link href="../css/bootstrap.min.css" rel="stylesheet" />\Hnewline 28 <link href="../css/bootstrap-theme.min.css" rel="stylesheet" />\Hnewline 29 <link href="../css/tbi_bootstrap.css" rel="stylesheet" />\Hnewline 30 <link href="../css/tbi_mod.css" rel="stylesheet" />\Hnewline 31 } 32} 33\Configure{@HEAD}{\HCode{<script type="text/javascript"\Hnewline 34src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"\Hnewline 35></script>\Hnewline}} 36\Configure{@HEAD}{\HCode{<style type="text/css">\Hnewline 37 .MathJax_MathML {text-indent: 0;}\Hnewline 38</style>\Hnewline}} 39 40 41\Configure{BODY}{\Tg<body role="document">}{\Tg</body>} 42\Configure{@BODY}{} 43\Configure{@BODY}{\IgnorePar\HCode{ 44 <div class="container wrap">\Hnewline 45 <div class="container headwrap">\Hnewline 46 <header class="hidden-xs">\Hnewline 47 <img class="unilogo" src="../gfx/base/unilogo_small.png" alt="Univiersity of Vienna"/>\Hnewline 48 <hgroup class="head-title-lg">\Hnewline 49 <div class="title-link-lg"><a href="http://www.tbi.univie.ac.at">Theoretical Biochemistry Group</a></div>\Hnewline 50 <div class="title-link-sm"><a href="http://www.itc.univie.ac.at">Institute for Theoretical Chemistry</a></div>\Hnewline 51 </hgroup>\Hnewline 52 </header>\Hnewline 53 <nav class="navbar navbar-default navbar-tbi navbar-tbi-main center" role="navigation">\Hnewline 54 <div class="container-fluid">\Hnewline 55 <div class="navbar-header">\Hnewline 56 <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="\#navbar" aria-expanded="false" aria-controls="navbar">\Hnewline 57 <span class="sr-only">Toggle navigation</span>\Hnewline 58 <span class="icon-bar"></span>\Hnewline 59 <span class="icon-bar"></span>\Hnewline 60 <span class="icon-bar"></span>\Hnewline 61 </button>\Hnewline 62 <a class="navbar-brand visible-xs" href="/index.html"><img alt="TBI" height="24" src="../gfx/base/tbilogo.png"></a>\Hnewline 63 </div>\Hnewline 64 <div id="navbar" class="navbar-collapse collapse navbar-inner">\Hnewline 65 <ul class="nav navbar-nav navbar-tbi">\Hnewline 66 <li><a href="/index.html">TBI</a></li>\Hnewline 67 <li class="dropdown"><a href="\#" class="dropdown-toggle"\Hnewline 68 data-toggle="dropdown"\Hnewline 69 role="button"\Hnewline 70 aria-haspopup="true"\Hnewline 71 aria-expanded="false">RNA Software <span class="caret"></span></a>\Hnewline 72 <ul class="dropdown-menu">\Hnewline 73 <li><a href="../">ViennaRNA Package</a></li>\Hnewline 74 <li><a href="../Barriers">Barriers</a></li>\Hnewline 75 <li><a href="../Treekin">Treekin</a></li>\Hnewline 76 <li><a href="../bar_map">barMap</a></li>\Hnewline 77 <li><a href="../BHG">Basin Hopping Graph</a></li>\Hnewline 78 <li><a href="http://www.tbi.univie.ac.at/software/rnawolf/rnawolf.html">RNAwolf</a></li>\Hnewline 79 <li><a href="https://www.tbi.univie.ac.at/~wash/RNAz/">RNAz</a></li>\Hnewline 80 <li><a href="../Alidot">AliDot</a></li>\Hnewline 81 </ul>\Hnewline 82 </li>\Hnewline 83 <li><a href="../">ViennaRNA</a></li>\Hnewline 84 <li><a href="../documentation.html">Documentation</a></li>\Hnewline 85 <li class="selected"><a href="\#">Tutorial</a></li>\Hnewline 86 <li><a href="../changelog.html">Changelog</a></li>\Hnewline 87 </ul>\Hnewline 88 </div><!--/.nav-collapse -->\Hnewline 89 </div>\Hnewline 90 </nav>\Hnewline 91 </div>\Hnewline 92 <!-- Main Content Container -->\Hnewline 93 <div class="container contentwrap" role="main">\Hnewline 94 <div class="container-main">\Hnewline 95 <!-- BREADCRUMB BAR -->\Hnewline 96 <div class="row wai">\Hnewline 97 <div class="col-xs-12 col-sm-6 breadcrumbs">\Hnewline 98 <span class="caption">You are here:</span>\Hnewline 99 <ol class="breadcrumb">\Hnewline 100 <li><a href="/">TBI</a></li>\Hnewline 101 <li><a href="/software">Software</a></li>\Hnewline 102 <li><a href="../index.html">ViennaRNA</a></li>\Hnewline 103 <li class="active"><a href="tutorial.html">Tutorial</a></li>\Hnewline 104 </ol>\Hnewline 105 </div>\Hnewline 106 <div class="col-xs-12 col-sm-6 appearance">\Hnewline 107 <span class="caption">Font size: </span>\Hnewline 108 <a class="incfont" href="\#"><img src="../gfx/base/font_inc.gif" alt="Increase font size"></a>\Hnewline 109 <a class="decfont" href="\#"><img src="../gfx/base/font_dec.gif" alt="Decrease font size"></a>\Hnewline 110 <a class="highcontrast" href="\#"><img src="../gfx/base/contrast.gif" alt="Switch style sheet from default to highcontrast and back"></a>\Hnewline 111 </div>\Hnewline 112 </div><!-- /.row -->\Hnewline 113 <div class="row row-offcanvas row-offcanvas-right">\Hnewline 114 <div class="col-xs-12 col-sm-9">\Hnewline 115 <article>\Hnewline 116 <p class="pull-right visible-xs">\Hnewline 117 <button type="button" class="btn btn-primary btn-xs" data-toggle="offcanvas">Toggle sidebar</button>\Hnewline 118 </p>\Hnewline 119 } 120} 121\Configure{@/BODY}{ 122 \HCode{\IgnorePar 123 </article>\Hnewline 124 </div><!-- /.row -->\Hnewline\Hnewline 125 <!-- SIDEBAR -->\Hnewline 126 <div class="col-xs-6 col-sm-3 sidebar-offcanvas" id="sidebar" role="navigation">\Hnewline\Hnewline 127 <aside>\Hnewline 128 <nav id="sidebarNav" role="navigation">\Hnewline 129 __SIDENAVLIST__\Hnewline 130 </nav>\Hnewline 131 </aside>\Hnewline 132 </div><!--/.sidebar-offcanvas-->\Hnewline 133 </div><!-- /.row-offcanvas -->\Hnewline 134 <div class="topwrap hidden"><a class="top hidden" href="\#">Top</a></div>\Hnewline 135 </div>\Hnewline 136 </div>\Hnewline 137 </div> <!-- /.wrap -->\Hnewline\Hnewline 138 <footer>\Hnewline 139 <p class="legalstuff">\Hnewline 140 <a href="/legal.html">Legal Details</a>\Hnewline 141 </p>\Hnewline 142 </footer>\Hnewline\Hnewline 143 <!-- Bootstrap core JavaScript\Hnewline 144 ================================================== -->\Hnewline 145 <!-- Placed at the end of the document so the pages load faster -->\Hnewline\Hnewline 146 <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->\Hnewline 147 <script src="../js/jquery.min.js"></script>\Hnewline\Hnewline 148 <!-- Include all compiled plugins (below), or include individual files as needed -->\Hnewline 149 <script src="../js/bootstrap.min.js"></script>\Hnewline 150 <script src="../js/offcanvas.js"></script>\Hnewline\Hnewline 151 <script src="../js/jquery.cookie.js" type="text/javascript"></script>\Hnewline 152 <script src="../js/tbi_base.js" type="text/javascript"></script>\Hnewline 153 <script src="../js/tbi_bootstrap.js" type="text/javascript"></script> 154 } 155} 156 157% Translate \textbf, \textit, \texttt, and \emph directives into 158% <b>, <em>, <code>, and <em> 159\Configure{textbf}{\ifvmode\ShowPar\fi\HCode{<b>}}{\HCode{</b>}} 160\Configure{textit}{\ifvmode\ShowPar\fi\HCode{<i>}}{\HCode{</i>}} 161\Configure{texttt}{\ifvmode\ShowPar\fi\HCode{<code>}}{\HCode{</code>}} 162\Configure{emph}{\ifvmode\ShowPar\fi\HCode{<em>}}{\HCode{</em>}} 163 164 165% Translate verbatim and lstlisting blocks into <pre> elements 166\ScriptEnv{verbatim} 167 {\IgnorePar\EndP\nobreak\vfil\penalty0\vfilneg\vtop\bgroup\HCode{<pre class="commands">}\NoFonts} 168 {\egroup\IgnorePar\nobreak\vfil\penalty0\vfilneg\vtop\bgroup\HCode{</pre>}\egroup\EndNoFonts} 169%\ScriptEnv{Verbatim} 170% {} 171% {} 172\ScriptEnv{lstlisting} 173 {\IgnorePar\EndP\nobreak\vfil\penalty0\vfilneg\vtop\bgroup\HCode{<pre><code>}\NoFonts} 174 {\egroup\IgnorePar\nobreak\vfil\penalty0\vfilneg\vtop\bgroup\HCode{</code></pre>}\egroup\EndNoFonts} 175 176%\HAssign\fancyvrbNo=0 177\Configure{fancyvrb} 178 {\IgnorePar \EndP \gHAssign\fancyvrbCnt 0 } 179 {\EndP} 180 {\gHAdvance\fancyvrbCnt by 1 \ifnum \fancyvrbCnt > 1 \HCode{<br />}\fi} 181 {} 182 {}{} 183 184\ConfigureEnv{VerbatimExample} 185 {\IgnorePar\EndP\nobreak\vfil\penalty0\vfilneg\vtop\bgroup\HCode{<div class="tbi-example"><p><samp>}\NoFonts} 186 {\egroup\IgnorePar\nobreak\vfil\penalty0\vfilneg\vtop\bgroup\HCode{</samp></p></div>}\egroup\EndNoFonts} 187 {} 188 {} 189 190\ConfigureEnv{VerbatimTask} 191 {\IgnorePar\EndP\nobreak\vfil\penalty0\vfilneg\vtop\bgroup\HCode{<div class="tbi-example tbi-task"><p><samp>}\NoFonts} 192 {\egroup\IgnorePar\nobreak\vfil\penalty0\vfilneg\vtop\bgroup\HCode{</samp></p></div>}\egroup\EndNoFonts} 193 {} 194 {} 195 196\Configure{newline}{\HCode{<br>}} 197%\Configure{Link} 198% {a} % replaces a 199% {href=} % replaces href= 200% {name=} % replaces name= 201% {} % replaces '#' 202 203% Do not set `indent`/`noindent` classes on paragraphs 204\Configure{HtmlPar} 205{\EndP\Tg<p>} 206{\EndP\Tg<p>} 207{\HCode{</p>\Hnewline}} 208{\HCode{</p>\Hnewline}} 209 210\Configure{section} 211 {\EndP\IgnorePar\Tg<section id="sec\thesection">} 212 {\EndP\Tg</section>} 213 {\Tg<h2>} 214 {\Tg</h2>\ShowPar} 215 216\Configure{subsection} 217 {\EndP\IgnorePar\Tg<div id="sec\thesubsection">} 218 {\EndP\Tg</div>} 219 {\Tg<h3>} 220 {\Tg</h3>\ShowPar} 221 222\Configure{subsubsection} 223 {\EndP\IgnorePar\Tg<div id="sec\thesubsubsection">} 224 {\EndP\Tg</div>} 225 {\Tg<b>} 226 {\HCode{</b><br>}\ShowPar} 227 228\ConfigureList{itemize} 229 {\EndP\HCode{<ul class="list-group">}\let\endItem=\empty} 230 {\ifvmode \IgnorePar\fi \EndP\HCode{</li></ul>}\ShowPar} 231 {\endItem \def\endItem{\EndP\Tg</li>}\HCode{<li class="list-group-item">} \DeleteMark} 232 {} 233 234\ConfigureList{enumerate} 235 {\EndP\HCode{<ol class="list-group">}\let\endItem=\empty} 236 {\ifvmode \IgnorePar\fi \EndP\HCode{</li></ol>}\ShowPar} 237 {\endItem \def\endItem{\EndP\Tg</li>}\HCode{<li class="list-group-item">} \DeleteMark} 238 {} 239 240\Configure{graphics*} 241 {eps} 242 {\Needs{"convert -trim +repage -density 200x200 -geometry 25\% -transparent '\#FFFFFF' \csname Gin@base\endcsname.eps \csname Gin@base\endcsname.png"} 243 \Picture[pict]{\csname Gin@base\endcsname.png}} 244\Configure{graphics*} 245 {ps} 246 {\Needs{"convert -trim +repage -density 200x200 -geometry 25\% -transparent '\#FFFFFF' \csname Gin@base\endcsname.ps \csname Gin@base\endcsname.png"} 247 \Picture[pict]{\csname Gin@base\endcsname.png}} 248 249%\Configure{tabular} 250% {\HCode{<table class='table'>}} 251% {\HCode{</tbody></table>}} 252% {\ifnum \HRow=1 \HCode{<thead><tr>} \else \HCode{<tr>} \fi} 253% {\ifnum \HRow=1 \HCode{</tr><tbody>} \else \HCode{</tr>} \fi} 254% {\ifnum \HRow=1 \HCode{<th>} \else \HCode{<td colspan="\HMultispan">} \fi} 255% {\ifnum \HRow=1 \HCode{</th>} \else \HCode{</td>} \fi} 256% 257\Configure{hline} {} 258 259\ConfigureEnv{titlepage} {\HCode{<div class='titlepage'>}} {\HCode{</div>}} {} {} 260 261\begin{document} 262 263\Configure{tableofcontents} 264 {} 265 {\tocNesting{0}} 266 {} 267 {} 268 {} 269\HAssign\IdTOC=0 270\HAssign\IdTOCsub=0 271 272\ConfigureToc{section} 273 {} 274 {\tocNesting{1}\HAssign \IdTOCsub=0 \HAdvance \IdTOC by 1 \HCode{<li class="has-subnav"><a href="\#sec\IdTOC">}} 275 {} 276 {\HCode{</a>}} 277 278\ConfigureToc{subsection} 279 {} 280 {\tocNesting{2}\HAdvance \IdTOCsub by 1 \HCode{<li><a href="\#sec\IdTOC.\IdTOCsub">}} 281 {} 282 {\HCode{</a>}} 283 284\ConfigureToc{subsubsection}{}{}{}{} 285 286\Configure{TocLink}{#4} 287 288%\ConfigureToc{section} 289% {} 290% {\gHAdvance \IdTOC by 1 \HCode{Items[\IdTOC]=["}} 291% {} 292% {\HCode{"]\Hnewline}} 293 294%\Configure{TocLink}{\HCode{"\##2","#4"}} 295 296%\ConfigureToc{section} 297% {\HCode{<li>}} 298% {} 299% {} 300% {\HCode{</li>\Hnewline}} 301 302%\ConfigureToc{subsection} 303% {\HCode{<ul class="nav sidenav-tbi subnav">}} 304% {} 305% {} 306% {\HCode{</ul>}} 307 308%\ConfigureToc{section} 309% {\tocNesting{1}\HCode{<li class="has-subnav">}}{ }{}{} 310 311 312%\ConfigureToc{subsection} 313% {\tocNesting{2}\HCode{<li>}}{ }{}{\HCode{</li>}} 314%\ConfigureToc{subsubsection} 315% {\tocNesting{3}\HCode{<li>}}{ }{}{ } 316%\Configure{tableofcontents} 317% {} {\tocNesting{0}} {} {} {} 318 319%\Configure{TocLink}{\Link{#2}{#3}#4\EndLink} 320 321\newcount\c 322 \def\tocNesting#1{% 323 \expandafter\ifx \csname level#1\endcsname\relax 324 \ifnum #1=2 \HCode{<ul class="nav sidenav-tbi subnav hide">} \else \ifnum #1>0 \HCode{<ul id="sidebarNavList" class="nav sidenav-tbi">} \fi \fi 325 \expandafter\def \csname level#1\endcsname{\HCode{</ul>}} 326 \fi 327 \c=#1 \advance\c by 1 328 \loop 329 \csname level\the\c\endcsname 330 \expandafter\let \csname level\the\c\endcsname\relax 331 \advance\c by 1 332 \ifnum \c<10 \repeat 333 } 334 335\def\hlink#1#2{\Tg<a href="#1">#2\Tg</a>\xspace} 336 337\EndPreamble 338