Skip to content

Commit 02f3ec9

Browse files
committed
Improve latex/pdf build support
1 parent 3fae82d commit 02f3ec9

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

Book/hashtables/basic_structure.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ method simply stores all elements having the same hash in a linked list. When a
2525
hash and then go through the linked list of "possible" values until it finds the matching entry. Here is an
2626
illustration of chaining collision resolution:
2727

28-
.. image:: ./images/basic_hashtable.svg
28+
.. image:: ./images/basic_hashtable.*
2929
:align: center
3030
:height: 265px
31+
:scale: 200%
3132

3233
The elements of the linked list are called ``Bucket``\s and the C array containing the heads of the linked lists is
3334
called ``arBuckets``.
@@ -38,9 +39,10 @@ bucket of ``"a"`` which you can do either by traversing the linked list for the
3839
pointers in the reverse direction. The latter is what PHP does: Every bucket contains both a pointer to the next bucket
3940
(``pNext``) and the previous bucket (``pLast``). This is illustrated in the following graphic:
4041

41-
.. image:: ./images/doubly_linked_hashtable.svg
42+
.. image:: ./images/doubly_linked_hashtable.*
4243
:align: center
4344
:height: 250px
45+
:scale: 200%
4446

4547
Furthermore PHP hashtables are *ordered*: If you traverse an array you'll get the elements in same order in which you
4648
inserted them. To support this the buckets have to be part of another linked list which specifies the order. This is
@@ -49,9 +51,10 @@ The forward pointers are stored in ``pListNext``, the backward pointers in ``pLi
4951
structure has a pointer to the start of the list (``pListHead``) and the end of the list (``pListLast``). Here is an
5052
example of how this linked list could look like for the elements ``"a"``, ``"b"``, ``"c"`` (in that order):
5153

52-
.. image:: ./images/ordered_hashtable.svg
54+
.. image:: ./images/ordered_hashtable.*
5355
:align: center
5456
:height: 250px
57+
:scale: 200%
5558

5659
The HashTable and Bucket structures
5760
-----------------------------------

Book/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,3 @@ Index and search
4141

4242
* :ref:`genindex`
4343
* :ref:`search`
44-

build_release_latex.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
rm -rf BookLatex
2+
# inkscape Book/hashtables/images/basic_hashtable.svg -D -A Book/hashtables/images/basic_hashtable.pdf
3+
# inkscape Book/hashtables/images/doubly_linked_hashtable.svg -D -A Book/hashtables/images/doubly_linked_hashtable.pdf
4+
# inkscape Book/hashtables/images/ordered_hashtable.svg -D -A Book/hashtables/images/ordered_hashtable.pdf
5+
sphinx-build -b latex -d BookLatex/doctrees -a Book BookLatex/latex
6+
cd BookLatex/latex
7+
pdflatex PHPInternalsBook.tex
8+
pdflatex PHPInternalsBook.tex
9+
cd ../..

0 commit comments

Comments
 (0)