Skip to content

Commit 406217e

Browse files
committed
improved abstract and preface
1 parent b9b94af commit 406217e

16 files changed

+85
-18
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ If you have any questions or suggestions, please contact
1818
Prof. Dr. [Thomas Weise](http://iao.hfuu.edu.cn/5) (汤卫思教授)
1919
at the Institute of Applied Optimization (应用优化研究所, [IAO](http://iao.hfuu.edu.cn))
2020
of the School of Artificial Intelligence and Big Data ([人工智能与大数据学院](http://www.hfuu.edu.cn/jsjx/))
21-
of [Hefei University](http://www.hfuu.edu.cn/english/) ([合肥学院](http://www.hfuu.edu.cn/)),
21+
of [Hefei University](http://www.hfuu.edu.cn/english/) ([合肥大学](http://www.hfuu.edu.cn/)),
2222
in Hefei, Anhui, China (中国安徽省合肥市)
2323
via email to [[email protected]](mailto:[email protected]) with CC to [[email protected]](mailto:[email protected]).

styles/colors.sty

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
%% Link and Citation Colors
1010
%%
1111
\colorlet{href-linkcolor}{hfuu-red!60!black}%
12-
\colorlet{href-citecolor}{hfuu-red!60!black}%
13-
\colorlet{href-urlcolor}{hfuu-orange!40!black}%
12+
\colorlet{href-citecolor}{href-linkcolor}%
13+
\colorlet{href-urlcolor}{href-linkcolor}%
1414
%%
1515
%% Listings Colors
1616
%%

styles/keys.sty

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,6 @@
2323
%
2424
%% Include a pdf with chinese characters
2525
%% the pdf should have 0.2pt space around the characters of height 11pt, font should be KaiTi
26-
\protected\gdef\cnPdf#1{(\raisebox{-0.4ex}{\includegraphics[height=2.1ex,keepaspectratio]{\currentDir/#1}})}
26+
\protected\gdef\cnPdfRaw#1{\raisebox{-0.4ex}{\includegraphics[height=2.1ex,keepaspectratio]{\currentDir/#1}}}%
27+
\protected\gdef\cnPdf#1{(\cnPdfRaw{#1})}%
28+
%

styles/listing.sty

+13-3
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,21 @@ language=bash,%
199199
%% #2 the local path
200200
%% #3 the command
201201
%% #4 the label (exec: will be pre-pended)
202-
%% #5 the caption
203-
\protected\gdef\gitOutput#1#2#3#4#5{%
202+
%% #5 the additional parameters, if any
203+
\protected\gdef\gitOutputRaw#1#2#3#4#5{%
204204
\gitExec{#1}{#2}{#3}%
205205
\expandafter\expandafter\expandafter\edef\expandafter\csname @pwp@gitFile:exec:#4\endcsname{\gitFile}%
206-
\lstinputlisting[float,style=text_style,label={exec:#4},caption={#5}]{\csname @pwp@gitFile:exec:#4\endcsname}%
206+
\lstinputlisting[style=text_style#5]{\csname @pwp@gitFile:exec:#4\endcsname}%
207+
}%
208+
%
209+
%% Use latexgit to place a listing with program output.
210+
%% #1 the git repository
211+
%% #2 the local path
212+
%% #3 the command
213+
%% #4 the label (exec: will be pre-pended)
214+
%% #5 the caption
215+
\protected\gdef\gitOutput#1#2#3#4#5{%
216+
\gitOutputRaw{#1}{#2}{#3}{#4}{,label={exec:#4},caption={#5},float}%
207217
}%
208218
%
209219
%% Use latexgit to place a listing with code and the program output.

text/front/preface/city.pdf

4.51 KB
Binary file not shown.

text/front/preface/city.svg

+1
Loading

text/front/preface/iao.pdf

4.22 KB
Binary file not shown.

text/front/preface/iao.svg

+1
Loading

text/front/preface/preface.tex

+53-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,59 @@
11
\chapter*{Preface}%
22
\pdfbookmark{Preface}{preface}%
33
%
4-
This is work in progress.
4+
This book is intended to be read on an electronic devise.
5+
Please do not print it.
6+
Help preserving the environment.
57

6-
The text of the book itself is actively written and available in the repository \url{\programmingWithPythonRepo}.
7-
There, you can also submit \href{\programmingWithPythonRepo/issues}{issues}, such as change requests, suggestions, errors, typos, or you can inform me that something is unclear, so that I can improve the book.
8+
This book is work in progress.
9+
It will take years to be completed and I plan to keep improving and extending it for quite some time.
810

9-
This book is released under the \emph{Attribution-NonCommercial-ShareAlike~4.0 International license} (\href{http://creativecommons.org/licenses/by-nc-sa/4.0/}{\mbox{CC~BY-NC-SA~4.0}}).
11+
This book is freely available.
12+
You can download its newest version from \url{https://thomasweise.github.io/programmingWithPython/}.
13+
This version may change since this book is, well, work in progress.
14+
The book is released under the \emph{Attribution-NonCommercial-ShareAlike~4.0 International license} (\href{http://creativecommons.org/licenses/by-nc-sa/4.0/}{\mbox{CC~BY-NC-SA~4.0}}).
1015
You can freely share it.
11-
Please do not print it, though, to preserve the environment.
12-
13-
This book was built using the software versions given in \cref{exec:versions}.
14-
15-
\gitOutput{}{}{scripts/dependencyVersions.sh}{versions}{The versions of the software packages used to build this book.}
16+
You can also copy text or figures, as long as you cite the book as the original source, e.g., by using the following Bib\TeX:%
17+
%
18+
\begin{lstlisting}[style=text_style]
19+
@book{programmingWithPython,
20+
author = {Thomas Weise},
21+
title = {Programming with Python},
22+
year = {2024},
23+
publisher = {Institute of Applied Optimization,
24+
School of Artificial Intelligence and Big Data,
25+
Hefei University},
26+
address = {Hefei, Anhui, China},
27+
url = {https://thomasweise.github.io/programmingWithPython}
28+
}
29+
\end{lstlisting}
30+
%
31+
This book contains a lot of examples.
32+
You can find all of them in the repository \url{\programmingWithPythonCodeRepo}.
33+
You can clone this repository and play with these example codes.%
34+
%
35+
\begin{sloppypar}%
36+
The text of the book itself is also available in the repository \url{\programmingWithPythonRepo}.
37+
There, you can also submit \href{\programmingWithPythonRepo/issues}{issues}, such as change requests, suggestions, errors, typos, or you can inform me that something is unclear, so that I can improve the book.
38+
Such feedback is most welcome.
39+
The book is written using \LaTeX\ and this repository contains all the scripts, styles, graphics, and source files of the book (except the source files of the example programs).%
40+
\end{sloppypar}%
41+
%
42+
\strut\vfill\strut%
43+
%
44+
%
45+
\begin{flushleft}%
46+
Copyright \textcopyright\ 2024\\%
47+
Prof.~Dr.~\href{http://iao.hfuu.edu.cn/5}{Thomas Weise}~\cnPdf{profWeise}\\%
48+
at the Institute of Applied Optimization~(\cnPdfRaw{iao}, \href{http://iao.hfuu.edu.cn}{IAO})\\%
49+
of the School of Artificial Intelligence and Big Data~(\href{http://www.hfuu.edu.cn/jsjx/}{\cnPdfRaw{school}})\\%
50+
of \href{http://www.hfuu.edu.cn/english}{Hefei University}~(\href{http://www.hfuu.edu.cn}{\cnPdfRaw{uni}}),\\%
51+
in Hefei, Anhui, China~\cnPdf{city}\\%
52+
via email to \href{mailto:[email protected]}{[email protected]} with CC to \href{mailto:[email protected]}{[email protected]}.
53+
\end{flushleft}
54+
%
55+
\clearpage%
56+
%
57+
\strut\vfill\strut%
58+
This book was built using the following software versions:%
59+
\gitOutputRaw{}{}{scripts/dependencyVersions.sh}{versions}{}%

text/front/preface/profWeise.pdf

4.05 KB
Binary file not shown.

text/front/preface/profWeise.svg

+1
Loading

text/front/preface/school.pdf

4.78 KB
Binary file not shown.

text/front/preface/school.svg

+1
Loading

text/front/preface/uni.pdf

3.66 KB
Binary file not shown.

text/front/preface/uni.svg

+1
Loading

text/title/abstract.tex

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
%
2-
This is work in progress.
2+
The goal of this book is to teach practical programming with the Python language to high school, undergraduate, and graduate students alike.
3+
Hopefully, readers without prior knowledge can follow the text.
4+
Therefore, all concepts are introduced using examples and discussed comprehensively.
5+
All examples are available online in the GitHub repository associated with this book, so that readers can play with them easily.
6+
Actually, the goal of the book is not just to teach programming, but to teach programming as a part of the software development process.
7+
This means that from the very beginning, we will attempt to push the reader towards writing clean code with comments and documentation as well as to use various tools for finding potential issues.
8+
While this book is work in progress, we hope that it will eventually teach all the elements of Python software creation.
9+
We hope that it can enable readers without prior programming experience to develop beautiful and maintainable software.
310
%
4-

0 commit comments

Comments
 (0)