Skip to content

Commit

Permalink
Add code blocks and author
Browse files Browse the repository at this point in the history
  • Loading branch information
laduplessis committed Nov 1, 2016
1 parent fef7b96 commit 474da9f
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 2 deletions.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
author: Author I. Name
---


# Background

This is a style guide to help formatting Markdown tutorials. Please add some background about the tutorial in this section, clearly explaining the question/problem and the type of analysis that the methods in the tutorial should be used for. In the next section please add a short description of all the programs or packages used in the tutorial.
Expand Down Expand Up @@ -86,6 +91,35 @@ Use block-quotes for step-by-step instructions (this will produce a framed box o
>
> Nothing interesting will happen
Use the code environment to add code blocks:
```java
public class HelloWorld {

public static void main(String[] args) {
// Prints "Hello, World" to the terminal window.
System.out.println("Hello, World");
}

}
```

```xml
\begin{lstlisting}[language=XML]
<BirthDeathSkylineModel spec="BirthDeathSkylineModel" id="birthDeath" tree="@tree" contemp="true">
<parameter name="origin" id="origin" value ="100" lower="0."/>
<parameter name="R0" id="R0" value="2" lower="0." dimension ="10"/>
<parameter name="becomeUninfectiousRate" id="becomeUninfectiousRate" value="1" lower="0." dimension ="10"/>
<parameter name="samplingProportion" id="samplingProportion" value="0."/>
<parameter name="rho" id="rho" value="1e-6" lower="0." upper="1."/>
</BirthDeathSkylineModel>
```

```R
> myString <- "Hello, World!"
> print (myString)
[1] "Hello, World!"
```



# Hyperlinks
Expand Down
30 changes: 29 additions & 1 deletion main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,35 @@ \section{Instructions}

\end{framed}


Use lstlisting boxes for inserting code in different languages:

\begin{lstlisting}[language=java]
public class HelloWorld {

public static void main(String[] args) {
// Prints "Hello, World" to the terminal window.
System.out.println("Hello, World");
}

}
\end{lstlisting}


\begin{lstlisting}[language=XML]
<BirthDeathSkylineModel spec="BirthDeathSkylineModel" id="birthDeath" tree="@tree" contemp="true">
<parameter name="origin" id="origin" value ="100" lower="0."/>
<parameter name="R0" id="R0" value="2" lower="0." dimension ="10"/>
<parameter name="becomeUninfectiousRate" id="becomeUninfectiousRate" value="1" lower="0." dimension ="10"/>
<parameter name="samplingProportion" id="samplingProportion" value="0."/>
<parameter name="rho" id="rho" value="1e-6" lower="0." upper="1."/>
</BirthDeathSkylineModel>
\end{lstlisting}

\begin{lstlisting}[language=R]
> myString <- "Hello, World!"
> print (myString)
[1] "Hello, World!"
\end{lstlisting}

\bigskip
\section{Hyperlinks}
Expand Down
23 changes: 22 additions & 1 deletion preamble.tex
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,28 @@
\usepackage{placeins}
\usepackage{epstopdf}

\lstset{breaklines=true}


\lstset{backgroundcolor=\color[rgb]{0.972,0.972,0.972},
tabsize=4,
rulecolor=,
basicstyle=\scriptsize,
upquote=true,
aboveskip={1.5\baselineskip},
columns=fixed,
showstringspaces=false,
extendedchars=true,
breaklines=true,
prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},
frame=single,
showtabs=false,
showspaces=false,
showstringspaces=false,
identifierstyle=\ttfamily,
keywordstyle=\color[rgb]{0,0,1},
commentstyle=\color[rgb]{0.133,0.545,0.133},
stringstyle=\color[rgb]{0.627,0.126,0.941}
}

\definecolor{shadecolor}{RGB}{194,225,255}

Expand Down

0 comments on commit 474da9f

Please sign in to comment.