Switch back to listings for code snippets
This commit is contained in:
parent
50c38e2e77
commit
09030736c5
5 changed files with 38 additions and 12 deletions
|
@ -5,11 +5,26 @@
|
||||||
("\\section{%s}" . "\\addsec{%s}")
|
("\\section{%s}" . "\\addsec{%s}")
|
||||||
("\\subsection{%s}" . "\\subsection*{%s}")
|
("\\subsection{%s}" . "\\subsection*{%s}")
|
||||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))
|
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))
|
||||||
(org-latex-src-block-backend . minted)
|
(org-latex-src-block-backend . listings)
|
||||||
|
(org-latex-listings-options . (("backgroundcolor" "\\color{white}")
|
||||||
|
("commentstyle" "\\color{green}")
|
||||||
|
("keywordstyle" "\\color{magenta}")
|
||||||
|
("numberstyle" "\\color{gray}")
|
||||||
|
("stringstyle" "\\color{purple}")
|
||||||
|
("basicstyle" "\\ttfamily")
|
||||||
|
("breakatwhitespace" "false")
|
||||||
|
("breaklines" "true")
|
||||||
|
("captionpos" "b")
|
||||||
|
("keepspaces" "true")
|
||||||
|
("numbers" "left")
|
||||||
|
("numbersep" "5pt")
|
||||||
|
("showspaces" "false")
|
||||||
|
("showstringspaces" "false")
|
||||||
|
("showtabs" "false")
|
||||||
|
("tabsize" "2")))
|
||||||
(org-latex-prefer-user-labels . t)
|
(org-latex-prefer-user-labels . t)
|
||||||
(org-html-prefer-user-labels . t)
|
(org-html-prefer-user-labels . t)
|
||||||
(org-latex-toc-command . "\\frontmatter\n\\addchap{Table of Contents}\n\\label{chap:toc}\n\\listoftoc*{toc}\n\n")
|
(org-latex-toc-command . "\\frontmatter\n\\addchap{Table of Contents}\n\\label{chap:toc}\n\\listoftoc*{toc}\n\n")
|
||||||
(org-latex-pdf-process . ("latexmk -f -pdf -%latex -interaction=nonstopmode -shell-escape -output-directory=%o %f"))
|
|
||||||
(fill-column . 200)))
|
(fill-column . 200)))
|
||||||
(org-mode . ((eval . (progn (visual-line-mode)
|
(org-mode . ((eval . (progn (visual-line-mode)
|
||||||
(org-toggle-link-display)
|
(org-toggle-link-display)
|
||||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,5 +1,3 @@
|
||||||
book.pdf
|
book.pdf
|
||||||
book.tex
|
book.tex
|
||||||
diff.pdf
|
diff.pdf
|
||||||
_minted-book
|
|
||||||
_minted-diff
|
|
||||||
|
|
3
book.org
3
book.org
|
@ -5,7 +5,7 @@
|
||||||
#+LATEX_CLASS_OPTIONS: [paper=240mm:170mm,parskip]
|
#+LATEX_CLASS_OPTIONS: [paper=240mm:170mm,parskip]
|
||||||
#+LATEX_COMPILER: lualatex
|
#+LATEX_COMPILER: lualatex
|
||||||
#+LATEX_HEADER: \usepackage[inline]{enumitem}
|
#+LATEX_HEADER: \usepackage[inline]{enumitem}
|
||||||
#+LATEX_HEADER: \usepackage{minted}
|
#+LATEX_HEADER: \usepackage{listings}
|
||||||
#+LATEX_HEADER: \usepackage{color}
|
#+LATEX_HEADER: \usepackage{color}
|
||||||
#+LATEX_HEADER: \usepackage{url}
|
#+LATEX_HEADER: \usepackage{url}
|
||||||
#+LATEX_HEADER: \usepackage[type=report]{ugent2016-title}
|
#+LATEX_HEADER: \usepackage[type=report]{ugent2016-title}
|
||||||
|
@ -1085,6 +1085,7 @@ The API for the R judge was designed to follow the visual structure of the feedb
|
||||||
|
|
||||||
#+CAPTION: Sample evaluation code for a simple R exercise.
|
#+CAPTION: Sample evaluation code for a simple R exercise.
|
||||||
#+NAME: lst:technicalrsample
|
#+NAME: lst:technicalrsample
|
||||||
|
#+ATTR_LATEX: :float t
|
||||||
#+BEGIN_SRC r
|
#+BEGIN_SRC r
|
||||||
context({
|
context({
|
||||||
testcase('The correct method was used', {
|
testcase('The correct method was used', {
|
||||||
|
|
18
build.el
18
build.el
|
@ -14,7 +14,23 @@
|
||||||
("\\section{%s}" . "\\addsec{%s}")
|
("\\section{%s}" . "\\addsec{%s}")
|
||||||
("\\subsection{%s}" . "\\subsection*{%s}")
|
("\\subsection{%s}" . "\\subsection*{%s}")
|
||||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
|
("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
|
||||||
org-latex-src-block-backend 'minted
|
org-latex-src-block-backend 'listings
|
||||||
|
org-latex-listings-options '(("backgroundcolor" "\\color{white}")
|
||||||
|
("commentstyle" "\\color{green}")
|
||||||
|
("keywordstyle" "\\color{magenta}")
|
||||||
|
("numberstyle" "\\color{gray}")
|
||||||
|
("stringstyle" "\\color{purple}")
|
||||||
|
("basicstyle" "\\ttfamily")
|
||||||
|
("breakatwhitespace" "false")
|
||||||
|
("breaklines" "true")
|
||||||
|
("captionpos" "b")
|
||||||
|
("keepspaces" "true")
|
||||||
|
("numbers" "left")
|
||||||
|
("numbersep" "5pt")
|
||||||
|
("showspaces" "false")
|
||||||
|
("showstringspaces" "false")
|
||||||
|
("showtabs" "false")
|
||||||
|
("tabsize" "2"))
|
||||||
org-latex-prefer-user-labels t
|
org-latex-prefer-user-labels t
|
||||||
org-latex-toc-command "\\frontmatter\n\\addchap{Table of Contents}\n\\label{chap:toc}\n\\listoftoc*{toc}\n\n")
|
org-latex-toc-command "\\frontmatter\n\\addchap{Table of Contents}\n\\label{chap:toc}\n\\listoftoc*{toc}\n\n")
|
||||||
|
|
||||||
|
|
|
@ -27,9 +27,6 @@
|
||||||
full-texlive = pkgs.texlive.combine { inherit (pkgs.texlive) scheme-full; inherit ugent2016; };
|
full-texlive = pkgs.texlive.combine { inherit (pkgs.texlive) scheme-full; inherit ugent2016; };
|
||||||
build-diffed = pkgs.writeShellScriptBin "build-diffed" ''
|
build-diffed = pkgs.writeShellScriptBin "build-diffed" ''
|
||||||
set -E
|
set -E
|
||||||
|
|
||||||
export PATH=${pkgs.python311Packages.pygments}/bin:$PATH
|
|
||||||
|
|
||||||
atexit() {
|
atexit() {
|
||||||
git worktree remove -f .sent
|
git worktree remove -f .sent
|
||||||
rm book.tex sent.tex diff.tex -f
|
rm book.tex sent.tex diff.tex -f
|
||||||
|
@ -44,8 +41,8 @@
|
||||||
popd
|
popd
|
||||||
mkdir build
|
mkdir build
|
||||||
${full-texlive}/bin/latexdiff --math-markup=whole -t CFONT sent.tex book.tex > diff.tex
|
${full-texlive}/bin/latexdiff --math-markup=whole -t CFONT sent.tex book.tex > diff.tex
|
||||||
${full-texlive}/bin/latexmk -f -pdf -lualatex -shell-escape -interaction=nonstopmode -output-directory=build book.tex
|
${full-texlive}/bin/latexmk -f -pdf -lualatex -interaction=nonstopmode -output-directory=build book.tex
|
||||||
${full-texlive}/bin/latexmk -f -pdf -lualatex -shell-escape -interaction=nonstopmode -output-directory=build diff.tex
|
${full-texlive}/bin/latexmk -f -pdf -lualatex -interaction=nonstopmode -output-directory=build diff.tex
|
||||||
mv build/book.pdf build/diff.pdf .
|
mv build/book.pdf build/diff.pdf .
|
||||||
'';
|
'';
|
||||||
ugent2016 = pkgs.stdenvNoCC.mkDerivation (finalAttrs: {
|
ugent2016 = pkgs.stdenvNoCC.mkDerivation (finalAttrs: {
|
||||||
|
@ -107,7 +104,6 @@
|
||||||
packages = [
|
packages = [
|
||||||
full-texlive
|
full-texlive
|
||||||
pkgs.nixpkgs-fmt
|
pkgs.nixpkgs-fmt
|
||||||
pkgs.python310Packages.pygments
|
|
||||||
];
|
];
|
||||||
commands = [
|
commands = [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue