Skip to content

Commit c7ca48f

Browse files
committed
Lots of latex fixes
1 parent 408616f commit c7ca48f

13 files changed

+115
-53
lines changed

‎doc/source/10_trees_and_directed_acyclic_graphs.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ responsibility for translating the maths into code.
2525
The splat and double splat operators
2626
------------------------------------
2727

28-
.. dropdown:: Video: splat and double splat.
28+
.. details:: Video: splat and double splat.
2929

3030
.. vimeo:: 523477744
3131

@@ -251,7 +251,7 @@ Tree nodes with no children are called *leaf nodes*.
251251
Data structures for trees
252252
-------------------------
253253

254-
.. dropdown:: Tree data structures.
254+
.. details:: Tree data structures.
255255

256256
.. vimeo:: 523477713
257257

@@ -329,7 +329,7 @@ to read! This is the reason that trees are often represented by diagrams.
329329
Traversing :class:`~example_code.graphs.TreeNode`
330330
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
331331

332-
.. dropdown:: Video: tree traversal.
332+
.. details:: Video: tree traversal.
333333

334334
.. vimeo:: 523477719
335335

@@ -648,7 +648,7 @@ in the case of :class:`Number` and a :class:`str` in the case of :class:`Symbol`
648648
Operations on expression trees
649649
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
650650

651-
.. dropdown:: Video: evaluating expressions.
651+
.. details:: Video: evaluating expressions.
652652

653653
.. vimeo:: 523478799
654654

‎doc/source/11_further_object-oriented_features.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ in the course so far.
1010
Decorators
1111
----------
1212

13-
.. dropdown:: Video: decorators.
13+
.. details:: Video: decorators.
1414

1515
.. vimeo:: 526946976
1616

@@ -203,7 +203,7 @@ ones. We will survey just a few here:
203203
Abstract base classes
204204
---------------------
205205

206-
.. dropdown:: Video: Abstract base classes.
206+
.. details:: Video: Abstract base classes.
207207

208208
.. vimeo:: 526947635
209209

@@ -382,7 +382,7 @@ second use of abstract base classes comes into play.
382382
Virtual subclasses
383383
~~~~~~~~~~~~~~~~~~
384384

385-
.. dropdown:: Video: virtual subclasses.
385+
.. details:: Video: virtual subclasses.
386386

387387
.. vimeo:: 526947427
388388

‎doc/source/1_introduction.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Introduction: abstraction in mathematics and programming
44
========================================================
55

6-
.. dropdown:: Video introduction.
6+
.. details:: Video introduction.
77

88
.. vimeo:: 486106801
99

‎doc/source/2_programs_in_files.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ code really reusable by creating Python modules and packages.
2020
Setting up a Python environment for this course
2121
-----------------------------------------------
2222

23-
.. dropdown:: Video: setting up your virtual environment.
23+
.. details:: Video: setting up your virtual environment.
2424

2525
.. vimeo:: 486546635
2626

@@ -87,7 +87,7 @@ Pip can also be used to upgrade a package to the latest version:
8787
The Python interpreter
8888
----------------------
8989

90-
.. dropdown:: Video: a first Python script.
90+
.. details:: Video: a first Python script.
9191

9292
.. vimeo:: 486557682
9393

@@ -266,7 +266,7 @@ shortly.
266266
Modules
267267
-------
268268

269-
.. dropdown:: Video: a first Python module.
269+
.. details:: Video: a first Python module.
270270

271271
.. vimeo:: 486845755
272272

@@ -428,7 +428,7 @@ is in :ref:`the official Python documentation. <python:import>`
428428
Packages
429429
--------
430430

431-
.. dropdown:: Video: a first Python package.
431+
.. details:: Video: a first Python package.
432432

433433
.. vimeo:: 487003753
434434

@@ -636,7 +636,7 @@ the package every time you change it.
636636
Testing frameworks
637637
------------------
638638

639-
.. dropdown:: Video: introducing Pytest.
639+
.. details:: Video: introducing Pytest.
640640

641641
.. vimeo:: 486987209
642642

‎doc/source/3_objects.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ Python is an object, and every object has a type.
175175
Defining new types
176176
------------------
177177

178-
.. dropdown:: Video: a first class
178+
.. details:: Video: a first class
179179

180180
.. vimeo:: 488143930
181181

@@ -320,7 +320,7 @@ create a private attribute.
320320
Methods
321321
.......
322322

323-
.. dropdown:: Video: defining methods
323+
.. details:: Video: defining methods
324324

325325
.. vimeo:: 488273256
326326

@@ -378,7 +378,7 @@ later, so that will be the one which is accessed.
378378
String representations of objects
379379
.................................
380380

381-
.. dropdown:: Video: printing classes
381+
.. details:: Video: printing classes
382382

383383
.. vimeo:: 488275072
384384

@@ -484,7 +484,7 @@ We can now observe the difference in the result:
484484
Object equality
485485
...............
486486

487-
.. dropdown:: Video: object equality and test driven development
487+
.. details:: Video: object equality and test driven development
488488

489489
.. vimeo:: 488981397
490490

@@ -584,7 +584,7 @@ equality now behaves as we might expect.
584584
Defining arithmetic options on objects
585585
......................................
586586

587-
.. dropdown:: Video: polynomial addition.
587+
.. details:: Video: polynomial addition.
588588

589589
.. vimeo:: 489009900
590590

‎doc/source/4_style.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
A matter of style
44
=================
55

6-
.. dropdown:: Video: why style?
6+
.. details:: Video: why style?
77

88
.. vimeo:: 499766703
99

@@ -107,7 +107,7 @@ with code layout rules while this chapter roams more widely.
107107
Linters
108108
.......
109109

110-
.. dropdown:: Video: installing and using a linter.
110+
.. details:: Video: installing and using a linter.
111111

112112

113113
.. vimeo:: 499770130
@@ -154,7 +154,7 @@ to set up your editor to highlight flake8 incompatibilities in your source. For
154154
visual studio code, first open the command palette by typing :kbd:`control` +
155155
:kbd:`shift` + :kbd:`P` (:kbd:`` + :kbd:`shift` + :kbd:`P` on Mac). There type
156156
"Python: Select Linter" to bring up the list of available linters, and select
157-
"flake8" from the dropdown list. The video above shows this process.
157+
"flake8" from the details list. The video above shows this process.
158158

159159
How to tell Flake8 to shut up
160160
.............................

‎doc/source/5_abstract_data_types.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ structures which could be used to implement them.
3434
Stacks
3535
------
3636

37-
.. dropdown:: Video: stacks as an abstract data type.
37+
.. details:: Video: stacks as an abstract data type.
3838

3939

4040
.. vimeo:: 506479213
@@ -280,7 +280,7 @@ tasks.
280280
Algorithmic complexity
281281
----------------------
282282

283-
.. dropdown:: Video: dynamic arrays and algorithmic complexity.
283+
.. details:: Video: dynamic arrays and algorithmic complexity.
284284

285285

286286
.. vimeo:: 506479208
@@ -552,7 +552,7 @@ this.
552552
Queues and deques
553553
-----------------
554554

555-
.. dropdown:: Video: deques and ring buffers.
555+
.. details:: Video: deques and ring buffers.
556556

557557
.. vimeo:: 506710190
558558

@@ -610,7 +610,7 @@ Linked lists
610610
------------
611611

612612

613-
.. dropdown:: Video: linked lists.
613+
.. details:: Video: linked lists.
614614

615615
.. vimeo:: 506743244
616616

@@ -774,7 +774,7 @@ based on ring buffers.
774774
The iterator protocol
775775
---------------------
776776

777-
.. dropdown:: Video: the iterator protocol.
777+
.. details:: Video: the iterator protocol.
778778

779779
.. vimeo:: 506743250
780780

‎doc/source/6_exceptions.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Errors and exceptions
44
=====================
55

6-
.. dropdown:: Video: errors and exceptions.
6+
.. details:: Video: errors and exceptions.
77

88

99
.. vimeo:: 509280820
@@ -178,7 +178,7 @@ exceptions so there are many more defined in third-party packages.
178178
Tracebacks: finding errors
179179
--------------------------
180180

181-
.. dropdown:: Video: tracebacks.
181+
.. details:: Video: tracebacks.
182182

183183
.. vimeo:: 509280880
184184

@@ -246,7 +246,7 @@ the call stack.
246246
The call stack
247247
..............
248248

249-
.. dropdown:: Video: the call stack.
249+
.. details:: Video: the call stack.
250250

251251
.. vimeo:: 509281576
252252

@@ -365,7 +365,7 @@ line of the iPython session.
365365
Raising exceptions
366366
------------------
367367

368-
.. dropdown:: Video: raising an exception.
368+
.. details:: Video: raising an exception.
369369

370370
.. vimeo:: 509492490
371371

@@ -479,7 +479,7 @@ distinction is of negligible importance for our current purposes.
479479
Handling exceptions
480480
-------------------
481481

482-
.. dropdown:: Video: handling exceptions.
482+
.. details:: Video: handling exceptions.
483483

484484
.. vimeo:: 509492495
485485

@@ -580,7 +580,7 @@ version of :func:`gcd` then we have, as we might expect:
580580
Except clauses
581581
..............
582582

583-
.. dropdown:: Video: further exception handling.
583+
.. details:: Video: further exception handling.
584584

585585
.. vimeo:: 509492496
586586

‎doc/source/8_inheritance.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Inheritance and composition
44
===========================
55

6-
.. dropdown:: Video: inheritance and composition.
6+
.. details:: Video: inheritance and composition.
77

88
.. vimeo:: 516216973
99

@@ -95,7 +95,7 @@ a *has a* relationship, inheritance defines an *is a* relationship.
9595
An example from group theory
9696
----------------------------
9797

98-
.. dropdown:: Video: an example from group theory.
98+
.. details:: Video: an example from group theory.
9999

100100
.. vimeo:: 516277973
101101

@@ -299,7 +299,7 @@ is delegated to the group by calling :meth:`self.group.operation`.
299299
General linear groups
300300
~~~~~~~~~~~~~~~~~~~~~
301301

302-
.. dropdown:: Video: inheritance.
302+
.. details:: Video: inheritance.
303303

304304
.. vimeo:: 516698411
305305

‎doc/source/9_debugging.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ called pdbpp.
145145
Using a graphical debugger
146146
--------------------------
147147

148-
.. dropdown:: Video: using a graphical debugger.
148+
.. details:: Video: using a graphical debugger.
149149

150150
.. vimeo:: 520604326
151151

@@ -162,7 +162,7 @@ documentation on `using the Python debugger in Visual Studio Code
162162
Invoking a command-line debugger
163163
--------------------------------
164164

165-
.. dropdown:: Video: command line debuggers.
165+
.. details:: Video: command line debuggers.
166166

167167
.. vimeo:: 520605730
168168

@@ -431,7 +431,7 @@ well-posed.
431431
Debugging tactics
432432
-----------------
433433

434-
.. dropdown:: Video: minimal failing examples and bisection.
434+
.. details:: Video: minimal failing examples and bisection.
435435

436436
.. vimeo:: 520604328
437437

‎doc/source/_themes/finite_element/static/fenics.css_t

+23
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,29 @@ div.figure {
813813

814814
span.strikethrough { text-decoration: line-through; }
815815

816+
details {
817+
background-clip: border-box;
818+
background-color: #fff;
819+
border: 1px solid rgba(0,0,0,0.125);
820+
border-radius: .25rem;
821+
display: flex;
822+
flex-direction: column;
823+
min-width: 0;
824+
position: relative;
825+
word-wrap: break-word;
826+
}
827+
828+
details p {
829+
padding-left: 1.5rem;
830+
}
831+
832+
summary {
833+
background-color: rgba(0,0,0,0.03);
834+
border-bottom: 1px solid rgba(0,0,0,0.125);
835+
margin-bottom: 0;
836+
padding: 1em;
837+
}
838+
816839
.video_wrapper {
817840
position: relative !important;
818841
padding-bottom: 57% !important;

0 commit comments

Comments
 (0)