1
Fork 0

Add more titles and code examples

This commit is contained in:
Jake Howard 2018-04-30 09:42:38 +01:00
parent 862f8a4308
commit af572de26c
Signed by: jake
GPG key ID: 57AFB45680EDD477
3 changed files with 86 additions and 2 deletions

View file

@ -19,7 +19,7 @@ then
INPUT_FILES="$INPUT_FILES $METADATA_FILE" INPUT_FILES="$INPUT_FILES $METADATA_FILE"
fi fi
PANDOC_ARGS="$INPUT_FILES --lua-filter=$SCRIPTPATH/variables.lua --template $SCRIPTPATH/main.tex -o $OUTPUT_FILE $ADDITIONAL_ARGS" PANDOC_ARGS="$INPUT_FILES --lua-filter=$SCRIPTPATH/variables.lua --template $SCRIPTPATH/main.tex --listings -o $OUTPUT_FILE $ADDITIONAL_ARGS"
echo "> Building document..." echo "> Building document..."
cd $SCRIPTPATH && pandoc $PANDOC_ARGS cd $SCRIPTPATH && pandoc $PANDOC_ARGS

View file

@ -11,6 +11,9 @@
\usepackage[margin=1in,includefoot]{geometry} \usepackage[margin=1in,includefoot]{geometry}
\usepackage{graphicx} \usepackage{graphicx}
\usepackage{titlesec} \usepackage{titlesec}
\usepackage{textcomp}
\usepackage{xcolor}
\usepackage{listings}
\hypersetup{ \hypersetup{
hidelinks=true hidelinks=true
@ -18,6 +21,27 @@
\usepackage{helvet} \usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault} \renewcommand{\familydefault}{\sfdefault}
\newcommand{\passthrough}{}
\usepackage[document]{ragged2e} \usepackage[document]{ragged2e}
\usepackage{lastpage} \usepackage{lastpage}
\lstset{
basicstyle=\ttfamily,
keywordstyle=\color[rgb]{0.13,0.29,0.53}\bfseries,
stringstyle=\color[rgb]{0.31,0.60,0.02},
commentstyle=\color[rgb]{0.56,0.35,0.01}\itshape,
backgroundcolor=\color[RGB]{248,248,248},
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2,
captionpos=b,
breaklines=true,
breakatwhitespace=true,
breakautoindent=true,
escapeinside={\%*}{*)},
linewidth=\textwidth,
basewidth=0.5em,
}

View file

@ -5,9 +5,69 @@ subtitle: Test Document
--- ---
# Hello world # Hello world
\lipsum[3-15] \lipsum[3-10]
Foo is equal to \$foo\$. Foo is equal to \$foo\$.
Input directory is at \$inputDir\$. Input directory is at \$inputDir\$.
\includegraphics[width=\textwidth]{test-image} \includegraphics[width=\textwidth]{test-image}
# Test 1
test 1
## Test 1a
test 1a
### Test 1ai
test 1ai
### Test 1aii
test 1aii
#### Test 1aii inner
test 1aii inner
##### Test 1aii inner inner
test 1aii inner inner
### Test 1aiii
test 1aiii
## Test 1b
test 1b
## Test 1c
test 1c
# Test 2
test 2
# Test 3
test 3
# Test 4
test 4
# Test code
```java
public class Test {
static Set<Thread> updateThreads = new HashSet<Thread>();
public static void main(String[] args) {
ConcurrentMap<Integer, String> concurrentMap = new ConcurrentHashMap<Integer, String>();
for (int i = 0; i < 1000; i++) {
startUpdateThread(i, concurrentMap);
}
for (Map.Entry<Integer, String> entry : concurrentMap.entrySet()) {
System.out.println("Key :" + entry.getKey() + " Value:" + entry.getValue());
}
for (Thread thread : updateThreads) {
thread.interrupt();
}
}
}
```
## Test Inline Code
Some `inline` code.