Pārlūkot izejas kodu

Cleanup and manuals now can have box diagrams

master
Felix Brendel pirms 7 gadiem
vecāks
revīzija
fb7f3a00c9
5 mainītis faili ar 40 papildinājumiem un 204 dzēšanām
  1. +3
    -1
      .gitignore
  2. +5
    -0
      manual/diagrams/.gitignore
  3. +32
    -8
      manual/manual.org
  4. Binārs
     
  5. +0
    -195
      manual/manual.tex

+ 3
- 1
.gitignore Parādīt failu

@@ -8,4 +8,6 @@
*.vspx
todo.html
*.expanded
/bin/vgcore.*
/bin/vgcore.*
/manual/manual.pdf
/manual/manual.tex

+ 5
- 0
manual/diagrams/.gitignore Parādīt failu

@@ -0,0 +1,5 @@
# everything
*

# except this file
!.gitignore

+ 32
- 8
manual/manual.org Parādīt failu

@@ -1,5 +1,31 @@
#+title: The Slime 1.0 Manual

#+begin_abstract
sad
#+end_abstract

\tableofcontents

* testbox :noexport:
#+BEGIN_SRC ditaa :file diagrams/test.eps :cmdline --no-separation --no-shadows
+-----+-----+ +-----+-----+ +-----+-----+ +-----+-----+
| | | | | | | | | | | |
| | |--->| | |--->| | |--->| | / |
| | | | | | | | | | | |
+-----+-----+ +-----+-----+ +-----+-----+ +-----+-----+
|
|
V
+-----+-----+
| | |
| | / |
| | |
+-----+-----+
#+END_SRC

#+RESULTS:
[[file:diagrams/test.eps]]

{{{slime_header}}}
#+caption: Some text to illustrate
#+begin_src slime
@@ -10,7 +36,7 @@
(fib (- x 2))))))

(print (if (> (fib 3) 1)
"Hello Felixses\n"
"Hello World\n"
"Goodbye World\n"))

(fib 12)
@@ -38,26 +64,24 @@

#+author: Felix Brendel
#+mail: felix.brendel@airmail.cc
#+options: H:2
#+options: H:2 toc:nil

#+macro: slime_header (eval (concat "#+header: :exports both" "\n" "#+attr_latex: :options keywordstyle=\\color{slimeKeyword}, commentstyle=\\color{slimeComment}, stringstyle=\\color{slimeString}"))

#+latex_class:assign
#+latex_class:article

#+latex_header: \usepackage[german]{babel}
#+latex_header: \usepackage{xcolor}
#+latex_header: \usepackage{listings}
#+latex_header: \definecolor{slimeKeyword}{HTML}{B58900}
#+latex_header: \definecolor{slimeString}{HTML}{2AA198}
#+latex_header: \definecolor{slimeComment}{HTML}{839496}


#+latex_header: \lstdefinelanguage{slime}
#+latex_header: {
#+latex_header: % list of keywords
#+latex_header: morekeywords={
#+latex_header: print,
#+latex_header: if,
#+latex_header: define,
#+latex_header: cond
#+latex_header: =, >, >=, <, <=, +, -, *, /, **, assert, define, define-syntax, mutate, if, quote, quasiquote, and, or, not, while, let, lambda, special-lambda, eval, begin, list, pair, first, rest, set-type, delete-type, type, info, show, print, read, exit, break, memstat, try, load, copy, error, symbol->keyword, string->symbol, symbol->string, concat-strings
#+latex_header: },
#+latex_header: basicstyle=\ttfamily\small,
#+latex_header: showstringspaces=false,


Binārs
Parādīt failu


+ 0
- 195
manual/manual.tex Parādīt failu

@@ -1,195 +0,0 @@
% Created 2019-05-15 Mi 01:07
% Intended LaTeX compiler: pdflatex
\documentclass{article}
\usepackage{amsmath,amsfonts,stmaryrd,amssymb}
\usepackage{enumerate}
\usepackage[ruled]{algorithm2e}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{listings}
\usepackage{inconsolata}
\usepackage[footnote]{snotez}

\usepackage{geometry}

\geometry{
paper=a4paper,
top=40pt,
bottom=3cm,
left=30pt,
textwidth=417pt,
headheight=14pt,
marginparsep=20pt,
marginparwidth=100pt,
footskip=30pt,
headsep=0cm,
}


\usepackage[utf8]{inputenc}
\usepackage{sansmathfonts}
\usepackage[T1]{fontenc}
\renewcommand*\familydefault{\sfdefault}
\mdfdefinestyle{commandline}{
leftmargin=10pt,
rightmargin=10pt,
innerleftmargin=15pt,
middlelinecolor=black!50!white,
middlelinewidth=2pt,
frametitlerule=false,
backgroundcolor=black!5!white,
frametitle={Commandline},
frametitlefont={\normalfont\sffamily\color{white}\hspace{-1em}},
frametitlebackgroundcolor=black!50!white,
nobreak,
}


\newenvironment{commandline}{
\medskip
\begin{mdframed}[style=commandline]
}{
\end{mdframed}
\medskip
}


\mdfdefinestyle{question}{
innertopmargin=1.2\baselineskip,
innerbottommargin=0.8\baselineskip,
roundcorner=5pt,
nobreak,
singleextra={
\draw(P-|O)node[xshift=1em,anchor=west,fill=white,draw,rounded corners=5pt]{
Question \theQuestion\questionTitle};
},
}

\newcounter{Question}


\newenvironment{question}[1][\unskip]{
\bigskip
\stepcounter{Question}
\newcommand{\questionTitle}{~#1}
\begin{mdframed}[style=question]
}{
\end{mdframed}
\medskip
}



\mdfdefinestyle{warning}{
topline=false, bottomline=false,
leftline=false, rightline=false,
nobreak,
singleextra={
\draw(P-|O)++(-0.5em,0)node(tmp1){};
\draw(P-|O)++(0.5em,0)node(tmp2){};
\fill[black,rotate around={45:(P-|O)}](tmp1)rectangle(tmp2);
\node at(P-|O){\color{white}\scriptsize\bf !};
\draw[very thick](P-|O)++(0,-1em)--(O);
}
}


\newenvironment{warning}[1][Attention:]{
\medskip
\begin{mdframed}[style=warning]
\noindent{\textbf{#1}}
}{
\end{mdframed}
}



\mdfdefinestyle{info}{
topline=false, bottomline=false,
leftline=false, rightline=false,
nobreak,
singleextra={
\fill[black](P-|O)circle[radius=0.4em];
\node at(P-|O){\color{white}\scriptsize\bf i};
\draw[very thick](P-|O)++(0,-0.8em)--(O);
}
}

\newenvironment{info}[1][Info:]{
\medskip
\begin{mdframed}[style=info]
\noindent{\textbf{#1}}
}{
\end{mdframed}
}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage[german, english]{babel}
\definecolor{slimeKeyword}{HTML}{B58900}
\definecolor{slimeString}{HTML}{2AA198}
\definecolor{slimeComment}{HTML}{839496}
\lstdefinelanguage{slime}
{
% list of keywords
morekeywords={
print,
if,
define,
cond
},
basicstyle=\ttfamily\small,
showstringspaces=false,
sensitive=true, % keywords are not case-sensitive
morecomment=[l]{;}, % l is for line comment
morestring=[b]" % defines that strings are enclosed in double quotes
}
\author{Felix Brendel}
\date{\today}
\title{The Slime 1.0 Manual}
\begin{document}

\maketitle
\tableofcontents

\lstset{language=slime,label= ,caption={Some text to illustrate},captionpos=t,numbers=none,keywordstyle=\color{slimeKeyword}, commentstyle=\color{slimeComment}, stringstyle=\color{slimeString}}
\begin{lstlisting}
(define (fib x)
(cond ((< x 1) 0)
((= x 1) 1)
(else (+ (fib (- x 1))
(fib (- x 2))))))

(print (if (> (fib 3) 1)
"Hello Felixses\n"
"Goodbye World\n"))

(fib 12)
\end{lstlisting}

\begin{verbatim}
=> Hello Felixses
144.000000
\end{verbatim}


\lstset{language=slime,label= ,caption={Some text to illustrate},captionpos=t,numbers=none,keywordstyle=\color{slimeKeyword}, commentstyle=\color{slimeComment}, stringstyle=\color{slimeString}}
\begin{lstlisting}
;; Comment here
(print "String here")
(+ 1 2 3)
\end{lstlisting}

\begin{verbatim}
=> String here6.000000
\end{verbatim}
\end{document}

Notiek ielāde…
Atcelt
Saglabāt