Skip to content

Commit 906a82a

Browse files
committed
finished the string section by adding unicode
1 parent 5709e55 commit 906a82a

File tree

11 files changed

+252
-30
lines changed

11 files changed

+252
-30
lines changed

bibliography/bibliography.bib

Lines changed: 93 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ @string { a_zinoviev_dimitry
219219
@string { l_australia_hobart = "{{Hobart}, {TAS}, {Australia}}" }
220220
@string { l_canada_oakville = "{{Oakville}, {ON}, {Canada}}" }
221221
@string { l_canada_vancouver = "{{Vancouver}, {BC}, {Canada}}" }
222+
@string { l_china_beijing = "{{China}, {Beijing}}" }
222223
@string { l_portugal_lisbon = "{{Lisbon}, {Portugal}}" }
223224
@string { l_switzerland_cham = "{{Cham}, {Switzerland}}" }
224225
@string { l_switzerland_geneva = "{{Geneva}, {Switzerland}}" }
@@ -246,13 +247,15 @@ @string { l_usa_savannah
246247
@string { l_usa_seattle = "{{Seattle}, {WA}, {USA}}" }
247248
@string { l_usa_sebastopol = "{{Sebastopol}, {CA}, {USA}}" }
248249
@string { l_usa_shelter_island = "{{Shelter Island}, {NY}, {USA}}" }
250+
@string { l_usa_south_san_francisco = "{{South San Francisco}, {CA}, {USA}}" }
249251
@string { l_usa_new_york = "{{New York}, {NY}, {USA}}" }
250252
251253
252254
%% publishers
253255
@string { p_aci_learning = "{{ACI} Learning}" }
254256
@string { p_acm = "{Association for Computing Machinery~({ACM})}" }
255257
@string { p_apress = "{Apress Media, LLC}" }
258+
@string { p_asa = "{American Standards Association Incorporated}" }
256259
@string { p_bruhin_software = "{Bruhin Software}" }
257260
@string { p_cambridge_uni_press_ass = "{Cambridge University Press \& Assessment}" }
258261
@string { p_cnri = "{Corporation for National Research Initiatives~({CNRI})}" }
@@ -264,7 +267,6 @@ @string { p_ieee
264267
@string { p_infinite_skills = "Infinite Skills Inc" }
265268
@string { p_informs = "{The Institute for Operations Research and the Management Sciences~({INFORMS})}" }
266269
@string { p_iso = "{International Organization for Standardization~{(ISO)}}" }
267-
@string { p_iso_iec = "{International Organization for Standardization~{(ISO)} / International Electrotechnical Commission~{(IEC)}}" }
268270
@string { p_manning_publications = "{Manning Publications}" }
269271
@string { p_microsoft_press = "{Microsoft Press}, " # p_pearson_education }
270272
@string { p_mit_press = "{{MIT} Press}" }
@@ -279,8 +281,10 @@ @string { p_springer
279281
@string { p_springer_nature_limited = "{Springer Nature Limited}" }
280282
@string { p_springer_new_york = "{Springer New York}" }
281283
@string { p_taylor_and_francis = "{Taylor and Francis Ltd.}" }
284+
@string { p_unicode_consortium = "{The Unicode Consortium}" }
282285
@string { p_university_of_south_carolina = "{University of South Carolina}" }
283286
@string { p_university_of_washington = "{University of Washington}" }
287+
@string { p_usas = "{United States of America Standards Institute~{(USAS)}}" }
284288
@string { p_usenix = "{{USENIX} Association}" }
285289
@string { p_wiley_and_sons_ltd = "{John Wiley and Sons Ltd.}" }
286290
@@ -289,6 +293,7 @@ @string { p_wiley_and_sons_ltd
289293
@string { pa_aci_learning = l_usa_centennial }
290294
@string { pa_acm = l_usa_new_york }
291295
@string { pa_apress = l_usa_new_york }
296+
@string { pa_asa = l_usa_new_york }
292297
@string { pa_bruhin_software = l_switzerland_winterthur }
293298
@string { pa_cambridge_uni_press_ass = l_uk_cambridge }
294299
@string { pa_cnri = l_usa_reston }
@@ -313,8 +318,10 @@ @string { pa_python_software_foundation
313318
@string { pa_springer_cham = l_switzerland_cham }
314319
@string { pa_springer_nature_limited = l_uk_london }
315320
@string { pa_springer_new_york = l_usa_new_york }
321+
@string { pa_unicode_consortium = l_usa_south_san_francisco }
316322
@string { pa_university_of_south_carolina = l_usa_columbia }
317323
@string { pa_university_of_washington = l_usa_seattle }
324+
@string { pa_usas = l_usa_new_york }
318325
@string { pa_usenix = l_usa_berkeley }
319326
@string { pa_taylor_and_francis = l_uk_london }
320327
@string { pa_wiley_and_sons_ltd = l_uk_chichester }
@@ -418,7 +425,7 @@ @xdata{rep_cnri_proposal
418425
}
419426

420427
@xdata{rep_iso_iec_standard,
421-
institution = p_iso_iec,
428+
institution = p_iso # and # p_iec,
422429
address = pa_iso_iec,
423430
type = {International Standard},
424431
}
@@ -429,6 +436,11 @@ @xdata{rep_ieee_standard
429436
type = {{IEEE}~Std},
430437
}
431438

439+
@xdata{rep_nsotprocg,
440+
type = {National Standard of the People's Republic of China~{(GB)}},
441+
address = l_china_beijing
442+
}
443+
432444

433445
%% series
434446
@xdata{ser_bs,
@@ -486,6 +498,16 @@ @inbook{APM1991TOEAP
486498
doi = {10.1007/978-1-4419-8552-1_8},
487499
}
488500

501+
@techreport{ASA1963ASCII,
502+
title = {American Standard Code for Information Interchange~{(ASCII~1963)}},
503+
date = {1963-06-17},
504+
number = {ASA~X3.4-1963},
505+
institution = p_asa,
506+
address = pa_asa,
507+
url = {https://www.sensitiveresearch.com/Archive/CharCodeHist/Files/CODES%20standards%20documents%20ASCII%20Sean%20Leonard%20Oct%202015/ASCII%2063,%20X3.4-1963.pdf},
508+
urldate = {2024-07-26}
509+
}
510+
489511
@article{B1991IWNT,
490512
author = a_beigel_richard,
491513
title = {Irrationality Without Number Theory},
@@ -629,6 +651,27 @@ @book{G2023CAIP
629651
address = pa_crc_press
630652
}
631653

654+
@techreport{GB180302022ITCCCS,
655+
title = {Information Technology -- Chinese Coded Character Set},
656+
xdata = {rep_nsotprocg},
657+
number = {\mbox{GB~18030-2022}},
658+
date = {2022-07-19/2023-08-01},
659+
institution = {State Administration for Market Regulation} # and # {Standardization Administration of the People's Republic of China},
660+
address = l_china_beijing,
661+
url = {https://openstd.samr.gov.cn/bzgk/gb/newGbInfo?hcno=A1931A578FE14957104988029B0833D3},
662+
urldate = {2024-07-26}
663+
}
664+
665+
@techreport{GBT23121980PROCNSG21CCECSFIE,
666+
title = {Code of Chinese Graphic Character Set for Information Interchange -- Primary Set},
667+
xdata = {rep_nsotprocg},
668+
number = {\mbox{GB/T 2312-1980}},
669+
date = {1980/1981-05-01},
670+
institution = {National Standards Administration},
671+
url = {https://openstd.samr.gov.cn/bzgk/gb/newGbInfo?hcno=5664A728BD9D523DE3B99BC37AC7A2CC},
672+
urldate = {2024-07-26},
673+
}
674+
632675
@inproceedings{GPBS2006WCTIPIHSUP,
633676
author = a_grendell_lina # and # a_peltomaeki_mia # and # a_back_ralph_johan # and # a_salakoski_tapio,
634677
title = {Why complicate things? Introducing Programming in High School using \python},
@@ -696,9 +739,17 @@ @techreport{IEEE2019ISFFPA
696739
isbn = {978-1-5044-5925-9},
697740
}
698741

699-
@techreport{ISOIEC207PLCWDOS,
742+
@techreport{ISOIEC106462020ITUCCSU,
743+
title = {Information Technology -- Universal Coded Character Set~(UCS)},
744+
number = {ISO/IEC~10646:2020},
745+
edition = {6},
746+
xdata = {rep_iso_iec_standard},
747+
date = {2020-12},
748+
}
749+
750+
@techreport{ISOIEC98892017PLCWDOS,
700751
title = {Programming Languages -- \pgls{C}, Working Document of~{SC22/WG14}},
701-
number = {{ISO/\linebreak{3}IEC9899:2017} {C17~ballot} {N2176}},
752+
number = {{ISO/\linebreak{3}IEC9899:2017} {C17~Ballot} {N2176}},
702753
xdata = {rep_iso_iec_standard},
703754
date = {2017-11},
704755
url = {https://files.lhmouse.com/standards/ISO%20C%20N2176.pdf},
@@ -981,6 +1032,44 @@ @book{T2024BGAGVCPMATFTND
9811032
execute = {\sloppy}
9821033
}
9831034

1035+
@techreport{TSSL1995CICSNSE,
1036+
title = {Chinese Internal Code Specification, National Standard Extended~{(GBK)}},
1037+
type = {Technical Supervision Standard Letter},
1038+
number = {1995~229},
1039+
date = {1995-12-15},
1040+
institution = {Standardization Department of the State Administration of Technical Supervision} # and # {Department of Science and Quality Supervision of the Ministry of Electronics Industry},
1041+
address = l_china_beijing,
1042+
}
1043+
1044+
@book{TUC2023U1510,
1045+
title = {\pgls{unicode}\textsuperscript{\textregistered}~15.1.0},
1046+
date = {2023-09-12},
1047+
publisher = p_unicode_consortium,
1048+
address = pa_unicode_consortium,
1049+
isbn = {978-1-936213-33-7},
1050+
url = {https://www.unicode.org/versions/Unicode15.1.0},
1051+
urldate = {2024-07-26}
1052+
}
1053+
1054+
@book{TUC2023U151ACS,
1055+
title = {The Unicode Standard, Version~15.1:~Archived Code Charts},
1056+
date = {2023-08-25},
1057+
publisher = p_unicode_consortium,
1058+
address = pa_unicode_consortium,
1059+
url = {https://www.unicode.org/Public/15.1.0/charts/CodeCharts.pdf},
1060+
urldate = {2024-07-26}
1061+
}
1062+
1063+
@techreport{USAS1967USCFII,
1064+
title = {USA Standard Code for Information Interchange~{(ASCII~1967)}},
1065+
date = {1967-07-07},
1066+
number = {USAS~X3.4-1967},
1067+
institution = p_usas,
1068+
address = pa_usas,
1069+
url = {https://www.sensitiveresearch.com/Archive/CharCodeHist/Files/CODES%20standards%20documents%20ASCII%20Sean%20Leonard%20Oct%202015/ASCII%2068,%20X3.4-1967.pdf},
1070+
urldate = {2024-07-26}
1071+
}
1072+
9841073
@article{VGOHRCBPWBvdWBWMMNJKLCPFMVLPCHQHARPvMS2020SFAFSCIP,
9851074
author = a_virtanen_pauli # and # a_gommers_ralf # and # a_oliphant_travis_e # and # a_haberland_matt # and # a_reddy_tyler # and # a_cornapeau_david # and # a_burovski_evgeni # and # a_peterson_pearu # and # a_warren_weckesser # and # a_bright_jonathan # and # a_van_der_walt_stefan # and # a_brett_matthew # and # a_wilson_joshua # and # a_millman_jarrod_k # and # a_mayorov_nikolay # and # a_nelson_andrew_r_j # and # a_jones_eric # and # a_kern_robert # and # a_larson_eric # and # a_carey_cj # and # a_polat_ilhan # and # a_feng_yu # and # a_moore_eric_w # and # a_vanderplas_jake # and # a_laxalde_denis # and # a_perktold_josef # and # a_cimran_robert # and # a_henriksen_ian # and # a_quinter_ea # and # a_harris_charles_r # and # a_archibald_anne_m # and # a_ribeiro_antonio_h # and # a_pedregosa_fabian # and # a_van_mulbregt_paul # and # a_scipy_1,
9861075
title = {\scipy~1.0:~Fundamental Algorithms for Scientific Computing in \python},

notation/terms.sty

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ text={\softwareStyle{C}},%
1919
name={C},%
2020
sort={C},%
2121
description={%
22-
is another programming language, which is very successful in system programming situations~\cite{ISOIEC207PLCWDOS,D2024MCFABAFITTCPL}.%
22+
is another programming language, which is very successful in system programming situations~\cite{ISOIEC98892017PLCWDOS,D2024MCFABAFITTCPL}.%
2323
}%
2424
}%
2525
%
@@ -35,6 +35,17 @@ See \cref{sec:howFloatingPointNumbersWork}.%
3535
}%
3636
%
3737
%
38+
\newglossaryentry{fstring}{%
39+
name={f-string},%
40+
plural={f-strings},%
41+
sort={f-string},
42+
description={%
43+
is a special string in \python, which delimited by \pythonil{f"..."} which can contain expressions in curly braces like \pythonil{f"a\{6-1\}b"} that are then turned to text via \pgls{strinterpolation}, which turns the string to~\pythonil{"a5b"}. %
44+
f\nobreakdash-strings are discussed in \cref{sec:fstrings}.%
45+
}%
46+
}%
47+
%
48+
%
3849
\newglossaryentry{git}{%
3950
name={Git},%
4051
description={%
@@ -65,6 +76,17 @@ For this course, we recommend using \pycharm.%
6576
}%
6677
%
6778
%
79+
\newglossaryentry{strinterpolation}{%
80+
name={(string) interpolation},%
81+
sort={string interpolation},
82+
description={%
83+
In \python, string interpolation is the process where all the expressions in an \pgls{fstring} are evaluated and the final string is constructed. %
84+
An example for string interpolation is turning \pythonil{f"Rounded \{1.234:.2f\}"} to \pythonil{"Rounded 1.23"}\pythonIdx{.2f}. %
85+
This is discussed in \cref{sec:fstrings}.%
86+
}%
87+
}%
88+
%
89+
%
6890
\newglossaryentry{Java}{%
6991
text={\softwareStyle{Java}},%
7092
name={Java},%
@@ -83,6 +105,16 @@ See \gls{significand}.%
83105
}%
84106
%
85107
%
108+
\newglossaryentry{modulodiv}{%
109+
name={modulo division},%
110+
description={%
111+
is, in \python, done by the operator \pythonil{\%} that computes the remainder of a division. %
112+
\pythonil{15 \% 6} gives us \pythonil{3}. %
113+
Modulo division is mentioned in \cref{sec:int,sec:floatarith}.%
114+
}%
115+
}%
116+
%
117+
%
86118
\newglossaryentry{significand}{%
87119
name={significand},%
88120
description={%
@@ -126,6 +158,16 @@ Under \ubuntu\ \linux, \ubuntuTerminal\ opens a terminal.%
126158
}%
127159
%
128160
%
161+
\newglossaryentry{unicode}{%
162+
name={Unicode},%
163+
description={%
164+
A standard for assigning characters to numbers~\cite{TUC2023U1510,TUC2023U151ACS,ISOIEC106462020ITUCCSU}. %
165+
The Unicode standard supports basically all characters from all languages that are currently in use, as well as many special symbols. %
166+
It is the predominantly used way to represent characters in computers and is regularly updated and improved.%
167+
}%
168+
}%
169+
%
170+
%
129171
\newglossaryentry{vcs}{%
130172
name={Version Control System},%
131173
plural={Version Control Systems},%

scripts/filterPdf.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ echo "$(date +'%0Y-%0m-%0d %0R:%0S'): Welcome to the pdf filtering script."
1212
fileIn="$1"
1313
fileOut="$2"
1414

15-
echo "$(date +'%0Y-%0m-%0d %0R:%0S'): We will filter '$fileIn' to '$fileOut using ghostscipt."
15+
echo "$(date +'%0Y-%0m-%0d %0R:%0S'): We will filter '$fileIn' to '$fileOut using ghostscript."
1616

1717
gs -dAntiAliasColorImages=true \
1818
-dAntiAliasGrayImages=true \
@@ -58,5 +58,4 @@ gs -dAntiAliasColorImages=true \
5858
-c "<</NeverEmbed [ ]>> setdistillerparams" \
5959
-q
6060

61-
echo "$(date +'%0Y-%0m-%0d %0R:%0S'): Successfully finished filtering '$fileIn' to '$fileOut using ghostscipt."
62-
61+
echo "$(date +'%0Y-%0m-%0d %0R:%0S'): Successfully finished filtering '$fileIn' to '$fileOut using ghostscript."

styles/glossary.sty

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,19 @@ description={\sloppy#4.}%
9494
%%
9595
%% Invoke the glossary term, but link only once per page.
9696
%%
97+
%% Print the glosary entry in the singular form.
9798
\protected\gdef\pgls#1{%
9899
\expandafter\ifcsname @@@@#1\endcsname\else%
99100
\oncePerPage{@@@@#1}{\gls{#1}}{\gls[hyper=false]{#1}}%
100101
\fi%
101102
\expandafter\csname @@@@#1\endcsname%
102103
}%
103104
%
105+
%% Print the glosary entry in the plural form.
106+
\protected\gdef\pglspl#1{%
107+
\expandafter\ifcsname @@@@#1\endcsname\else%
108+
\oncePerPage{@@@@#1}{\glspl{#1}}{\glspl[hyper=false]{#1}}%
109+
\fi%
110+
\expandafter\csname @@@@#1\endcsname%
111+
}%
112+
%

text/main/basics/simpleDataTypesAndOperations/float/float.tex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
\endhsection%
7070
%
7171
\hsection{Floating Point Arithmetic}%
72+
\label{sec:floatarith}%
7273
%
7374
\begin{figure}%
7475
\centering%
@@ -88,7 +89,7 @@
8889
Thus, \pythonil{1.0 + 7}\pythonIdx{+} gives us \pythonil{8} and \pythonil{2 * 3.0}\pythonIdx{*} yields \pythonil{6.0}.
8990
In other words, if one \pythonilIdx{float} occurs somewhere in an expression, it will \inQuotes{infect} everything that it touches to become a \pythonilIdx{float} too, even if the result could be represented as \pythonilIdx{int}.
9091
Some results cannot be integers anyway, for example \pythonil{5 - 3.6}\pythonIdx{-} evaluates to~\pythonil{1.4}.
91-
The remainder (the modulo) of a division can also be computed for floating point numbers.
92+
The remainder (the \glsdisp{modulodiv}{modulo}) of a division can also be computed for floating point numbers.
9293
The remainder of the division of 6.5 by 2, i.e., \expandafter\pythonil{6.5 \% 2}\pythonIdx{\%} is~\pythonil{0.5}.%
9394
%
9495
\begin{sloppypar}%

text/main/basics/simpleDataTypesAndOperations/int/int.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
In many programming languages, there are different integer datatypes with different ranges.
1010
In \pgls{Java}, a \pythonil{byte} is an integer datatype with range~\intRange{-2^7}{2^7-1}, a \pythonil{short} has range~\intRange{-2^{15}}{2^{17}-1}, an \pythonilIdx{int} has range~\intRange{-2^{31}}{2^{31}-1}, and \pythonil{long} has range~\intRange{-2^{63}}{2^{63}-1}, for example.
11-
The draft for the \softwareStyle{C17} standard for the \pgls{C}~programming language lists five signed and five unsigned integer types, plus several ways to extend them~\cite{ISOIEC207PLCWDOS}.
11+
The draft for the \softwareStyle{C17} standard for the \pgls{C}~programming language lists five signed and five unsigned integer types, plus several ways to extend them~\cite{ISOIEC98892017PLCWDOS}.
1212
The different integer types of both languages have different ranges and sizes, and the programmer must carefully choose which she needs to use in which situation.
1313

1414
\python\ only has one integer type, called \pythonilIdx{int}.
@@ -18,7 +18,7 @@
1818
%
1919
\hsection{Integer Arithmetics}%
2020
Now, what can we do with integer numbers?
21-
We can add, subtract, multiply, divide, modulo divide, and raise them to powers.
21+
We can add, subtract, multiply, divide, \glsdisp{modulodiv}{modulo divide}, and raise them to powers, for example.
2222

2323
\begin{figure}%
2424
\centering%
@@ -57,7 +57,7 @@
5757
Notice that the result of this division operator is always a floating point number, even if the number itself is an integer.
5858

5959
Now above we have said that \pythonil{33 // 4} yields the integer~\pythonil{8}.
60-
The remainder of this operation can be computed using the modulo operator \expandafter\pythonilIdx{\%}, i.e., by typing \pythonil{33 \% 4}, which yields~\pythonil{1}.
60+
The remainder of this operation can be computed using the \pgls{modulodiv} operator \expandafter\pythonilIdx{\%}, i.e., by typing \pythonil{33 \% 4}, which yields~\pythonil{1}.
6161
We also find that \expandafter\pythonil{34 \% 4} yields~\pythonil{2}, \expandafter\pythonil{35 \% 4} gives us~\pythonil{3}, and \expandafter\pythonil{36 \% 4} is~\pythonil{0}.
6262

6363
\begin{figure}%

text/main/basics/simpleDataTypesAndOperations/introduction/introduction.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
\item \pythonilIdx{int}: the integer datatype, which represents integers numbers~\integerNumbers~(\cref{sec:int}),%
4242
\item \pythonilIdx{float}: the floating point numbers, i.e., a subset of the real numbers~\realNumbers~(\cref{sec:float}),%
4343
\item \pythonilIdx{bool}: Boolean values, which can be either \pythonilIdx{True} or \pythonilIdx{False}~(\cref{sec:bool}),%
44-
\item \pythonilIdx{str}: strings, i.e., portions of text of arbitrary length~(\cref{sec:str}), and.%
44+
\item \pythonilIdx{str}: strings, i.e., portions of text of arbitrary length~(\cref{sec:str}), and%
4545
\item \pythonilIdx{None}: nothing, which is the result of any command that does not explicitly return a value.%
4646
%
4747
\end{itemize}%

0 commit comments

Comments
 (0)