From c761ac17b4fe0220d3f47ff236ee577688dbfede Mon Sep 17 00:00:00 2001
From: Deepak Khatri <lorforlinux@beagleboard.org>
Date: Mon, 14 Nov 2022 01:19:14 +0530
Subject: [PATCH] Table rotation and font size change

---
 boards/beaglebone/black/ch08.rst      | 21 ++++++++++--
 boards/pocketbeagle/original/ch06.rst |  9 +++++
 boards/pocketbeagle/original/ch07.rst | 17 ++++++++++
 books/index.rst                       |  6 ++--
 books/pru-cookbook/08ai/ai.rst        |  9 +++++
 projects/simppru/language.rst         | 48 +++++++++++++--------------
 6 files changed, 81 insertions(+), 29 deletions(-)

diff --git a/boards/beaglebone/black/ch08.rst b/boards/beaglebone/black/ch08.rst
index 55dee849..b8dd37c2 100644
--- a/boards/beaglebone/black/ch08.rst
+++ b/boards/beaglebone/black/ch08.rst
@@ -359,9 +359,9 @@ VDD_3V3B
    Expansion Board EEPROM Write Protect
 
 EEPROM Data Format
-************************
+*********************
 
-*Table 17* shows the format of the contents of the expansion board
+Table below shows the format of the contents of the expansion board
 EEPROM. Data is stored in Big Endian with the least significant value on
 the right. All addresses read as a single byte data from the EEPROM, but
 two byte addressing is used. ASCII values are intended to be easily read
@@ -466,6 +466,11 @@ The *AIN0-6* pins do not have a pin mux setting, but they need to be set
 to indicate if each of the pins is used on the cape. Only bit 15 is used
 for the AIN signals.
 
+.. raw:: latex
+
+  \begin{landscape}
+  \scriptsize
+
 .. list-table:: EEPROM Pin Usage
    :header-rows: 1
    :class: longtable
@@ -963,6 +968,15 @@ for the AIN signals.
      - `+` 
      - `+`
 
+.. raw:: latex
+
+  \end{landscape}
+
+
+.. raw:: latex
+
+  \begin{landscape}
+  \scriptsize
 
 .. list-table::
    :header-rows: 1
@@ -1612,6 +1626,9 @@ for the AIN signals.
      - `+` 
      - `+`
 
+.. raw:: latex
+
+  \end{landscape}
 
 Pin Usage Consideration
 ---------------------------
diff --git a/boards/pocketbeagle/original/ch06.rst b/boards/pocketbeagle/original/ch06.rst
index e0ee74f7..664f3264 100644
--- a/boards/pocketbeagle/original/ch06.rst
+++ b/boards/pocketbeagle/original/ch06.rst
@@ -246,6 +246,11 @@ Use scroll bar at bottom of chart to see additional features in columns
 to the right. When printing this document, you will need to print this
 chart separately.
 
+.. raw:: latex
+
+  \begin{landscape}
+  \scriptsize
+
 .. table:: PRU0 and PRU1 Access
 
     +-------------+-------------+-----------------+-----------+------------------------------+---------------------------+------------------------------+-------------------------------+----------------------------------------------+
@@ -313,3 +318,7 @@ chart separately.
     +-------------+-------------+-----------------+-----------+------------------------------+---------------------------+------------------------------+-------------------------------+----------------------------------------------+
     | P2.35       | A5/86       | U5              | F3        |                              |                           | pr1_pru1_pru_r30_8 (Output)  | pr1_pru1_pru_r31_8 (Input)    |                                              |
     +-------------+-------------+-----------------+-----------+------------------------------+---------------------------+------------------------------+-------------------------------+----------------------------------------------+
+
+.. raw:: latex
+
+  \end{landscape}
diff --git a/boards/pocketbeagle/original/ch07.rst b/boards/pocketbeagle/original/ch07.rst
index c7e2f413..41f8943e 100644
--- a/boards/pocketbeagle/original/ch07.rst
+++ b/boards/pocketbeagle/original/ch07.rst
@@ -58,6 +58,11 @@ Use scroll bar at bottom of chart to see additional features in columns
 to the right. When printing this document you will need to print this
 chart separately.
 
+.. raw:: latex
+
+  \begin{landscape}
+  \scriptsize
+
 .. table:: P1 Header Pinout
                          
     +-------------+-------------+----------------------+------------+--------------------+-------------------+---------------+---------------+-------------------------+-------------------------+---------------------+---------------------+-----------+
@@ -138,6 +143,9 @@ chart separately.
     | P1.36       | PWM0A       | P1.36 (PWM0A)        | A13        | A1                 | mcasp0_aclkx      | ehrpwm0A      | -             | spi1_sclk               | mmc0_sdcd               | pr1_pru0_pru_r30_0  | pr1_pru0_pru_r31_0  | gpio3_14  |
     +-------------+-------------+----------------------+------------+--------------------+-------------------+---------------+---------------+-------------------------+-------------------------+---------------------+---------------------+-----------+
 
+.. raw:: latex
+
+  \end{landscape}
 
 .. _p2_header:
 
@@ -156,6 +164,11 @@ Use scroll bar at bottom of chart to see additional features in columns
 to the right. When printing this document you will need to print this
 chart separately.
 
+.. raw:: latex
+
+  \begin{landscape}
+  \scriptsize
+
 .. table:: P2 Header Pinout
 
     +-------------+-------------+----------------------+------------+--------------------+--------------------+-------------------------+---------------+------------------------------+--------------------+------------------------------+----------------------+-----------+
@@ -236,6 +249,10 @@ chart separately.
     | P2.36       | A7(1.8)     | P2.36 (AIN7)         |            | N13                | ain7               |                         |               |                              |                    |                              |                      |           |
     +-------------+-------------+----------------------+------------+--------------------+--------------------+-------------------------+---------------+------------------------------+--------------------+------------------------------+----------------------+-----------+
 
+.. raw:: latex
+
+  \end{landscape}
+
 .. _mikrobus_socket_connections:
 
 mikroBUS socket connections
diff --git a/books/index.rst b/books/index.rst
index 37ddb641..8aa0f1ed 100644
--- a/books/index.rst
+++ b/books/index.rst
@@ -5,15 +5,15 @@ Books
 
 This is a collection of open-source books written to help Beagle developers.
 
-:ref:`BeagleBone Cookbook <bone-cook-book-home>`__ is a great introduction to programming
+:ref:`bone-cook-book-home` is a great introduction to programming
 a BeagleBone using Linux from userspace, mostly using Python or JavaScript.
 
-:ref:`PRU Cookbook <pru-cookbook-home>`__ provides numerous examples on using the incredible
+:ref:`pru-cookbook-home` provides numerous examples on using the incredible
 ultra-low-latency microcontrollers inside the processors used on BeagleBone boards
 that are a big part of what has made BeagleBone such a popular platform.
 
 Links to additional books available for purchase can be found on the
-`Beagle books page <https://beagleboard.org/books>`__.
+`Beagle books page <https://beagleboard.org/books>`_.
 
 .. toctree::
    :maxdepth: 1
diff --git a/books/pru-cookbook/08ai/ai.rst b/books/pru-cookbook/08ai/ai.rst
index fdf9655e..b37f13ac 100644
--- a/books/pru-cookbook/08ai/ai.rst
+++ b/books/pru-cookbook/08ai/ai.rst
@@ -45,6 +45,11 @@ Here the tables are combined into one to make it easier to see what goes where.
 
 .. _aimapping_bits:
 
+.. raw:: latex
+
+  \begin{landscape}
+  \small
+
 .. table:: Mapping bit positions to pin names
 
 	+---+---+---------+-----------+-----------+-------------+
@@ -136,6 +141,10 @@ Here the tables are combined into one to make it easier to see what goes where.
 	|1  |19 |         |           |P8_43      |             |
 	+---+---+---------+-----------+-----------+-------------+
 
+.. raw:: latex
+
+  \end{landscape}
+
 The pins in *bold* are already configured as pru pins.  See :ref:`ai_config` to
 see what's currently configured as what.  See :ref:`ai_device_tree` to 
 configure pins.
diff --git a/projects/simppru/language.rst b/projects/simppru/language.rst
index 815a8819..ebb4c4b1 100644
--- a/projects/simppru/language.rst
+++ b/projects/simppru/language.rst
@@ -187,30 +187,30 @@ Comments
 Keyword and Identifiers
 -----------------------
 
-Reserved keywords
-~~~~~~~~~~~~~~~~~
-
-+-------------------------+------------------------------+-----------------------+
-| **``true``**            | **``read_counter``**         | **``stop_counter``**  |
-+-------------------------+------------------------------+-----------------------+
-| **``false``**           | **``start_counter``**        | **``pwm``**           |
-+-------------------------+------------------------------+-----------------------+
-| **``int``**             | **``delay``**                | **``digital_write``** |
-+-------------------------+------------------------------+-----------------------+
-| **``bool``**            | **``digital_read``**         | **``def``**           |
-+-------------------------+------------------------------+-----------------------+
-| **``void``**            | **``return``**               | **``or``**            |
-+-------------------------+------------------------------+-----------------------+
-| **``if``**              | **``and``**                  | **``not``**           |
-+-------------------------+------------------------------+-----------------------+
-| **``elif``**            | **``continue``**             | **``break``**         |
-+-------------------------+------------------------------+-----------------------+
-| **``else``**            | **``while``**                | **``in``**            |
-+-------------------------+------------------------------+-----------------------+
-| **``for``**             | **``init_message_channel``** | **``send_message``**  |
-+-------------------------+------------------------------+-----------------------+
-| **``receive_message``** | **``print``**                | **``println``**       |
-+-------------------------+------------------------------+-----------------------+
+
+.. table:: Reserved keywords
+   
+   +-------------------------+------------------------------+-----------------------+
+   | **``true``**            | **``read_counter``**         | **``stop_counter``**  |
+   +-------------------------+------------------------------+-----------------------+
+   | **``false``**           | **``start_counter``**        | **``pwm``**           |
+   +-------------------------+------------------------------+-----------------------+
+   | **``int``**             | **``delay``**                | **``digital_write``** |
+   +-------------------------+------------------------------+-----------------------+
+   | **``bool``**            | **``digital_read``**         | **``def``**           |
+   +-------------------------+------------------------------+-----------------------+
+   | **``void``**            | **``return``**               | **``or``**            |
+   +-------------------------+------------------------------+-----------------------+
+   | **``if``**              | **``and``**                  | **``not``**           |
+   +-------------------------+------------------------------+-----------------------+
+   | **``elif``**            | **``continue``**             | **``break``**         |
+   +-------------------------+------------------------------+-----------------------+
+   | **``else``**            | **``while``**                | **``in``**            |
+   +-------------------------+------------------------------+-----------------------+
+   | **``for``**             | **``init_message_channel``** | **``send_message``**  |
+   +-------------------------+------------------------------+-----------------------+
+   | **``receive_message``** | **``print``**                | **``println``**       |
+   +-------------------------+------------------------------+-----------------------+
 
 Valid identifier naming
 ~~~~~~~~~~~~~~~~~~~~~~~
-- 
GitLab