forked from Grimler91/pythontex
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbash_test.tex
More file actions
58 lines (45 loc) · 1.11 KB
/
Copy pathbash_test.tex
File metadata and controls
58 lines (45 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
\documentclass[11pt]{article}
% Engine-specific settings
% pdftex:
\ifcsname pdfmatch\endcsname
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\fi
% xetex:
\ifcsname XeTeXinterchartoks\endcsname
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\fi
% luatex:
\ifcsname directlua\endcsname
\usepackage{fontspec}
\fi
% End engine-specific settings
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage{graphicx}
\usepackage{fullpage}
\usepackage[keeptemps=all, makestderr, usefamily=bash]{pythontex}
\begin{document}
\section*{Bash}
Inline: \bash{echo "Hello from bash!"}
Code environment:
\begin{bashcode}
echo "More from bash."
\end{bashcode}
Block environment:
\begin{bashblock}
ls -a
\end{bashblock}
Printed output:
\printpythontex[verbatim]
Verbatim:
\begin{bashverbatim}
echo "More from bash."
\end{bashverbatim}
Sub environment:
\begin{bashsub}
Some text \textcolor{blue}{!{"followed by things from bash"}} and then more text.
\end{bashsub}
Again, with command: \bashs{Some text \textcolor{blue}{!{"followed by more things from bash"}} and then more text.}
\end{document}