Initial Commit
This commit is contained in:
commit
90646370b5
58 changed files with 8509 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
build*
|
||||||
20
Makefile
Normal file
20
Makefile
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Minimal makefile for Sphinx documentation
|
||||||
|
#
|
||||||
|
|
||||||
|
# You can set these variables from the command line, and also
|
||||||
|
# from the environment for the first two.
|
||||||
|
SPHINXOPTS ?=
|
||||||
|
SPHINXBUILD ?= sphinx-build
|
||||||
|
SOURCEDIR = source
|
||||||
|
BUILDDIR = build
|
||||||
|
|
||||||
|
# Put it first so that "make" without argument is like "make help".
|
||||||
|
help:
|
||||||
|
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
|
||||||
|
.PHONY: help Makefile
|
||||||
|
|
||||||
|
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||||
|
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||||
|
%: Makefile
|
||||||
|
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
9
README.md
Normal file
9
README.md
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
# JMK Engineering Report Template
|
||||||
|
|
||||||
|
This is the template Sphinx install to produce both mini-sites and PDFs (using the LATEX builder) for publishing.
|
||||||
|
|
||||||
|
The source folder includes the minimum files. The ``conf.py`` file should be used to update the project specific information.
|
||||||
|
|
||||||
|
In future releases there will be template reports included that will act as the starting point for the body, etc.
|
||||||
|
|
||||||
|
To build the report simply use the: ``./make.bat latexpdf`` command.
|
||||||
35
make.bat
Normal file
35
make.bat
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
@ECHO OFF
|
||||||
|
|
||||||
|
pushd %~dp0
|
||||||
|
|
||||||
|
REM Command file for Sphinx documentation
|
||||||
|
|
||||||
|
if "%SPHINXBUILD%" == "" (
|
||||||
|
set SPHINXBUILD=sphinx-build
|
||||||
|
)
|
||||||
|
set SOURCEDIR=source
|
||||||
|
set BUILDDIR=build
|
||||||
|
|
||||||
|
%SPHINXBUILD% >NUL 2>NUL
|
||||||
|
if errorlevel 9009 (
|
||||||
|
echo.
|
||||||
|
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
||||||
|
echo.installed, then set the SPHINXBUILD environment variable to point
|
||||||
|
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
||||||
|
echo.may add the Sphinx directory to PATH.
|
||||||
|
echo.
|
||||||
|
echo.If you don't have Sphinx installed, grab it from
|
||||||
|
echo.https://www.sphinx-doc.org/
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%1" == "" goto help
|
||||||
|
|
||||||
|
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
||||||
|
goto end
|
||||||
|
|
||||||
|
:help
|
||||||
|
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
||||||
|
|
||||||
|
:end
|
||||||
|
popd
|
||||||
447
source/111136.10.rst
Normal file
447
source/111136.10.rst
Normal file
|
|
@ -0,0 +1,447 @@
|
||||||
|
.. ==== -> Heading 1
|
||||||
|
.. ---- -> Heading 2
|
||||||
|
.. ~~~~ -> Heading 3
|
||||||
|
.. ^^^^ -> Heading 4
|
||||||
|
.. """" -> Heading 5
|
||||||
|
|
||||||
|
.. Part 1 Replacements
|
||||||
|
|
||||||
|
.. |CodeEdition| replace:: Latest Edition
|
||||||
|
|
||||||
|
.. |L2MINPOWER| replace:: 10kW
|
||||||
|
.. |L3MINPOWER| replace:: 100kW
|
||||||
|
.. |installer warranty| replace:: 2 years
|
||||||
|
|
||||||
|
.. minimum OCPP version
|
||||||
|
|
||||||
|
.. |verOCPP| replace:: 1.6
|
||||||
|
|
||||||
|
..
|
||||||
|
SPEC NOTE: DESCRIPTION: This Section specifies Level 1, Level 2, and Level 3 (DCFC) vehicle charging equipment station(s). It contains performance and prescriptive criteria, options for the specifier's consideration, installation, and verification requirements.
|
||||||
|
SPEC NOTE: SUSTAINABILITY: This Section outlines the requirements to integrate sustainability aspects such as low carbon, water, materials, plastics, and construction waste disposal into projects. Refer to the sustainability commitments laid out in the following documents: The Greening Government Strategy, the Ocean Plastics Charter - Government of Canada actions on plastic waste in federal operations, and PSPC's Departmental Sustainable Development Strategy: 2020-2023.
|
||||||
|
SPEC NOTE: Examples of regional Electric Vehicle Charging Station standards and strategies: British Columbia: http://blogs.ubc.ca/tipslab/files/2018/08/TIPS_DGS_WEB.pdf and https://vancouver.ca/files/cov/2019-006-electric-vehicle-charging-for-buildings.pdf Alberta: https://www.calgary.ca/transportation/tp/strategy/electric-vehicle-strategy.html.
|
||||||
|
|
||||||
|
11 11 36.10 - Electric Vehicle Charging Units
|
||||||
|
================================================
|
||||||
|
|
||||||
|
PART 1 - GENERAL
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
1.1 Related Requirements
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. SPEC NOTE: List other Sections that are referenced in this Section that contain specific information that the reader might expect to find in this Section, but is specified elsewhere. Typically, this list does not include Division 00 or Division 01 Sections.
|
||||||
|
|
||||||
|
A. Section 26 05 00 - Common Work Results for Electrical
|
||||||
|
#. Section 26 05 32 - Outlet Boxes, Conduit Boxes and Fittings
|
||||||
|
#. Section 26 12 16 - Dry Type, Medium Voltage Transformers
|
||||||
|
#. Section 26 12 16.01 - Dry Type Transformers Up To 600 V Primary
|
||||||
|
#. Section 26 12 19 - Pad Mounted, Liquid Filled, Medium Voltage Transformers
|
||||||
|
|
||||||
|
1.2 ABBREVIATIONS
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. DCFC: Direct Current Fast Charging.
|
||||||
|
#. EV: Electric vehicle.
|
||||||
|
#. EVSE: Electric Vehicle Supply Equipment. This includes EV charging equipment, grounded conductors, ungrounded conductors, equipment grounding conductors, EV cables, attachment plugs, and other fittings, devices, power outlets, or components installed for transferring power and communication between the supply wiring and the EV.
|
||||||
|
|
||||||
|
1.3 DEFINITIONS
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. EV Cable: Cable containing the conductor(s) to connect the EV power to the EV, providing power and communication during energy transfer.
|
||||||
|
#. EV Capable: Parking space(s) that include nearby termination of conduit to a power source, electrical panel designed with sufficient capacity for simultaneous charging of EV in identified, planned EV parking spaces.
|
||||||
|
#. EV Charger or EV Charging Equipment: Refer to EVSE.
|
||||||
|
#. EV Connector: Conductive device that, when electrically coupled to an EV inlet, establishes a connection to the EV for power transfer and information exchange. This device is part of the EV coupler.
|
||||||
|
#. EV Coupler: Device mating the EV inlet and EV connector.
|
||||||
|
#. EV Inlet: Device in the vehicle into which the EV connector is inserted.
|
||||||
|
#. EV Make Ready: Parking space(s) that include(s) nearby termination of raceway (conduit) to a power source, electrical panel designed with sufficient capacity for simultaneous charging of all EV in identified, planned EV parking spaces. Electrical wiring to be pulled through raceway (conduit) when charging station is installed.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1.4 REFERENCE STANDARDS
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. SPEC NOTE: List standards referenced within this Section for a specific project. Other helpful standards include NEC Article 625, Electric Vehicle Power Transfer System; and ISO 15118 Road vehicles -- Vehicle to Grid Communication Interface, and CSA C22.2 No.107.1 Power Conversion Equipment.
|
||||||
|
|
||||||
|
A. All reference standards are the latest public edition unless specified otherwise.
|
||||||
|
B. American National Standards Institute (ANSI)/National Electrical Manufacturers Association (NEMA):
|
||||||
|
|
||||||
|
1. ANSI/NEMA WD 6, Wiring Devices - Dimensional Specifications
|
||||||
|
#. ANSI/NEMA 250, Enclosures for Electrical Equipment (1000 Volts Maximum)
|
||||||
|
|
||||||
|
#. CSA Group (CSA):
|
||||||
|
|
||||||
|
1. CSA C22.1, Canadian Electrical Code, Part I |CodeEdition|, Safety Standard for Electrical Installations
|
||||||
|
#. CSA C22.2 No. 280, Electric Vehicle Supply Equipment
|
||||||
|
#. CAN/CSA-C22.2 No. 282, Plugs, Receptacles, and Couplers for Electric Vehicles
|
||||||
|
|
||||||
|
#. International Organization for Standardization (ISO):
|
||||||
|
|
||||||
|
1. ISO/IEC 14443-2, Cards and Security Devices for Personal Identification - Contactless Proximity Objects - Part 2: Radio Frequency Power and Signal Interface
|
||||||
|
#. ISO/IEC 15693-1, Cards and Security Devices for Personal Identification - Contactless Vicinity Objects - Part 1: Physical Characteristics
|
||||||
|
|
||||||
|
#. SAE International (SAE):
|
||||||
|
|
||||||
|
1. SAE J1772, SAE Electric Vehicle and Plug in Hybrid Electric Vehicle Conductive Charge Coupler
|
||||||
|
|
||||||
|
#. Underwriter's Laboratories (UL):
|
||||||
|
|
||||||
|
1. UL 1998, Standard for Software in Programmable Components
|
||||||
|
#. UL 2231-1 Ed. 2, Personnel Protection Systems for Electric Vehicle (EV) Supply Circuits; Part 1: General Requirements
|
||||||
|
#. UL 2231-2 Ed. 2, Personnel Protection Systems for Electric Vehicle (EV) Supply Circuits: Particular Requirements for Protection Devices for Use in Charging Systems
|
||||||
|
#. UL 2251 Ed. 4, Standard for Plugs, Receptacles, and Couplers for Electric Vehicles
|
||||||
|
#. UL 2594 Ed. 2, Standard for Electric Vehicle Supply Equipment
|
||||||
|
|
||||||
|
1.5 SECTION INCLUDES
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. SPEC NOTE: Indicate primary features and functions of charging units. Indicate applicable configurations and verify availability of chargers specified.
|
||||||
|
|
||||||
|
A. Section includes, but is not limited to:
|
||||||
|
|
||||||
|
1. Wall, Pole, Pedestal-mounted electric vehicle charging stations, in single and multiple station configuration.
|
||||||
|
|
||||||
|
1. Auto-coil cable retraction.
|
||||||
|
#. Non-motorized wrapped cable.
|
||||||
|
#. Payment module for charging stations.
|
||||||
|
|
||||||
|
.. #. [Testing devices.]
|
||||||
|
|
||||||
|
.. SPEC NOTE: Alternatively, the power output (e.g., 7 kW) could be stated instead of “Time to Full Charge”.
|
||||||
|
|
||||||
|
3. Level 2 Electric Vehicle Charging Station: 208 Volt or 240 Volt AC, using an outlet equivalent those used for typical household appliances.
|
||||||
|
|
||||||
|
1. Minimum Power Output at system voltage: |L2MINPOWER|
|
||||||
|
|
||||||
|
.. SPEC NOTE: Alternatively, the power output (e.g., 300 kW) could be stated instead of “Time to Full Charge”.
|
||||||
|
|
||||||
|
4. Level 3 DCFC Electric Vehicle Charging Station (DC Fast Charge): 208 Volt or 240 Volt, charging station installation is required.
|
||||||
|
|
||||||
|
1. Minimum Power Output at system voltage: |L3MINPOWER|
|
||||||
|
|
||||||
|
1.6 PRODUCTS SUPPLIED BUT NOT INSTALLED UNDER THIS SECTION
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Level 1: 120V AC outlet.
|
||||||
|
B. Level 2: 208V or 240V AC power supply.
|
||||||
|
|
||||||
|
.. SPEC NOTE: A transformer might not be required for 600V charging equipment, although equipment at this voltage might be uncommon.
|
||||||
|
|
||||||
|
C. Level 3 DCFC: 480V 3 phase power supply and DCFC power supply.
|
||||||
|
|
||||||
|
1.7 ADMINISTRATIVE REQUIREMENTS
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Coordination:
|
||||||
|
|
||||||
|
1. Coordinate with Section 03 30 00 - Cast-in-Place Concrete for items embedded in concrete slabs and electrical conduit cast in concrete.
|
||||||
|
2. Coordinate with Section 05 50 00 - Metal Fabrications for steel bollards.
|
||||||
|
|
||||||
|
.. SPEC NOTE: A sign might include a No Parking symbol, an EV Charger symbol, and the text “EXCEPT WHILE CHARGING/EXCEPTÉ EN RECHARGE”. Refer to local provincial/territorial regulations for sign requirements, such as Ontario Regulation 462/20: Signs.
|
||||||
|
|
||||||
|
3. Coordinate with Section 10 14 00 - Signage for exterior pole-mounted signs.
|
||||||
|
4. Coordinate with Section 26 05 00 - Common Work Results for Electrical for conduit.
|
||||||
|
5. Coordinate with Section 26 05 32 - Outlet Boxes, Conduit Boxes and Fittings.
|
||||||
|
6. Coordinate with Section 26 12 16 - Dry Type, Medium Voltage Transformers, 26 12 16.01 - Dry Type Transformers Up To 600 V Primary and/or 26 12 19 - Pad Mounted, Liquid Filled, Medium Voltage Transformers for transformer(s) for Level 3 DCFC EVSE applications.
|
||||||
|
7. Coordinate with Section 32 17 23 - Pavement Markings for line markings within reach of EV cables.
|
||||||
|
|
||||||
|
.. SPEC NOTE: A pre-installation meeting may not be required for simple installations.
|
||||||
|
|
||||||
|
B. Pre-Installation Meetings: Conduct a meeting in accordance with Section 01 31 19 - Project Meetings one week before pouring concrete and one week before installing the vehicle charging equipment, with Contractor, applicable Subcontractors and Owner's Representative to:
|
||||||
|
|
||||||
|
1. Verify Project requirements.
|
||||||
|
#. Review installation methods and verify substrate conditions where the components will be installed.
|
||||||
|
#. Discuss coordination of related construction with other Subcontractors.
|
||||||
|
#. Review manufacturer's written installation instructions and warranty requirements.
|
||||||
|
|
||||||
|
1.8 ACTION AND INFORMATION SUBMITTALS
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Submit in accordance with Section 01 33 00 - Submittal Procedures.
|
||||||
|
B. Product Data: Submit manufacturer's Product literature and data sheets for electric vehicle charging station[s]. Include connection type, Product characteristics, performance criteria, dimensions, finishes, and limitations.
|
||||||
|
|
||||||
|
1. Include manufacturer's recommendations for continuous operations:
|
||||||
|
|
||||||
|
1. Ambient temperature operating range.
|
||||||
|
#. Maximum altitude.
|
||||||
|
|
||||||
|
2. Submit sample of warranty documents for review.
|
||||||
|
|
||||||
|
C. Shop Drawings: Indicate Project layout on drawings including the following:
|
||||||
|
|
||||||
|
1. Plans, elevations, sections, [[mounting] [attachment]] details [and wall blocking requirements]. Make drawing to scale, indicating proposed locations, dimensions, required clearances, assembly, and locations of site connections.
|
||||||
|
2. Wiring diagrams detailing power, signal and control systems. Diagrams should clearly differentiate between factory-installed wiring and site-installed wiring, and between components provided by the EV charging station manufacturer and those provided by work of other Sections.
|
||||||
|
|
||||||
|
1. Location of [circuit breaker] [switchboard panel] [disconnect switch].
|
||||||
|
|
||||||
|
.. SPEC NOTE: Include the following sentence for Level 2 or Level 3 (DCFC) installations with multiple chargers.
|
||||||
|
|
||||||
|
2. Include schematic for:
|
||||||
|
3. Time allocation.
|
||||||
|
#. Power allocation:
|
||||||
|
#. Load switching.
|
||||||
|
#. Load sharing.
|
||||||
|
#. Load management without monitoring.
|
||||||
|
#. Load management with EVSE monitoring.
|
||||||
|
#. Load management with exterior monitoring.
|
||||||
|
#. Load management with monitoring at EVSE and external monitoring.
|
||||||
|
|
||||||
|
3. Communication services [including wireless communications equipment].
|
||||||
|
|
||||||
|
D. Certificates:
|
||||||
|
|
||||||
|
.. SPEC NOTE: Specifier to verify that permitting requirements are adequately identified in the General Conditions of the Contract or in Division 01.
|
||||||
|
|
||||||
|
1. When requested, submit manufacturer's certificates certifying that materials comply with specified performance characteristics and physical properties.
|
||||||
|
#. When requested, submit installer's qualifications.
|
||||||
|
|
||||||
|
E. Manufacturer's Instructions: Submit manufacturer's installation instructions for vehicle charging equipment, [pedestal and anchors,] [communications gateway,] and cable management. Include recommendations for software configuration settings.
|
||||||
|
F. Manufacturer's Site Services: Submit electronic copy of manufacturer's site reports.
|
||||||
|
#. Sustainable Design Submittals: Submit in accordance with Section [01 35 21 - LEED Requirements].
|
||||||
|
|
||||||
|
1. Sourcing of Raw Materials: For the entire Project provide a minimum of 20 Products from a minimum of 5 manufacturers with responsible extraction practices as follows:
|
||||||
|
|
||||||
|
1. Submit evidence that a minimum of 25% of permanently installed Products by cost meet [[LEED] [sustainability]] program criteria (extended producer responsibility, bio-based materials, materials reuse, recycled content). Include location factor for all Products.
|
||||||
|
|
||||||
|
2. Building Product Disclosure and Optimization, Material Ingredients: Provide a minimum of 20 different permanently installed Products from a minimum of 5 different manufacturers that use programs acceptable to [[LEED] [sustainability]] program to demonstrate the chemical inventory of the Product to at least 0.1% (1 000 ppm).
|
||||||
|
|
||||||
|
1. Submit evidence using reporting criteria acceptable to [[LEED] [sustainability]] program.
|
||||||
|
|
||||||
|
1.9 CLOSEOUT SUBMITTALS
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Submit in accordance with Section 01 78 00 - Closeout Submittals.
|
||||||
|
B. Operation and Maintenance Data: Submit operation and maintenance data for electric vehicle charging station equipment and incorporate into manual.
|
||||||
|
|
||||||
|
1. Include parts catalogue with a complete list of replacement parts, including equipment description and identifying numbers.
|
||||||
|
#. Include contact information for local parts Suppliers and local technician service company authorized by the manufacturer.
|
||||||
|
|
||||||
|
C. Warranty Documentation: Submit manufacturer's [and installer's] warranty.
|
||||||
|
D. Record Documentation: Record actual locations of equipment, names of equipment manufacturers and Suppliers[, concealed [and underground] conduits and boxes] [, concealed [and underground] devices] [, and locations of disconnects].
|
||||||
|
|
||||||
|
1.10 QUALITY ASSURANCE
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Qualifications:
|
||||||
|
|
||||||
|
1. Manufacturer Qualifications:
|
||||||
|
|
||||||
|
.. SPEC NOTE: Manufacturers with fewer years' experience might encourage emerging companies.
|
||||||
|
|
||||||
|
1. Company with a minimum of [[five] [______]] years of documented experience in manufacturing EV Level [[1] [2] [3]] charging systems, of the type required for this Project.
|
||||||
|
#. Single Source Responsibility: Provide all EV charging components and accessories from a single manufacturer [for each Level of charging equipment].
|
||||||
|
|
||||||
|
2. Installer Qualifications:
|
||||||
|
|
||||||
|
1. Licensed master electrician at the [province] [territory] where work will be performed.
|
||||||
|
|
||||||
|
.. SPEC NOTE: Delete the following sentence for Level 1 installations. Keep for Level 2 or Level 3 (DCFC) installations.
|
||||||
|
|
||||||
|
2. Company or person experienced in performing work of this Section and specializing in installation of work similar to that required for this Project, approved by or acceptable to manufacturer.
|
||||||
|
|
||||||
|
B. Certifications: A Product or system designated with a “UL” mark will only be considered where local authorities having jurisdiction (AHJ) have reviewed and accepted the Product or system in writing.
|
||||||
|
|
||||||
|
1.11 DELIVERY, STORAGE, AND HANDLING
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Perform in accordance with Section 01 61 00 - Common Product Requirements.
|
||||||
|
B. Storage and Handling Requirements:
|
||||||
|
|
||||||
|
1. Store materials [off ground] [indoors] in clean, dry, well-ventilated area and in accordance with manufacturer's recommendations.
|
||||||
|
2. Store and protect electric vehicle charging equipment components [from nicks and scratches] until ready for installation.
|
||||||
|
|
||||||
|
1.12 WARRANTY
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Manufacturer's Warranty: Manufacturer's standard warranty covering materials and manufacturing quality.
|
||||||
|
|
||||||
|
.. SPEC NOTE: Verify types of warranty available before specifying additional requirements.
|
||||||
|
|
||||||
|
1. Installer's Warranty: |installer warranty|.
|
||||||
|
|
||||||
|
|
||||||
|
PART 2 - PRODUCTS
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
2.1 REGULATORY REQUIREMENTS
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Electrical Equipment: Certified by an agency accredited by the Standards Council of Canada (SCC), displaying a permanent label or mark from the certification agency that is acceptable to the AHJ.
|
||||||
|
B. Electrical Supply Equipment: Complying with CSA C22.2 No.280 (UL 2594).
|
||||||
|
C. Plugs, Receptacles, and Couplers: Complying with CAN/CSA-C22.2 No.282 (UL 2251).
|
||||||
|
|
||||||
|
2.2 SUSTAINABILITY CHARACTERISTICS
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. SPEC NOTE: SUSTAINABILITY: Refer to USGBC LEED v4 or v4.1 for EV charging station requirements. Energy Star certification may not be available to Level 3 (DCFC) chargers.
|
||||||
|
|
||||||
|
A. Electric Vehicle Charging Equipment, Level 2: ENERGY STAR certified.
|
||||||
|
|
||||||
|
|
||||||
|
.. Performance Criteria
|
||||||
|
.. |L2PowerSupply| replace:: [Direct hardwired connection] [Capable of plugging into ANSI/NEMA WD-6, [6-50R] receptacle (welder outlet)]
|
||||||
|
.. |charger cable length| replace:: 7620mm
|
||||||
|
.. |coupler type| replace:: [SAE J1772] [CCS type 1] [CSS type 2]
|
||||||
|
.. |locking mechanism| replace:: with locking mechanism
|
||||||
|
.. |installation location| replace:: [Interior] [Exterior] installation. [Resistant to rain, snow, and ice.]\
|
||||||
|
.. |operational temperatures| replace:: -17°C to 50°C
|
||||||
|
.. |operational humidity| replace:: 95%
|
||||||
|
.. The unit rating may be "unrated" if it is indoors.
|
||||||
|
.. |unit enclosure rating| replace:: Type 3 rated
|
||||||
|
|
||||||
|
|
||||||
|
2.3 PERFORMANCE CRITERIA
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. SPEC NOTE: CSA C22.2 No. 280 is equivalent to UL 2594, and CAN/CSA-C22.2 No. 282 is equivalent to UL 2251. CSA-C22.2 No.280 includes requirements for EV cord sets, cord connecting devices, and cord reels.
|
||||||
|
.. SPEC NOTE: SUSTAINABILITY: For federal government projects, refer to the Greening Government Strategy: A Government of Canada Directive; Greening Government Fleets, 2018; and Technical Reference for Office Building Design, 2017. For DND projects, refer to the DND Greening Building Directive, 2021 and DAES Technical Requirements Annex to DCPD SOW for EV charging station requirements and for future charging station requirements.
|
||||||
|
|
||||||
|
.. SPEC NOTE: Safety features may include over current, GFCI protection, missing ground connection, and brownout and blackout detection. Verify that safety features are available before including the following.
|
||||||
|
|
||||||
|
|
||||||
|
A. Design and install EVSE to: SAE J1772, UL 1998, UL 2231-1, UL 2231-2, CSA C22.2 No.280, CAN/CSA-C22.2 No. 282, local codes and regulations.
|
||||||
|
B. Provide electric vehicle charging station components to form a complete operating system meeting the following performance criteria.
|
||||||
|
|
||||||
|
1. EVSE Unit:
|
||||||
|
|
||||||
|
1. Vertical, [wall] [pole] [floor] [ground] mounted [fully integrated pedestal mounted unit with base] [, single or dual] [, with LED status indicators].
|
||||||
|
#. [Unit capable of tracking kWh usage internally (duration/capacity).]
|
||||||
|
|
||||||
|
3. Power Delivery:
|
||||||
|
|
||||||
|
1. Capable of providing up to [[30] [40] [______]] A at [208-240] VAC, single phase, 60 Hz. L1 L2 Ground.
|
||||||
|
#. Capable of operating in “simulated” Level 1 mode.
|
||||||
|
|
||||||
|
4. Power Supply: |L2PowerSupply|. Outlet supplied by work of other Sections in this Contract.
|
||||||
|
5. Equipment: Universal SAE J1772 power cable. Cable: Non-motorized Self-retracting.
|
||||||
|
|
||||||
|
1. |charger cable length| nominal long cable with manufacturer's standard cable storage hanger.
|
||||||
|
|
||||||
|
.. SPEC NOTE: Delete the following if not required.
|
||||||
|
|
||||||
|
2. On disconnection from vehicle, cable retracts into EVSE automatically.
|
||||||
|
#. Cable is released for pulling to vehicle inlet; pull under 22 N of force.
|
||||||
|
#. Coupler: |coupler type|, |locking mechanism|.
|
||||||
|
|
||||||
|
6. Safety Features:
|
||||||
|
|
||||||
|
1. Over current disconnect.
|
||||||
|
#. Ground Fault Circuit Interrupter (GFCI): Internal.
|
||||||
|
#. Surge protection.
|
||||||
|
#. Visible and fully accessible disconnect switch close to the Level 3 DCFC EVSE.
|
||||||
|
|
||||||
|
7. Electromagnetic Compliance (EMC): to Canadian ICES-00
|
||||||
|
8. Environmental:
|
||||||
|
|
||||||
|
|
||||||
|
1. Installation Location: |installation location|
|
||||||
|
#. Operational temperatures: |operational temperatures|
|
||||||
|
#. Operational Humidity: Up to |operational humidity| non-condensing.
|
||||||
|
#. Unit Enclosure: ANSI/NEMA 250, |unit enclosure rating|.
|
||||||
|
|
||||||
|
.. SPECNOTE: This is a nice to have, I don't know if it needs to be included in all specifications.
|
||||||
|
|
||||||
|
9. Control Module for Charging Station:
|
||||||
|
|
||||||
|
1. State-of-Charge lighted indicators showing that the SAE J1772 is properly connected and the vehicle is charging.
|
||||||
|
#. Light displaying if there is a problem with the connection.
|
||||||
|
|
||||||
|
10. The EVSE shall be certified with the Open Charge Alliance to OCPP version |verOCPP|.
|
||||||
|
|
||||||
|
.. SPEC NOTE: Consider integration with in-place revenue collection, credit or debit card, pre-paid cards, and secure access (gate and ticket) systems. Encrypted PCI compliant credit card service. Payment and usage data may be transmitted through a number of communication and network options requiring minimal customization during installation. Consider including fleet cards for tracking fleet consumption.
|
||||||
|
|
||||||
|
..
|
||||||
|
11. Accessories:
|
||||||
|
|
||||||
|
1. Communication Modules: [Modbus TCP/IP] [Serial (RS-232)].
|
||||||
|
#. Communication to remote gateway or payment module.
|
||||||
|
#. Detached Gateway or Payment Module: [No onboard payment module] [Onboard Gateway with cellular] [Onboard Gateway with Ethernet] [Onboard payment module with cellular] [Onboard payment module with Ethernet] [, with Near Field Communication in accordance with [______] protocol standard for devices].
|
||||||
|
#. Payment Module for Charging Station: Keypad and insertion or tap style credit and debit card reader to ISO 14443-2 and ISO 15693-1.
|
||||||
|
|
||||||
|
2.4 ACCEPTABLE PRODUCTS
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Autel
|
||||||
|
#. ABB
|
||||||
|
#. Previously approved alternate.
|
||||||
|
|
||||||
|
PART 3 - EXECUTION
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
3.1 EXAMINATION
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Verification of Conditions: Verify that conditions of substrate and power supply previously installed are acceptable for electric vehicle charging station installation in accordance with manufacturer's instructions.
|
||||||
|
|
||||||
|
1. Verify that required utilities are properly sized and in correct location.
|
||||||
|
#. Review substrate conditions and atmospheric conditions. Inform Owner's Representative of unacceptable conditions immediately upon discovery.
|
||||||
|
#. Proceed with installation only after unacceptable conditions have been remedied.
|
||||||
|
|
||||||
|
3.2 INSTALLATION
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Install EVSE and components in accordance with local codes, regulations, CSA C22.1, Section 86, and manufacturer's installation instructions.
|
||||||
|
#. Installation Tolerances: Level and plumb within 0.5°.
|
||||||
|
|
||||||
|
3.3 SITE QUALITY CONTROL
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. SPEC NOTE: Confirmation that manufacturer's offer this service must be made before issuing for bid/tender. Manufacturer's site services are not commonly required for Level 1 charging stations.
|
||||||
|
|
||||||
|
A. Manufacturer Services:
|
||||||
|
|
||||||
|
1. Have manufacturer of Products supplied under this Section review installation of its Products and submit written reports, in acceptable format, to verify installation in accordance with manufacturer's instructions compliance of work with Contract.
|
||||||
|
2. Schedule site visits as follows:
|
||||||
|
|
||||||
|
1. After delivery and storage of Products, and when preparatory Work or other work on which work of this Section depends is complete, but before installation begins.
|
||||||
|
|
||||||
|
.. SPEC NOTE: Consider the complexity of the EV charging station installation when specifying frequency of visits.
|
||||||
|
|
||||||
|
2. At least once during progress of the work.
|
||||||
|
3. Upon completion of the Work.
|
||||||
|
|
||||||
|
3. Obtain reports within three days of review, and submit immediately to Owner's Representative.
|
||||||
|
|
||||||
|
3.4 SYSTEMS STARTUP
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. EVSE tester for electrician: Indicator lights indicate:
|
||||||
|
|
||||||
|
1. Proper connection.
|
||||||
|
2. Charger is providing power.
|
||||||
|
3. Voltage level and current level tests.
|
||||||
|
|
||||||
|
.. SPEC NOTE: Pilot function is single-wire communication between EV and EV Charger, which verifies that power delivery only occurs when a connection is established.
|
||||||
|
|
||||||
|
4. Pilot is functioning.
|
||||||
|
5. Proximity switch is functioning.
|
||||||
|
6. Trip tests GFCI.
|
||||||
|
|
||||||
|
B. Perform tests for each electric vehicle charging station:
|
||||||
|
|
||||||
|
1. EV charging station unit self-test.
|
||||||
|
#. Test for proper EV charging station operation and charging rate.
|
||||||
|
#. Verify operation and communication of payment module.
|
||||||
|
|
||||||
|
3.5 CLEANING
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Progress Cleaning: Clean in accordance with Section 01 74 00 - Cleaning.
|
||||||
|
#. Final Cleaning: Upon completion remove surplus materials, rubbish, tools, and equipment in accordance with Section 01 74 00 - Cleaning.
|
||||||
|
|
||||||
|
1. Remove protective coverings from finished surfaces and components.
|
||||||
|
#. Clean surfaces and components ready for final review.
|
||||||
|
|
||||||
|
3.6 TRAINING
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Perform training by manufacturer's authorized representative.
|
||||||
|
#. Train Owner's maintenance personnel to adjust, operate, and manage charging station software, to establish access and pricing policies for Owner's electric vehicle charging station program, and to perform periodic maintenance to electric vehicle charging stations.
|
||||||
|
|
||||||
|
3.7 PROTECTION
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Protect installed Products and components from damage during construction.
|
||||||
|
|
||||||
|
|
||||||
|
**END OF SECTION**
|
||||||
80
source/260500.rst
Normal file
80
source/260500.rst
Normal file
|
|
@ -0,0 +1,80 @@
|
||||||
|
.. ==== -> Heading 1
|
||||||
|
.. ---- -> Heading 2
|
||||||
|
.. ~~~~ -> Heading 3
|
||||||
|
.. ^^^^ -> Heading 4
|
||||||
|
.. """" -> Heading 5
|
||||||
|
|
||||||
|
.. |CODE| replace:: NEC
|
||||||
|
|
||||||
|
|
||||||
|
26 05 00 - GENERAL
|
||||||
|
=========================================
|
||||||
|
|
||||||
|
PART 1 - GENERAL
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
1.1 Work Included
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Labor,
|
||||||
|
|
||||||
|
1.2 Related Work
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Section 26 05 10
|
||||||
|
#. Section 26 05 19
|
||||||
|
#. Section 26 05 70
|
||||||
|
|
||||||
|
1.3 Qualifications
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Material furnished under this specification shall be installed by qualified installers meeting requirements specified in Section 26 05 10.
|
||||||
|
|
||||||
|
1.4 Submittals
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Refer to Section 26 05 10
|
||||||
|
|
||||||
|
PART 2 - PRODUCTS
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
2.1 Grounding System
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. General
|
||||||
|
|
||||||
|
#. Grounding conductors shall be sized as shown on the Drawings or in accordance with |CODE|, whichever is larger.
|
||||||
|
#. Components of the grounding electrode system shall be manufactured in accordance with UL 467 - Standard for Safety Grounding and Bonding Equipment.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
PART 3 - EXECUTION
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
3.1 Workmanship
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. All work in this Section shall conform to the codes and standards specified in specified in Section 26 05 00 subsection 3.3, Workmanship.
|
||||||
|
|
||||||
|
3.2 Installation
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Grounding System:
|
||||||
|
|
||||||
|
1. Install all products per Section 26 05 00 – General Electric subsection 3.6, Installation.
|
||||||
|
2. Each nonmetallic conduit shall contain a code sized grounding conductor.
|
||||||
|
3. The system neutral conductor and all equipment and devices required to be grounded by the National Electrical Code shall be grounded in a manner that satisfies the requirements of the National Code.
|
||||||
|
|
||||||
|
3.3 Field Quality Control
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Inspections:
|
||||||
|
|
||||||
|
1. Owner’s representative shall inspect ground system prior to cover.
|
||||||
|
|
||||||
|
B. Testing
|
||||||
|
|
||||||
|
1. Complete applicable test forms if provided in Section 26 05 70 – Factory and Field Testing. If form is not provided, furnish results on vendor standard testing forms with signature of tester, date of test and test results.
|
||||||
|
|
||||||
|
|
||||||
|
**END OF SECTION**
|
||||||
221
source/260521.rst
Normal file
221
source/260521.rst
Normal file
|
|
@ -0,0 +1,221 @@
|
||||||
|
.. ==== -> Heading 1
|
||||||
|
.. ---- -> Heading 2
|
||||||
|
.. ~~~~ -> Heading 3
|
||||||
|
.. ^^^^ -> Heading 4
|
||||||
|
.. """" -> Heading 5
|
||||||
|
|
||||||
|
.. |CODE| replace:: CEC
|
||||||
|
|
||||||
|
..
|
||||||
|
SPEC NOTE: DESCRIPTION: Specifies copper, ACM alloy and aluminum conductors rated from 0-1000 Volts and the most common electrical insulation and covering materials. Does not include fire rated building wiring to ULC S139 and CSA C83, marine, hazardous, mining, instrumentation, communication and fire alarm wiring.
|
||||||
|
SPEC NOTE: Aluminum wiring is more commonly recycled and remanufactured than copper wiring. Projects including significant amounts of new or redundant aluminum wiring should have particular notes for the preference of recycling. Building renovations can often include redundant wiring and particular effort should be made to have abandoned wiring removed and recycled. This can also remove quantities of various potential toxic electrical insulation materials from the site.
|
||||||
|
SPEC NOTE: For Federal Government projects refer to departmental guidelines for conductor material selection for branch circuit wiring.
|
||||||
|
|
||||||
|
26 05 21 - Wires and Cables (0-1000 V)
|
||||||
|
=========================================
|
||||||
|
|
||||||
|
PART 1 - GENERAL
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
1.1 Related Requirements
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. SPEC NOTE: Edit the following paragraphs to list documents or Sections with specific information that the reader might expect to find in this Section, but is specified elsewhere. Do not include Division 00 or Division 01 Sections in this listing.
|
||||||
|
|
||||||
|
A. Section [______].
|
||||||
|
#. Section 26 05 00 - Common Work Results for Electrical
|
||||||
|
#. Section 26 05 20 - Wire and Box Connectors - (0-1000 V)
|
||||||
|
#. Section 26 05 34 - Conduits, Conduit Fastenings and Conduit Fittings
|
||||||
|
#. Section 26 05 36 - Cable Trays for Electrical Systems
|
||||||
|
#. Section 33 71 73.02 - Underground Electrical Service
|
||||||
|
|
||||||
|
1.2 REFERENCE STANDARDS
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. SPEC NOTE: Section 26 05 00 - Common Work Results For Electrical, clause 1.2 REFERENCED STANDARDS, requires compliance to CSA C22.1 and CSA C22.2 standards. These standards include all the CSA testing and cable standards and have not been repeated in this section. Therefore the only standards not included in CSA C22.1 and CSA C22.2 need to be referenced here.
|
||||||
|
.. SPEC NOTE: Edit the following for the specific project.
|
||||||
|
|
||||||
|
A. [______].
|
||||||
|
#. [______]
|
||||||
|
|
||||||
|
1.3 PRODUCT DATA
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Provide product data in accordance with Section 01 33 00 - Submittal Procedures.
|
||||||
|
|
||||||
|
1.4 DELIVERY, STORAGE AND HANDLING
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Packaging Waste Management: remove for reuse [and return] [by manufacturer] of [pallets] [crates] [padding] [and] [packaging materials] in accordance with Section [01 74 19 - Waste Management and Disposal].
|
||||||
|
|
||||||
|
|
||||||
|
PART 2 - PRODUCTS
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
2.1 BUILDING WIRES
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. SPEC NOTE: CSA C22.1 CEC (Canadian Electrical Code) table D1 indicates details of cable types and recommended applications.
|
||||||
|
.. SPEC NOTE: Where cables assemblies are specified to have a PVC overall covering it may be required to comply to the Vertical Tray Fire Test of CSA C22.2 No.0.3 for the applicable Building Code classification of the project as it relates to the actual installed location.
|
||||||
|
|
||||||
|
A. Conductors: stranded for 10 AWG and larger. Minimum size: 12 AWG.
|
||||||
|
#. [Copper] [ACM alloy] [Aluminum] conductors: size as indicated, with [600] [1000] V insulation of cross-linked thermosetting polyethylene material rated [RW90 XLPE] [RWU90 XLPE], [Jacketted] [Non Jacketted].
|
||||||
|
#. Neutral supported cable: [1] [2] [3] phase insulated conductors of [Copper] [Aluminum] and one neutral conductor of [Copper] [Aluminum] steel reinforced, size as indicated. Type: [NS75] [NS90] Insulation: [Type NS-1 rated 300 V] [Type NSF-2 flame retardant rated 600 V].
|
||||||
|
|
||||||
|
2.2 TECK 90 CABLE
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. SPEC NOTE: Copper, ACM or aluminum conductors can be required in different parts of the project. In this case, select “as indicated” and identify on project drawings or schedules.
|
||||||
|
|
||||||
|
.. SPEC NOTE: Overall covering is optional, but required for direct-burial or where corrosive agents or moisture exist. TECK cable can also be supplied with improved LFS/LGE jacket for fire protection and low acid gas evolution.
|
||||||
|
|
||||||
|
A. Cable: in accordance with Section [26 05 00 - Common Work Results for Electrical].
|
||||||
|
|
||||||
|
#. Conductors:
|
||||||
|
|
||||||
|
1. Grounding conductor: [copper] [ACM alloy] [aluminum] [as indicated].
|
||||||
|
#. Circuit conductors: [copper] [ACM alloy] [aluminum] [as indicated], size as indicated.
|
||||||
|
|
||||||
|
#. Insulation:
|
||||||
|
|
||||||
|
1. [Ethylene propylene rubber EP].
|
||||||
|
#. [Cross-linked polyethylene XLPE].
|
||||||
|
#. Rating:, [600] [1000] V.
|
||||||
|
|
||||||
|
#. Inner jacket: [polyvinyl chloride] material.
|
||||||
|
#. Armour: [flat] [interlocking] [galvanized steel] [aluminum].
|
||||||
|
|
||||||
|
|
||||||
|
#. Overall covering: thermoplastic polyvinyl chloride, [compliant to applicable Building Code classification for this project].
|
||||||
|
SPEC NOTE: Add special fastenings where required.
|
||||||
|
#. Fastenings:
|
||||||
|
|
||||||
|
.1 One hole [malleable iron] [steel] [aluminum] [zinc] straps to secure surface cables 50 mm and smaller. Two hole steel straps for cables larger than 50 mm.
|
||||||
|
.2 Channel type supports for two or more cables at [______] mm centers.
|
||||||
|
.3 Threaded rods: 6 mm diameter to support suspended channels.
|
||||||
|
|
||||||
|
#. Connectors:
|
||||||
|
|
||||||
|
1. [Watertight], [explosion-proof] approved for TECK cable.
|
||||||
|
|
||||||
|
2.3 ARMOURED CABLES
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. SPEC NOTE: The “Armoured Cable” designation includes both AC90 (”BX”) without an outer PVC jacket and ACWU with a PVC jacket. Both types can be with copper or aluminum conductors. Edit to suit.
|
||||||
|
|
||||||
|
A. Conductors: insulated, [copper] [aluminum], size as indicated.
|
||||||
|
#. Type: [AC90] [ACL90 - lead sheath over cable assembly and under armour].
|
||||||
|
#. Armour: interlocking type fabricated from [galvanized steel] [aluminum] strip.
|
||||||
|
#. Type: [ACWU90] [PVC] [flame retardant] jacket over [thermoplastic] armour and compliant to applicable Building Code classification for this project [wet locations].
|
||||||
|
#. Connectors: anti short connectors.
|
||||||
|
|
||||||
|
2.4 ALUMINUM SHEATHED CABLE
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. SPEC NOTE: Overall PVC jacket covering is optional, but required for direct-burial or where corrosive agents or moisture exist.
|
||||||
|
|
||||||
|
.. SPEC NOTE: Add special fastenings where required.
|
||||||
|
|
||||||
|
|
||||||
|
A. Conductors: [copper] [ACM alloy] [aluminum], size as indicated.
|
||||||
|
#. Insulation: [cross linked polyethylene] [ethylene propylene rubber] type[RA90] rated [600] [1000] V.
|
||||||
|
#. Sheath: aluminum applied to form continuous [smooth] [corrugated] [seamless] sheath.
|
||||||
|
#. Outer jacket: [none] [thermoplastic applied over sheath and to be compliant to applicable Building Code classification for this project], [direct burial] [wet locations].
|
||||||
|
#. Fastenings for aluminum sheathed cable:
|
||||||
|
|
||||||
|
1. One hole [aluminum] [malleable iron] [steel] straps to secure surface cables 25 mm and smaller. Two hole steel straps for cables larger than 25 mm. Use aluminum strap only with single conductor cable.
|
||||||
|
#. Channel type supports for two or more cables at [______] mm centers.
|
||||||
|
#. Threaded rods: 6 mm diameter to support suspended channels.
|
||||||
|
|
||||||
|
2.5 CONTROL CABLES
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Type: LVT: [2] soft annealed copper conductors, sized as indicated:
|
||||||
|
|
||||||
|
1. Insulation: thermoplastic.
|
||||||
|
2. Sheath: [cotton braid] [thermoplastic jacket], [and armour of closely wound aluminum wire].
|
||||||
|
|
||||||
|
#. Type: low energy 300 V control cable: [solid] [stranded] annealed copper conductors sized as indicated LVT: [2] soft annealed copper conductors, sized as indicated:
|
||||||
|
|
||||||
|
1. Insulation: [PVC] [TW] [TW 40 degrees C] [TWH] [polyethylene].
|
||||||
|
#. Shielding: [tape coated with paramagnetic material] [tape coated with diamagnetic material] [wire] [braid] [metallized tapes] over each[conductor] [pair] [group] [over conductors].
|
||||||
|
#. Overall covering: [PVC jackets] [polyethylene jackets] [lead sheath] [aluminum sheath] [interlocked armour of] [flat galvanized steel] [aluminum strip] [copper strip].
|
||||||
|
|
||||||
|
#. Type: 600 V [______] stranded [annealed copper] [semi-annealed aluminum] [ACM alloy] conductors, sizes as indicated:
|
||||||
|
|
||||||
|
1. Insulation: [PVC] [TW] [TWH] [TW 40 degrees C], [butyl rubber insulation type] [RW75] [R90], [polyethylene] [cross-linked polyethylene type] [RW75 (x-link)] [R90 (x-link)] [RW90 (x-link)] [ethylene-propylene rubber insulation type] [RW75 (EP)] [R90 (EP)] [RW90 (EP)].
|
||||||
|
2. Shielding: [magnetic tape] [non-magnetic tape] [wire] [braid] [metallized tapes] [over] [each conductor] [each pair of conductors] [conductors].
|
||||||
|
3. Overall covering: [thermoplastic jacket] [thermosetting jackets] [with sheath of] [aluminum] [lead] [interlocked armour] [and jacket over sheath of] [PVC] [thermosetting compound].
|
||||||
|
|
||||||
|
2.6 NON-METALLIC SHEATHED CABLE
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Non-metallic sheathed [copper] [ACM alloy] cable type: [NMD90XLPE] [NMD90 nylon] [NMW] [NMWU], size as indicated.
|
||||||
|
|
||||||
|
PART 3 - EXECUTION
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
3.1 FIELD QUALITY CONTROL
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Perform tests in accordance with Section [26 05 00 - Common Work Results for Electrical].
|
||||||
|
#. Perform [______] tests using method appropriate to site conditions and to approval of [Departmental Representative] [DCC Representative] [Consultant] and local authority having jurisdiction over installation.
|
||||||
|
#. Perform tests before energizing electrical system.
|
||||||
|
|
||||||
|
3.02 GENERAL CABLE INSTALLATION
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Install cable in trenches in accordance with Section [33 71 73.02 - Underground Electrical Service].
|
||||||
|
#. Lay cable in cable trays in accordance with Section [26 05 36 - Cable Trays for Electrical Systems].
|
||||||
|
#. Terminate cables in accordance with Section [26 05 20 - Wire and Box Connectors - (0-1000 V)].
|
||||||
|
#. Cable Colour Coding: to Section [26 05 00 - Common Work Results for Electrical].
|
||||||
|
#. Conductor length for parallel feeders to be identical.
|
||||||
|
#. Lace or clip groups of feeder cables at distribution centres, pull boxes, and termination points.
|
||||||
|
#. Wiring in walls: typically drop or loop vertically from above to better facilitate future renovations. Generally wiring from below and horizontal wiring in walls to be avoided unless indicated.
|
||||||
|
#. Branch circuit wiring for surge suppression receptacles and permanently wired computer and electronic equipment to be 2-wire circuits only, i.e. common neutrals not permitted.
|
||||||
|
#. Provide numbered wire collars for control wiring. Numbers to correspond to control shop drawing legend. Obtain wiring diagram for control wiring.
|
||||||
|
|
||||||
|
3.3 INSTALLATION OF BUILDING WIRES
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Install wiring as follows:
|
||||||
|
|
||||||
|
1. In conduit systems in accordance with Section [26 05 34 - Conduits, Conduit Fastenings and Conduit Fittings].
|
||||||
|
#. In underground ducts in accordance with Section 33 [______].
|
||||||
|
#. In underfloor distribution system in accordance with Section 21 [______].
|
||||||
|
#. In cellular floor raceways in accordance with Section 21 [______].
|
||||||
|
#. In surface and lighting fixture raceways in accordance with Section 26 [______].
|
||||||
|
#. In wireways and auxiliary gutters in accordance with Section 21 [______].
|
||||||
|
#. Overhead service conductors in accordance with Section 21 [______].
|
||||||
|
|
||||||
|
3.4 INSTALLATION OF TECK90 CABLE (0 -1000 V)
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Group cables wherever possible on channels.
|
||||||
|
#. Install cable [exposed] [concealed], securely supported by [staples] [straps] [hangers].
|
||||||
|
|
||||||
|
3.06 INSTALLATION OF ARMOURED CABLES
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Group cables wherever possible on channels.
|
||||||
|
|
||||||
|
3.07 INSTALLATION OF ALUMINUM SHEATHED CABLE
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Group cables wherever possible on channels.
|
||||||
|
|
||||||
|
3.08 INSTALLATION OF CONTROL CABLES
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Install control cables [in [conduit] [under floor raceways] [cable troughs] [underground ducts]] [by direct burial].
|
||||||
|
#. Ground control cable shield.
|
||||||
|
|
||||||
|
3.09 INSTALLATION OF NON-METALLIC SHEATHED CABLE
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. SPEC NOTE: NMD90 cable is normally used only in frame construction especially residential.
|
||||||
|
|
||||||
|
A. Install cables.
|
||||||
|
#. Install straps and box connectors to cables as required.
|
||||||
|
|
||||||
|
**END OF SECTION**
|
||||||
115
source/260526.rst
Normal file
115
source/260526.rst
Normal file
|
|
@ -0,0 +1,115 @@
|
||||||
|
.. ==== -> Heading 1
|
||||||
|
.. ---- -> Heading 2
|
||||||
|
.. ~~~~ -> Heading 3
|
||||||
|
.. ^^^^ -> Heading 4
|
||||||
|
.. """" -> Heading 5
|
||||||
|
|
||||||
|
.. |CODE| replace:: NEC
|
||||||
|
|
||||||
|
|
||||||
|
26 05 26 - GROUNDING
|
||||||
|
=========================================
|
||||||
|
|
||||||
|
PART 1 - GENERAL
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
1.1 Work Included
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Labor, materials, equipment, tools, safety gear, test equipment, incidentals, services, and transportation for a complete electro-mechanical installation as shown on the Drawings, included in these Specifications, or as can be reasonably implied from project descriptions.
|
||||||
|
#. Furnish and install grounding system required by Drawings, or if not shown or defined, as required by |CODE|. Ground conductors shall be sized for the protective device, minimum.
|
||||||
|
#. Furnish and install conduits, junction boxes, underground boxes, and associated hardware. Provide hardware, conduit, fittings, and other parts for a complete grounding installation
|
||||||
|
|
||||||
|
1.2 Related Work
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Section 26 05 10
|
||||||
|
#. Section 26 05 19
|
||||||
|
#. Section 26 05 70
|
||||||
|
|
||||||
|
1.3 Qualifications
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Material furnished under this specification shall be installed by qualified installers meeting requirements specified in Section 26 05 10.
|
||||||
|
|
||||||
|
1.4 Submittals
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Refer to Section 26 05 10
|
||||||
|
|
||||||
|
PART 2 - PRODUCTS
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
2.1 Grounding System
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. General
|
||||||
|
|
||||||
|
#. Grounding conductors shall be sized as shown on the Drawings or in accordance with |CODE|, whichever is larger.
|
||||||
|
#. Components of the grounding electrode system shall be manufactured in accordance with UL 467 - Standard for Safety Grounding and Bonding Equipment.
|
||||||
|
|
||||||
|
B. Grounding System
|
||||||
|
|
||||||
|
1. The utility service ground shall be tied to a building ground grid consisting of an electrode ground/ "UFER" and/or ground rod type grounding system.
|
||||||
|
2. The UFER shall consist of minimum 25 feet minimum of code sized bare copper wire conductor laid at 3 foot nominal depth encased with concrete or as detailed on the Contract Drawings. UFER ground shall be located where soil moisture content will be maximized.
|
||||||
|
3. Ground enhancement material shall be permanent and be designed to lower earth resistance in all soil conditions. Once set, material shall have resistivity of not more than 25 ohm-cm resistance. Material shall be set by mixing it with water to form a slurry and shall not dissolve or decompose once cured. Ground enhancement material shall be Erico Ground Enhancement Material (GEM), Lyncole XIT, or equal.
|
||||||
|
4. The main ground bonding wire from the ground rod shall extend up into the utility service panel with readily visible UL approved "ground clamp" attached to the ground bus.
|
||||||
|
5. Install bare copper ground bond wires from the UFER ground to the various locations shown on the Drawings.
|
||||||
|
|
||||||
|
#. Raceway Grounds
|
||||||
|
|
||||||
|
1. If above ground, metallic conduits shall be assembled to provide a continuous ground path. Metallic conduits shall be bonded using insulated grounding bushings.
|
||||||
|
|
||||||
|
#. Equipment and Enclosure Grounds
|
||||||
|
|
||||||
|
1. Electrical and distribution equipment shall be connected to the grounding system. Cables shall be sized as specified. Furnish and install a green grounding conductor inside conduit containing the power conductors serving the equipment.
|
||||||
|
|
||||||
|
#. Components
|
||||||
|
|
||||||
|
1. Ground rod shall be ¾” x 10 ft solid steel with 10-mil copper-cladding.
|
||||||
|
2. Provide ground well enclosures for all outdoor ground rods. Furnish Christy type F8 or equal unless otherwise shown on the Drawings.
|
||||||
|
3. Ground rod clamps shall be bolt-on type as manufactured by O-Z Gedney type GRC, or equal.
|
||||||
|
4. Grounding and bonding wires shall be installed in all PVC conduits and nonmetallic raceways and connected to the ground bus and all equipment.
|
||||||
|
5. Each electrical enclosure shall have a copper ground bus. Screw type fasteners shall be provided on all ground busses for connection of grounding conductors. Ground bus shall be a Challenger GB series, ILSCO CAN series or equal.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
PART 3 - EXECUTION
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
3.1 Workmanship
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. All work in this Section shall conform to the codes and standards specified in specified in Section 26 05 00 subsection 3.3, Workmanship.
|
||||||
|
|
||||||
|
3.2 Installation
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Grounding System:
|
||||||
|
|
||||||
|
1. Install all products per Section 26 05 00 – General Electric subsection 3.6, Installation.
|
||||||
|
2. Each nonmetallic conduit shall contain a code sized grounding conductor.
|
||||||
|
3. The system neutral conductor and all equipment and devices required to be grounded by the National Electrical Code shall be grounded in a manner that satisfies the requirements of the National Code.
|
||||||
|
4. The system neutral (grounded conductor) shall be connected to the system's grounding conductor at only a single point in the system. This connection shall be made by a removable bonding jumper sized in accordance with the applicable provisions of the National Electrical Code if the size is not shown on the Drawings. The grounding of the system neutral shall be in the enclosure that houses the service entrance main overcurrent protection.
|
||||||
|
5. Utilize mechanical connections in accessible locations and exothermic connections in non-accessible or buried locations.
|
||||||
|
6. The secondary on all transformers shall be grounded.
|
||||||
|
7. All raceway systems, supports, enclosures, panels, motor frames, and equipment housings shall be permanently and effectively grounded.
|
||||||
|
8. Install insulated grounding conductor with feeders and branch circuit conductors in conduits. Size grounding conductors in accordance with NEC. Install from grounding bus of serving panel to ground bus of served panel, grounding screw of receptacles, lighting fixture housing, light switch outlet boxes or metal enclosures of service equipment. Ground conduits by means of grounding bushings on terminations at panelboards and distribution panels with 12ga. conductor to grounding bus
|
||||||
|
9. All receptacles shall have their grounding contact connected to a grounding conductor.
|
||||||
|
10. Branch circuit grounding conductors for receptacles or other electrical loads shall be arranged such that the removal of a lighting fixture, receptacle, or other load does not interrupt the ground continuity to any other part of the circuit.
|
||||||
|
11. Attachment of the grounding conductor to equipment or enclosures shall be by connectors specifically provided for grounding. Mounting, support, or bracing bolts shall not be used as an attachment point for ground conductors.
|
||||||
|
12. Install grounding electrode conductor and connect to reinforcing steel in foundation footing. Electrically bond building steel to ground system. Bond metal siding not attached to grounded structure.
|
||||||
|
|
||||||
|
3.3 Field Quality Control
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
A. Inspections:
|
||||||
|
|
||||||
|
1. Owner’s representative shall inspect ground system prior to cover.
|
||||||
|
|
||||||
|
B. Testing
|
||||||
|
|
||||||
|
1. Complete applicable test forms if provided in Section 26 05 70 – Factory and Field Testing. If form is not provided, furnish results on vendor standard testing forms with signature of tester, date of test and test results.
|
||||||
|
2. Test each grounding connection to determine the ground resistance. The grounding test shall be IEEE 81.2 and NETA 7.13. The current reference rod shall be driven at least 100 feet from the ground rod or grid under test. The measurements shall be made at 10-foot intervals beginning 20 feet from the test electrode and ending 80 feet from it, in direct line between the ground rod or center of grid and the current reference electrode.
|
||||||
|
|
||||||
|
**END OF SECTION**
|
||||||
BIN
source/_static/JMKEngineering-Logo_blue.jpg
Normal file
BIN
source/_static/JMKEngineering-Logo_blue.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 78 KiB |
216
source/_static/jmk_spec.sty
Normal file
216
source/_static/jmk_spec.sty
Normal file
|
|
@ -0,0 +1,216 @@
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
%
|
||||||
|
% jmk_spec.sty
|
||||||
|
%
|
||||||
|
% LaTeX package for Sphinx override template
|
||||||
|
%
|
||||||
|
% © Jeff MacKinnon
|
||||||
|
% code by E. A. Farina latex.guru
|
||||||
|
%
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
|
\ProvidesPackage{jmk_spec}[2024/04/16 v1.1 LaTeX package for Sphinx override template]
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Useful packages
|
||||||
|
\RequirePackage{tikz}
|
||||||
|
\RequirePackage[table]{xcolor}
|
||||||
|
\RequirePackage{tabularx}
|
||||||
|
\RequirePackage{xstring}
|
||||||
|
\RequirePackage{anyfontsize}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Colors
|
||||||
|
\definecolor{JMKblue}{HTML}{004360}%{17365d}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Layout
|
||||||
|
\newlength{\MARmar}\setlength{\MARmar}{1in}
|
||||||
|
\newlength{\MARlef}\setlength{\MARlef}{\MARmar}
|
||||||
|
\newlength{\MARrig}\setlength{\MARrig}{\MARmar}
|
||||||
|
\newlength{\MARtop}\setlength{\MARtop}{1.75\MARmar}
|
||||||
|
\newlength{\MARbot}\setlength{\MARbot}{\MARmar}
|
||||||
|
\@ifpackageloaded{geometry}{}{\RequirePackage{geometry}}
|
||||||
|
\geometry{letterpaper,portrait,left=\MARlef,right=\MARrig,top=\MARtop,bottom=\MARbot,headheight=14.5pt}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Language
|
||||||
|
%\RequirePackage[english]{babel}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Font
|
||||||
|
\usepackage[scaled]{helvet}
|
||||||
|
\usepackage[T1]{fontenc}
|
||||||
|
\renewcommand{\familydefault}{\sfdefault}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Tokens
|
||||||
|
\newcommand{\dbclient}{}\newcommand{\client}[1]{\renewcommand{\dbclient}{#1}}
|
||||||
|
\newcommand{\dbrevision}{}\newcommand{\revision}[1]{\renewcommand{\dbrevision}{#1}}
|
||||||
|
\newcommand{\dbsubtitle}{}\newcommand{\subtitle}[1]{\renewcommand{\dbsubtitle}{#1}}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Page style
|
||||||
|
\RequirePackage{fancyhdr}
|
||||||
|
\renewcommand{\headrulewidth}{0pt}
|
||||||
|
\renewcommand{\footrulewidth}{0pt}
|
||||||
|
\newcommand{\headfoot}{\fancyhf{}\fancyhead[C]{\begin{tikzpicture}[remember picture,overlay,inner sep=0pt,outer sep=0pt]
|
||||||
|
%\node at (current page.center) {\includegraphics[width=\paperwidth,page=2]{TEST.pdf}};
|
||||||
|
% HEAD
|
||||||
|
\coordinate (TOPl) at ([shift={(\MARlef+100pt,0pt)}]current page.north west);
|
||||||
|
\coordinate (TOPr) at ([shift={(-\MARrig-100pt,0pt)}]current page.north east);
|
||||||
|
% Logo
|
||||||
|
\node[anchor=west] (LOGO) at ([shift={(\MARlef,-0.5\MARtop)}]current page.north west) {\includegraphics[height=55pt]{JMKEngineering-Logo_blue.jpg}};
|
||||||
|
% Left
|
||||||
|
% Title
|
||||||
|
\node[anchor=north west,font=\fontsize{10pt}{12pt}\selectfont] at (TOPl|-LOGO.north) {\bfseries\Chaptername};
|
||||||
|
% Client
|
||||||
|
\node[anchor=west,font=\fontsize{10pt}{12pt}\selectfont] at (TOPl|-LOGO.east) {CLIENT: \strut\dbclient};
|
||||||
|
% Project
|
||||||
|
\node[anchor=south west,font=\fontsize{10pt}{12pt}\selectfont] at (TOPl|-LOGO.south) {\strut Project Num: \version};
|
||||||
|
% Right
|
||||||
|
% Date
|
||||||
|
\node[anchor=north west,font=\fontsize{10pt}{12pt}\selectfont] (REV) at (TOPr|-LOGO.north) {\strut\@date};
|
||||||
|
% Revision
|
||||||
|
\node[anchor=west,font=\fontsize{10pt}{12pt}\selectfont] at (TOPr|-LOGO.center) {\strut Rev: \strut\dbrevision};
|
||||||
|
% Page
|
||||||
|
\node[anchor=south west,font=\fontsize{10pt}{12pt}\selectfont] at (TOPr|-LOGO.south) {\StrBefore[1]{\Chaptername}{\sphinxhyphen{}}[\ChapterSpecNum]\strut Page \ChapterSpecNum~--~\thepage};
|
||||||
|
% FOOT
|
||||||
|
% Copyright
|
||||||
|
\node[anchor=center,font=\fontsize{10pt}{12pt}\selectfont,align=left] at ([shift={(0pt,0.5\MARbot)}]current page.south) {JMK Engineering Inc.};
|
||||||
|
% LAYOUT
|
||||||
|
%\draw ([shift={(\MARlef,\MARbot)}]current page.south west) rectangle ([shift={(-\MARrig,-\MARtop)}]current page.north east);
|
||||||
|
%\draw[|<->|] (current page.west)--++(0:\MARlef) node[midway,above] {\strut 1~in};
|
||||||
|
%\draw[|<->|] (current page.east)--++(180:\MARrig) node[midway,above] {\strut 1~in};
|
||||||
|
%\draw[|<->|] (current page.south)--++(90:\MARbot) node[midway,right] {\strut 1~in};
|
||||||
|
%\draw[|<->|] (current page.north)--++(270:\MARtop) node[midway,right] {\strut 1.5~in};
|
||||||
|
\end{tikzpicture}}}
|
||||||
|
\fancypagestyle{plain}{\headfoot}
|
||||||
|
\fancypagestyle{normal}{\headfoot}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Headings
|
||||||
|
%\RequirePackage[Bjornstrup]{fncychap}% Loaded by conf.py but remove by Elio
|
||||||
|
%\RequirePackage[explicit]{titlesec}
|
||||||
|
\let\Chaptermark\chaptermark
|
||||||
|
\def\chaptermark#1{\def\Chaptername{#1}\Chaptermark{#1}}
|
||||||
|
%
|
||||||
|
\def\FONTchapter{\Large\bfseries\color{JMKblue}}
|
||||||
|
\titleformat{\chapter}[hang]{\FONTchapter}{}{0pt}{}[]
|
||||||
|
\titleformat{name=\chapter,numberless}[hang]{\FONTchapter}{}{0pt}{}[]
|
||||||
|
\titlespacing*{\chapter}{0pt}{-3\baselineskip}{\baselineskip}
|
||||||
|
%
|
||||||
|
\def\FONTsection{\large\bfseries\color{JMKblue}}
|
||||||
|
\titleformat{\section}[hang]{\FONTsection}{}{0pt}{}[]
|
||||||
|
\titleformat{name=\section,numberless}[hang]{\FONTsection}{}{0pt}{}[]
|
||||||
|
\titlespacing*{\section}{0pt}{\baselineskip}{0pt}
|
||||||
|
%
|
||||||
|
\def\FONTsubsection{\bfseries\color{JMKblue}}
|
||||||
|
\titleformat{\subsection}[hang]{\FONTsubsection}{}{0pt}{}[]
|
||||||
|
\titleformat{name=\subsection,numberless}[hang]{\FONTsubsection}{}{0pt}{}[]
|
||||||
|
\titlespacing*{\subsection}{0pt}{\baselineskip}{0pt}
|
||||||
|
%
|
||||||
|
\def\FONTsubsubsection{\itshape\color{JMKblue}}
|
||||||
|
\titleformat{\subsubsection}[hang]{\FONTsubsubsection}{}{0pt}{}[]
|
||||||
|
\titleformat{name=\subsubsection,numberless}[hang]{\FONTsubsubsection}{}{0pt}{}[]
|
||||||
|
\titlespacing*{\subsubsection}{0pt}{\baselineskip}{0pt}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Title page
|
||||||
|
\newcommand{\OLDsphinxmaketitle}{\pagestyle{plain}\pagenumbering{roman}\strut
|
||||||
|
\vspace{-4\baselineskip}
|
||||||
|
\begin{center}\fontsize{31pt}{37pt}\bfseries\color{JMKblue}\selectfont
|
||||||
|
\@title
|
||||||
|
\end{center}
|
||||||
|
\vspace{2\baselineskip}
|
||||||
|
\begin{center}\huge\bfseries\color{JMKblue}
|
||||||
|
\dbsubtitle
|
||||||
|
\end{center}
|
||||||
|
\vfill
|
||||||
|
\ifnumequal{\therevhis}{0}{}{
|
||||||
|
\begin{center}\large\bfseries\color{JMKblue}Revision History\end{center}
|
||||||
|
\begin{tabularx}{\linewidth}{|c|X|l|l|}\hline
|
||||||
|
\rowcolor{black!10}\bfseries Number & \bfseries Description & \bfseries Date & \bfseries Approved \\\hline
|
||||||
|
\ifnumgreater{\therevhis}{0}{\csuse{REVnum1} & \csuse{REVdesc1} & \csuse{REVdate1} & \\ \hline}{}
|
||||||
|
\ifnumgreater{\therevhis}{1}{\csuse{REVnum2} & \csuse{REVdesc2} & \csuse{REVdate2} & \\ \hline}{}
|
||||||
|
\ifnumgreater{\therevhis}{2}{\csuse{REVnum3} & \csuse{REVdesc3} & \csuse{REVdate3} & \\ \hline}{}
|
||||||
|
\ifnumgreater{\therevhis}{3}{\csuse{REVnum4} & \csuse{REVdesc4} & \csuse{REVdate4} & \\ \hline}{}
|
||||||
|
\ifnumgreater{\therevhis}{4}{\csuse{REVnum5} & \csuse{REVdesc5} & \csuse{REVdate5} & \\ \hline}{}
|
||||||
|
\ifnumgreater{\therevhis}{5}{\csuse{REVnum6} & \csuse{REVdesc6} & \csuse{REVdate6} & \\ \hline}{}
|
||||||
|
\ifnumgreater{\therevhis}{6}{\csuse{REVnum7} & \csuse{REVdesc7} & \csuse{REVdate7} & \\ \hline}{}
|
||||||
|
\ifnumgreater{\therevhis}{7}{\csuse{REVnum8} & \csuse{REVdesc8} & \csuse{REVdate8} & \\ \hline}{}
|
||||||
|
\ifnumgreater{\therevhis}{8}{\csuse{REVnum9} & \csuse{REVdesc9} & \csuse{REVdate9} & \\ \hline}{}
|
||||||
|
\ifnumgreater{\therevhis}{9}{\csuse{REVnum10} & \csuse{REVdesc10} & \csuse{REVdate10} & \\ \hline}{}
|
||||||
|
\ifnumgreater{\therevhis}{10}{\csuse{REVnum11} & \csuse{REVdesc11} & \csuse{REVdate11} & \\ \hline}{}
|
||||||
|
\end{tabularx}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Intentionally Blank Page
|
||||||
|
\newcommand{\IBP}{\clearpage\pagestyle{plain}
|
||||||
|
\strut\par
|
||||||
|
\vfill
|
||||||
|
\centerline{\textbf{\sffamily Intentionally Blank Page}}\par
|
||||||
|
\vfill
|
||||||
|
\strut
|
||||||
|
\clearpage
|
||||||
|
}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% End of section
|
||||||
|
\protected\def\sphinxstylestrong#1{\ifstrequal{#1}{END OF SECTION}{\vskip\baselineskip\centerline{\textbf{#1}}}{\textbf{#1}}}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Title page
|
||||||
|
\renewcommand{\sphinxmaketitle}{\pagestyle{empty}\pagenumbering{roman}\strut
|
||||||
|
\begin{tikzpicture}[remember picture,overlay,inner sep=0pt,outer sep=0pt]
|
||||||
|
% Logo
|
||||||
|
\node[anchor=north west] (LOGO) at ([shift={(125pt,-100pt)}]current page.north west) {\includegraphics[height=72pt]{JMKEngineering-Logo_text.jpg}};
|
||||||
|
% Title
|
||||||
|
\node[anchor=north west,text width=\linewidth-125pt,align=flush left,font=\fontsize{34pt}{40pt}\color{JMKblue}\bfseries\selectfont] (TITLE) at ([shift={(0pt,-18pt)}]LOGO.south west) {\@title};
|
||||||
|
% Project num
|
||||||
|
\node[anchor=north west,text width=\linewidth-125pt,align=flush left,font=\fontsize{12pt}{14pt}\color{JMKblue}\sffamily\selectfont] (VER) at ([shift={(0pt,-15pt)}]TITLE.south west) {Project Number: \strut\version};
|
||||||
|
% Left band
|
||||||
|
\draw[JMKblue,line width=1.2pt] ([shift={(-5pt,10pt)}]LOGO.north west) coordinate (LS) --([yshift=-10pt]LS|-VER.south);
|
||||||
|
% Date
|
||||||
|
\node[anchor=south west,text width=\linewidth-125pt,align=flush left,font=\fontsize{14pt}{16pt}\color{JMKblue}\sffamily\selectfont] (DATE) at ([shift={(0pt,100pt)}]TITLE.west|-current page.south) {Issue Date: \strut\@date};
|
||||||
|
% Revision
|
||||||
|
\node[anchor=south west,text width=\linewidth-125pt,align=flush left,font=\fontsize{14pt}{16pt}\color{JMKblue}\sffamily\selectfont] (DATE) at ([shift={(0pt,80pt)}]TITLE.west|-current page.south) {Revision: \strut\dbrevision};
|
||||||
|
\end{tikzpicture}
|
||||||
|
%\IBP
|
||||||
|
\clearpage
|
||||||
|
\pagenumbering{arabic}
|
||||||
|
}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Revision history
|
||||||
|
\newcounter{revhis}
|
||||||
|
\setcounter{revhis}{0}
|
||||||
|
\makeatletter
|
||||||
|
\define@key{rev}{num}{\csdef{REVnum\therevhis}{#1}}
|
||||||
|
\define@key{rev}{desc}{\csdef{REVdesc\therevhis}{#1}}
|
||||||
|
\define@key{rev}{date}{\csdef{REVdate\therevhis}{#1}}
|
||||||
|
\makeatother
|
||||||
|
\setkeys{rev}{}
|
||||||
|
\newcommand{\revisionhistory}[1]{\stepcounter{revhis}\setkeys{rev}{#1}}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% List of figures and tables
|
||||||
|
\RequirePackage{float}
|
||||||
|
\floatstyle{boxed}
|
||||||
|
\restylefloat{figure}
|
||||||
|
\restylefloat{table}
|
||||||
|
\newif\iffigures
|
||||||
|
\newif\iftables
|
||||||
|
\makeatletter
|
||||||
|
\AtEndDocument{%
|
||||||
|
\if@filesw
|
||||||
|
\ifnum\value{figure}=\z@ % no figures
|
||||||
|
\immediate\write\@mainaux {\global\string\figuresfalse}%
|
||||||
|
\else
|
||||||
|
\immediate\write\@mainaux {\global\string\figurestrue}%
|
||||||
|
\fi
|
||||||
|
\ifnum\value{table}=\z@ % no tables
|
||||||
|
\immediate\write\@mainaux {\global\string\tablesfalse}%
|
||||||
|
\else
|
||||||
|
\immediate\write\@mainaux {\global\string\tablestrue}%
|
||||||
|
\fi
|
||||||
|
\fi
|
||||||
|
}
|
||||||
|
\makeatother
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Table of contents
|
||||||
|
\setcounter{tocdepth}{1}
|
||||||
|
\renewcommand{\sphinxtableofcontents}{}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Hyperref
|
||||||
|
\hypersetup{hidelinks}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
\endinput
|
||||||
88
source/conf.py
Normal file
88
source/conf.py
Normal file
|
|
@ -0,0 +1,88 @@
|
||||||
|
# Configuration file for the Sphinx documentation builder.
|
||||||
|
#
|
||||||
|
# This file only contains a selection of the most common options. For a full
|
||||||
|
# list see the documentation:
|
||||||
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||||
|
|
||||||
|
# -- Path setup --------------------------------------------------------------
|
||||||
|
|
||||||
|
# If extensions (or modules to document with autodoc) are in another directory,
|
||||||
|
# add these directories to sys.path here. If the directory is relative to the
|
||||||
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||||
|
#
|
||||||
|
# import os
|
||||||
|
# import sys
|
||||||
|
# sys.path.insert(0, os.path.abspath('.'))
|
||||||
|
|
||||||
|
|
||||||
|
# -- Project information -----------------------------------------------------
|
||||||
|
|
||||||
|
project = 'JMK Engineering Spec Template'
|
||||||
|
copyright = '2023, Jeff MacKinnon'
|
||||||
|
author = 'Jeff MacKinnon'
|
||||||
|
release = 'AB' # Used as the Project Number in the Report
|
||||||
|
|
||||||
|
|
||||||
|
# -- General configuration ---------------------------------------------------
|
||||||
|
|
||||||
|
# Add any Sphinx extension module names here, as strings. They can be
|
||||||
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||||
|
# ones.
|
||||||
|
extensions = [
|
||||||
|
# "sphinx_design",
|
||||||
|
# "myst_nb",
|
||||||
|
# "myst-parser",
|
||||||
|
]
|
||||||
|
source_suffix = {
|
||||||
|
'.rst': 'restructuredtext',
|
||||||
|
'.ipynb': 'myst-nb',
|
||||||
|
'.myst': 'myst-nb',
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
|
templates_path = ['_templates']
|
||||||
|
|
||||||
|
# List of patterns, relative to source directory, that match files and
|
||||||
|
# directories to ignore when looking for source files.
|
||||||
|
# This pattern also affects html_static_path and html_extra_path.
|
||||||
|
exclude_patterns = []
|
||||||
|
|
||||||
|
|
||||||
|
# -- Options for HTML output -------------------------------------------------
|
||||||
|
|
||||||
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||||
|
# a list of builtin themes.
|
||||||
|
#
|
||||||
|
#html_theme = 'alabaster'
|
||||||
|
html_theme = "sphinx_book_theme"
|
||||||
|
|
||||||
|
# Add any paths that contain custom static files (such as style sheets) here,
|
||||||
|
# relative to this directory. They are copied after the builtin static files,
|
||||||
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||||
|
html_static_path = ['_static']
|
||||||
|
|
||||||
|
# Latex setup
|
||||||
|
|
||||||
|
PREAMBLE = r"""
|
||||||
|
\usepackage{jmk_spec}
|
||||||
|
"""
|
||||||
|
latex_additional_files = [
|
||||||
|
'_static/JMKEngineering-Logo-Small.jpg',
|
||||||
|
'_static/JMKEngineering-Logo.jpg',
|
||||||
|
'_static/JMKEngineering-Logo_blue.jpg',
|
||||||
|
'_static/JMKEngineering-Logo_text.jpg',
|
||||||
|
'_static/jmk_spec.sty',
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
latex_elements = {
|
||||||
|
'pointsize':'12pt',
|
||||||
|
'classoptions': ',openany,oneside',
|
||||||
|
'preamble' : PREAMBLE,
|
||||||
|
'extrapackages': r'\usepackage{lipsum}',
|
||||||
|
}
|
||||||
|
|
||||||
|
latex_logo = '_static/JMKEngineering-Logo_blue.jpg'
|
||||||
|
|
||||||
|
latex_show_urls = 'inline'
|
||||||
BIN
source/frUpwork/project_spec.zip
Normal file
BIN
source/frUpwork/project_spec.zip
Normal file
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 78 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 78 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
101
source/frUpwork/project_spec/project_spec/LICRcyr2utf8.xdy
Normal file
101
source/frUpwork/project_spec/project_spec/LICRcyr2utf8.xdy
Normal file
|
|
@ -0,0 +1,101 @@
|
||||||
|
;; -*- coding: utf-8; mode: Lisp; -*-
|
||||||
|
;; style file for xindy
|
||||||
|
;; filename: LICRcyr2utf8.xdy
|
||||||
|
;; description: style file for xindy which maps back LaTeX Internal
|
||||||
|
;; Character Representation of Cyrillic to utf-8
|
||||||
|
;; usage: for use with pdflatex produced .idx files.
|
||||||
|
;; Contributed by the Sphinx team, July 2018.
|
||||||
|
(merge-rule "\IeC {\'\CYRG }" "Ѓ" :string)
|
||||||
|
(merge-rule "\IeC {\'\CYRK }" "Ќ" :string)
|
||||||
|
(merge-rule "\IeC {\'\cyrg }" "ѓ" :string)
|
||||||
|
(merge-rule "\IeC {\'\cyrk }" "ќ" :string)
|
||||||
|
(merge-rule "\IeC {\CYRA }" "А" :string)
|
||||||
|
(merge-rule "\IeC {\CYRB }" "Б" :string)
|
||||||
|
(merge-rule "\IeC {\CYRC }" "Ц" :string)
|
||||||
|
(merge-rule "\IeC {\CYRCH }" "Ч" :string)
|
||||||
|
(merge-rule "\IeC {\CYRD }" "Д" :string)
|
||||||
|
(merge-rule "\IeC {\CYRDJE }" "Ђ" :string)
|
||||||
|
(merge-rule "\IeC {\CYRDZE }" "Ѕ" :string)
|
||||||
|
(merge-rule "\IeC {\CYRDZHE }" "Џ" :string)
|
||||||
|
(merge-rule "\IeC {\CYRE }" "Е" :string)
|
||||||
|
(merge-rule "\IeC {\CYREREV }" "Э" :string)
|
||||||
|
(merge-rule "\IeC {\CYRERY }" "Ы" :string)
|
||||||
|
(merge-rule "\IeC {\CYRF }" "Ф" :string)
|
||||||
|
(merge-rule "\IeC {\CYRG }" "Г" :string)
|
||||||
|
(merge-rule "\IeC {\CYRGUP }" "Ґ" :string)
|
||||||
|
(merge-rule "\IeC {\CYRH }" "Х" :string)
|
||||||
|
(merge-rule "\IeC {\CYRHRDSN }" "Ъ" :string)
|
||||||
|
(merge-rule "\IeC {\CYRI }" "И" :string)
|
||||||
|
(merge-rule "\IeC {\CYRIE }" "Є" :string)
|
||||||
|
(merge-rule "\IeC {\CYRII }" "І" :string)
|
||||||
|
(merge-rule "\IeC {\CYRISHRT }" "Й" :string)
|
||||||
|
(merge-rule "\IeC {\CYRJE }" "Ј" :string)
|
||||||
|
(merge-rule "\IeC {\CYRK }" "К" :string)
|
||||||
|
(merge-rule "\IeC {\CYRL }" "Л" :string)
|
||||||
|
(merge-rule "\IeC {\CYRLJE }" "Љ" :string)
|
||||||
|
(merge-rule "\IeC {\CYRM }" "М" :string)
|
||||||
|
(merge-rule "\IeC {\CYRN }" "Н" :string)
|
||||||
|
(merge-rule "\IeC {\CYRNJE }" "Њ" :string)
|
||||||
|
(merge-rule "\IeC {\CYRO }" "О" :string)
|
||||||
|
(merge-rule "\IeC {\CYRP }" "П" :string)
|
||||||
|
(merge-rule "\IeC {\CYRR }" "Р" :string)
|
||||||
|
(merge-rule "\IeC {\CYRS }" "С" :string)
|
||||||
|
(merge-rule "\IeC {\CYRSFTSN }" "Ь" :string)
|
||||||
|
(merge-rule "\IeC {\CYRSH }" "Ш" :string)
|
||||||
|
(merge-rule "\IeC {\CYRSHCH }" "Щ" :string)
|
||||||
|
(merge-rule "\IeC {\CYRT }" "Т" :string)
|
||||||
|
(merge-rule "\IeC {\CYRTSHE }" "Ћ" :string)
|
||||||
|
(merge-rule "\IeC {\CYRU }" "У" :string)
|
||||||
|
(merge-rule "\IeC {\CYRUSHRT }" "Ў" :string)
|
||||||
|
(merge-rule "\IeC {\CYRV }" "В" :string)
|
||||||
|
(merge-rule "\IeC {\CYRYA }" "Я" :string)
|
||||||
|
(merge-rule "\IeC {\CYRYI }" "Ї" :string)
|
||||||
|
(merge-rule "\IeC {\CYRYO }" "Ё" :string)
|
||||||
|
(merge-rule "\IeC {\CYRYU }" "Ю" :string)
|
||||||
|
(merge-rule "\IeC {\CYRZ }" "З" :string)
|
||||||
|
(merge-rule "\IeC {\CYRZH }" "Ж" :string)
|
||||||
|
(merge-rule "\IeC {\cyra }" "а" :string)
|
||||||
|
(merge-rule "\IeC {\cyrb }" "б" :string)
|
||||||
|
(merge-rule "\IeC {\cyrc }" "ц" :string)
|
||||||
|
(merge-rule "\IeC {\cyrch }" "ч" :string)
|
||||||
|
(merge-rule "\IeC {\cyrd }" "д" :string)
|
||||||
|
(merge-rule "\IeC {\cyrdje }" "ђ" :string)
|
||||||
|
(merge-rule "\IeC {\cyrdze }" "ѕ" :string)
|
||||||
|
(merge-rule "\IeC {\cyrdzhe }" "џ" :string)
|
||||||
|
(merge-rule "\IeC {\cyre }" "е" :string)
|
||||||
|
(merge-rule "\IeC {\cyrerev }" "э" :string)
|
||||||
|
(merge-rule "\IeC {\cyrery }" "ы" :string)
|
||||||
|
(merge-rule "\IeC {\cyrf }" "ф" :string)
|
||||||
|
(merge-rule "\IeC {\cyrg }" "г" :string)
|
||||||
|
(merge-rule "\IeC {\cyrgup }" "ґ" :string)
|
||||||
|
(merge-rule "\IeC {\cyrh }" "х" :string)
|
||||||
|
(merge-rule "\IeC {\cyrhrdsn }" "ъ" :string)
|
||||||
|
(merge-rule "\IeC {\cyri }" "и" :string)
|
||||||
|
(merge-rule "\IeC {\cyrie }" "є" :string)
|
||||||
|
(merge-rule "\IeC {\cyrii }" "і" :string)
|
||||||
|
(merge-rule "\IeC {\cyrishrt }" "й" :string)
|
||||||
|
(merge-rule "\IeC {\cyrje }" "ј" :string)
|
||||||
|
(merge-rule "\IeC {\cyrk }" "к" :string)
|
||||||
|
(merge-rule "\IeC {\cyrl }" "л" :string)
|
||||||
|
(merge-rule "\IeC {\cyrlje }" "љ" :string)
|
||||||
|
(merge-rule "\IeC {\cyrm }" "м" :string)
|
||||||
|
(merge-rule "\IeC {\cyrn }" "н" :string)
|
||||||
|
(merge-rule "\IeC {\cyrnje }" "њ" :string)
|
||||||
|
(merge-rule "\IeC {\cyro }" "о" :string)
|
||||||
|
(merge-rule "\IeC {\cyrp }" "п" :string)
|
||||||
|
(merge-rule "\IeC {\cyrr }" "р" :string)
|
||||||
|
(merge-rule "\IeC {\cyrs }" "с" :string)
|
||||||
|
(merge-rule "\IeC {\cyrsftsn }" "ь" :string)
|
||||||
|
(merge-rule "\IeC {\cyrsh }" "ш" :string)
|
||||||
|
(merge-rule "\IeC {\cyrshch }" "щ" :string)
|
||||||
|
(merge-rule "\IeC {\cyrt }" "т" :string)
|
||||||
|
(merge-rule "\IeC {\cyrtshe }" "ћ" :string)
|
||||||
|
(merge-rule "\IeC {\cyru }" "у" :string)
|
||||||
|
(merge-rule "\IeC {\cyrushrt }" "ў" :string)
|
||||||
|
(merge-rule "\IeC {\cyrv }" "в" :string)
|
||||||
|
(merge-rule "\IeC {\cyrya }" "я" :string)
|
||||||
|
(merge-rule "\IeC {\cyryi }" "ї" :string)
|
||||||
|
(merge-rule "\IeC {\cyryo }" "ё" :string)
|
||||||
|
(merge-rule "\IeC {\cyryu }" "ю" :string)
|
||||||
|
(merge-rule "\IeC {\cyrz }" "з" :string)
|
||||||
|
(merge-rule "\IeC {\cyrzh }" "ж" :string)
|
||||||
239
source/frUpwork/project_spec/project_spec/LICRlatin2utf8.xdy
Normal file
239
source/frUpwork/project_spec/project_spec/LICRlatin2utf8.xdy
Normal file
|
|
@ -0,0 +1,239 @@
|
||||||
|
;; style file for xindy
|
||||||
|
;; filename: LICRlatin2utf8.xdy
|
||||||
|
;; description: style file for xindy which maps back LaTeX Internal
|
||||||
|
;; Character Representation of letters (as arising in .idx index
|
||||||
|
;; file) to UTF-8 encoding for correct sorting by xindy.
|
||||||
|
;; usage: for use with the pdflatex engine,
|
||||||
|
;; *not* for use with xelatex or lualatex.
|
||||||
|
;;
|
||||||
|
;; This is based upon xindy's distributed file tex/inputenc/utf8.xdy.
|
||||||
|
;; The modifications include:
|
||||||
|
;;
|
||||||
|
;; - Updates for compatibility with current LaTeX macro encoding.
|
||||||
|
;;
|
||||||
|
;; - Systematic usage of the \IeC {...} mark-up, because mark-up in
|
||||||
|
;; tex/inputenc/utf8.xdy was using it on seemingly random basis, and
|
||||||
|
;; Sphinx coercing of xindy usability for both Latin and Cyrillic scripts
|
||||||
|
;; with pdflatex requires its systematic presence here.
|
||||||
|
;;
|
||||||
|
;; - Support for some extra letters: Ÿ, Ŋ, ŋ, Œ, œ, IJ, ij, ȷ and ẞ.
|
||||||
|
;;
|
||||||
|
;; Indeed Sphinx needs to support for pdflatex engine all Unicode letters
|
||||||
|
;; available in TeX T1 font encoding. The above letters are found in
|
||||||
|
;; that encoding but not in the Latin1, 2, 3 charsets which are those
|
||||||
|
;; covered by original tex/inputenc/utf8.xdy.
|
||||||
|
;;
|
||||||
|
;; - There is a problem that ȷ is not supported out-of-the box by LaTeX
|
||||||
|
;; with inputenc, one must add explicitly
|
||||||
|
;; \DeclareUnicodeCharacter{0237}{\j}
|
||||||
|
;; to preamble of LaTeX document. However this character is not supported
|
||||||
|
;; by the TeX "times" font used by default by Sphinx for pdflatex engine.
|
||||||
|
;;
|
||||||
|
;; **Update**: since LaTeX 2018/12/01, the \j as well as \SS, \k{} and
|
||||||
|
;; \.{} need no extra user declaration anymore.
|
||||||
|
;;
|
||||||
|
;; - ẞ needs \DeclareUnicodeCharacter{1E9E}{\SS} (but ß needs no extra set-up).
|
||||||
|
;;
|
||||||
|
;; - U+02DB (˛) and U+02D9 (˙) are also not supported by inputenc
|
||||||
|
;; out of the box and require
|
||||||
|
;; \DeclareUnicodeCharacter{02DB}{\k{}}
|
||||||
|
;; \DeclareUnicodeCharacter{02D9}{\.{}}
|
||||||
|
;; to be added to preamble.
|
||||||
|
;;
|
||||||
|
;; - U+0127 ħ and U+0126 Ħ are absent from TeX T1+TS1 font encodings.
|
||||||
|
;;
|
||||||
|
;; - Characters Ŋ and ŋ are not supported by TeX font "times" used by
|
||||||
|
;; default by Sphinx for pdflatex engine but they are supported by
|
||||||
|
;; some TeX fonts, in particular by the default LaTeX font for T1
|
||||||
|
;; encoding.
|
||||||
|
;;
|
||||||
|
;; - " and ~ must be escaped as ~" and resp. ~~ in xindy merge rules.
|
||||||
|
;;
|
||||||
|
;; Contributed by the Sphinx team, July 2018.
|
||||||
|
;;
|
||||||
|
;; See sphinx.xdy for superior figures, as they are escaped by LaTeX writer.
|
||||||
|
(merge-rule "\IeC {\textonesuperior }" "¹" :string)
|
||||||
|
(merge-rule "\IeC {\texttwosuperior }" "²" :string)
|
||||||
|
(merge-rule "\IeC {\textthreesuperior }" "³" :string)
|
||||||
|
(merge-rule "\IeC {\'a}" "á" :string)
|
||||||
|
(merge-rule "\IeC {\'A}" "Á" :string)
|
||||||
|
(merge-rule "\IeC {\`a}" "à" :string)
|
||||||
|
(merge-rule "\IeC {\`A}" "À" :string)
|
||||||
|
(merge-rule "\IeC {\^a}" "â" :string)
|
||||||
|
(merge-rule "\IeC {\^A}" "Â" :string)
|
||||||
|
(merge-rule "\IeC {\~"a}" "ä" :string)
|
||||||
|
(merge-rule "\IeC {\~"A}" "Ä" :string)
|
||||||
|
(merge-rule "\IeC {\~~a}" "ã" :string)
|
||||||
|
(merge-rule "\IeC {\~~A}" "Ã" :string)
|
||||||
|
(merge-rule "\IeC {\c c}" "ç" :string)
|
||||||
|
(merge-rule "\IeC {\c C}" "Ç" :string)
|
||||||
|
(merge-rule "\IeC {\'c}" "ć" :string)
|
||||||
|
(merge-rule "\IeC {\'C}" "Ć" :string)
|
||||||
|
(merge-rule "\IeC {\^c}" "ĉ" :string)
|
||||||
|
(merge-rule "\IeC {\^C}" "Ĉ" :string)
|
||||||
|
(merge-rule "\IeC {\.c}" "ċ" :string)
|
||||||
|
(merge-rule "\IeC {\.C}" "Ċ" :string)
|
||||||
|
(merge-rule "\IeC {\c s}" "ş" :string)
|
||||||
|
(merge-rule "\IeC {\c S}" "Ş" :string)
|
||||||
|
(merge-rule "\IeC {\c t}" "ţ" :string)
|
||||||
|
(merge-rule "\IeC {\c T}" "Ţ" :string)
|
||||||
|
(merge-rule "\IeC {\-}" "" :string); soft hyphen
|
||||||
|
(merge-rule "\IeC {\textdiv }" "÷" :string)
|
||||||
|
(merge-rule "\IeC {\'e}" "é" :string)
|
||||||
|
(merge-rule "\IeC {\'E}" "É" :string)
|
||||||
|
(merge-rule "\IeC {\`e}" "è" :string)
|
||||||
|
(merge-rule "\IeC {\`E}" "È" :string)
|
||||||
|
(merge-rule "\IeC {\^e}" "ê" :string)
|
||||||
|
(merge-rule "\IeC {\^E}" "Ê" :string)
|
||||||
|
(merge-rule "\IeC {\~"e}" "ë" :string)
|
||||||
|
(merge-rule "\IeC {\~"E}" "Ë" :string)
|
||||||
|
(merge-rule "\IeC {\^g}" "ĝ" :string)
|
||||||
|
(merge-rule "\IeC {\^G}" "Ĝ" :string)
|
||||||
|
(merge-rule "\IeC {\.g}" "ġ" :string)
|
||||||
|
(merge-rule "\IeC {\.G}" "Ġ" :string)
|
||||||
|
(merge-rule "\IeC {\^h}" "ĥ" :string)
|
||||||
|
(merge-rule "\IeC {\^H}" "Ĥ" :string)
|
||||||
|
(merge-rule "\IeC {\H o}" "ő" :string)
|
||||||
|
(merge-rule "\IeC {\H O}" "Ő" :string)
|
||||||
|
(merge-rule "\IeC {\textacutedbl }" "˝" :string)
|
||||||
|
(merge-rule "\IeC {\H u}" "ű" :string)
|
||||||
|
(merge-rule "\IeC {\H U}" "Ű" :string)
|
||||||
|
(merge-rule "\IeC {\ae }" "æ" :string)
|
||||||
|
(merge-rule "\IeC {\AE }" "Æ" :string)
|
||||||
|
(merge-rule "\IeC {\textcopyright }" "©" :string)
|
||||||
|
(merge-rule "\IeC {\c \ }" "¸" :string)
|
||||||
|
(merge-rule "\IeC {\dh }" "ð" :string)
|
||||||
|
(merge-rule "\IeC {\DH }" "Ð" :string)
|
||||||
|
(merge-rule "\IeC {\dj }" "đ" :string)
|
||||||
|
(merge-rule "\IeC {\DJ }" "Đ" :string)
|
||||||
|
(merge-rule "\IeC {\guillemotleft }" "«" :string)
|
||||||
|
(merge-rule "\IeC {\guillemotright }" "»" :string)
|
||||||
|
(merge-rule "\IeC {\'\i }" "í" :string)
|
||||||
|
(merge-rule "\IeC {\`\i }" "ì" :string)
|
||||||
|
(merge-rule "\IeC {\^\i }" "î" :string)
|
||||||
|
(merge-rule "\IeC {\~"\i }" "ï" :string)
|
||||||
|
(merge-rule "\IeC {\i }" "ı" :string)
|
||||||
|
(merge-rule "\IeC {\^\j }" "ĵ" :string)
|
||||||
|
(merge-rule "\IeC {\k {}}" "˛" :string)
|
||||||
|
(merge-rule "\IeC {\l }" "ł" :string)
|
||||||
|
(merge-rule "\IeC {\L }" "Ł" :string)
|
||||||
|
(merge-rule "\IeC {\nobreakspace }" " " :string)
|
||||||
|
(merge-rule "\IeC {\o }" "ø" :string)
|
||||||
|
(merge-rule "\IeC {\O }" "Ø" :string)
|
||||||
|
(merge-rule "\IeC {\textsterling }" "£" :string)
|
||||||
|
(merge-rule "\IeC {\textparagraph }" "¶" :string)
|
||||||
|
(merge-rule "\IeC {\ss }" "ß" :string)
|
||||||
|
(merge-rule "\IeC {\textsection }" "§" :string)
|
||||||
|
(merge-rule "\IeC {\textbrokenbar }" "¦" :string)
|
||||||
|
(merge-rule "\IeC {\textcent }" "¢" :string)
|
||||||
|
(merge-rule "\IeC {\textcurrency }" "¤" :string)
|
||||||
|
(merge-rule "\IeC {\textdegree }" "°" :string)
|
||||||
|
(merge-rule "\IeC {\textexclamdown }" "¡" :string)
|
||||||
|
(merge-rule "\IeC {\texthbar }" "ħ" :string)
|
||||||
|
(merge-rule "\IeC {\textHbar }" "Ħ" :string)
|
||||||
|
(merge-rule "\IeC {\textonehalf }" "½" :string)
|
||||||
|
(merge-rule "\IeC {\textonequarter }" "¼" :string)
|
||||||
|
(merge-rule "\IeC {\textordfeminine }" "ª" :string)
|
||||||
|
(merge-rule "\IeC {\textordmasculine }" "º" :string)
|
||||||
|
(merge-rule "\IeC {\textperiodcentered }" "·" :string)
|
||||||
|
(merge-rule "\IeC {\textquestiondown }" "¿" :string)
|
||||||
|
(merge-rule "\IeC {\textregistered }" "®" :string)
|
||||||
|
(merge-rule "\IeC {\textthreequarters }" "¾" :string)
|
||||||
|
(merge-rule "\IeC {\textyen }" "¥" :string)
|
||||||
|
(merge-rule "\IeC {\th }" "þ" :string)
|
||||||
|
(merge-rule "\IeC {\TH }" "Þ" :string)
|
||||||
|
(merge-rule "\IeC {\'I}" "Í" :string)
|
||||||
|
(merge-rule "\IeC {\`I}" "Ì" :string)
|
||||||
|
(merge-rule "\IeC {\^I}" "Î" :string)
|
||||||
|
(merge-rule "\IeC {\~"I}" "Ï" :string)
|
||||||
|
(merge-rule "\IeC {\.I}" "İ" :string)
|
||||||
|
(merge-rule "\IeC {\^J}" "Ĵ" :string)
|
||||||
|
(merge-rule "\IeC {\k a}" "ą" :string)
|
||||||
|
(merge-rule "\IeC {\k A}" "Ą" :string)
|
||||||
|
(merge-rule "\IeC {\k e}" "ę" :string)
|
||||||
|
(merge-rule "\IeC {\k E}" "Ę" :string)
|
||||||
|
(merge-rule "\IeC {\'l}" "ĺ" :string)
|
||||||
|
(merge-rule "\IeC {\'L}" "Ĺ" :string)
|
||||||
|
(merge-rule "\IeC {\textlnot }" "¬" :string)
|
||||||
|
(merge-rule "\IeC {\textmu }" "µ" :string)
|
||||||
|
(merge-rule "\IeC {\'n}" "ń" :string)
|
||||||
|
(merge-rule "\IeC {\'N}" "Ń" :string)
|
||||||
|
(merge-rule "\IeC {\~~n}" "ñ" :string)
|
||||||
|
(merge-rule "\IeC {\~~N}" "Ñ" :string)
|
||||||
|
(merge-rule "\IeC {\'o}" "ó" :string)
|
||||||
|
(merge-rule "\IeC {\'O}" "Ó" :string)
|
||||||
|
(merge-rule "\IeC {\`o}" "ò" :string)
|
||||||
|
(merge-rule "\IeC {\`O}" "Ò" :string)
|
||||||
|
(merge-rule "\IeC {\^o}" "ô" :string)
|
||||||
|
(merge-rule "\IeC {\^O}" "Ô" :string)
|
||||||
|
(merge-rule "\IeC {\~"o}" "ö" :string)
|
||||||
|
(merge-rule "\IeC {\~"O}" "Ö" :string)
|
||||||
|
(merge-rule "\IeC {\~~o}" "õ" :string)
|
||||||
|
(merge-rule "\IeC {\~~O}" "Õ" :string)
|
||||||
|
(merge-rule "\IeC {\textpm }" "±" :string)
|
||||||
|
(merge-rule "\IeC {\r a}" "å" :string)
|
||||||
|
(merge-rule "\IeC {\r A}" "Å" :string)
|
||||||
|
(merge-rule "\IeC {\'r}" "ŕ" :string)
|
||||||
|
(merge-rule "\IeC {\'R}" "Ŕ" :string)
|
||||||
|
(merge-rule "\IeC {\r u}" "ů" :string)
|
||||||
|
(merge-rule "\IeC {\r U}" "Ů" :string)
|
||||||
|
(merge-rule "\IeC {\'s}" "ś" :string)
|
||||||
|
(merge-rule "\IeC {\'S}" "Ś" :string)
|
||||||
|
(merge-rule "\IeC {\^s}" "ŝ" :string)
|
||||||
|
(merge-rule "\IeC {\^S}" "Ŝ" :string)
|
||||||
|
(merge-rule "\IeC {\textasciidieresis }" "¨" :string)
|
||||||
|
(merge-rule "\IeC {\textasciimacron }" "¯" :string)
|
||||||
|
(merge-rule "\IeC {\.{}}" "˙" :string)
|
||||||
|
(merge-rule "\IeC {\textasciiacute }" "´" :string)
|
||||||
|
(merge-rule "\IeC {\texttimes }" "×" :string)
|
||||||
|
(merge-rule "\IeC {\u a}" "ă" :string)
|
||||||
|
(merge-rule "\IeC {\u A}" "Ă" :string)
|
||||||
|
(merge-rule "\IeC {\u g}" "ğ" :string)
|
||||||
|
(merge-rule "\IeC {\u G}" "Ğ" :string)
|
||||||
|
(merge-rule "\IeC {\textasciibreve }" "˘" :string)
|
||||||
|
(merge-rule "\IeC {\'u}" "ú" :string)
|
||||||
|
(merge-rule "\IeC {\'U}" "Ú" :string)
|
||||||
|
(merge-rule "\IeC {\`u}" "ù" :string)
|
||||||
|
(merge-rule "\IeC {\`U}" "Ù" :string)
|
||||||
|
(merge-rule "\IeC {\^u}" "û" :string)
|
||||||
|
(merge-rule "\IeC {\^U}" "Û" :string)
|
||||||
|
(merge-rule "\IeC {\~"u}" "ü" :string)
|
||||||
|
(merge-rule "\IeC {\~"U}" "Ü" :string)
|
||||||
|
(merge-rule "\IeC {\u u}" "ŭ" :string)
|
||||||
|
(merge-rule "\IeC {\u U}" "Ŭ" :string)
|
||||||
|
(merge-rule "\IeC {\v c}" "č" :string)
|
||||||
|
(merge-rule "\IeC {\v C}" "Č" :string)
|
||||||
|
(merge-rule "\IeC {\v d}" "ď" :string)
|
||||||
|
(merge-rule "\IeC {\v D}" "Ď" :string)
|
||||||
|
(merge-rule "\IeC {\v e}" "ě" :string)
|
||||||
|
(merge-rule "\IeC {\v E}" "Ě" :string)
|
||||||
|
(merge-rule "\IeC {\v l}" "ľ" :string)
|
||||||
|
(merge-rule "\IeC {\v L}" "Ľ" :string)
|
||||||
|
(merge-rule "\IeC {\v n}" "ň" :string)
|
||||||
|
(merge-rule "\IeC {\v N}" "Ň" :string)
|
||||||
|
(merge-rule "\IeC {\v r}" "ř" :string)
|
||||||
|
(merge-rule "\IeC {\v R}" "Ř" :string)
|
||||||
|
(merge-rule "\IeC {\v s}" "š" :string)
|
||||||
|
(merge-rule "\IeC {\v S}" "Š" :string)
|
||||||
|
(merge-rule "\IeC {\textasciicaron }" "ˇ" :string)
|
||||||
|
(merge-rule "\IeC {\v t}" "ť" :string)
|
||||||
|
(merge-rule "\IeC {\v T}" "Ť" :string)
|
||||||
|
(merge-rule "\IeC {\v z}" "ž" :string)
|
||||||
|
(merge-rule "\IeC {\v Z}" "Ž" :string)
|
||||||
|
(merge-rule "\IeC {\'y}" "ý" :string)
|
||||||
|
(merge-rule "\IeC {\'Y}" "Ý" :string)
|
||||||
|
(merge-rule "\IeC {\~"y}" "ÿ" :string)
|
||||||
|
(merge-rule "\IeC {\'z}" "ź" :string)
|
||||||
|
(merge-rule "\IeC {\'Z}" "Ź" :string)
|
||||||
|
(merge-rule "\IeC {\.z}" "ż" :string)
|
||||||
|
(merge-rule "\IeC {\.Z}" "Ż" :string)
|
||||||
|
;; letters not in Latin1, 2, 3 but available in TeX T1 font encoding
|
||||||
|
(merge-rule "\IeC {\~"Y}" "Ÿ" :string)
|
||||||
|
(merge-rule "\IeC {\NG }" "Ŋ" :string)
|
||||||
|
(merge-rule "\IeC {\ng }" "ŋ" :string)
|
||||||
|
(merge-rule "\IeC {\OE }" "Œ" :string)
|
||||||
|
(merge-rule "\IeC {\oe }" "œ" :string)
|
||||||
|
(merge-rule "\IeC {\IJ }" "IJ" :string)
|
||||||
|
(merge-rule "\IeC {\ij }" "ij" :string)
|
||||||
|
(merge-rule "\IeC {\j }" "ȷ" :string)
|
||||||
|
(merge-rule "\IeC {\SS }" "ẞ" :string)
|
||||||
607
source/frUpwork/project_spec/project_spec/LatinRules.xdy
Normal file
607
source/frUpwork/project_spec/project_spec/LatinRules.xdy
Normal file
|
|
@ -0,0 +1,607 @@
|
||||||
|
;; style file for xindy
|
||||||
|
;; filename: LatinRules.xdy
|
||||||
|
;;
|
||||||
|
;; It is based upon xindy's files lang/general/utf8.xdy and
|
||||||
|
;; lang/general/utf8-lang.xdy which implement
|
||||||
|
;; "a general sorting order for Western European languages"
|
||||||
|
;;
|
||||||
|
;; The aim for Sphinx is to be able to index in a Cyrillic document
|
||||||
|
;; also terms using the Latin alphabets, inclusive of letters
|
||||||
|
;; with diacritics. To this effect the xindy rules from lang/general
|
||||||
|
;; got manually re-coded to avoid collisions with the encoding
|
||||||
|
;; done by xindy for sorting words in Cyrillic languages, which was
|
||||||
|
;; observed not to use bytes with octal encoding 0o266 or higher.
|
||||||
|
;;
|
||||||
|
;; So here we use only 0o266 or higher bytes.
|
||||||
|
;; (Ŋ, ŋ, IJ, and ij are absent from
|
||||||
|
;; lang/general/utf8.xdy and not included here)
|
||||||
|
;; Contributed by the Sphinx team, 2018.
|
||||||
|
|
||||||
|
(define-letter-group "A" :prefixes ("¶"))
|
||||||
|
(define-letter-group "B" :after "A" :prefixes ("·"))
|
||||||
|
(define-letter-group "C" :after "B" :prefixes ("¸"))
|
||||||
|
(define-letter-group "D" :after "C" :prefixes ("¹"))
|
||||||
|
(define-letter-group "E" :after "D" :prefixes ("º"))
|
||||||
|
(define-letter-group "F" :after "E" :prefixes ("»"))
|
||||||
|
(define-letter-group "G" :after "F" :prefixes ("¼"))
|
||||||
|
(define-letter-group "H" :after "G" :prefixes ("½"))
|
||||||
|
(define-letter-group "I" :after "H" :prefixes ("¾"))
|
||||||
|
(define-letter-group "J" :after "I" :prefixes ("¿"))
|
||||||
|
(define-letter-group "K" :after "J" :prefixes ("À"))
|
||||||
|
(define-letter-group "L" :after "K" :prefixes ("Á"))
|
||||||
|
(define-letter-group "M" :after "L" :prefixes ("Â"))
|
||||||
|
(define-letter-group "N" :after "M" :prefixes ("Ã"))
|
||||||
|
(define-letter-group "O" :after "N" :prefixes ("Ä"))
|
||||||
|
(define-letter-group "P" :after "O" :prefixes ("È"))
|
||||||
|
(define-letter-group "Q" :after "P" :prefixes ("Ê"))
|
||||||
|
(define-letter-group "R" :after "Q" :prefixes ("Ë"))
|
||||||
|
(define-letter-group "S" :after "R" :prefixes ("Ð"))
|
||||||
|
(define-letter-group "T" :after "S" :prefixes ("Ú"))
|
||||||
|
(define-letter-group "U" :after "T" :prefixes ("à"))
|
||||||
|
(define-letter-group "V" :after "U" :prefixes ("å"))
|
||||||
|
(define-letter-group "W" :after "V" :prefixes ("æ"))
|
||||||
|
(define-letter-group "X" :after "W" :prefixes ("ë"))
|
||||||
|
(define-letter-group "Y" :after "X" :prefixes ("í"))
|
||||||
|
(define-letter-group "Z" :after "Y" :prefixes ("ð"))
|
||||||
|
|
||||||
|
(define-rule-set "sphinx-xy-alphabetize"
|
||||||
|
|
||||||
|
:rules (("À" "¶" :string)
|
||||||
|
("Ä‚" "¶" :string)
|
||||||
|
("â" "¶" :string)
|
||||||
|
("Ä" "¶" :string)
|
||||||
|
("Ã " "¶" :string)
|
||||||
|
("Ã…" "¶" :string)
|
||||||
|
("Ã" "¶" :string)
|
||||||
|
("Ã<>" "¶" :string)
|
||||||
|
("á" "¶" :string)
|
||||||
|
("ã" "¶" :string)
|
||||||
|
("Â" "¶" :string)
|
||||||
|
("ă" "¶" :string)
|
||||||
|
("Ã¥" "¶" :string)
|
||||||
|
("Ä…" "¶" :string)
|
||||||
|
("ä" "¶" :string)
|
||||||
|
("Ä„" "¶" :string)
|
||||||
|
("æ" "¶º" :string)
|
||||||
|
("Æ" "¶º" :string)
|
||||||
|
("ć" "¸" :string)
|
||||||
|
("ĉ" "¸" :string)
|
||||||
|
("ç" "¸" :string)
|
||||||
|
("ÄŒ" "¸" :string)
|
||||||
|
("Ä<>" "¸" :string)
|
||||||
|
("Ĉ" "¸" :string)
|
||||||
|
("Ç" "¸" :string)
|
||||||
|
("Ć" "¸" :string)
|
||||||
|
("Ä<>" "¹" :string)
|
||||||
|
("Ä<>" "¹" :string)
|
||||||
|
("ÄŽ" "¹" :string)
|
||||||
|
("Ä‘" "¹" :string)
|
||||||
|
("ê" "º" :string)
|
||||||
|
("Ę" "º" :string)
|
||||||
|
("Äš" "º" :string)
|
||||||
|
("ë" "º" :string)
|
||||||
|
("Ä›" "º" :string)
|
||||||
|
("é" "º" :string)
|
||||||
|
("È" "º" :string)
|
||||||
|
("Ë" "º" :string)
|
||||||
|
("É" "º" :string)
|
||||||
|
("è" "º" :string)
|
||||||
|
("Ê" "º" :string)
|
||||||
|
("Ä™" "º" :string)
|
||||||
|
("Ä<>" "¼" :string)
|
||||||
|
("ÄŸ" "¼" :string)
|
||||||
|
("Äž" "¼" :string)
|
||||||
|
("Äœ" "¼" :string)
|
||||||
|
("Ä¥" "½" :string)
|
||||||
|
("Ĥ" "½" :string)
|
||||||
|
("Ã<>" "¾" :string)
|
||||||
|
("Ã<>" "¾" :string)
|
||||||
|
("ï" "¾" :string)
|
||||||
|
("ÃŽ" "¾" :string)
|
||||||
|
("î" "¾" :string)
|
||||||
|
("ı" "¾" :string)
|
||||||
|
("İ" "¾" :string)
|
||||||
|
("Ã" "¾" :string)
|
||||||
|
("ÃŒ" "¾" :string)
|
||||||
|
("ì" "¾" :string)
|
||||||
|
("Ä´" "¿" :string)
|
||||||
|
("ĵ" "¿" :string)
|
||||||
|
("Å‚" "Á" :string)
|
||||||
|
("Å<>" "Á" :string)
|
||||||
|
("ľ" "Á" :string)
|
||||||
|
("Ľ" "Á" :string)
|
||||||
|
("Å„" "Ã" :string)
|
||||||
|
("Ń" "Ã" :string)
|
||||||
|
("ñ" "Ã" :string)
|
||||||
|
("ň" "Ã" :string)
|
||||||
|
("Ñ" "Ã" :string)
|
||||||
|
("Ň" "Ã" :string)
|
||||||
|
("Õ" "Ä" :string)
|
||||||
|
("Å<>" "Ä" :string)
|
||||||
|
("ó" "Ä" :string)
|
||||||
|
("ö" "Ä" :string)
|
||||||
|
("ô" "Ä" :string)
|
||||||
|
("Å‘" "Ä" :string)
|
||||||
|
("Ø" "Ä" :string)
|
||||||
|
("Ö" "Ä" :string)
|
||||||
|
("õ" "Ä" :string)
|
||||||
|
("Ô" "Ä" :string)
|
||||||
|
("ø" "Ä" :string)
|
||||||
|
("Ó" "Ä" :string)
|
||||||
|
("Ã’" "Ä" :string)
|
||||||
|
("ò" "Ä" :string)
|
||||||
|
("œ" "ĺ" :string)
|
||||||
|
("Œ" "ĺ" :string)
|
||||||
|
("Ř" "Ë" :string)
|
||||||
|
("Å™" "Ë" :string)
|
||||||
|
("Å”" "Ë" :string)
|
||||||
|
("Å•" "Ë" :string)
|
||||||
|
("Å<>" "Ð" :string)
|
||||||
|
("Åš" "Ð" :string)
|
||||||
|
("È™" "Ð" :string)
|
||||||
|
("ÅŸ" "Ð" :string)
|
||||||
|
("Åœ" "Ð" :string)
|
||||||
|
("Å›" "Ð" :string)
|
||||||
|
("Ș" "Ð" :string)
|
||||||
|
("Å¡" "Ð" :string)
|
||||||
|
("Åž" "Ð" :string)
|
||||||
|
("Å " "Ð" :string)
|
||||||
|
("ß" "ÐÐ" :string)
|
||||||
|
("Èš" "Ú" :string)
|
||||||
|
("Ť" "Ú" :string)
|
||||||
|
("È›" "Ú" :string)
|
||||||
|
("Å¥" "Ú" :string)
|
||||||
|
("û" "à" :string)
|
||||||
|
("Å" "à" :string)
|
||||||
|
("ů" "à" :string)
|
||||||
|
("ű" "à" :string)
|
||||||
|
("ù" "à" :string)
|
||||||
|
("Ŭ" "à" :string)
|
||||||
|
("Ù" "à" :string)
|
||||||
|
("Ű" "à" :string)
|
||||||
|
("Ü" "à" :string)
|
||||||
|
("Å®" "à" :string)
|
||||||
|
("ú" "à" :string)
|
||||||
|
("Ú" "à" :string)
|
||||||
|
("Û" "à" :string)
|
||||||
|
("ü" "à" :string)
|
||||||
|
("ÿ" "í" :string)
|
||||||
|
("Ã<>" "í" :string)
|
||||||
|
("Ÿ" "í" :string)
|
||||||
|
("ý" "í" :string)
|
||||||
|
("Å»" "ð" :string)
|
||||||
|
("Ž" "ð" :string)
|
||||||
|
("Ź" "ð" :string)
|
||||||
|
("ž" "ð" :string)
|
||||||
|
("ż" "ð" :string)
|
||||||
|
("ź" "ð" :string)
|
||||||
|
("a" "¶" :string)
|
||||||
|
("A" "¶" :string)
|
||||||
|
("b" "·" :string)
|
||||||
|
("B" "·" :string)
|
||||||
|
("c" "¸" :string)
|
||||||
|
("C" "¸" :string)
|
||||||
|
("d" "¹" :string)
|
||||||
|
("D" "¹" :string)
|
||||||
|
("e" "º" :string)
|
||||||
|
("E" "º" :string)
|
||||||
|
("F" "»" :string)
|
||||||
|
("f" "»" :string)
|
||||||
|
("G" "¼" :string)
|
||||||
|
("g" "¼" :string)
|
||||||
|
("H" "½" :string)
|
||||||
|
("h" "½" :string)
|
||||||
|
("i" "¾" :string)
|
||||||
|
("I" "¾" :string)
|
||||||
|
("J" "¿" :string)
|
||||||
|
("j" "¿" :string)
|
||||||
|
("K" "À" :string)
|
||||||
|
("k" "À" :string)
|
||||||
|
("L" "Á" :string)
|
||||||
|
("l" "Á" :string)
|
||||||
|
("M" "Â" :string)
|
||||||
|
("m" "Â" :string)
|
||||||
|
("n" "Ã" :string)
|
||||||
|
("N" "Ã" :string)
|
||||||
|
("O" "Ä" :string)
|
||||||
|
("o" "Ä" :string)
|
||||||
|
("p" "È" :string)
|
||||||
|
("P" "È" :string)
|
||||||
|
("Q" "Ê" :string)
|
||||||
|
("q" "Ê" :string)
|
||||||
|
("r" "Ë" :string)
|
||||||
|
("R" "Ë" :string)
|
||||||
|
("S" "Ð" :string)
|
||||||
|
("s" "Ð" :string)
|
||||||
|
("t" "Ú" :string)
|
||||||
|
("T" "Ú" :string)
|
||||||
|
("u" "à" :string)
|
||||||
|
("U" "à" :string)
|
||||||
|
("v" "å" :string)
|
||||||
|
("V" "å" :string)
|
||||||
|
("W" "æ" :string)
|
||||||
|
("w" "æ" :string)
|
||||||
|
("x" "ë" :string)
|
||||||
|
("X" "ë" :string)
|
||||||
|
("Y" "í" :string)
|
||||||
|
("y" "í" :string)
|
||||||
|
("z" "ð" :string)
|
||||||
|
("Z" "ð" :string)
|
||||||
|
))
|
||||||
|
|
||||||
|
(define-rule-set "sphinx-xy-resolve-diacritics"
|
||||||
|
|
||||||
|
:rules (("Ĥ" "£" :string)
|
||||||
|
("ó" "£" :string)
|
||||||
|
("ľ" "£" :string)
|
||||||
|
("Ř" "£" :string)
|
||||||
|
("Ä<>" "£" :string)
|
||||||
|
("Ä<>" "£" :string)
|
||||||
|
("Äš" "£" :string)
|
||||||
|
("Ä¥" "£" :string)
|
||||||
|
("ÄŒ" "£" :string)
|
||||||
|
("Ä´" "£" :string)
|
||||||
|
("Ä›" "£" :string)
|
||||||
|
("ž" "£" :string)
|
||||||
|
("ÄŽ" "£" :string)
|
||||||
|
("Å™" "£" :string)
|
||||||
|
("Ž" "£" :string)
|
||||||
|
("ı" "£" :string)
|
||||||
|
("Ť" "£" :string)
|
||||||
|
("á" "£" :string)
|
||||||
|
("Ä<>" "£" :string)
|
||||||
|
("Ã<>" "£" :string)
|
||||||
|
("ň" "£" :string)
|
||||||
|
("Å " "£" :string)
|
||||||
|
("Ň" "£" :string)
|
||||||
|
("ĵ" "£" :string)
|
||||||
|
("Å¥" "£" :string)
|
||||||
|
("Ó" "£" :string)
|
||||||
|
("ý" "£" :string)
|
||||||
|
("Äœ" "£" :string)
|
||||||
|
("Ú" "£" :string)
|
||||||
|
("Ľ" "£" :string)
|
||||||
|
("Å¡" "£" :string)
|
||||||
|
("Ã<>" "£" :string)
|
||||||
|
("ú" "£" :string)
|
||||||
|
("Åš" "¤" :string)
|
||||||
|
("ć" "¤" :string)
|
||||||
|
("Å<>" "¤" :string)
|
||||||
|
("Å‚" "¤" :string)
|
||||||
|
("Å„" "¤" :string)
|
||||||
|
("À" "¤" :string)
|
||||||
|
("Ź" "¤" :string)
|
||||||
|
("Ã " "¤" :string)
|
||||||
|
("Ń" "¤" :string)
|
||||||
|
("Ä<>" "¤" :string)
|
||||||
|
("ÿ" "¤" :string)
|
||||||
|
("Å›" "¤" :string)
|
||||||
|
("Äž" "¤" :string)
|
||||||
|
("ÄŸ" "¤" :string)
|
||||||
|
("Ù" "¤" :string)
|
||||||
|
("İ" "¤" :string)
|
||||||
|
("Ä‘" "¤" :string)
|
||||||
|
("ù" "¤" :string)
|
||||||
|
("Èš" "¤" :string)
|
||||||
|
("é" "¤" :string)
|
||||||
|
("Å•" "¤" :string)
|
||||||
|
("Ć" "¤" :string)
|
||||||
|
("È›" "¤" :string)
|
||||||
|
("ò" "¤" :string)
|
||||||
|
("ź" "¤" :string)
|
||||||
|
("Ã’" "¤" :string)
|
||||||
|
("Ÿ" "¤" :string)
|
||||||
|
("Å”" "¤" :string)
|
||||||
|
("É" "¤" :string)
|
||||||
|
("ĉ" "¥" :string)
|
||||||
|
("ô" "¥" :string)
|
||||||
|
("Ã<>" "¥" :string)
|
||||||
|
("Å<>" "¥" :string)
|
||||||
|
("Å»" "¥" :string)
|
||||||
|
("Ä‚" "¥" :string)
|
||||||
|
("Åœ" "¥" :string)
|
||||||
|
("ñ" "¥" :string)
|
||||||
|
("Å" "¥" :string)
|
||||||
|
("Ã" "¥" :string)
|
||||||
|
("È" "¥" :string)
|
||||||
|
("Ô" "¥" :string)
|
||||||
|
("Ŭ" "¥" :string)
|
||||||
|
("ż" "¥" :string)
|
||||||
|
("Ñ" "¥" :string)
|
||||||
|
("è" "¥" :string)
|
||||||
|
("Ĉ" "¥" :string)
|
||||||
|
("ă" "¥" :string)
|
||||||
|
("â" "¦" :string)
|
||||||
|
("û" "¦" :string)
|
||||||
|
("ê" "¦" :string)
|
||||||
|
("Õ" "¦" :string)
|
||||||
|
("õ" "¦" :string)
|
||||||
|
("È™" "¦" :string)
|
||||||
|
("ç" "¦" :string)
|
||||||
|
("Â" "¦" :string)
|
||||||
|
("Ê" "¦" :string)
|
||||||
|
("Û" "¦" :string)
|
||||||
|
("Ç" "¦" :string)
|
||||||
|
("ì" "¦" :string)
|
||||||
|
("ÃŒ" "¦" :string)
|
||||||
|
("Ș" "¦" :string)
|
||||||
|
("ö" "§" :string)
|
||||||
|
("Ö" "§" :string)
|
||||||
|
("ÅŸ" "§" :string)
|
||||||
|
("ů" "§" :string)
|
||||||
|
("ë" "§" :string)
|
||||||
|
("ã" "§" :string)
|
||||||
|
("î" "§" :string)
|
||||||
|
("ÃŽ" "§" :string)
|
||||||
|
("Ã" "§" :string)
|
||||||
|
("Åž" "§" :string)
|
||||||
|
("Å®" "§" :string)
|
||||||
|
("Ë" "§" :string)
|
||||||
|
("ï" "¨" :string)
|
||||||
|
("Å<>" "¨" :string)
|
||||||
|
("Ã<>" "¨" :string)
|
||||||
|
("Ę" "¨" :string)
|
||||||
|
("Å‘" "¨" :string)
|
||||||
|
("Ü" "¨" :string)
|
||||||
|
("Ã…" "¨" :string)
|
||||||
|
("ü" "¨" :string)
|
||||||
|
("Ä™" "¨" :string)
|
||||||
|
("Ã¥" "¨" :string)
|
||||||
|
("Ä" "©" :string)
|
||||||
|
("ű" "©" :string)
|
||||||
|
("Ø" "©" :string)
|
||||||
|
("ø" "©" :string)
|
||||||
|
("Ű" "©" :string)
|
||||||
|
("ä" "©" :string)
|
||||||
|
("Ä„" "ª" :string)
|
||||||
|
("Ä…" "ª" :string)
|
||||||
|
("Å“" "ÿ" :string)
|
||||||
|
("ß" "ÿ" :string)
|
||||||
|
("Æ" "ÿ" :string)
|
||||||
|
("Å’" "ÿ" :string)
|
||||||
|
("æ" "ÿ" :string)
|
||||||
|
("e" "¢" :string)
|
||||||
|
("t" "¢" :string)
|
||||||
|
("L" "¢" :string)
|
||||||
|
("Y" "¢" :string)
|
||||||
|
("J" "¢" :string)
|
||||||
|
("a" "¢" :string)
|
||||||
|
("p" "¢" :string)
|
||||||
|
("u" "¢" :string)
|
||||||
|
("j" "¢" :string)
|
||||||
|
("b" "¢" :string)
|
||||||
|
("G" "¢" :string)
|
||||||
|
("U" "¢" :string)
|
||||||
|
("F" "¢" :string)
|
||||||
|
("H" "¢" :string)
|
||||||
|
("i" "¢" :string)
|
||||||
|
("z" "¢" :string)
|
||||||
|
("c" "¢" :string)
|
||||||
|
("l" "¢" :string)
|
||||||
|
("A" "¢" :string)
|
||||||
|
("Q" "¢" :string)
|
||||||
|
("w" "¢" :string)
|
||||||
|
("D" "¢" :string)
|
||||||
|
("R" "¢" :string)
|
||||||
|
("d" "¢" :string)
|
||||||
|
("s" "¢" :string)
|
||||||
|
("r" "¢" :string)
|
||||||
|
("k" "¢" :string)
|
||||||
|
("v" "¢" :string)
|
||||||
|
("m" "¢" :string)
|
||||||
|
("P" "¢" :string)
|
||||||
|
("y" "¢" :string)
|
||||||
|
("K" "¢" :string)
|
||||||
|
("q" "¢" :string)
|
||||||
|
("S" "¢" :string)
|
||||||
|
("I" "¢" :string)
|
||||||
|
("C" "¢" :string)
|
||||||
|
("M" "¢" :string)
|
||||||
|
("Z" "¢" :string)
|
||||||
|
("T" "¢" :string)
|
||||||
|
("W" "¢" :string)
|
||||||
|
("B" "¢" :string)
|
||||||
|
("h" "¢" :string)
|
||||||
|
("x" "¢" :string)
|
||||||
|
("X" "¢" :string)
|
||||||
|
("f" "¢" :string)
|
||||||
|
("E" "¢" :string)
|
||||||
|
("V" "¢" :string)
|
||||||
|
("N" "¢" :string)
|
||||||
|
("O" "¢" :string)
|
||||||
|
("o" "¢" :string)
|
||||||
|
("g" "¢" :string)
|
||||||
|
("n" "¢" :string)
|
||||||
|
))
|
||||||
|
|
||||||
|
(define-rule-set "sphinx-xy-resolve-case"
|
||||||
|
|
||||||
|
:rules (("Ú" "8" :string)
|
||||||
|
("Ÿ" "8" :string)
|
||||||
|
("Ç" "8" :string)
|
||||||
|
("Ĉ" "8" :string)
|
||||||
|
("Å”" "8" :string)
|
||||||
|
("Ľ" "8" :string)
|
||||||
|
("Å®" "8" :string)
|
||||||
|
("Ã<>" "8" :string)
|
||||||
|
("É" "8" :string)
|
||||||
|
("Ë" "8" :string)
|
||||||
|
("Ș" "8" :string)
|
||||||
|
("Ì" "8" :string)
|
||||||
|
("Ê" "8" :string)
|
||||||
|
("Ň" "8" :string)
|
||||||
|
("Ä„" "8" :string)
|
||||||
|
("Å " "8" :string)
|
||||||
|
("Û" "8" :string)
|
||||||
|
("Åž" "8" :string)
|
||||||
|
("Ć" "8" :string)
|
||||||
|
("Ã’" "8" :string)
|
||||||
|
("Ĝ" "8" :string)
|
||||||
|
("Ñ" "8" :string)
|
||||||
|
("Ó" "8" :string)
|
||||||
|
("ÃŽ" "8" :string)
|
||||||
|
("Ã<>" "8" :string)
|
||||||
|
("Ã" "8" :string)
|
||||||
|
("Èš" "8" :string)
|
||||||
|
("Ã…" "8" :string)
|
||||||
|
("Äž" "8" :string)
|
||||||
|
("Ü" "8" :string)
|
||||||
|
("È" "8" :string)
|
||||||
|
("Ô" "8" :string)
|
||||||
|
("İ" "8" :string)
|
||||||
|
("Ű" "8" :string)
|
||||||
|
("Ù" "8" :string)
|
||||||
|
("Ŭ" "8" :string)
|
||||||
|
("Â" "8" :string)
|
||||||
|
("Ť" "8" :string)
|
||||||
|
("Ń" "8" :string)
|
||||||
|
("ÄŽ" "8" :string)
|
||||||
|
("Ź" "8" :string)
|
||||||
|
("Ž" "8" :string)
|
||||||
|
("Ä<>" "8" :string)
|
||||||
|
("Ŝ" "8" :string)
|
||||||
|
("Č" "8" :string)
|
||||||
|
("Ä´" "8" :string)
|
||||||
|
("Ö" "8" :string)
|
||||||
|
("Ø" "8" :string)
|
||||||
|
("Å»" "8" :string)
|
||||||
|
("Å<>" "8" :string)
|
||||||
|
("Ä‚" "8" :string)
|
||||||
|
("Äš" "8" :string)
|
||||||
|
("Å<>" "8" :string)
|
||||||
|
("Õ" "8" :string)
|
||||||
|
("Ę" "8" :string)
|
||||||
|
("Ã<>" "8" :string)
|
||||||
|
("À" "8" :string)
|
||||||
|
("Ĥ" "8" :string)
|
||||||
|
("Ä" "8" :string)
|
||||||
|
("Åš" "8" :string)
|
||||||
|
("Ř" "8" :string)
|
||||||
|
("Ã<>" "8" :string)
|
||||||
|
("Å’" "89" :string)
|
||||||
|
("Æ" "89" :string)
|
||||||
|
("ì" "9" :string)
|
||||||
|
("è" "9" :string)
|
||||||
|
("Ä…" "9" :string)
|
||||||
|
("Å¡" "9" :string)
|
||||||
|
("ú" "9" :string)
|
||||||
|
("Ã¥" "9" :string)
|
||||||
|
("ă" "9" :string)
|
||||||
|
("Ä™" "9" :string)
|
||||||
|
("ü" "9" :string)
|
||||||
|
("ź" "9" :string)
|
||||||
|
("ò" "9" :string)
|
||||||
|
("Å¥" "9" :string)
|
||||||
|
("È›" "9" :string)
|
||||||
|
("ĵ" "9" :string)
|
||||||
|
("Å•" "9" :string)
|
||||||
|
("ż" "9" :string)
|
||||||
|
("ä" "9" :string)
|
||||||
|
("ý" "9" :string)
|
||||||
|
("ù" "9" :string)
|
||||||
|
("á" "9" :string)
|
||||||
|
("é" "9" :string)
|
||||||
|
("Ä<>" "9" :string)
|
||||||
|
("ň" "9" :string)
|
||||||
|
("Å›" "9" :string)
|
||||||
|
("ø" "9" :string)
|
||||||
|
("Ã" "9" :string)
|
||||||
|
("Ä‘" "9" :string)
|
||||||
|
("ı" "9" :string)
|
||||||
|
("ÄŸ" "9" :string)
|
||||||
|
("î" "9" :string)
|
||||||
|
("ã" "9" :string)
|
||||||
|
("Ã " "9" :string)
|
||||||
|
("Å™" "9" :string)
|
||||||
|
("Å‘" "9" :string)
|
||||||
|
("ů" "9" :string)
|
||||||
|
("È™" "9" :string)
|
||||||
|
("ÿ" "9" :string)
|
||||||
|
("ë" "9" :string)
|
||||||
|
("Å" "9" :string)
|
||||||
|
("ç" "9" :string)
|
||||||
|
("ű" "9" :string)
|
||||||
|
("ñ" "9" :string)
|
||||||
|
("õ" "9" :string)
|
||||||
|
("Ä›" "9" :string)
|
||||||
|
("ÅŸ" "9" :string)
|
||||||
|
("ž" "9" :string)
|
||||||
|
("Ä<>" "9" :string)
|
||||||
|
("Å<>" "9" :string)
|
||||||
|
("Å„" "9" :string)
|
||||||
|
("û" "9" :string)
|
||||||
|
("Å‚" "9" :string)
|
||||||
|
("Ä<>" "9" :string)
|
||||||
|
("Ä¥" "9" :string)
|
||||||
|
("ê" "9" :string)
|
||||||
|
("ô" "9" :string)
|
||||||
|
("ĉ" "9" :string)
|
||||||
|
("â" "9" :string)
|
||||||
|
("ć" "9" :string)
|
||||||
|
("ï" "9" :string)
|
||||||
|
("ö" "9" :string)
|
||||||
|
("ľ" "9" :string)
|
||||||
|
("ó" "9" :string)
|
||||||
|
("æ" "99" :string)
|
||||||
|
("ß" "99" :string)
|
||||||
|
("Å“" "99" :string)
|
||||||
|
("N" "8" :string)
|
||||||
|
("V" "8" :string)
|
||||||
|
("O" "8" :string)
|
||||||
|
("X" "8" :string)
|
||||||
|
("E" "8" :string)
|
||||||
|
("P" "8" :string)
|
||||||
|
("K" "8" :string)
|
||||||
|
("T" "8" :string)
|
||||||
|
("Z" "8" :string)
|
||||||
|
("M" "8" :string)
|
||||||
|
("C" "8" :string)
|
||||||
|
("I" "8" :string)
|
||||||
|
("S" "8" :string)
|
||||||
|
("B" "8" :string)
|
||||||
|
("W" "8" :string)
|
||||||
|
("D" "8" :string)
|
||||||
|
("R" "8" :string)
|
||||||
|
("H" "8" :string)
|
||||||
|
("F" "8" :string)
|
||||||
|
("Q" "8" :string)
|
||||||
|
("A" "8" :string)
|
||||||
|
("G" "8" :string)
|
||||||
|
("U" "8" :string)
|
||||||
|
("J" "8" :string)
|
||||||
|
("Y" "8" :string)
|
||||||
|
("L" "8" :string)
|
||||||
|
("o" "9" :string)
|
||||||
|
("n" "9" :string)
|
||||||
|
("g" "9" :string)
|
||||||
|
("x" "9" :string)
|
||||||
|
("f" "9" :string)
|
||||||
|
("y" "9" :string)
|
||||||
|
("q" "9" :string)
|
||||||
|
("h" "9" :string)
|
||||||
|
("w" "9" :string)
|
||||||
|
("s" "9" :string)
|
||||||
|
("d" "9" :string)
|
||||||
|
("v" "9" :string)
|
||||||
|
("k" "9" :string)
|
||||||
|
("r" "9" :string)
|
||||||
|
("m" "9" :string)
|
||||||
|
("z" "9" :string)
|
||||||
|
("c" "9" :string)
|
||||||
|
("i" "9" :string)
|
||||||
|
("l" "9" :string)
|
||||||
|
("b" "9" :string)
|
||||||
|
("j" "9" :string)
|
||||||
|
("a" "9" :string)
|
||||||
|
("p" "9" :string)
|
||||||
|
("u" "9" :string)
|
||||||
|
("t" "9" :string)
|
||||||
|
("e" "9" :string)
|
||||||
|
))
|
||||||
|
|
||||||
|
(use-rule-set :run 0
|
||||||
|
:rule-set ("sphinx-xy-alphabetize"))
|
||||||
|
(use-rule-set :run 1
|
||||||
|
:rule-set ("sphinx-xy-resolve-diacritics"))
|
||||||
|
(use-rule-set :run 2
|
||||||
|
:rule-set ("sphinx-xy-resolve-case"))
|
||||||
81
source/frUpwork/project_spec/project_spec/Makefile
Normal file
81
source/frUpwork/project_spec/project_spec/Makefile
Normal file
|
|
@ -0,0 +1,81 @@
|
||||||
|
# Makefile for Sphinx LaTeX output
|
||||||
|
|
||||||
|
ALLDOCS = $(basename $(wildcard *.tex))
|
||||||
|
ALLPDF = $(addsuffix .pdf,$(ALLDOCS))
|
||||||
|
ALLDVI = $(addsuffix .dvi,$(ALLDOCS))
|
||||||
|
ALLPS = $(addsuffix .ps,$(ALLDOCS))
|
||||||
|
|
||||||
|
# Prefix for archive names
|
||||||
|
ARCHIVEPREFIX =
|
||||||
|
# Additional LaTeX options
|
||||||
|
LATEXOPTS =
|
||||||
|
# format: pdf or dvi
|
||||||
|
FMT = pdf
|
||||||
|
|
||||||
|
LATEX = latex
|
||||||
|
PDFLATEX = pdflatex
|
||||||
|
MAKEINDEX = makeindex
|
||||||
|
|
||||||
|
|
||||||
|
all: $(ALLPDF)
|
||||||
|
all-pdf: $(ALLPDF)
|
||||||
|
all-dvi: $(ALLDVI)
|
||||||
|
all-ps: $(ALLPS)
|
||||||
|
|
||||||
|
all-pdf-ja:
|
||||||
|
for f in *.pdf *.png *.gif *.jpg *.jpeg; do extractbb $$f; done
|
||||||
|
for f in *.tex; do pdflatex -kanji=utf8 $(LATEXOPTS) $$f; done
|
||||||
|
for f in *.tex; do pdflatex -kanji=utf8 $(LATEXOPTS) $$f; done
|
||||||
|
for f in *.tex; do pdflatex -kanji=utf8 $(LATEXOPTS) $$f; done
|
||||||
|
-for f in *.idx; do mendex -U -f -d "`basename $$f .idx`.dic" -s python.ist $$f; done
|
||||||
|
for f in *.tex; do pdflatex -kanji=utf8 $(LATEXOPTS) $$f; done
|
||||||
|
for f in *.tex; do pdflatex -kanji=utf8 $(LATEXOPTS) $$f; done
|
||||||
|
for f in *.dvi; do dvipdfmx $$f; done
|
||||||
|
|
||||||
|
zip: all-$(FMT)
|
||||||
|
mkdir $(ARCHIVEPREFIX)docs-$(FMT)
|
||||||
|
cp $(ALLPDF) $(ARCHIVEPREFIX)docs-$(FMT)
|
||||||
|
zip -q -r -9 $(ARCHIVEPREFIX)docs-$(FMT).zip $(ARCHIVEPREFIX)docs-$(FMT)
|
||||||
|
rm -r $(ARCHIVEPREFIX)docs-$(FMT)
|
||||||
|
|
||||||
|
tar: all-$(FMT)
|
||||||
|
mkdir $(ARCHIVEPREFIX)docs-$(FMT)
|
||||||
|
cp $(ALLPDF) $(ARCHIVEPREFIX)docs-$(FMT)
|
||||||
|
tar cf $(ARCHIVEPREFIX)docs-$(FMT).tar $(ARCHIVEPREFIX)docs-$(FMT)
|
||||||
|
rm -r $(ARCHIVEPREFIX)docs-$(FMT)
|
||||||
|
|
||||||
|
gz: tar
|
||||||
|
gzip -9 < $(ARCHIVEPREFIX)docs-$(FMT).tar > $(ARCHIVEPREFIX)docs-$(FMT).tar.gz
|
||||||
|
|
||||||
|
bz2: tar
|
||||||
|
bzip2 -9 -k $(ARCHIVEPREFIX)docs-$(FMT).tar
|
||||||
|
|
||||||
|
xz: tar
|
||||||
|
xz -9 -k $(ARCHIVEPREFIX)docs-$(FMT).tar
|
||||||
|
|
||||||
|
# The number of LaTeX runs is quite conservative, but I don't expect it
|
||||||
|
# to get run often, so the little extra time won't hurt.
|
||||||
|
%.dvi: %.tex
|
||||||
|
$(LATEX) $(LATEXOPTS) '$<'
|
||||||
|
$(LATEX) $(LATEXOPTS) '$<'
|
||||||
|
$(LATEX) $(LATEXOPTS) '$<'
|
||||||
|
-$(MAKEINDEX) -s python.ist '$(basename $<).idx'
|
||||||
|
$(LATEX) $(LATEXOPTS) '$<'
|
||||||
|
$(LATEX) $(LATEXOPTS) '$<'
|
||||||
|
|
||||||
|
%.pdf: %.tex
|
||||||
|
$(PDFLATEX) $(LATEXOPTS) '$<'
|
||||||
|
$(PDFLATEX) $(LATEXOPTS) '$<'
|
||||||
|
$(PDFLATEX) $(LATEXOPTS) '$<'
|
||||||
|
-$(MAKEINDEX) -s python.ist '$(basename $<).idx'
|
||||||
|
$(PDFLATEX) $(LATEXOPTS) '$<'
|
||||||
|
$(PDFLATEX) $(LATEXOPTS) '$<'
|
||||||
|
|
||||||
|
%.ps: %.dvi
|
||||||
|
dvips '$<'
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.log *.ind *.aux *.toc *.syn *.idx *.out *.ilg *.pla *.ps *.tar *.tar.gz *.tar.bz2 *.tar.xz $(ALLPDF) $(ALLDVI)
|
||||||
|
|
||||||
|
.PHONY: all all-pdf all-dvi all-ps clean zip tar gz bz2 xz
|
||||||
|
.PHONY: all-pdf-ja
|
||||||
76
source/frUpwork/project_spec/project_spec/conf.py
Normal file
76
source/frUpwork/project_spec/project_spec/conf.py
Normal file
|
|
@ -0,0 +1,76 @@
|
||||||
|
# Configuration file for the Sphinx documentation builder.
|
||||||
|
#
|
||||||
|
# This file only contains a selection of the most common options. For a full
|
||||||
|
# list see the documentation:
|
||||||
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||||
|
|
||||||
|
# -- Path setup --------------------------------------------------------------
|
||||||
|
|
||||||
|
# If extensions (or modules to document with autodoc) are in another directory,
|
||||||
|
# add these directories to sys.path here. If the directory is relative to the
|
||||||
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||||
|
#
|
||||||
|
# import os
|
||||||
|
# import sys
|
||||||
|
# sys.path.insert(0, os.path.abspath('.'))
|
||||||
|
|
||||||
|
|
||||||
|
# -- Project information -----------------------------------------------------
|
||||||
|
|
||||||
|
project = 'JMK Engineering Arc Flash Report Template'
|
||||||
|
copyright = '2024, Jeff MacKinnon'
|
||||||
|
author = 'Jeff MacKinnon'
|
||||||
|
|
||||||
|
|
||||||
|
# -- General configuration ---------------------------------------------------
|
||||||
|
|
||||||
|
# Add any Sphinx extension module names here, as strings. They can be
|
||||||
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||||
|
# ones.
|
||||||
|
extensions = [
|
||||||
|
]
|
||||||
|
source_suffix = {
|
||||||
|
'.rst': 'restructuredtext',
|
||||||
|
'.ipynb': 'myst-nb',
|
||||||
|
'.myst': 'myst-nb',
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
|
templates_path = ['_templates']
|
||||||
|
|
||||||
|
# List of patterns, relative to source directory, that match files and
|
||||||
|
# directories to ignore when looking for source files.
|
||||||
|
# This pattern also affects html_static_path and html_extra_path.
|
||||||
|
exclude_patterns = []
|
||||||
|
|
||||||
|
|
||||||
|
# -- Options for HTML output -------------------------------------------------
|
||||||
|
|
||||||
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||||
|
# a list of builtin themes.
|
||||||
|
#
|
||||||
|
html_theme = "sphinx_book_theme"
|
||||||
|
|
||||||
|
# Add any paths that contain custom static files (such as style sheets) here,
|
||||||
|
# relative to this directory. They are copied after the builtin static files,
|
||||||
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||||
|
html_static_path = ['_static']
|
||||||
|
|
||||||
|
# Latex setup
|
||||||
|
|
||||||
|
|
||||||
|
latex_additional_files = [
|
||||||
|
'_static/JMKEngineering-Logo-Small.jpg',
|
||||||
|
]
|
||||||
|
|
||||||
|
latex_elements = {
|
||||||
|
'pointsize':'12pt',
|
||||||
|
'classoptions': ',openany,oneside',
|
||||||
|
'preamble' : PREAMBLE,
|
||||||
|
'extrapackages': r'\usepackage{lipsum}',
|
||||||
|
}
|
||||||
|
|
||||||
|
latex_logo = '_static/JMKEngineering-Logo-Small.jpg'
|
||||||
|
|
||||||
|
latex_show_urls = 'inline'
|
||||||
71
source/frUpwork/project_spec/project_spec/document.aux
Normal file
71
source/frUpwork/project_spec/project_spec/document.aux
Normal file
|
|
@ -0,0 +1,71 @@
|
||||||
|
\relax
|
||||||
|
\providecommand\babel@aux[2]{}
|
||||||
|
\@nameuse{bbl@beforestart}
|
||||||
|
\providecommand\hyper@newdestlabel[2]{}
|
||||||
|
\providecommand\HyField@AuxAddToFields[1]{}
|
||||||
|
\providecommand\HyField@AuxAddToCoFields[2]{}
|
||||||
|
\pgfsyspdfmark {pgfid1}{20129219}{45513608}
|
||||||
|
\babel@aux{english}{}
|
||||||
|
\newlabel{index::doc}{{}{i}{}{section*.1}{}}
|
||||||
|
\pgfsyspdfmark {pgfid2}{20129219}{45513608}
|
||||||
|
\@writefile{toc}{\contentsline {chapter}{\numberline {1}Common}{ii}{chapter.1}\protected@file@percent }
|
||||||
|
\@writefile{lof}{\addvspace {10\p@ }}
|
||||||
|
\@writefile{lot}{\addvspace {10\p@ }}
|
||||||
|
\newlabel{260500:common}{{1}{ii}{Common}{chapter.1}{}}
|
||||||
|
\newlabel{260500::doc}{{1}{ii}{Common}{chapter.1}{}}
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {1.1}GENERAL}{ii}{section.1.1}\protected@file@percent }
|
||||||
|
\newlabel{260500:general}{{1.1}{ii}{GENERAL}{section.1.1}{}}
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {1.1.1}SCOPE}{ii}{subsection.1.1.1}\protected@file@percent }
|
||||||
|
\newlabel{260500:scope}{{1.1.1}{ii}{SCOPE}{subsection.1.1.1}{}}
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {1.1.2}SCHEDULE}{ii}{subsection.1.1.2}\protected@file@percent }
|
||||||
|
\newlabel{260500:schedule}{{1.1.2}{ii}{SCHEDULE}{subsection.1.1.2}{}}
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {1.1.3}STANDARDS AND REGULATIONS}{ii}{subsection.1.1.3}\protected@file@percent }
|
||||||
|
\newlabel{260500:standards-and-regulations}{{1.1.3}{ii}{STANDARDS AND REGULATIONS}{subsection.1.1.3}{}}
|
||||||
|
\pgfsyspdfmark {pgfid3}{20129219}{45513608}
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {1.1.4}DEFINITIONS}{iii}{subsection.1.1.4}\protected@file@percent }
|
||||||
|
\newlabel{260500:definitions}{{1.1.4}{iii}{DEFINITIONS}{subsection.1.1.4}{}}
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {1.1.5}ACRONYMS}{iii}{subsection.1.1.5}\protected@file@percent }
|
||||||
|
\newlabel{260500:acronyms}{{1.1.5}{iii}{ACRONYMS}{subsection.1.1.5}{}}
|
||||||
|
\pgfsyspdfmark {pgfid4}{20129219}{45513608}
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {1.2}PRODUCTS}{iv}{section.1.2}\protected@file@percent }
|
||||||
|
\newlabel{260500:products}{{1.2}{iv}{PRODUCTS}{section.1.2}{}}
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {1.2.1}MATERIALS AND EQUIPMENT}{iv}{subsection.1.2.1}\protected@file@percent }
|
||||||
|
\newlabel{260500:materials-and-equipment}{{1.2.1}{iv}{MATERIALS AND EQUIPMENT}{subsection.1.2.1}{}}
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {1.2.2}MATERIAL SUPPLIED BY OWNER}{iv}{subsection.1.2.2}\protected@file@percent }
|
||||||
|
\newlabel{260500:material-supplied-by-owner}{{1.2.2}{iv}{MATERIAL SUPPLIED BY OWNER}{subsection.1.2.2}{}}
|
||||||
|
\pgfsyspdfmark {pgfid5}{20129219}{45513608}
|
||||||
|
\@writefile{toc}{\contentsline {chapter}{\numberline {2}SECTION 26 05 26 \sphinxhyphen {} GROUNDING}{v}{chapter.2}\protected@file@percent }
|
||||||
|
\@writefile{lof}{\addvspace {10\p@ }}
|
||||||
|
\@writefile{lot}{\addvspace {10\p@ }}
|
||||||
|
\newlabel{260526:section-26-05-26-grounding}{{2}{v}{SECTION 26 05 26 \sphinxhyphen {} GROUNDING}{chapter.2}{}}
|
||||||
|
\newlabel{260526::doc}{{2}{v}{SECTION 26 05 26 \sphinxhyphen {} GROUNDING}{chapter.2}{}}
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {2.1}PART 1 \sphinxhyphen {} GENERAL}{v}{section.2.1}\protected@file@percent }
|
||||||
|
\newlabel{260526:part-1-general}{{2.1}{v}{PART 1 \sphinxhyphen {} GENERAL}{section.2.1}{}}
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1.1}1.1 Work Included}{v}{subsection.2.1.1}\protected@file@percent }
|
||||||
|
\newlabel{260526:work-included}{{2.1.1}{v}{1.1 Work Included}{subsection.2.1.1}{}}
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1.2}1.2 Related Work}{v}{subsection.2.1.2}\protected@file@percent }
|
||||||
|
\newlabel{260526:related-work}{{2.1.2}{v}{1.2 Related Work}{subsection.2.1.2}{}}
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1.3}1.3 Qualifications}{v}{subsection.2.1.3}\protected@file@percent }
|
||||||
|
\newlabel{260526:qualifications}{{2.1.3}{v}{1.3 Qualifications}{subsection.2.1.3}{}}
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1.4}1.4 Submittals}{v}{subsection.2.1.4}\protected@file@percent }
|
||||||
|
\newlabel{260526:submittals}{{2.1.4}{v}{1.4 Submittals}{subsection.2.1.4}{}}
|
||||||
|
\pgfsyspdfmark {pgfid6}{20129219}{45513608}
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {2.2}PART 2 \sphinxhyphen {} PRODUCTS}{vi}{section.2.2}\protected@file@percent }
|
||||||
|
\newlabel{260526:part-2-products}{{2.2}{vi}{PART 2 \sphinxhyphen {} PRODUCTS}{section.2.2}{}}
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {2.2.1}2.1 Grounding System}{vi}{subsection.2.2.1}\protected@file@percent }
|
||||||
|
\newlabel{260526:grounding-system}{{2.2.1}{vi}{2.1 Grounding System}{subsection.2.2.1}{}}
|
||||||
|
\pgfsyspdfmark {pgfid7}{20129219}{45513608}
|
||||||
|
\@writefile{toc}{\contentsline {section}{\numberline {2.3}PART 3 \sphinxhyphen {} EXECUTION}{vii}{section.2.3}\protected@file@percent }
|
||||||
|
\newlabel{260526:part-3-execution}{{2.3}{vii}{PART 3 \sphinxhyphen {} EXECUTION}{section.2.3}{}}
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {2.3.1}3.1 Workmanship}{vii}{subsection.2.3.1}\protected@file@percent }
|
||||||
|
\newlabel{260526:workmanship}{{2.3.1}{vii}{3.1 Workmanship}{subsection.2.3.1}{}}
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {2.3.2}3.2 Installation}{vii}{subsection.2.3.2}\protected@file@percent }
|
||||||
|
\newlabel{260526:installation}{{2.3.2}{vii}{3.2 Installation}{subsection.2.3.2}{}}
|
||||||
|
\pgfsyspdfmark {pgfid8}{20129219}{45513608}
|
||||||
|
\@writefile{toc}{\contentsline {subsection}{\numberline {2.3.3}3.3 Field Quality Control}{viii}{subsection.2.3.3}\protected@file@percent }
|
||||||
|
\newlabel{260526:field-quality-control}{{2.3.3}{viii}{3.3 Field Quality Control}{subsection.2.3.3}{}}
|
||||||
|
\pgfsyspdfmark {pgfid9}{20129219}{45513608}
|
||||||
|
\newlabel{260526:center}{{2.3.3}{ix}{3.3 Field Quality Control}{section*.2}{}}
|
||||||
|
\global \figuresfalse
|
||||||
|
\global \tablesfalse
|
||||||
|
\gdef \@abspage@last{9}
|
||||||
1
source/frUpwork/project_spec/project_spec/document.idx
Normal file
1
source/frUpwork/project_spec/project_spec/document.idx
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
\indexentry{center (built\sphinxhyphen{}in class)@\spxentry{center}\spxextra{built\sphinxhyphen{}in class}|hyperpage}{ix}
|
||||||
1218
source/frUpwork/project_spec/project_spec/document.log
Normal file
1218
source/frUpwork/project_spec/project_spec/document.log
Normal file
File diff suppressed because it is too large
Load diff
22
source/frUpwork/project_spec/project_spec/document.out
Normal file
22
source/frUpwork/project_spec/project_spec/document.out
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
\BOOKMARK [0][-]{chapter.1}{\376\377\000C\000o\000m\000m\000o\000n}{}% 1
|
||||||
|
\BOOKMARK [1][-]{section.1.1}{\376\377\000G\000E\000N\000E\000R\000A\000L}{chapter.1}% 2
|
||||||
|
\BOOKMARK [2][-]{subsection.1.1.1}{\376\377\000S\000C\000O\000P\000E}{section.1.1}% 3
|
||||||
|
\BOOKMARK [2][-]{subsection.1.1.2}{\376\377\000S\000C\000H\000E\000D\000U\000L\000E}{section.1.1}% 4
|
||||||
|
\BOOKMARK [2][-]{subsection.1.1.3}{\376\377\000S\000T\000A\000N\000D\000A\000R\000D\000S\000\040\000A\000N\000D\000\040\000R\000E\000G\000U\000L\000A\000T\000I\000O\000N\000S}{section.1.1}% 5
|
||||||
|
\BOOKMARK [2][-]{subsection.1.1.4}{\376\377\000D\000E\000F\000I\000N\000I\000T\000I\000O\000N\000S}{section.1.1}% 6
|
||||||
|
\BOOKMARK [2][-]{subsection.1.1.5}{\376\377\000A\000C\000R\000O\000N\000Y\000M\000S}{section.1.1}% 7
|
||||||
|
\BOOKMARK [1][-]{section.1.2}{\376\377\000P\000R\000O\000D\000U\000C\000T\000S}{chapter.1}% 8
|
||||||
|
\BOOKMARK [2][-]{subsection.1.2.1}{\376\377\000M\000A\000T\000E\000R\000I\000A\000L\000S\000\040\000A\000N\000D\000\040\000E\000Q\000U\000I\000P\000M\000E\000N\000T}{section.1.2}% 9
|
||||||
|
\BOOKMARK [2][-]{subsection.1.2.2}{\376\377\000M\000A\000T\000E\000R\000I\000A\000L\000\040\000S\000U\000P\000P\000L\000I\000E\000D\000\040\000B\000Y\000\040\000O\000W\000N\000E\000R}{section.1.2}% 10
|
||||||
|
\BOOKMARK [0][-]{chapter.2}{\376\377\000S\000E\000C\000T\000I\000O\000N\000\040\0002\0006\000\040\0000\0005\000\040\0002\0006\000\040\000-\000\040\000G\000R\000O\000U\000N\000D\000I\000N\000G}{}% 11
|
||||||
|
\BOOKMARK [1][-]{section.2.1}{\376\377\000P\000A\000R\000T\000\040\0001\000\040\000-\000\040\000G\000E\000N\000E\000R\000A\000L}{chapter.2}% 12
|
||||||
|
\BOOKMARK [2][-]{subsection.2.1.1}{\376\377\0001\000.\0001\000\040\000W\000o\000r\000k\000\040\000I\000n\000c\000l\000u\000d\000e\000d}{section.2.1}% 13
|
||||||
|
\BOOKMARK [2][-]{subsection.2.1.2}{\376\377\0001\000.\0002\000\040\000R\000e\000l\000a\000t\000e\000d\000\040\000W\000o\000r\000k}{section.2.1}% 14
|
||||||
|
\BOOKMARK [2][-]{subsection.2.1.3}{\376\377\0001\000.\0003\000\040\000Q\000u\000a\000l\000i\000f\000i\000c\000a\000t\000i\000o\000n\000s}{section.2.1}% 15
|
||||||
|
\BOOKMARK [2][-]{subsection.2.1.4}{\376\377\0001\000.\0004\000\040\000S\000u\000b\000m\000i\000t\000t\000a\000l\000s}{section.2.1}% 16
|
||||||
|
\BOOKMARK [1][-]{section.2.2}{\376\377\000P\000A\000R\000T\000\040\0002\000\040\000-\000\040\000P\000R\000O\000D\000U\000C\000T\000S}{chapter.2}% 17
|
||||||
|
\BOOKMARK [2][-]{subsection.2.2.1}{\376\377\0002\000.\0001\000\040\000G\000r\000o\000u\000n\000d\000i\000n\000g\000\040\000S\000y\000s\000t\000e\000m}{section.2.2}% 18
|
||||||
|
\BOOKMARK [1][-]{section.2.3}{\376\377\000P\000A\000R\000T\000\040\0003\000\040\000-\000\040\000E\000X\000E\000C\000U\000T\000I\000O\000N}{chapter.2}% 19
|
||||||
|
\BOOKMARK [2][-]{subsection.2.3.1}{\376\377\0003\000.\0001\000\040\000W\000o\000r\000k\000m\000a\000n\000s\000h\000i\000p}{section.2.3}% 20
|
||||||
|
\BOOKMARK [2][-]{subsection.2.3.2}{\376\377\0003\000.\0002\000\040\000I\000n\000s\000t\000a\000l\000l\000a\000t\000i\000o\000n}{section.2.3}% 21
|
||||||
|
\BOOKMARK [2][-]{subsection.2.3.3}{\376\377\0003\000.\0003\000\040\000F\000i\000e\000l\000d\000\040\000Q\000u\000a\000l\000i\000t\000y\000\040\000C\000o\000n\000t\000r\000o\000l}{section.2.3}% 22
|
||||||
BIN
source/frUpwork/project_spec/project_spec/document.pdf
Normal file
BIN
source/frUpwork/project_spec/project_spec/document.pdf
Normal file
Binary file not shown.
562
source/frUpwork/project_spec/project_spec/document.tex
Normal file
562
source/frUpwork/project_spec/project_spec/document.tex
Normal file
|
|
@ -0,0 +1,562 @@
|
||||||
|
%% Generated by Sphinx.
|
||||||
|
\def\sphinxdocclass{report}
|
||||||
|
\documentclass[letterpaper,12pt,openany,oneside,english]{sphinxmanual}
|
||||||
|
\ifdefined\pdfpxdimen
|
||||||
|
\let\sphinxpxdimen\pdfpxdimen\else\newdimen\sphinxpxdimen
|
||||||
|
\fi \sphinxpxdimen=.75bp\relax
|
||||||
|
\ifdefined\pdfimageresolution
|
||||||
|
\pdfimageresolution= \numexpr \dimexpr1in\relax/\sphinxpxdimen\relax
|
||||||
|
\fi
|
||||||
|
%% let collapsible pdf bookmarks panel have high depth per default
|
||||||
|
\PassOptionsToPackage{bookmarksdepth=5}{hyperref}
|
||||||
|
|
||||||
|
\PassOptionsToPackage{warn}{textcomp}
|
||||||
|
\usepackage[utf8]{inputenc}
|
||||||
|
\ifdefined\DeclareUnicodeCharacter
|
||||||
|
% support both utf8 and utf8x syntaxes
|
||||||
|
\ifdefined\DeclareUnicodeCharacterAsOptional
|
||||||
|
\def\sphinxDUC#1{\DeclareUnicodeCharacter{"#1}}
|
||||||
|
\else
|
||||||
|
\let\sphinxDUC\DeclareUnicodeCharacter
|
||||||
|
\fi
|
||||||
|
\sphinxDUC{00A0}{\nobreakspace}
|
||||||
|
\sphinxDUC{2500}{\sphinxunichar{2500}}
|
||||||
|
\sphinxDUC{2502}{\sphinxunichar{2502}}
|
||||||
|
\sphinxDUC{2514}{\sphinxunichar{2514}}
|
||||||
|
\sphinxDUC{251C}{\sphinxunichar{251C}}
|
||||||
|
\sphinxDUC{2572}{\textbackslash}
|
||||||
|
\fi
|
||||||
|
\usepackage{cmap}
|
||||||
|
\usepackage[T1]{fontenc}
|
||||||
|
\usepackage{amsmath,amssymb,amstext}
|
||||||
|
\usepackage[english]{babel}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
\usepackage{tgtermes}
|
||||||
|
\usepackage{tgheros}
|
||||||
|
\renewcommand{\ttdefault}{txtt}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
\usepackage[Bjornstrup]{fncychap}
|
||||||
|
\usepackage{sphinx}
|
||||||
|
|
||||||
|
\fvset{fontsize=auto}
|
||||||
|
\usepackage[letterpaper, portrait, includehead, includefoot,margin=1in,headheight=10mm]{geometry}
|
||||||
|
\usepackage{fancyhdr}\usepackage{lipsum}
|
||||||
|
|
||||||
|
% Include hyperref last.
|
||||||
|
\usepackage{hyperref}
|
||||||
|
% Fix anchor placement for figures with captions.
|
||||||
|
\usepackage{hypcap}% it must be loaded after hyperref.
|
||||||
|
% Set up styles of URL: it should be placed after hyperref.
|
||||||
|
\urlstyle{same}
|
||||||
|
|
||||||
|
\addto\captionsenglish{\renewcommand{\contentsname}{Table of Contents}}
|
||||||
|
|
||||||
|
\usepackage{sphinxmessages}
|
||||||
|
\setcounter{tocdepth}{2}
|
||||||
|
|
||||||
|
|
||||||
|
\setcounter{tocdepth}{1}
|
||||||
|
|
||||||
|
|
||||||
|
\title{EV Charging Station Specification - Canada}
|
||||||
|
\date{Mar 27, 2024}
|
||||||
|
\release{A}
|
||||||
|
\author{Jeff MacKinnon}
|
||||||
|
\newcommand{\sphinxlogo}{\sphinxincludegraphics{logo.jpg}\par}
|
||||||
|
\renewcommand{\releasename}{Release}
|
||||||
|
\makeindex
|
||||||
|
\usepackage{jmk_spec}
|
||||||
|
\subtitle{Construction Specification - Template}
|
||||||
|
\client{Client Category}
|
||||||
|
\revision{AW}
|
||||||
|
%
|
||||||
|
\revisionhistory{
|
||||||
|
num={Aw},
|
||||||
|
desc={Initial Review Submission},
|
||||||
|
date={Sept. 30, 2022},
|
||||||
|
}
|
||||||
|
\revisionhistory{
|
||||||
|
num={2},
|
||||||
|
desc={Second Review Submission},
|
||||||
|
date={Sept. 30, 2023},
|
||||||
|
}
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\pagestyle{empty}
|
||||||
|
\sphinxmaketitle
|
||||||
|
\pagestyle{plain}
|
||||||
|
\sphinxtableofcontents
|
||||||
|
\pagestyle{normal}
|
||||||
|
\phantomsection\label{\detokenize{index::doc}}
|
||||||
|
|
||||||
|
|
||||||
|
\sphinxstepscope
|
||||||
|
|
||||||
|
|
||||||
|
\chapter{Common}
|
||||||
|
\label{\detokenize{260500:common}}\label{\detokenize{260500::doc}}
|
||||||
|
|
||||||
|
\section{GENERAL}
|
||||||
|
\label{\detokenize{260500:general}}
|
||||||
|
|
||||||
|
\subsection{SCOPE}
|
||||||
|
\label{\detokenize{260500:scope}}\begin{enumerate}
|
||||||
|
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
|
||||||
|
\item {}
|
||||||
|
\item {} \begin{description}
|
||||||
|
\item[{The Work is to include, but not limited to, the following:}] \leavevmode\begin{enumerate}
|
||||||
|
\sphinxsetlistlabels{\arabic}{enumii}{enumiii}{}{.}%
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
List one
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
two
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
More Items
|
||||||
|
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
\end{description}
|
||||||
|
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
|
||||||
|
\subsection{SCHEDULE}
|
||||||
|
\label{\detokenize{260500:schedule}}\begin{enumerate}
|
||||||
|
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
The Work shall be carried out in accordance with the Schedule provided with this document. The Contractor shall be prepared to work a sufficient number of hours and/or shifts to ensure completion by the scheduled dates.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
The Contractor shall prepare a detail construction schedule for this work and fully coordinate with the schedule provided.
|
||||||
|
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
|
||||||
|
\subsection{STANDARDS AND REGULATIONS}
|
||||||
|
\label{\detokenize{260500:standards-and-regulations}}\begin{enumerate}
|
||||||
|
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
THE ENTIRE ELECTRICAL INSTALLATION IS TO BE IN ACCORDANCE WITH ALL CURRENT CODES, RULES AND REGULATIONS, INCLUDING (BUT NOT LIMITED TO) THE CURRENT EDITIONS OF THE CANADIAN ELECTRICAL CODE AND NATIONAL BUILDING CODE, WITH ALL APPLICABLE PROVINCIAL AND MUNICIPAL AMENDMENTS.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
INSTALL ALL EQUIPMENT AND DEVICES IN ACCORDANCE WITH THE MANUFACTURER’S RECOMMENDATIONS.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Before work is allowed to proceed, the Contractor’s safety and construction procedures as well as all other procedures specified as required in this document shall have been reviewed and approved by the Engineer. All personnel involved in the work shall be made aware of the procedures and their requirements. Copies of the procedures shall be readily available on site for the use of the Contractor’s workforce and for viewing by the Engineer and Authorities Having Jurisdiction.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
The Contractor is required to attend all site safety meetings to address job site health, safety and environmental concerns as they arise and shall also hold a weekly work site safety meeting with all their employees.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
The Contractor’s Superintendent or representation shall attend daily site coordination meetings and weekly meetings regarding the progress of the Work as required by the Engineer.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
The Contractor shall keep an up to date list of all construction personnel complete with record of the completion of both the WHMIS training and the on\sphinxhyphen{}site safety orientation conducted by the Company, which is required of all contractors. The contractor shall furnish this list or a copy thereof to the Company upon their request.
|
||||||
|
|
||||||
|
\item {} \begin{description}
|
||||||
|
\item[{The Works shall be carried out in accordance with the latest issue of the following standards:}] \leavevmode\begin{enumerate}
|
||||||
|
\sphinxsetlistlabels{\arabic}{enumii}{enumiii}{}{.}%
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
CSA Standard C22.1 \sphinxhyphen{} Canadian Electrical Code Part 1
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
CSA Standard C22.2 \sphinxhyphen{} Canadian Electrical Code Part 2
|
||||||
|
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
\end{description}
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Should any discrepancy be noted between the standards and/or the specification, and should any interpretation be required, the matter shall be referred to the Engineer for clarification, whose decision will be final.
|
||||||
|
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
|
||||||
|
\subsection{DEFINITIONS}
|
||||||
|
\label{\detokenize{260500:definitions}}\begin{description}
|
||||||
|
\item[{The Work}] \leavevmode
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Includes the complete supply and guarantee of all labour, supervision, consumables, tools, construction equipment, and all incidental material and expenses in connection with the installation and erection in place, in accordance with this Specification, of all material specified as “installed by the Contractor”, and the supply in addition to erection in accordance with this Specification, of all material specified as “Supplied by the Contractor” or “Provided by the Contractor”.
|
||||||
|
|
||||||
|
\end{description}
|
||||||
|
|
||||||
|
|
||||||
|
\subsection{ACRONYMS}
|
||||||
|
\label{\detokenize{260500:acronyms}}
|
||||||
|
|
||||||
|
\begin{savenotes}\sphinxattablestart
|
||||||
|
\centering
|
||||||
|
\begin{tabular}[t]{|\X{20}{100}|\X{80}{100}|}
|
||||||
|
\hline
|
||||||
|
|
||||||
|
\sphinxAtStartPar
|
||||||
|
CSA
|
||||||
|
&
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Canadian Standards Association
|
||||||
|
\\
|
||||||
|
\hline
|
||||||
|
\sphinxAtStartPar
|
||||||
|
AHJ
|
||||||
|
&
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Authority Having Jurisdiction
|
||||||
|
\\
|
||||||
|
\hline
|
||||||
|
\sphinxAtStartPar
|
||||||
|
EV
|
||||||
|
&
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Electric Vehicle
|
||||||
|
\\
|
||||||
|
\hline
|
||||||
|
\end{tabular}
|
||||||
|
\par
|
||||||
|
\sphinxattableend\end{savenotes}
|
||||||
|
|
||||||
|
|
||||||
|
\section{PRODUCTS}
|
||||||
|
\label{\detokenize{260500:products}}
|
||||||
|
|
||||||
|
\subsection{MATERIALS AND EQUIPMENT}
|
||||||
|
\label{\detokenize{260500:materials-and-equipment}}\begin{enumerate}
|
||||||
|
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
PROVIDE IDENTIFICATION OF ALL PROVIDED ELECTRICAL EQUIPMENT, INCLUDING PANELBOARDS, DISCONNECT SWITCHES, SPLITTERS, MOTOR STARTERS, ETC.. IDENTIFICATION IS TO BE PROVIDED BY MEANS OF ENGRAVED LAMACOID LABELS FASTENED SECURELY TO THE EQUIPMENT.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
WIRING IS TO BE IN CONDUIT, UNLESS OTHERWISE INDICATED. ARMOURED CABLE MAY BE USED FOR DROPS TO RECESSED LUMINAIRES AND TO DEVICES IN STUD PARTITIONS.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
WIRE AND CABLE ARE TO BE STANDARD AWG COPPER WITH X\sphinxhyphen{}LINK POLYETHYLENE INSULATION RATED TO 600V AND 75°C, UNLESS OTHERWISE INDICATED OR PROHIBITED. ALUMINUM CONDUCTORS WILL BE ACCEPTED ONLY UPON APPROVAL. CONDUCTOR SIZES INDICATED ARE FOR COPPER, UNLESS OTHERWISE INDICATED. MINIMUM WIRE SIZE: \#12 AWG.
|
||||||
|
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
|
||||||
|
\subsection{MATERIAL SUPPLIED BY OWNER}
|
||||||
|
\label{\detokenize{260500:material-supplied-by-owner}}\begin{enumerate}
|
||||||
|
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
A list of Material
|
||||||
|
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
\newpage
|
||||||
|
|
||||||
|
\sphinxstepscope
|
||||||
|
|
||||||
|
|
||||||
|
\chapter{SECTION 26 05 26 \sphinxhyphen{} GROUNDING}
|
||||||
|
\label{\detokenize{260526:section-26-05-26-grounding}}\label{\detokenize{260526::doc}}
|
||||||
|
|
||||||
|
\section{PART 1 \sphinxhyphen{} GENERAL}
|
||||||
|
\label{\detokenize{260526:part-1-general}}
|
||||||
|
|
||||||
|
\subsection{1.1 Work Included}
|
||||||
|
\label{\detokenize{260526:work-included}}\begin{enumerate}
|
||||||
|
\sphinxsetlistlabels{\Alph}{enumi}{enumii}{}{.}%
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Labor, materials, equipment, tools, safety gear, test equipment, incidentals, services, and transportation for a complete electro\sphinxhyphen{}mechanical installation as shown on the Drawings, included in these Specifications, or as can be reasonably implied from project descriptions.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Furnish and install grounding system required by Drawings, or if not shown or defined, as required by NEC. Ground conductors shall be sized for the protective device, minimum.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Furnish and install conduits, junction boxes, underground boxes, and associated hardware. Provide hardware, conduit, fittings, and other parts for a complete grounding installation
|
||||||
|
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
|
||||||
|
\subsection{1.2 Related Work}
|
||||||
|
\label{\detokenize{260526:related-work}}\begin{enumerate}
|
||||||
|
\sphinxsetlistlabels{\Alph}{enumi}{enumii}{}{.}%
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Section 26 05 10
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Section 26 05 19
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Section 26 05 70
|
||||||
|
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
|
||||||
|
\subsection{1.3 Qualifications}
|
||||||
|
\label{\detokenize{260526:qualifications}}\begin{enumerate}
|
||||||
|
\sphinxsetlistlabels{\Alph}{enumi}{enumii}{}{.}%
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Material furnished under this specification shall be installed by qualified installers meeting requirements specified in Section 26 05 10.
|
||||||
|
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
|
||||||
|
\subsection{1.4 Submittals}
|
||||||
|
\label{\detokenize{260526:submittals}}\begin{enumerate}
|
||||||
|
\sphinxsetlistlabels{\Alph}{enumi}{enumii}{}{.}%
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Refer to Section 26 05 10
|
||||||
|
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
|
||||||
|
\section{PART 2 \sphinxhyphen{} PRODUCTS}
|
||||||
|
\label{\detokenize{260526:part-2-products}}
|
||||||
|
|
||||||
|
\subsection{2.1 Grounding System}
|
||||||
|
\label{\detokenize{260526:grounding-system}}\begin{enumerate}
|
||||||
|
\sphinxsetlistlabels{\Alph}{enumi}{enumii}{}{.}%
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
General
|
||||||
|
\begin{enumerate}
|
||||||
|
\sphinxsetlistlabels{\arabic}{enumii}{enumiii}{}{.}%
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Grounding conductors shall be sized as shown on the Drawings or in accordance with NEC, whichever is larger.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Components of the grounding electrode system shall be manufactured in accordance with UL 467 \sphinxhyphen{} Standard for Safety Grounding and Bonding Equipment.
|
||||||
|
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Grounding System
|
||||||
|
\begin{enumerate}
|
||||||
|
\sphinxsetlistlabels{\arabic}{enumii}{enumiii}{}{.}%
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
The utility service ground shall be tied to a building ground grid consisting of an electrode ground/ “UFER” and/or ground rod type grounding system.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
The UFER shall consist of minimum 25 feet minimum of code sized bare copper wire conductor laid at 3 foot nominal depth encased with concrete or as detailed on the Contract Drawings. UFER ground shall be located where soil moisture content will be maximized.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Ground enhancement material shall be permanent and be designed to lower earth resistance in all soil conditions. Once set, material shall have resistivity of not more than 25 ohm\sphinxhyphen{}cm resistance. Material shall be set by mixing it with water to form a slurry and shall not dissolve or decompose once cured. Ground enhancement material shall be Erico Ground Enhancement Material (GEM), Lyncole XIT, or equal.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
The main ground bonding wire from the ground rod shall extend up into the utility service panel with readily visible UL approved “ground clamp” attached to the ground bus.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Install bare copper ground bond wires from the UFER ground to the various locations shown on the Drawings.
|
||||||
|
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Raceway Grounds
|
||||||
|
\begin{enumerate}
|
||||||
|
\sphinxsetlistlabels{\arabic}{enumii}{enumiii}{}{.}%
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
If above ground, metallic conduits shall be assembled to provide a continuous ground path. Metallic conduits shall be bonded using insulated grounding bushings.
|
||||||
|
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Equipment and Enclosure Grounds
|
||||||
|
\begin{enumerate}
|
||||||
|
\sphinxsetlistlabels{\arabic}{enumii}{enumiii}{}{.}%
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Electrical and distribution equipment shall be connected to the grounding system. Cables shall be sized as specified. Furnish and install a green grounding conductor inside conduit containing the power conductors serving the equipment.
|
||||||
|
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Components
|
||||||
|
|
||||||
|
\end{enumerate}
|
||||||
|
\begin{enumerate}
|
||||||
|
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Ground rod shall be ¾” x 10 ft solid steel with 10\sphinxhyphen{}mil copper\sphinxhyphen{}cladding.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Provide ground well enclosures for all outdoor ground rods. Furnish Christy type F8 or equal unless otherwise shown on the Drawings.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Ground rod clamps shall be bolt\sphinxhyphen{}on type as manufactured by O\sphinxhyphen{}Z Gedney type GRC, or equal.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Grounding and bonding wires shall be installed in all PVC conduits and nonmetallic raceways and connected to the ground bus and all equipment.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Each electrical enclosure shall have a copper ground bus. Screw type fasteners shall be provided on all ground busses for connection of grounding conductors. Ground bus shall be a Challenger GB series, ILSCO CAN series or equal.
|
||||||
|
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
|
||||||
|
\section{PART 3 \sphinxhyphen{} EXECUTION}
|
||||||
|
\label{\detokenize{260526:part-3-execution}}
|
||||||
|
|
||||||
|
\subsection{3.1 Workmanship}
|
||||||
|
\label{\detokenize{260526:workmanship}}\begin{enumerate}
|
||||||
|
\sphinxsetlistlabels{\Alph}{enumi}{enumii}{}{.}%
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
All work in this Section shall conform to the codes and standards specified in specified in Section 26 05 00 subsection 3.3, Workmanship.
|
||||||
|
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
|
||||||
|
\subsection{3.2 Installation}
|
||||||
|
\label{\detokenize{260526:installation}}\begin{enumerate}
|
||||||
|
\sphinxsetlistlabels{\Alph}{enumi}{enumii}{}{.}%
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Grounding System:
|
||||||
|
|
||||||
|
\end{enumerate}
|
||||||
|
\begin{enumerate}
|
||||||
|
\sphinxsetlistlabels{\arabic}{enumi}{enumii}{}{.}%
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Install all products per Section 26 05 00 \textendash{} General Electric subsection 3.6, Installation.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Each nonmetallic conduit shall contain a code sized grounding conductor.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
The system neutral conductor and all equipment and devices required to be grounded by the National Electrical Code shall be grounded in a manner that satisfies the requirements of the National Code.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
The system neutral (grounded conductor) shall be connected to the system’s grounding conductor at only a single point in the system. This connection shall be made by a removable bonding jumper sized in accordance with the applicable provisions of the National Electrical Code if the size is not shown on the Drawings. The grounding of the system neutral shall be in the enclosure that houses the service entrance main overcurrent protection.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Utilize mechanical connections in accessible locations and exothermic connections in non\sphinxhyphen{}accessible or buried locations.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
The secondary on all transformers shall be grounded.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
All raceway systems, supports, enclosures, panels, motor frames, and equipment housings shall be permanently and effectively grounded.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Install insulated grounding conductor with feeders and branch circuit conductors in conduits. Size grounding conductors in accordance with NEC. Install from grounding bus of serving panel to ground bus of served panel, grounding screw of receptacles, lighting fixture housing, light switch outlet boxes or metal enclosures of service equipment. Ground conduits by means of grounding bushings on terminations at panelboards and distribution panels with 12ga. conductor to grounding bus
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
All receptacles shall have their grounding contact connected to a grounding conductor.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Branch circuit grounding conductors for receptacles or other electrical loads shall be arranged such that the removal of a lighting fixture, receptacle, or other load does not interrupt the ground continuity to any other part of the circuit.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Attachment of the grounding conductor to equipment or enclosures shall be by connectors specifically provided for grounding. Mounting, support, or bracing bolts shall not be used as an attachment point for ground conductors.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Install grounding electrode conductor and connect to reinforcing steel in foundation footing. Electrically bond building steel to ground system. Bond metal siding not attached to grounded structure.
|
||||||
|
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
|
||||||
|
\subsection{3.3 Field Quality Control}
|
||||||
|
\label{\detokenize{260526:field-quality-control}}\begin{enumerate}
|
||||||
|
\sphinxsetlistlabels{\Alph}{enumi}{enumii}{}{.}%
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Inspections:
|
||||||
|
\begin{enumerate}
|
||||||
|
\sphinxsetlistlabels{\arabic}{enumii}{enumiii}{}{.}%
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Owner’s representative shall inspect ground system prior to cover.
|
||||||
|
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Testing
|
||||||
|
\begin{enumerate}
|
||||||
|
\sphinxsetlistlabels{\arabic}{enumii}{enumiii}{}{.}%
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Complete applicable test forms if provided in Section 26 05 70 \textendash{} Factory and Field Testing. If form is not provided, furnish results on vendor standard testing forms with signature of tester, date of test and test results.
|
||||||
|
|
||||||
|
\item {}
|
||||||
|
\sphinxAtStartPar
|
||||||
|
Test each grounding connection to determine the ground resistance. The grounding test shall be IEEE 81.2 and NETA 7.13. The current reference rod shall be driven at least 100 feet from the ground rod or grid under test. The measurements shall be made at 10\sphinxhyphen{}foot intervals beginning 20 feet from the test electrode and ending 80 feet from it, in direct line between the ground rod or center of grid and the current reference electrode.
|
||||||
|
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
|
\end{enumerate}
|
||||||
|
\index{center (built\sphinxhyphen{}in class)@\spxentry{center}\spxextra{built\sphinxhyphen{}in class}}
|
||||||
|
|
||||||
|
\begin{fulllineitems}
|
||||||
|
\phantomsection\label{\detokenize{260526:center}}
|
||||||
|
\pysigstartsignatures
|
||||||
|
\pysigline{\sphinxbfcode{\sphinxupquote{class\DUrole{w}{ }}}\sphinxbfcode{\sphinxupquote{center}}}
|
||||||
|
\pysigstopsignatures
|
||||||
|
\sphinxAtStartPar
|
||||||
|
\sphinxstylestrong{END OF SECTION}
|
||||||
|
|
||||||
|
\end{fulllineitems}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
\newpage
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
\renewcommand{\indexname}{Index}
|
||||||
|
\printindex
|
||||||
|
\end{document}
|
||||||
23
source/frUpwork/project_spec/project_spec/document.toc
Normal file
23
source/frUpwork/project_spec/project_spec/document.toc
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
\babel@toc {english}{}\relax
|
||||||
|
\contentsline {chapter}{\numberline {1}Common}{1}{chapter.1}%
|
||||||
|
\contentsline {section}{GENERAL}{1}{section*.2}%
|
||||||
|
\contentsline {subsection}{SCOPE}{1}{subsection*.3}%
|
||||||
|
\contentsline {subsection}{SCHEDULE}{1}{subsection*.4}%
|
||||||
|
\contentsline {subsection}{STANDARDS AND REGULATIONS}{1}{subsection*.5}%
|
||||||
|
\contentsline {subsection}{DEFINITIONS}{2}{subsection*.6}%
|
||||||
|
\contentsline {subsection}{ACRONYMS}{3}{subsection*.7}%
|
||||||
|
\contentsline {section}{PRODUCTS}{3}{section*.8}%
|
||||||
|
\contentsline {subsection}{MATERIALS AND EQUIPMENT}{3}{subsection*.9}%
|
||||||
|
\contentsline {subsection}{MATERIAL SUPPLIED BY OWNER}{3}{subsection*.10}%
|
||||||
|
\contentsline {chapter}{\numberline {2}SECTION 26 05 26 \sphinxhyphen {} GROUNDING}{4}{chapter.2}%
|
||||||
|
\contentsline {section}{PART 1 \sphinxhyphen {} GENERAL}{4}{section*.11}%
|
||||||
|
\contentsline {subsection}{1.1 Work Included}{4}{subsection*.12}%
|
||||||
|
\contentsline {subsection}{1.2 Related Work}{4}{subsection*.13}%
|
||||||
|
\contentsline {subsection}{1.3 Qualifications}{4}{subsection*.14}%
|
||||||
|
\contentsline {subsection}{1.4 Submittals}{4}{subsection*.15}%
|
||||||
|
\contentsline {section}{PART 2 \sphinxhyphen {} PRODUCTS}{5}{section*.16}%
|
||||||
|
\contentsline {subsection}{2.1 Grounding System}{5}{subsection*.17}%
|
||||||
|
\contentsline {section}{PART 3 \sphinxhyphen {} EXECUTION}{6}{section*.18}%
|
||||||
|
\contentsline {subsection}{3.1 Workmanship}{6}{subsection*.19}%
|
||||||
|
\contentsline {subsection}{3.2 Installation}{6}{subsection*.20}%
|
||||||
|
\contentsline {subsection}{3.3 Field Quality Control}{7}{subsection*.21}%
|
||||||
178
source/frUpwork/project_spec/project_spec/jmk_spec.sty
Normal file
178
source/frUpwork/project_spec/project_spec/jmk_spec.sty
Normal file
|
|
@ -0,0 +1,178 @@
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
%
|
||||||
|
% jmk_spec.sty
|
||||||
|
%
|
||||||
|
% LaTeX package for Sphinx override template
|
||||||
|
%
|
||||||
|
% © Jeff MacKinnon
|
||||||
|
% code by E. A. Farina latex.guru
|
||||||
|
%
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
|
\ProvidesPackage{jmk_spec}[2024/04/10 v1.0 LaTeX package for Sphinx override template]
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Useful packages
|
||||||
|
\RequirePackage{tikz}
|
||||||
|
\RequirePackage[table]{xcolor}
|
||||||
|
\RequirePackage{tabularx}
|
||||||
|
\RequirePackage{anyfontsize}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Colors
|
||||||
|
\definecolor{JMKblue}{HTML}{004360}%{17365d}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Layout
|
||||||
|
\newlength{\MARmar}\setlength{\MARmar}{1in}
|
||||||
|
\newlength{\MARlef}\setlength{\MARlef}{\MARmar}
|
||||||
|
\newlength{\MARrig}\setlength{\MARrig}{\MARmar}
|
||||||
|
\newlength{\MARtop}\setlength{\MARtop}{1.25\MARmar}
|
||||||
|
\newlength{\MARbot}\setlength{\MARbot}{\MARmar}
|
||||||
|
\@ifpackageloaded{geometry}{}{\RequirePackage{geometry}}
|
||||||
|
\geometry{letterpaper,portrait,left=\MARlef,right=\MARrig,top=\MARtop,bottom=\MARbot,headheight=14.5pt}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Language
|
||||||
|
%\RequirePackage[english]{babel}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Font
|
||||||
|
\usepackage[scaled]{helvet}
|
||||||
|
\usepackage[T1]{fontenc}
|
||||||
|
\renewcommand{\familydefault}{\sfdefault}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Tokens
|
||||||
|
\newcommand{\dbclient}{}\newcommand{\client}[1]{\renewcommand{\dbclient}{#1}}
|
||||||
|
\newcommand{\dbrevision}{}\newcommand{\revision}[1]{\renewcommand{\dbrevision}{#1}}
|
||||||
|
\newcommand{\dbsubtitle}{}\newcommand{\subtitle}[1]{\renewcommand{\dbsubtitle}{#1}}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Page style
|
||||||
|
\RequirePackage{fancyhdr}
|
||||||
|
\renewcommand{\headrulewidth}{0pt}
|
||||||
|
\renewcommand{\footrulewidth}{0pt}
|
||||||
|
\newcommand{\headfoot}{\fancyhf{}\fancyhead[C]{\begin{tikzpicture}[remember picture,overlay,inner sep=0pt,outer sep=0pt]
|
||||||
|
%\node at (current page.center) {\includegraphics[width=\paperwidth,page=2]{TEST.pdf}};
|
||||||
|
% HEAD
|
||||||
|
\coordinate (TOPl) at ([shift={(\MARlef+100pt,0pt)}]current page.north west);
|
||||||
|
\coordinate (TOPr) at ([shift={(-\MARrig-100pt,0pt)}]current page.north east);
|
||||||
|
% Logo
|
||||||
|
\node[anchor=west] (LOGO) at ([shift={(\MARlef,-0.5\MARtop)}]current page.north west) {\includegraphics[height=55pt]{JMKEngineering-Logo_blue.jpg}};
|
||||||
|
% Left
|
||||||
|
% Title
|
||||||
|
\node[anchor=north west,font=\fontsize{10pt}{12pt}\selectfont] at (TOPl|-LOGO.north) {\bfseries\@title};
|
||||||
|
% Client
|
||||||
|
\node[anchor=west,font=\fontsize{10pt}{12pt}\selectfont] at (TOPl|-LOGO.east) {CLIENT: \strut\dbclient};
|
||||||
|
% Project
|
||||||
|
\node[anchor=south west,font=\fontsize{10pt}{12pt}\selectfont] at (TOPl|-LOGO.south) {\strut Project Num: \version};
|
||||||
|
% Right
|
||||||
|
% Date
|
||||||
|
\node[anchor=north west,font=\fontsize{10pt}{12pt}\selectfont] (REV) at (TOPr|-LOGO.north) {\strut\@date};
|
||||||
|
% Revision
|
||||||
|
\node[anchor=west,font=\fontsize{10pt}{12pt}\selectfont] at (TOPr|-LOGO.center) {\strut Rev: \strut\dbrevision};
|
||||||
|
% Page
|
||||||
|
\node[anchor=south west,font=\fontsize{10pt}{12pt}\selectfont] at (TOPr|-LOGO.south) {\strut Page \thepage};
|
||||||
|
% FOOT
|
||||||
|
% Copyright
|
||||||
|
\node[anchor=center,font=\fontsize{10pt}{12pt}\selectfont,align=left] at ([shift={(0pt,0.5\MARbot)}]current page.south) {JMK Engineering Inc.};
|
||||||
|
% LAYOUT
|
||||||
|
%\draw ([shift={(\MARlef,\MARbot)}]current page.south west) rectangle ([shift={(-\MARrig,-\MARtop)}]current page.north east);
|
||||||
|
%\draw[|<->|] (current page.west)--++(0:\MARlef) node[midway,above] {\strut 1~in};
|
||||||
|
%\draw[|<->|] (current page.east)--++(180:\MARrig) node[midway,above] {\strut 1~in};
|
||||||
|
%\draw[|<->|] (current page.south)--++(90:\MARbot) node[midway,right] {\strut 1~in};
|
||||||
|
%\draw[|<->|] (current page.north)--++(270:\MARtop) node[midway,right] {\strut 1.5~in};
|
||||||
|
\end{tikzpicture}}}
|
||||||
|
\fancypagestyle{plain}{\headfoot}
|
||||||
|
\fancypagestyle{normal}{\headfoot}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Headings
|
||||||
|
%\RequirePackage[Bjornstrup]{fncychap}% Loaded by conf.py but remove by Elio
|
||||||
|
%\RequirePackage[explicit]{titlesec}
|
||||||
|
\def\FONTchapter{\Large\bfseries\color{JMKblue}}
|
||||||
|
\titleformat{\chapter}[hang]{\FONTchapter}{}{0pt}{}[]
|
||||||
|
\titleformat{name=\chapter,numberless}[hang]{\FONTchapter}{}{0pt}{}[]
|
||||||
|
\titlespacing*{\chapter}{0pt}{-3\baselineskip}{\baselineskip}
|
||||||
|
%
|
||||||
|
\def\FONTsection{\large\bfseries\color{JMKblue}}
|
||||||
|
\titleformat{\section}[hang]{\FONTsection}{}{0pt}{}[]
|
||||||
|
\titleformat{name=\section,numberless}[hang]{\FONTsection}{}{0pt}{}[]
|
||||||
|
\titlespacing*{\section}{0pt}{\baselineskip}{0pt}
|
||||||
|
%
|
||||||
|
\def\FONTsubsection{\bfseries\color{JMKblue}}
|
||||||
|
\titleformat{\subsection}[hang]{\FONTsubsection}{}{0pt}{}[]
|
||||||
|
\titleformat{name=\subsection,numberless}[hang]{\FONTsubsection}{}{0pt}{}[]
|
||||||
|
\titlespacing*{\subsection}{0pt}{\baselineskip}{0pt}
|
||||||
|
%
|
||||||
|
\def\FONTsubsubsection{\itshape\color{JMKblue}}
|
||||||
|
\titleformat{\subsubsection}[hang]{\FONTsubsubsection}{}{0pt}{}[]
|
||||||
|
\titleformat{name=\subsubsection,numberless}[hang]{\FONTsubsubsection}{}{0pt}{}[]
|
||||||
|
\titlespacing*{\subsubsection}{0pt}{\baselineskip}{0pt}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Title page
|
||||||
|
\renewcommand{\sphinxmaketitle}{\pagestyle{plain}\pagenumbering{roman}\strut
|
||||||
|
\vspace{-4\baselineskip}
|
||||||
|
\begin{center}\fontsize{31pt}{37pt}\bfseries\color{JMKblue}\selectfont
|
||||||
|
\@title
|
||||||
|
\end{center}
|
||||||
|
\vspace{2\baselineskip}
|
||||||
|
\begin{center}\huge\bfseries\color{JMKblue}
|
||||||
|
\dbsubtitle
|
||||||
|
\end{center}
|
||||||
|
\vfill
|
||||||
|
\ifnumequal{\therevhis}{0}{}{
|
||||||
|
\begin{center}\large\bfseries\color{JMKblue}Revision History\end{center}
|
||||||
|
\begin{tabularx}{\linewidth}{|c|X|l|l|}\hline
|
||||||
|
\rowcolor{black!10}\bfseries Number & \bfseries Description & \bfseries Date & \bfseries Approved \\\hline
|
||||||
|
\ifnumgreater{\therevhis}{0}{\csuse{REVnum1} & \csuse{REVdesc1} & \csuse{REVdate1} & \\ \hline}{}
|
||||||
|
\ifnumgreater{\therevhis}{1}{\csuse{REVnum2} & \csuse{REVdesc2} & \csuse{REVdate2} & \\ \hline}{}
|
||||||
|
\ifnumgreater{\therevhis}{2}{\csuse{REVnum3} & \csuse{REVdesc3} & \csuse{REVdate3} & \\ \hline}{}
|
||||||
|
\ifnumgreater{\therevhis}{3}{\csuse{REVnum4} & \csuse{REVdesc4} & \csuse{REVdate4} & \\ \hline}{}
|
||||||
|
\ifnumgreater{\therevhis}{4}{\csuse{REVnum5} & \csuse{REVdesc5} & \csuse{REVdate5} & \\ \hline}{}
|
||||||
|
\ifnumgreater{\therevhis}{5}{\csuse{REVnum6} & \csuse{REVdesc6} & \csuse{REVdate6} & \\ \hline}{}
|
||||||
|
\ifnumgreater{\therevhis}{6}{\csuse{REVnum7} & \csuse{REVdesc7} & \csuse{REVdate7} & \\ \hline}{}
|
||||||
|
\ifnumgreater{\therevhis}{7}{\csuse{REVnum8} & \csuse{REVdesc8} & \csuse{REVdate8} & \\ \hline}{}
|
||||||
|
\ifnumgreater{\therevhis}{8}{\csuse{REVnum9} & \csuse{REVdesc9} & \csuse{REVdate9} & \\ \hline}{}
|
||||||
|
\ifnumgreater{\therevhis}{9}{\csuse{REVnum10} & \csuse{REVdesc10} & \csuse{REVdate10} & \\ \hline}{}
|
||||||
|
\ifnumgreater{\therevhis}{10}{\csuse{REVnum11} & \csuse{REVdesc11} & \csuse{REVdate11} & \\ \hline}{}
|
||||||
|
\end{tabularx}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Revision history
|
||||||
|
\newcounter{revhis}
|
||||||
|
\setcounter{revhis}{0}
|
||||||
|
\makeatletter
|
||||||
|
\define@key{rev}{num}{\csdef{REVnum\therevhis}{#1}}
|
||||||
|
\define@key{rev}{desc}{\csdef{REVdesc\therevhis}{#1}}
|
||||||
|
\define@key{rev}{date}{\csdef{REVdate\therevhis}{#1}}
|
||||||
|
\makeatother
|
||||||
|
\setkeys{rev}{}
|
||||||
|
\newcommand{\revisionhistory}[1]{\stepcounter{revhis}\setkeys{rev}{#1}}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% List of figures and tables
|
||||||
|
\RequirePackage{float}
|
||||||
|
\floatstyle{boxed}
|
||||||
|
\restylefloat{figure}
|
||||||
|
\restylefloat{table}
|
||||||
|
\newif\iffigures
|
||||||
|
\newif\iftables
|
||||||
|
\makeatletter
|
||||||
|
\AtEndDocument{%
|
||||||
|
\if@filesw
|
||||||
|
\ifnum\value{figure}=\z@ % no figures
|
||||||
|
\immediate\write\@mainaux {\global\string\figuresfalse}%
|
||||||
|
\else
|
||||||
|
\immediate\write\@mainaux {\global\string\figurestrue}%
|
||||||
|
\fi
|
||||||
|
\ifnum\value{table}=\z@ % no tables
|
||||||
|
\immediate\write\@mainaux {\global\string\tablesfalse}%
|
||||||
|
\else
|
||||||
|
\immediate\write\@mainaux {\global\string\tablestrue}%
|
||||||
|
\fi
|
||||||
|
\fi
|
||||||
|
}
|
||||||
|
\makeatother
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Table of contents
|
||||||
|
\setcounter{tocdepth}{1}
|
||||||
|
\renewcommand{\sphinxtableofcontents}{}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% Hyperref
|
||||||
|
\hypersetup{hidelinks}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
\endinput
|
||||||
22
source/frUpwork/project_spec/project_spec/latexmkjarc
Normal file
22
source/frUpwork/project_spec/project_spec/latexmkjarc
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
$latex = 'pdflatex ' . $ENV{'LATEXOPTS'} . ' -kanji=utf8 %O %S';
|
||||||
|
$dvipdf = 'dvipdfmx %O -o %D %S';
|
||||||
|
$makeindex = 'internal mendex %S %B %D';
|
||||||
|
sub mendex {
|
||||||
|
my ($source, $basename, $destination) = @_;
|
||||||
|
my $dictfile = $basename . ".dic";
|
||||||
|
unlink($destination);
|
||||||
|
system("mendex", "-U", "-f", "-d", $dictfile, "-s", "python.ist", $source);
|
||||||
|
if ($? > 0) {
|
||||||
|
print("mendex exited with error code $? (ignored)\n");
|
||||||
|
}
|
||||||
|
if (!-e $destination) {
|
||||||
|
# create an empty .ind file if nothing
|
||||||
|
open(FH, ">" . $destination);
|
||||||
|
close(FH);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
add_cus_dep( "glo", "gls", 0, "makeglo" );
|
||||||
|
sub makeglo {
|
||||||
|
return system( "mendex -J -f -s gglo.ist -o '$_[0].gls' '$_[0].glo'" );
|
||||||
|
}
|
||||||
9
source/frUpwork/project_spec/project_spec/latexmkrc
Normal file
9
source/frUpwork/project_spec/project_spec/latexmkrc
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
$latex = 'latex ' . $ENV{'LATEXOPTS'} . ' %O %S';
|
||||||
|
$pdflatex = 'pdflatex ' . $ENV{'LATEXOPTS'} . ' %O %S';
|
||||||
|
$lualatex = 'lualatex ' . $ENV{'LATEXOPTS'} . ' %O %S';
|
||||||
|
$xelatex = 'xelatex --no-pdf ' . $ENV{'LATEXOPTS'} . ' %O %S';
|
||||||
|
$makeindex = 'makeindex -s python.ist %O -o %D %S';
|
||||||
|
add_cus_dep( "glo", "gls", 0, "makeglo" );
|
||||||
|
sub makeglo {
|
||||||
|
return system( "makeindex -s gglo.ist -o '$_[0].gls' '$_[0].glo'" );
|
||||||
|
}
|
||||||
31
source/frUpwork/project_spec/project_spec/make.bat
Normal file
31
source/frUpwork/project_spec/project_spec/make.bat
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
@ECHO OFF
|
||||||
|
|
||||||
|
REM Command file for Sphinx documentation
|
||||||
|
|
||||||
|
pushd %~dp0
|
||||||
|
|
||||||
|
set PDFLATEX=latexmk -pdf -dvi- -ps-
|
||||||
|
|
||||||
|
set "LATEXOPTS= "
|
||||||
|
|
||||||
|
if "%1" == "" goto all-pdf
|
||||||
|
|
||||||
|
if "%1" == "all-pdf" (
|
||||||
|
:all-pdf
|
||||||
|
for %%i in (*.tex) do (
|
||||||
|
%PDFLATEX% %LATEXMKOPTS% %%i
|
||||||
|
)
|
||||||
|
goto end
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%1" == "all-pdf-ja" (
|
||||||
|
goto all-pdf
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%1" == "clean" (
|
||||||
|
del /q /s *.dvi *.log *.ind *.aux *.toc *.syn *.idx *.out *.ilg *.pla *.ps *.tar *.tar.gz *.tar.bz2 *.tar.xz *.fls *.fdb_latexmk
|
||||||
|
goto end
|
||||||
|
)
|
||||||
|
|
||||||
|
:end
|
||||||
|
popd
|
||||||
16
source/frUpwork/project_spec/project_spec/python.ist
Normal file
16
source/frUpwork/project_spec/project_spec/python.ist
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
line_max 100
|
||||||
|
headings_flag 1
|
||||||
|
heading_prefix " \\bigletter "
|
||||||
|
|
||||||
|
preamble "\\begin{sphinxtheindex}
|
||||||
|
\\let\\bigletter\\sphinxstyleindexlettergroup
|
||||||
|
\\let\\spxpagem \\sphinxstyleindexpagemain
|
||||||
|
\\let\\spxentry \\sphinxstyleindexentry
|
||||||
|
\\let\\spxextra \\sphinxstyleindexextra
|
||||||
|
|
||||||
|
"
|
||||||
|
|
||||||
|
postamble "\n\n\\end{sphinxtheindex}\n"
|
||||||
|
|
||||||
|
symhead_positive "{\\sphinxsymbolsname}"
|
||||||
|
numhead_positive "{\\sphinxnumbersname}"
|
||||||
351
source/frUpwork/project_spec/project_spec/sphinx.sty
Normal file
351
source/frUpwork/project_spec/project_spec/sphinx.sty
Normal file
|
|
@ -0,0 +1,351 @@
|
||||||
|
%
|
||||||
|
% sphinx.sty
|
||||||
|
%
|
||||||
|
% Adapted from the old python.sty, mostly written by Fred Drake,
|
||||||
|
% by Georg Brandl.
|
||||||
|
%
|
||||||
|
|
||||||
|
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
|
||||||
|
\ProvidesPackage{sphinx}[2021/01/27 v4.0.0 LaTeX package (Sphinx markup)]
|
||||||
|
|
||||||
|
% provides \ltx@ifundefined
|
||||||
|
% (many packages load ltxcmds: graphicx does for pdftex and lualatex but
|
||||||
|
% not xelatex, and anyhow kvoptions does, but it may be needed in future to
|
||||||
|
% use \sphinxdeprecationwarning earlier, and it needs \ltx@ifundefined)
|
||||||
|
\RequirePackage{ltxcmds}
|
||||||
|
|
||||||
|
%% for deprecation warnings
|
||||||
|
\newcommand\sphinxdeprecationwarning[4]{% #1 the deprecated macro or name,
|
||||||
|
% #2 = when deprecated, #3 = when removed, #4 = additional info
|
||||||
|
\edef\spx@tempa{\detokenize{#1}}%
|
||||||
|
\ltx@ifundefined{sphinx_depr_\spx@tempa}{%
|
||||||
|
\global\expandafter\let\csname sphinx_depr_\spx@tempa\endcsname\spx@tempa
|
||||||
|
\expandafter\AtEndDocument\expandafter{\expandafter\let\expandafter
|
||||||
|
\sphinxdeprecatedmacro\csname sphinx_depr_\spx@tempa\endcsname
|
||||||
|
\PackageWarningNoLine{sphinx}{^^J**** SPHINX DEPRECATION WARNING:^^J
|
||||||
|
\sphinxdeprecatedmacro^^J
|
||||||
|
\@spaces- is deprecated at Sphinx #2^^J
|
||||||
|
\@spaces- and removed at Sphinx #3.^^J
|
||||||
|
#4^^J****}}%
|
||||||
|
}{% warning already emitted (at end of latex log), don't repeat
|
||||||
|
}}
|
||||||
|
|
||||||
|
|
||||||
|
%% OPTION HANDLING
|
||||||
|
%
|
||||||
|
|
||||||
|
% We first handle options then load packages, but we need \definecolor from
|
||||||
|
% xcolor/color.
|
||||||
|
|
||||||
|
% FIXME: we should \RequirePackage{xcolor} always now
|
||||||
|
% The xcolor package draws better fcolorboxes around verbatim code
|
||||||
|
\IfFileExists{xcolor.sty}{
|
||||||
|
\RequirePackage{xcolor}
|
||||||
|
}{
|
||||||
|
\RequirePackage{color}
|
||||||
|
}
|
||||||
|
|
||||||
|
% Handle options via "kvoptions" (later loaded by hyperref anyhow)
|
||||||
|
\RequirePackage{kvoptions}
|
||||||
|
\SetupKeyvalOptions{prefix=spx@opt@} % use \spx@opt@ prefix
|
||||||
|
|
||||||
|
% Sphinx legacy text layout: 1in margins on all four sides
|
||||||
|
\ifx\@jsc@uplatextrue\@undefined
|
||||||
|
\DeclareStringOption[1in]{hmargin}
|
||||||
|
\DeclareStringOption[1in]{vmargin}
|
||||||
|
\DeclareStringOption[.5in]{marginpar}
|
||||||
|
\else
|
||||||
|
% Japanese standard document classes handle \mag in a special way
|
||||||
|
\DeclareStringOption[\inv@mag in]{hmargin}
|
||||||
|
\DeclareStringOption[\inv@mag in]{vmargin}
|
||||||
|
\DeclareStringOption[.5\dimexpr\inv@mag in\relax]{marginpar}
|
||||||
|
\fi
|
||||||
|
|
||||||
|
\DeclareStringOption[0]{maxlistdepth}% \newcommand*\spx@opt@maxlistdepth{0}
|
||||||
|
\DeclareStringOption[-1]{numfigreset}
|
||||||
|
\DeclareBoolOption[false]{nonumfigreset}
|
||||||
|
\DeclareBoolOption[false]{mathnumfig}
|
||||||
|
\define@key{sphinx}{bookmarksdepth}{\AtBeginDocument{\hypersetup{bookmarksdepth=#1}}}
|
||||||
|
\AtBeginDocument{\define@key{sphinx}{bookmarksdepth}{\hypersetup{bookmarksdepth=#1}}}
|
||||||
|
% \DeclareBoolOption[false]{usespart}% not used
|
||||||
|
% dimensions, we declare the \dimen registers here.
|
||||||
|
\newdimen\sphinxverbatimsep
|
||||||
|
\newdimen\sphinxverbatimborder
|
||||||
|
\newdimen\sphinxshadowsep
|
||||||
|
\newdimen\sphinxshadowsize
|
||||||
|
\newdimen\sphinxshadowrule
|
||||||
|
% \DeclareStringOption is not convenient for the handling of these dimensions
|
||||||
|
% because we want to assign the values to the corresponding registers. Even if
|
||||||
|
% we added the code to the key handler it would be too late for the initial
|
||||||
|
% set-up and we would need to do initial assignments explicitly. We end up
|
||||||
|
% using \define@key directly.
|
||||||
|
% verbatim
|
||||||
|
\sphinxverbatimsep=\fboxsep
|
||||||
|
\define@key{sphinx}{verbatimsep}{\sphinxverbatimsep\dimexpr #1\relax}
|
||||||
|
\sphinxverbatimborder=\fboxrule
|
||||||
|
\define@key{sphinx}{verbatimborder}{\sphinxverbatimborder\dimexpr #1\relax}
|
||||||
|
% topic boxes
|
||||||
|
\sphinxshadowsep =5pt
|
||||||
|
\define@key{sphinx}{shadowsep}{\sphinxshadowsep\dimexpr #1\relax}
|
||||||
|
\sphinxshadowsize=4pt
|
||||||
|
\define@key{sphinx}{shadowsize}{\sphinxshadowsize\dimexpr #1\relax}
|
||||||
|
\sphinxshadowrule=\fboxrule
|
||||||
|
\define@key{sphinx}{shadowrule}{\sphinxshadowrule\dimexpr #1\relax}
|
||||||
|
% verbatim
|
||||||
|
\DeclareBoolOption[true]{verbatimwithframe}
|
||||||
|
\DeclareBoolOption[true]{verbatimwrapslines}
|
||||||
|
\DeclareBoolOption[false]{verbatimforcewraps}
|
||||||
|
\DeclareStringOption[3]{verbatimmaxoverfull}
|
||||||
|
\DeclareStringOption[100]{verbatimmaxunderfull}
|
||||||
|
\DeclareBoolOption[true]{verbatimhintsturnover}
|
||||||
|
\DeclareBoolOption[true]{inlineliteralwraps}
|
||||||
|
\DeclareStringOption[t]{literalblockcappos}
|
||||||
|
\DeclareStringOption[r]{verbatimcontinuedalign}
|
||||||
|
\DeclareStringOption[r]{verbatimcontinuesalign}
|
||||||
|
% parsed literal
|
||||||
|
\DeclareBoolOption[true]{parsedliteralwraps}
|
||||||
|
% \textvisiblespace for compatibility with fontspec+XeTeX/LuaTeX
|
||||||
|
\DeclareStringOption[\textcolor{red}{\textvisiblespace}]{verbatimvisiblespace}
|
||||||
|
\DeclareStringOption % must use braces to hide the brackets
|
||||||
|
[{\makebox[2\fontcharwd\font`\x][r]{\textcolor{red}{\tiny$\m@th\hookrightarrow$}}}]%
|
||||||
|
{verbatimcontinued}
|
||||||
|
% notices/admonitions
|
||||||
|
% the dimensions for notices/admonitions are kept as macros and assigned to
|
||||||
|
% \spx@notice@border at time of use, hence \DeclareStringOption is ok for this
|
||||||
|
\newdimen\spx@notice@border
|
||||||
|
\DeclareStringOption[0.5pt]{noteborder}
|
||||||
|
\DeclareStringOption[0.5pt]{hintborder}
|
||||||
|
\DeclareStringOption[0.5pt]{importantborder}
|
||||||
|
\DeclareStringOption[0.5pt]{tipborder}
|
||||||
|
\DeclareStringOption[1pt]{warningborder}
|
||||||
|
\DeclareStringOption[1pt]{cautionborder}
|
||||||
|
\DeclareStringOption[1pt]{attentionborder}
|
||||||
|
\DeclareStringOption[1pt]{dangerborder}
|
||||||
|
\DeclareStringOption[1pt]{errorborder}
|
||||||
|
% footnotes
|
||||||
|
\DeclareStringOption[\mbox{ }]{AtStartFootnote}
|
||||||
|
% we need a public macro name for direct use in latex file
|
||||||
|
\newcommand*{\sphinxAtStartFootnote}{\spx@opt@AtStartFootnote}
|
||||||
|
% no such need for this one, as it is used inside other macros
|
||||||
|
\DeclareStringOption[\leavevmode\unskip]{BeforeFootnote}
|
||||||
|
% some font styling.
|
||||||
|
\DeclareStringOption[\sffamily\bfseries]{HeaderFamily}
|
||||||
|
% colours
|
||||||
|
% same problems as for dimensions: we want the key handler to use \definecolor.
|
||||||
|
% first, some colours with no prefix, for backwards compatibility
|
||||||
|
\newcommand*{\sphinxDeclareColorOption}[2]{%
|
||||||
|
\definecolor{#1}#2%
|
||||||
|
\define@key{sphinx}{#1}{\definecolor{#1}##1}%
|
||||||
|
}%
|
||||||
|
\sphinxDeclareColorOption{TitleColor}{{rgb}{0.126,0.263,0.361}}
|
||||||
|
\sphinxDeclareColorOption{InnerLinkColor}{{rgb}{0.208,0.374,0.486}}
|
||||||
|
\sphinxDeclareColorOption{OuterLinkColor}{{rgb}{0.216,0.439,0.388}}
|
||||||
|
\sphinxDeclareColorOption{VerbatimColor}{{rgb}{1,1,1}}
|
||||||
|
\sphinxDeclareColorOption{VerbatimBorderColor}{{rgb}{0,0,0}}
|
||||||
|
% now the colours defined with "sphinx" prefix in their names
|
||||||
|
\newcommand*{\sphinxDeclareSphinxColorOption}[2]{%
|
||||||
|
% set the initial default
|
||||||
|
\definecolor{sphinx#1}#2%
|
||||||
|
% set the key handler. The "value" ##1 must be acceptable by \definecolor.
|
||||||
|
\define@key{sphinx}{#1}{\definecolor{sphinx#1}##1}%
|
||||||
|
}%
|
||||||
|
% Default color chosen to be as in minted.sty LaTeX package!
|
||||||
|
\sphinxDeclareSphinxColorOption{VerbatimHighlightColor}{{rgb}{0.878,1,1}}
|
||||||
|
% admonition boxes, "light" style
|
||||||
|
\sphinxDeclareSphinxColorOption{noteBorderColor}{{rgb}{0,0,0}}
|
||||||
|
\sphinxDeclareSphinxColorOption{hintBorderColor}{{rgb}{0,0,0}}
|
||||||
|
\sphinxDeclareSphinxColorOption{importantBorderColor}{{rgb}{0,0,0}}
|
||||||
|
\sphinxDeclareSphinxColorOption{tipBorderColor}{{rgb}{0,0,0}}
|
||||||
|
% admonition boxes, "heavy" style
|
||||||
|
\sphinxDeclareSphinxColorOption{warningBorderColor}{{rgb}{0,0,0}}
|
||||||
|
\sphinxDeclareSphinxColorOption{cautionBorderColor}{{rgb}{0,0,0}}
|
||||||
|
\sphinxDeclareSphinxColorOption{attentionBorderColor}{{rgb}{0,0,0}}
|
||||||
|
\sphinxDeclareSphinxColorOption{dangerBorderColor}{{rgb}{0,0,0}}
|
||||||
|
\sphinxDeclareSphinxColorOption{errorBorderColor}{{rgb}{0,0,0}}
|
||||||
|
\sphinxDeclareSphinxColorOption{warningBgColor}{{rgb}{1,1,1}}
|
||||||
|
\sphinxDeclareSphinxColorOption{cautionBgColor}{{rgb}{1,1,1}}
|
||||||
|
\sphinxDeclareSphinxColorOption{attentionBgColor}{{rgb}{1,1,1}}
|
||||||
|
\sphinxDeclareSphinxColorOption{dangerBgColor}{{rgb}{1,1,1}}
|
||||||
|
\sphinxDeclareSphinxColorOption{errorBgColor}{{rgb}{1,1,1}}
|
||||||
|
|
||||||
|
\DeclareDefaultOption{\@unknownoptionerror}
|
||||||
|
\ProcessKeyvalOptions*
|
||||||
|
% don't allow use of maxlistdepth via \sphinxsetup.
|
||||||
|
\DisableKeyvalOption{sphinx}{maxlistdepth}
|
||||||
|
\DisableKeyvalOption{sphinx}{numfigreset}
|
||||||
|
\DisableKeyvalOption{sphinx}{nonumfigreset}
|
||||||
|
\DisableKeyvalOption{sphinx}{mathnumfig}
|
||||||
|
% FIXME: this is unrelated to an option, move this elsewhere
|
||||||
|
% To allow hyphenation of first word in narrow contexts; no option,
|
||||||
|
% customization to be done via 'preamble' key
|
||||||
|
\newcommand*\sphinxAtStartPar{\leavevmode\nobreak\hskip\z@skip}
|
||||||
|
% No need for the \hspace{0pt} trick (\hskip\z@skip) with luatex
|
||||||
|
\ifdefined\directlua\let\sphinxAtStartPar\@empty\fi
|
||||||
|
% user interface: options can be changed midway in a document!
|
||||||
|
\newcommand\sphinxsetup[1]{\setkeys{sphinx}{#1}}
|
||||||
|
|
||||||
|
|
||||||
|
%% MISCELLANEOUS CONTEXT
|
||||||
|
%
|
||||||
|
% flag to be set in a framed environment
|
||||||
|
% (defined here as currently needed by three sphinxlatex....sty files and
|
||||||
|
% even if not needed if such files are replaced, the definition does no harm)
|
||||||
|
\newif\ifspx@inframed
|
||||||
|
%
|
||||||
|
% \spx@ifcaptionpackage (defined at begin document)
|
||||||
|
% is needed currently in macros from:
|
||||||
|
% sphinxlatexliterals.sty (sphinxVerbatim)
|
||||||
|
% sphinxlatextables.sty (for some macros used in the table templates)
|
||||||
|
%
|
||||||
|
% \sphinxcaption is mark-up injected by the tabular and tabulary templates
|
||||||
|
% it is defined in sphinxlatextables.sty
|
||||||
|
%
|
||||||
|
% store the original \caption macro for usage with figures inside longtable
|
||||||
|
% and tabulary cells. Make sure we get the final \caption in presence of
|
||||||
|
% caption package, whether the latter was loaded before or after sphinx.
|
||||||
|
\AtBeginDocument{%
|
||||||
|
\let\spx@originalcaption\caption
|
||||||
|
\@ifpackageloaded{caption}
|
||||||
|
{\let\spx@ifcaptionpackage\@firstoftwo
|
||||||
|
\caption@AtBeginDocument*{\let\spx@originalcaption\caption}%
|
||||||
|
% in presence of caption package, drop our own \sphinxcaption whose aim was to
|
||||||
|
% ensure same width of caption to all kinds of tables (tabular(y), longtable),
|
||||||
|
% because caption package has its own width (or margin) option
|
||||||
|
\def\sphinxcaption{\caption}%
|
||||||
|
}%
|
||||||
|
{\let\spx@ifcaptionpackage\@secondoftwo}%
|
||||||
|
}
|
||||||
|
|
||||||
|
%% PASS OPTIONS
|
||||||
|
%
|
||||||
|
% pass options to hyperref; it must not have been loaded already
|
||||||
|
\input{sphinxoptionshyperref.sty}
|
||||||
|
% pass options to geometry; it must not have been loaded already
|
||||||
|
\input{sphinxoptionsgeometry.sty}
|
||||||
|
|
||||||
|
|
||||||
|
%% COLOR (general)
|
||||||
|
%
|
||||||
|
% FIXME: these two should be deprecated
|
||||||
|
%
|
||||||
|
% FIXME: \normalcolor should be used and \py@NormalColor never defined
|
||||||
|
\def\py@NormalColor{\color{black}}
|
||||||
|
% FIXME: \color{TitleColor} should be used directly and \py@TitleColor
|
||||||
|
% should never get defined.
|
||||||
|
\def\py@TitleColor{\color{TitleColor}}
|
||||||
|
|
||||||
|
|
||||||
|
%% PACKAGES
|
||||||
|
%
|
||||||
|
% as will be indicated below, secondary style files load some more packages
|
||||||
|
%
|
||||||
|
% For \text macro (sphinx.util.texescape)
|
||||||
|
% also for usage of \firstchoice@true(false) in sphinxlatexgraphics.sty
|
||||||
|
\RequirePackage{amstext}
|
||||||
|
% It was passed "warn" option from latex template in case it is already loaded
|
||||||
|
% via some other package before \usepackage{sphinx} in preamble
|
||||||
|
\RequirePackage{textcomp}
|
||||||
|
% For the H specifier. Do not \restylefloat{figure}, it breaks Sphinx code
|
||||||
|
% for allowing figures in tables.
|
||||||
|
\RequirePackage{float}
|
||||||
|
% For floating figures in the text. Better to load after float.
|
||||||
|
\RequirePackage{wrapfig}
|
||||||
|
% Provides \captionof, used once by latex writer (\captionof{figure})
|
||||||
|
\RequirePackage{capt-of}
|
||||||
|
% Support hlist directive
|
||||||
|
\RequirePackage{multicol}
|
||||||
|
|
||||||
|
|
||||||
|
%% GRAPHICS
|
||||||
|
%
|
||||||
|
% It will always be needed, so let's load it here
|
||||||
|
\RequirePackage{graphicx}
|
||||||
|
\input{sphinxlatexgraphics.sty}
|
||||||
|
|
||||||
|
|
||||||
|
%% FRAMED ENVIRONMENTS
|
||||||
|
%
|
||||||
|
\input{sphinxlatexadmonitions.sty}
|
||||||
|
\input{sphinxlatexliterals.sty}
|
||||||
|
\input{sphinxlatexshadowbox.sty}
|
||||||
|
|
||||||
|
|
||||||
|
%% CONTAINERS
|
||||||
|
%
|
||||||
|
\input{sphinxlatexcontainers.sty}
|
||||||
|
|
||||||
|
|
||||||
|
%% PYGMENTS
|
||||||
|
% stylesheet for highlighting with pygments
|
||||||
|
\RequirePackage{sphinxhighlight}
|
||||||
|
|
||||||
|
|
||||||
|
%% TABLES
|
||||||
|
%
|
||||||
|
\input{sphinxlatextables.sty}
|
||||||
|
|
||||||
|
|
||||||
|
%% NUMBERING OF FIGURES, TABLES, AND LITERAL BLOCKS
|
||||||
|
%
|
||||||
|
\input{sphinxlatexnumfig.sty}
|
||||||
|
|
||||||
|
|
||||||
|
%% LISTS
|
||||||
|
%
|
||||||
|
\input{sphinxlatexlists.sty}
|
||||||
|
|
||||||
|
|
||||||
|
%% FOOTNOTES
|
||||||
|
%
|
||||||
|
% Support scopes for footnote numbering
|
||||||
|
\newcounter{sphinxscope}
|
||||||
|
\newcommand{\sphinxstepscope}{\stepcounter{sphinxscope}}
|
||||||
|
% Some footnotes are multiply referred-to. For unique hypertarget in pdf,
|
||||||
|
% we need an additional counter. It is called "sphinxexplicit" for legacy
|
||||||
|
% reasons as "explicitly" numbered footnotes may be multiply referred-to.
|
||||||
|
\newcounter{sphinxexplicit}
|
||||||
|
\newcommand{\sphinxstepexplicit}{\stepcounter{sphinxexplicit}}
|
||||||
|
% Some babel/polyglossia languages fiddle with \@arabic, so let's be extra
|
||||||
|
% cautious and redefine \thesphinxscope with \number not \@arabic.
|
||||||
|
% Memo: we expect some subtle redefinition of \thesphinxscope to be a part of page
|
||||||
|
% scoping for footnotes, when we shall implement it.
|
||||||
|
\renewcommand{\thesphinxscope}{\number\value{sphinxscope}.\number\value{sphinxexplicit}}
|
||||||
|
\newcommand\sphinxthefootnotemark[2]{%
|
||||||
|
% this is used to make reference to an explicitly numbered footnote not on same page
|
||||||
|
% #1=label of footnote text, #2=page number where footnote text was printed
|
||||||
|
\ifdefined\pagename
|
||||||
|
\pagename\space#2, % <- space
|
||||||
|
\else
|
||||||
|
p. #2, % <- space
|
||||||
|
\fi #1% no space
|
||||||
|
}
|
||||||
|
% support large numbered footnotes in minipage; but this is now obsolete
|
||||||
|
% from systematic use of savenotes environment around minipages
|
||||||
|
\def\thempfootnote{\arabic{mpfootnote}}
|
||||||
|
% This package is needed to support hyperlinked footnotes in tables and
|
||||||
|
% framed contents, and to allow code-blocks in footnotes.
|
||||||
|
\RequirePackage{sphinxpackagefootnote}
|
||||||
|
|
||||||
|
|
||||||
|
%% INDEX, BIBLIOGRAPHY, APPENDIX, TABLE OF CONTENTS
|
||||||
|
%
|
||||||
|
\input{sphinxlatexindbibtoc.sty}
|
||||||
|
|
||||||
|
|
||||||
|
%% STYLING
|
||||||
|
%
|
||||||
|
\input{sphinxlatexstylepage.sty}
|
||||||
|
\input{sphinxlatexstyleheadings.sty}
|
||||||
|
\input{sphinxlatexstyletext.sty}
|
||||||
|
|
||||||
|
|
||||||
|
%% MODULE RELEASE DATA AND OBJECT DESCRIPTIONS
|
||||||
|
%
|
||||||
|
\input{sphinxlatexobjects.sty}
|
||||||
|
|
||||||
|
|
||||||
|
% FIXME: this line should be dropped, as "9" is default anyhow.
|
||||||
|
\ifdefined\pdfcompresslevel\pdfcompresslevel = 9 \fi
|
||||||
|
|
||||||
|
|
||||||
|
\endinput
|
||||||
230
source/frUpwork/project_spec/project_spec/sphinx.xdy
Normal file
230
source/frUpwork/project_spec/project_spec/sphinx.xdy
Normal file
|
|
@ -0,0 +1,230 @@
|
||||||
|
;;; -*- mode: lisp; coding: utf-8; -*-
|
||||||
|
|
||||||
|
;; Unfortunately xindy is out-of-the-box hyperref-incompatible. This
|
||||||
|
;; configuration is a workaround, which requires to pass option
|
||||||
|
;; hyperindex=false to hyperref.
|
||||||
|
;; textit and emph not currently used, spxpagem replaces former textbf
|
||||||
|
(define-attributes (("textbf" "textit" "emph" "spxpagem" "default")))
|
||||||
|
(markup-locref :open "\textbf{\hyperpage{" :close "}}" :attr "textbf")
|
||||||
|
(markup-locref :open "\textit{\hyperpage{" :close "}}" :attr "textit")
|
||||||
|
(markup-locref :open "\emph{\hyperpage{" :close "}}" :attr "emph")
|
||||||
|
(markup-locref :open "\spxpagem{\hyperpage{" :close "}}" :attr "spxpagem")
|
||||||
|
(markup-locref :open "\hyperpage{" :close "}" :attr "default")
|
||||||
|
|
||||||
|
(require "numeric-sort.xdy")
|
||||||
|
|
||||||
|
;; xindy base module latex.xdy loads tex.xdy and the latter instructs
|
||||||
|
;; xindy to ignore **all** TeX macros in .idx entries, except those
|
||||||
|
;; explicitly described in merge rule. But when after applying all
|
||||||
|
;; merge rules an empty string results, xindy raises an error:
|
||||||
|
|
||||||
|
;; ERROR: CHAR: index 0 should be less than the length of the string
|
||||||
|
|
||||||
|
;; For example when using pdflatex with utf-8 characters the index
|
||||||
|
;; file will contain \IeC macros and they will get ignored except if
|
||||||
|
;; suitable merge rules are loaded early. The texindy script coming
|
||||||
|
;; with xindy provides this, but only for Latin scripts. The texindy
|
||||||
|
;; man page says to use rather xelatex or lualatex in case of Cyrillic
|
||||||
|
;; scripts.
|
||||||
|
|
||||||
|
;; Sphinx contributes LICRcyr2utf8.xdy to provide support for Cyrillic
|
||||||
|
;; scripts for the pdflatex engine.
|
||||||
|
|
||||||
|
;; Another issue caused by xindy ignoring all TeX macros except those
|
||||||
|
;; explicitly declared reveals itself when attempting to index ">>>",
|
||||||
|
;; as the ">" is converted to "\textgreater{}" by Sphinx's LaTeX
|
||||||
|
;; escaping.
|
||||||
|
|
||||||
|
;; To fix this, Sphinx does **not** use texindy, and does not even
|
||||||
|
;; load the xindy latex.xdy base module.
|
||||||
|
|
||||||
|
;(require "latex.xdy")
|
||||||
|
|
||||||
|
;; Rather it incorporates some suitable extracts from latex.xdy and
|
||||||
|
;; tex.xdy with additional Sphinx contributed rules.
|
||||||
|
|
||||||
|
;; But, this means for pdflatex and Latin scripts that the xindy file
|
||||||
|
;; tex/inputenc/uf8.xdy is not usable because it refers to the macro
|
||||||
|
;; \IeC only sporadically, and as tex.xdy is not loaded, a rule such as
|
||||||
|
;; (merge-rule "\'e" "é" :string)
|
||||||
|
;; does not work, it must be
|
||||||
|
;; (merge-rule "\IeC {\'e}" "é" :string)
|
||||||
|
;; So Sphinx contributes LICRlatin2utf8.xdy to mitigate that problem.
|
||||||
|
|
||||||
|
;;;;;;;; extracts from tex.xdy (discarding most original comments):
|
||||||
|
|
||||||
|
;;;
|
||||||
|
;;; TeX conventions
|
||||||
|
;;;
|
||||||
|
|
||||||
|
;; Discard leading and trailing white space. Collapse multiple white
|
||||||
|
;; space characters to blank.
|
||||||
|
|
||||||
|
(merge-rule "^ +" "" :eregexp)
|
||||||
|
(merge-rule " +$" "" :eregexp)
|
||||||
|
(merge-rule " +" " " :eregexp)
|
||||||
|
|
||||||
|
;; Handle TeX markup
|
||||||
|
|
||||||
|
(merge-rule "\\([{}$%&#])" "\1" :eregexp)
|
||||||
|
|
||||||
|
;;;;;;;; end of extracts from xindy's tex.xdy
|
||||||
|
|
||||||
|
;;;;;;;; extracts from latex.xdy:
|
||||||
|
|
||||||
|
;; Standard location classes: arabic and roman numbers, and alphabets.
|
||||||
|
|
||||||
|
(define-location-class "arabic-page-numbers" ("arabic-numbers"))
|
||||||
|
(define-location-class "roman-page-numbers" ("roman-numbers-lowercase"))
|
||||||
|
(define-location-class "Roman-page-numbers" ("roman-numbers-uppercase"))
|
||||||
|
(define-location-class "alpha-page-numbers" ("alpha"))
|
||||||
|
(define-location-class "Alpha-page-numbers" ("ALPHA"))
|
||||||
|
|
||||||
|
;; Output Markup
|
||||||
|
|
||||||
|
(markup-letter-group-list :sep "~n~n \indexspace~n")
|
||||||
|
|
||||||
|
(markup-indexentry :open "~n \item " :depth 0)
|
||||||
|
(markup-indexentry :open "~n \subitem " :depth 1)
|
||||||
|
(markup-indexentry :open "~n \subsubitem " :depth 2)
|
||||||
|
|
||||||
|
(markup-locclass-list :open ", " :sep ", ")
|
||||||
|
(markup-locref-list :sep ", ")
|
||||||
|
|
||||||
|
;;;;;;;; end of extracts from latex.xdy
|
||||||
|
|
||||||
|
;; The LaTeX \index command turns \ into normal character so the TeX macros
|
||||||
|
;; written to .idx files are not followed by a blank. This is different
|
||||||
|
;; from non-ascii letters which end up (with pdflatex) as \IeC macros in .idx
|
||||||
|
;; file, with a blank space after \IeC
|
||||||
|
|
||||||
|
;; Details of the syntax are explained at
|
||||||
|
;; http://xindy.sourceforge.net/doc/manual-3.html
|
||||||
|
;; In absence of :string, "xindy uses an auto-detection mechanism to decide,
|
||||||
|
;; if the pattern is a regular expression or not". But it is not obvious to
|
||||||
|
;; guess, for example "\\_" is not detected as RE but "\\P\{\}" is, so for
|
||||||
|
;; being sure we apply the :string switch everywhere and do not use \\ etc...
|
||||||
|
|
||||||
|
;; Go back from sphinx.util.texescape TeX macros to UTF-8
|
||||||
|
|
||||||
|
(merge-rule "\sphinxleftcurlybrace{}" "{" :string)
|
||||||
|
(merge-rule "\sphinxrightcurlybrace{}" "}" :string)
|
||||||
|
(merge-rule "\_" "_" :string)
|
||||||
|
(merge-rule "{[}" "[" :string)
|
||||||
|
(merge-rule "{]}" "]" :string)
|
||||||
|
(merge-rule "\textbackslash{}" "\" :string) ; " for Emacs syntax highlighting
|
||||||
|
(merge-rule "\textasciitilde{}" "~~" :string); the ~~ escape is needed here
|
||||||
|
(merge-rule "\textasciicircum{}" "^" :string)
|
||||||
|
(merge-rule "\sphinxhyphen{}" "-" :string)
|
||||||
|
(merge-rule "\textquotesingle{}" "'" :string)
|
||||||
|
(merge-rule "\textasciigrave{}" "`" :string)
|
||||||
|
(merge-rule "\textless{}" "<" :string)
|
||||||
|
(merge-rule "\textgreater{}" ">" :string)
|
||||||
|
(merge-rule "\P{}" "¶" :string)
|
||||||
|
(merge-rule "\S{}" "§" :string)
|
||||||
|
(merge-rule "\texteuro{}" "€" :string)
|
||||||
|
(merge-rule "\(\infty\)" "∞" :string)
|
||||||
|
(merge-rule "\(\pm\)" "±" :string)
|
||||||
|
(merge-rule "\(\rightarrow\)" "→" :string)
|
||||||
|
(merge-rule "\(\checkmark\)" "✓" :string)
|
||||||
|
(merge-rule "\textendash{}" "–" :string)
|
||||||
|
(merge-rule "\textbar{}" "|" :string)
|
||||||
|
(merge-rule "\(\sp{\text{0}}\)" "⁰" :string)
|
||||||
|
(merge-rule "\(\sp{\text{1}}\)" "¹" :string)
|
||||||
|
(merge-rule "\(\sp{\text{2}}\)" "²" :string)
|
||||||
|
(merge-rule "\(\sp{\text{3}}\)" "³" :string)
|
||||||
|
(merge-rule "\(\sp{\text{4}}\)" "⁴" :string)
|
||||||
|
(merge-rule "\(\sp{\text{5}}\)" "⁵" :string)
|
||||||
|
(merge-rule "\(\sp{\text{6}}\)" "⁶" :string)
|
||||||
|
(merge-rule "\(\sp{\text{7}}\)" "⁷" :string)
|
||||||
|
(merge-rule "\(\sp{\text{8}}\)" "⁸" :string)
|
||||||
|
(merge-rule "\(\sp{\text{9}}\)" "⁹" :string)
|
||||||
|
(merge-rule "\(\sb{\text{0}}\)" "₀" :string)
|
||||||
|
(merge-rule "\(\sb{\text{1}}\)" "₁" :string)
|
||||||
|
(merge-rule "\(\sb{\text{2}}\)" "₂" :string)
|
||||||
|
(merge-rule "\(\sb{\text{3}}\)" "₃" :string)
|
||||||
|
(merge-rule "\(\sb{\text{4}}\)" "₄" :string)
|
||||||
|
(merge-rule "\(\sb{\text{5}}\)" "₅" :string)
|
||||||
|
(merge-rule "\(\sb{\text{6}}\)" "₆" :string)
|
||||||
|
(merge-rule "\(\sb{\text{7}}\)" "₇" :string)
|
||||||
|
(merge-rule "\(\sb{\text{8}}\)" "₈" :string)
|
||||||
|
(merge-rule "\(\sb{\text{9}}\)" "₉" :string)
|
||||||
|
(merge-rule "\IeC {\textalpha }" "α" :string)
|
||||||
|
(merge-rule "\IeC {\textbeta }" "β" :string)
|
||||||
|
(merge-rule "\IeC {\textgamma }" "γ" :string)
|
||||||
|
(merge-rule "\IeC {\textdelta }" "δ" :string)
|
||||||
|
(merge-rule "\IeC {\textepsilon }" "ε" :string)
|
||||||
|
(merge-rule "\IeC {\textzeta }" "ζ" :string)
|
||||||
|
(merge-rule "\IeC {\texteta }" "η" :string)
|
||||||
|
(merge-rule "\IeC {\texttheta }" "θ" :string)
|
||||||
|
(merge-rule "\IeC {\textiota }" "ι" :string)
|
||||||
|
(merge-rule "\IeC {\textkappa }" "κ" :string)
|
||||||
|
(merge-rule "\IeC {\textlambda }" "λ" :string)
|
||||||
|
(merge-rule "\IeC {\textmu }" "μ" :string)
|
||||||
|
(merge-rule "\IeC {\textnu }" "ν" :string)
|
||||||
|
(merge-rule "\IeC {\textxi }" "ξ" :string)
|
||||||
|
(merge-rule "\IeC {\textomicron }" "ο" :string)
|
||||||
|
(merge-rule "\IeC {\textpi }" "π" :string)
|
||||||
|
(merge-rule "\IeC {\textrho }" "ρ" :string)
|
||||||
|
(merge-rule "\IeC {\textsigma }" "σ" :string)
|
||||||
|
(merge-rule "\IeC {\texttau }" "τ" :string)
|
||||||
|
(merge-rule "\IeC {\textupsilon }" "υ" :string)
|
||||||
|
(merge-rule "\IeC {\textphi }" "φ" :string)
|
||||||
|
(merge-rule "\IeC {\textchi }" "χ" :string)
|
||||||
|
(merge-rule "\IeC {\textpsi }" "ψ" :string)
|
||||||
|
(merge-rule "\IeC {\textomega }" "ω" :string)
|
||||||
|
(merge-rule "\IeC {\textAlpha }" "Α" :string)
|
||||||
|
(merge-rule "\IeC {\textBeta }" "Β" :string)
|
||||||
|
(merge-rule "\IeC {\textGamma }" "Γ" :string)
|
||||||
|
(merge-rule "\IeC {\textDelta }" "Δ" :string)
|
||||||
|
(merge-rule "\IeC {\textEpsilon }" "Ε" :string)
|
||||||
|
(merge-rule "\IeC {\textZeta }" "Ζ" :string)
|
||||||
|
(merge-rule "\IeC {\textEta }" "Η" :string)
|
||||||
|
(merge-rule "\IeC {\textTheta }" "Θ" :string)
|
||||||
|
(merge-rule "\IeC {\textIota }" "Ι" :string)
|
||||||
|
(merge-rule "\IeC {\textKappa }" "Κ" :string)
|
||||||
|
(merge-rule "\IeC {\textLambda }" "Λ" :string)
|
||||||
|
(merge-rule "\IeC {\textMu }" "Μ" :string)
|
||||||
|
(merge-rule "\IeC {\textNu }" "Ν" :string)
|
||||||
|
(merge-rule "\IeC {\textTheta }" "Θ" :string)
|
||||||
|
(merge-rule "\IeC {\textIota }" "Ι" :string)
|
||||||
|
(merge-rule "\IeC {\textKappa }" "Κ" :string)
|
||||||
|
(merge-rule "\IeC {\textLambda }" "Λ" :string)
|
||||||
|
(merge-rule "\IeC {\textMu }" "Μ" :string)
|
||||||
|
(merge-rule "\IeC {\textNu }" "Ν" :string)
|
||||||
|
(merge-rule "\IeC {\textXi }" "Ξ" :string)
|
||||||
|
(merge-rule "\IeC {\textOmicron }" "Ο" :string)
|
||||||
|
(merge-rule "\IeC {\textPi }" "Π" :string)
|
||||||
|
(merge-rule "\IeC {\textRho }" "Ρ" :string)
|
||||||
|
(merge-rule "\IeC {\textSigma }" "Σ" :string)
|
||||||
|
(merge-rule "\IeC {\textTau }" "Τ" :string)
|
||||||
|
(merge-rule "\IeC {\textUpsilon }" "Υ" :string)
|
||||||
|
(merge-rule "\IeC {\textPhi }" "Φ" :string)
|
||||||
|
(merge-rule "\IeC {\textChi }" "Χ" :string)
|
||||||
|
(merge-rule "\IeC {\textPsi }" "Ψ" :string)
|
||||||
|
(merge-rule "\IeC {\textOmega }" "Ω" :string)
|
||||||
|
(merge-rule "\IeC {\textohm }" "Ω" :string)
|
||||||
|
|
||||||
|
;; This xindy module provides some basic support for "see"
|
||||||
|
(require "makeindex.xdy")
|
||||||
|
|
||||||
|
;; This creates one-letter headings and works fine with utf-8 letters.
|
||||||
|
;; For Cyrillic with pdflatex works thanks to LICRcyr2utf8.xdy
|
||||||
|
(require "latin-lettergroups.xdy")
|
||||||
|
|
||||||
|
;; currently we don't (know how to easily) separate "Numbers" from
|
||||||
|
;; "Symbols" with xindy as is the case with makeindex.
|
||||||
|
(markup-index :open "\begin{sphinxtheindex}
|
||||||
|
\let\lettergroup\sphinxstyleindexlettergroup
|
||||||
|
\let\lettergroupDefault\sphinxstyleindexlettergroupDefault
|
||||||
|
\let\spxpagem\sphinxstyleindexpagemain
|
||||||
|
\let\spxentry\sphinxstyleindexentry
|
||||||
|
\let\spxextra\sphinxstyleindexextra
|
||||||
|
|
||||||
|
"
|
||||||
|
:close "
|
||||||
|
|
||||||
|
\end{sphinxtheindex}
|
||||||
|
"
|
||||||
|
:tree)
|
||||||
|
|
||||||
107
source/frUpwork/project_spec/project_spec/sphinxhighlight.sty
Normal file
107
source/frUpwork/project_spec/project_spec/sphinxhighlight.sty
Normal file
|
|
@ -0,0 +1,107 @@
|
||||||
|
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
|
||||||
|
\ProvidesPackage{sphinxhighlight}[2016/05/29 stylesheet for highlighting with pygments]
|
||||||
|
% Its contents depend on pygments_style configuration variable.
|
||||||
|
|
||||||
|
|
||||||
|
\makeatletter
|
||||||
|
\def\PYG@reset{\let\PYG@it=\relax \let\PYG@bf=\relax%
|
||||||
|
\let\PYG@ul=\relax \let\PYG@tc=\relax%
|
||||||
|
\let\PYG@bc=\relax \let\PYG@ff=\relax}
|
||||||
|
\def\PYG@tok#1{\csname PYG@tok@#1\endcsname}
|
||||||
|
\def\PYG@toks#1+{\ifx\relax#1\empty\else%
|
||||||
|
\PYG@tok{#1}\expandafter\PYG@toks\fi}
|
||||||
|
\def\PYG@do#1{\PYG@bc{\PYG@tc{\PYG@ul{%
|
||||||
|
\PYG@it{\PYG@bf{\PYG@ff{#1}}}}}}}
|
||||||
|
\def\PYG#1#2{\PYG@reset\PYG@toks#1+\relax+\PYG@do{#2}}
|
||||||
|
|
||||||
|
\@namedef{PYG@tok@w}{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.73,0.73}{##1}}}
|
||||||
|
\@namedef{PYG@tok@c}{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}}
|
||||||
|
\@namedef{PYG@tok@cp}{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
|
||||||
|
\@namedef{PYG@tok@cs}{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}\def\PYG@bc##1{{\setlength{\fboxsep}{0pt}\colorbox[rgb]{1.00,0.94,0.94}{\strut ##1}}}}
|
||||||
|
\@namedef{PYG@tok@k}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
|
||||||
|
\@namedef{PYG@tok@kp}{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
|
||||||
|
\@namedef{PYG@tok@kt}{\def\PYG@tc##1{\textcolor[rgb]{0.56,0.13,0.00}{##1}}}
|
||||||
|
\@namedef{PYG@tok@o}{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||||
|
\@namedef{PYG@tok@ow}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
|
||||||
|
\@namedef{PYG@tok@nb}{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
|
||||||
|
\@namedef{PYG@tok@nf}{\def\PYG@tc##1{\textcolor[rgb]{0.02,0.16,0.49}{##1}}}
|
||||||
|
\@namedef{PYG@tok@nc}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.05,0.52,0.71}{##1}}}
|
||||||
|
\@namedef{PYG@tok@nn}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.05,0.52,0.71}{##1}}}
|
||||||
|
\@namedef{PYG@tok@ne}{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
|
||||||
|
\@namedef{PYG@tok@nv}{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.38,0.84}{##1}}}
|
||||||
|
\@namedef{PYG@tok@no}{\def\PYG@tc##1{\textcolor[rgb]{0.38,0.68,0.84}{##1}}}
|
||||||
|
\@namedef{PYG@tok@nl}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.13,0.44}{##1}}}
|
||||||
|
\@namedef{PYG@tok@ni}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.84,0.33,0.22}{##1}}}
|
||||||
|
\@namedef{PYG@tok@na}{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
|
||||||
|
\@namedef{PYG@tok@nt}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.02,0.16,0.45}{##1}}}
|
||||||
|
\@namedef{PYG@tok@nd}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.33,0.33,0.33}{##1}}}
|
||||||
|
\@namedef{PYG@tok@s}{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
|
||||||
|
\@namedef{PYG@tok@sd}{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
|
||||||
|
\@namedef{PYG@tok@si}{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.44,0.63,0.82}{##1}}}
|
||||||
|
\@namedef{PYG@tok@se}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
|
||||||
|
\@namedef{PYG@tok@sr}{\def\PYG@tc##1{\textcolor[rgb]{0.14,0.33,0.53}{##1}}}
|
||||||
|
\@namedef{PYG@tok@ss}{\def\PYG@tc##1{\textcolor[rgb]{0.32,0.47,0.09}{##1}}}
|
||||||
|
\@namedef{PYG@tok@sx}{\def\PYG@tc##1{\textcolor[rgb]{0.78,0.36,0.04}{##1}}}
|
||||||
|
\@namedef{PYG@tok@m}{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
|
||||||
|
\@namedef{PYG@tok@gh}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}
|
||||||
|
\@namedef{PYG@tok@gu}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.50,0.00,0.50}{##1}}}
|
||||||
|
\@namedef{PYG@tok@gd}{\def\PYG@tc##1{\textcolor[rgb]{0.63,0.00,0.00}{##1}}}
|
||||||
|
\@namedef{PYG@tok@gi}{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.63,0.00}{##1}}}
|
||||||
|
\@namedef{PYG@tok@gr}{\def\PYG@tc##1{\textcolor[rgb]{1.00,0.00,0.00}{##1}}}
|
||||||
|
\@namedef{PYG@tok@ge}{\let\PYG@it=\textit}
|
||||||
|
\@namedef{PYG@tok@gs}{\let\PYG@bf=\textbf}
|
||||||
|
\@namedef{PYG@tok@ges}{\let\PYG@bf=\textbf\let\PYG@it=\textit}
|
||||||
|
\@namedef{PYG@tok@gp}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.78,0.36,0.04}{##1}}}
|
||||||
|
\@namedef{PYG@tok@go}{\def\PYG@tc##1{\textcolor[rgb]{0.20,0.20,0.20}{##1}}}
|
||||||
|
\@namedef{PYG@tok@gt}{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.27,0.87}{##1}}}
|
||||||
|
\@namedef{PYG@tok@err}{\def\PYG@bc##1{{\setlength{\fboxsep}{\string -\fboxrule}\fcolorbox[rgb]{1.00,0.00,0.00}{1,1,1}{\strut ##1}}}}
|
||||||
|
\@namedef{PYG@tok@kc}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
|
||||||
|
\@namedef{PYG@tok@kd}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
|
||||||
|
\@namedef{PYG@tok@kn}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
|
||||||
|
\@namedef{PYG@tok@kr}{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
|
||||||
|
\@namedef{PYG@tok@bp}{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
|
||||||
|
\@namedef{PYG@tok@fm}{\def\PYG@tc##1{\textcolor[rgb]{0.02,0.16,0.49}{##1}}}
|
||||||
|
\@namedef{PYG@tok@vc}{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.38,0.84}{##1}}}
|
||||||
|
\@namedef{PYG@tok@vg}{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.38,0.84}{##1}}}
|
||||||
|
\@namedef{PYG@tok@vi}{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.38,0.84}{##1}}}
|
||||||
|
\@namedef{PYG@tok@vm}{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.38,0.84}{##1}}}
|
||||||
|
\@namedef{PYG@tok@sa}{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
|
||||||
|
\@namedef{PYG@tok@sb}{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
|
||||||
|
\@namedef{PYG@tok@sc}{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
|
||||||
|
\@namedef{PYG@tok@dl}{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
|
||||||
|
\@namedef{PYG@tok@s2}{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
|
||||||
|
\@namedef{PYG@tok@sh}{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
|
||||||
|
\@namedef{PYG@tok@s1}{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
|
||||||
|
\@namedef{PYG@tok@mb}{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
|
||||||
|
\@namedef{PYG@tok@mf}{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
|
||||||
|
\@namedef{PYG@tok@mh}{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
|
||||||
|
\@namedef{PYG@tok@mi}{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
|
||||||
|
\@namedef{PYG@tok@il}{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
|
||||||
|
\@namedef{PYG@tok@mo}{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
|
||||||
|
\@namedef{PYG@tok@ch}{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}}
|
||||||
|
\@namedef{PYG@tok@cm}{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}}
|
||||||
|
\@namedef{PYG@tok@cpf}{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}}
|
||||||
|
\@namedef{PYG@tok@c1}{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}}
|
||||||
|
|
||||||
|
\def\PYGZbs{\char`\\}
|
||||||
|
\def\PYGZus{\char`\_}
|
||||||
|
\def\PYGZob{\char`\{}
|
||||||
|
\def\PYGZcb{\char`\}}
|
||||||
|
\def\PYGZca{\char`\^}
|
||||||
|
\def\PYGZam{\char`\&}
|
||||||
|
\def\PYGZlt{\char`\<}
|
||||||
|
\def\PYGZgt{\char`\>}
|
||||||
|
\def\PYGZsh{\char`\#}
|
||||||
|
\def\PYGZpc{\char`\%}
|
||||||
|
\def\PYGZdl{\char`\$}
|
||||||
|
\def\PYGZhy{\char`\-}
|
||||||
|
\def\PYGZsq{\char`\'}
|
||||||
|
\def\PYGZdq{\char`\"}
|
||||||
|
\def\PYGZti{\char`\~}
|
||||||
|
% for compatibility with earlier versions
|
||||||
|
\def\PYGZat{@}
|
||||||
|
\def\PYGZlb{[}
|
||||||
|
\def\PYGZrb{]}
|
||||||
|
\makeatother
|
||||||
|
|
||||||
|
\renewcommand\PYGZsq{\textquotesingle}
|
||||||
102
source/frUpwork/project_spec/project_spec/sphinxhowto.cls
Normal file
102
source/frUpwork/project_spec/project_spec/sphinxhowto.cls
Normal file
|
|
@ -0,0 +1,102 @@
|
||||||
|
%
|
||||||
|
% sphinxhowto.cls for Sphinx (https://www.sphinx-doc.org/)
|
||||||
|
%
|
||||||
|
|
||||||
|
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
|
||||||
|
\ProvidesClass{sphinxhowto}[2019/12/01 v2.3.0 Document class (Sphinx howto)]
|
||||||
|
|
||||||
|
% 'oneside' option overriding the 'twoside' default
|
||||||
|
\newif\if@oneside
|
||||||
|
\DeclareOption{oneside}{\@onesidetrue}
|
||||||
|
% Pass remaining document options to the parent class.
|
||||||
|
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\sphinxdocclass}}
|
||||||
|
\ProcessOptions\relax
|
||||||
|
|
||||||
|
% Default to two-side document
|
||||||
|
\if@oneside
|
||||||
|
% nothing to do (oneside is the default)
|
||||||
|
\else
|
||||||
|
\PassOptionsToClass{twoside}{\sphinxdocclass}
|
||||||
|
\fi
|
||||||
|
|
||||||
|
\LoadClass{\sphinxdocclass}
|
||||||
|
|
||||||
|
% Set some sane defaults for section numbering depth and TOC depth. You can
|
||||||
|
% reset these counters in your preamble.
|
||||||
|
%
|
||||||
|
\setcounter{secnumdepth}{2}
|
||||||
|
\setcounter{tocdepth}{2}% i.e. section and subsection
|
||||||
|
|
||||||
|
% Adapt \and command to the flushright context of \sphinxmaketitle, to
|
||||||
|
% avoid ragged line endings if author names do not fit all on one single line
|
||||||
|
\DeclareRobustCommand{\and}{%
|
||||||
|
\end{tabular}\kern-\tabcolsep
|
||||||
|
\allowbreak
|
||||||
|
\hskip\dimexpr1em+\tabcolsep\@plus.17fil\begin{tabular}[t]{c}%
|
||||||
|
}%
|
||||||
|
% If it is desired that each author name be on its own line, use in preamble:
|
||||||
|
%\DeclareRobustCommand{\and}{%
|
||||||
|
% \end{tabular}\kern-\tabcolsep\\\begin{tabular}[t]{c}%
|
||||||
|
%}%
|
||||||
|
% Change the title page to look a bit better, and fit in with the fncychap
|
||||||
|
% ``Bjarne'' style a bit better.
|
||||||
|
%
|
||||||
|
\newcommand{\sphinxmaketitle}{%
|
||||||
|
\noindent\rule{\textwidth}{1pt}\par
|
||||||
|
\begingroup % for PDF information dictionary
|
||||||
|
\def\endgraf{ }\def\and{\& }%
|
||||||
|
\pdfstringdefDisableCommands{\def\\{, }}% overwrite hyperref setup
|
||||||
|
\hypersetup{pdfauthor={\@author}, pdftitle={\@title}}%
|
||||||
|
\endgroup
|
||||||
|
\begin{flushright}
|
||||||
|
\sphinxlogo
|
||||||
|
\py@HeaderFamily
|
||||||
|
{\Huge \@title }\par
|
||||||
|
{\itshape\large \py@release \releaseinfo}\par
|
||||||
|
\vspace{25pt}
|
||||||
|
{\Large
|
||||||
|
\begin{tabular}[t]{c}
|
||||||
|
\@author
|
||||||
|
\end{tabular}\kern-\tabcolsep}\par
|
||||||
|
\vspace{25pt}
|
||||||
|
\@date \par
|
||||||
|
\py@authoraddress \par
|
||||||
|
\end{flushright}
|
||||||
|
\@thanks
|
||||||
|
\setcounter{footnote}{0}
|
||||||
|
\let\thanks\relax\let\maketitle\relax
|
||||||
|
%\gdef\@thanks{}\gdef\@author{}\gdef\@title{}
|
||||||
|
}
|
||||||
|
|
||||||
|
\newcommand{\sphinxtableofcontents}{%
|
||||||
|
\begingroup
|
||||||
|
\parskip \z@skip
|
||||||
|
\sphinxtableofcontentshook
|
||||||
|
\tableofcontents
|
||||||
|
\endgroup
|
||||||
|
\noindent\rule{\textwidth}{1pt}\par
|
||||||
|
\vspace{12pt}%
|
||||||
|
}
|
||||||
|
\newcommand\sphinxtableofcontentshook{}
|
||||||
|
\pagenumbering{arabic}
|
||||||
|
|
||||||
|
% Fix the bibliography environment to add an entry to the Table of
|
||||||
|
% Contents.
|
||||||
|
% For an article document class this environment is a section,
|
||||||
|
% so no page break before it.
|
||||||
|
%
|
||||||
|
\newenvironment{sphinxthebibliography}[1]{%
|
||||||
|
% \phantomsection % not needed here since TeXLive 2010's hyperref
|
||||||
|
\begin{thebibliography}{#1}%
|
||||||
|
\addcontentsline{toc}{section}{\ifdefined\refname\refname\else\ifdefined\bibname\bibname\fi\fi}}{\end{thebibliography}}
|
||||||
|
|
||||||
|
|
||||||
|
% Same for the indices.
|
||||||
|
% The memoir class already does this, so we don't duplicate it in that case.
|
||||||
|
%
|
||||||
|
\@ifclassloaded{memoir}
|
||||||
|
{\newenvironment{sphinxtheindex}{\begin{theindex}}{\end{theindex}}}
|
||||||
|
{\newenvironment{sphinxtheindex}{%
|
||||||
|
\phantomsection % needed because no chapter, section, ... is created by theindex
|
||||||
|
\begin{theindex}%
|
||||||
|
\addcontentsline{toc}{section}{\indexname}}{\end{theindex}}}
|
||||||
|
|
@ -0,0 +1,148 @@
|
||||||
|
%% NOTICES AND ADMONITIONS
|
||||||
|
%
|
||||||
|
% change this info string if making any custom modification
|
||||||
|
\ProvidesFile{sphinxlatexadmonitions.sty}[2021/01/27 admonitions]
|
||||||
|
|
||||||
|
% Provides support for this output mark-up from Sphinx latex writer:
|
||||||
|
%
|
||||||
|
% - sphinxadmonition (environment)
|
||||||
|
% This is a dispatch supporting
|
||||||
|
%
|
||||||
|
% - note, hint, important, tip (via sphinxlightbox)
|
||||||
|
% - warning, caution, attention, danger, error (via sphinxheavybox)
|
||||||
|
%
|
||||||
|
% Each sphinx<notice name> environment can be redefined by user.
|
||||||
|
% The defaults are customizable via various colour and dimension
|
||||||
|
% settings, cf sphinx docs (latex customization).
|
||||||
|
%
|
||||||
|
% Requires:
|
||||||
|
\RequirePackage{framed}% used by sphinxheavybox
|
||||||
|
%
|
||||||
|
% Dependencies (they do not need to be defined at time of loading):
|
||||||
|
% - of course the various colour and dimension options handled via sphinx.sty
|
||||||
|
% - \sphinxstrong (for sphinxlightbox and sphinxheavybox)
|
||||||
|
% - dimension register \spx@image@maxheight from sphinxlatexgraphics.sty
|
||||||
|
% - \savenotes/\spewnotes from sphinxpackagefootnote (for sphinxheavybox)
|
||||||
|
|
||||||
|
% Provides: (also in sphinxlatexliterals.sty)
|
||||||
|
\providecommand*\sphinxvspacefixafterfrenchlists{%
|
||||||
|
\ifvmode\ifdim\lastskip<\z@ \vskip\parskip\fi\else\par\fi
|
||||||
|
}
|
||||||
|
|
||||||
|
% Some are quite plain
|
||||||
|
% the spx@notice@bordercolor etc are set in the sphinxadmonition environment
|
||||||
|
\newenvironment{sphinxlightbox}{%
|
||||||
|
\par
|
||||||
|
\noindent{\color{spx@notice@bordercolor}%
|
||||||
|
\rule{\linewidth}{\spx@notice@border}}\par\nobreak
|
||||||
|
{\parskip\z@skip\noindent}%
|
||||||
|
}
|
||||||
|
{%
|
||||||
|
% counteract previous possible negative skip (French lists!):
|
||||||
|
% (we can't cancel that any earlier \vskip introduced a potential pagebreak)
|
||||||
|
\sphinxvspacefixafterfrenchlists
|
||||||
|
\nobreak\vbox{\noindent\kern\@totalleftmargin
|
||||||
|
{\color{spx@notice@bordercolor}%
|
||||||
|
\rule[\dimexpr.4\baselineskip-\spx@notice@border\relax]
|
||||||
|
{\linewidth}{\spx@notice@border}}\hss}\allowbreak
|
||||||
|
}% end of sphinxlightbox environment definition
|
||||||
|
% may be renewenvironment'd by user for complete customization
|
||||||
|
\newenvironment{sphinxnote}[1]
|
||||||
|
{\begin{sphinxlightbox}\sphinxstrong{#1} }{\end{sphinxlightbox}}
|
||||||
|
\newenvironment{sphinxhint}[1]
|
||||||
|
{\begin{sphinxlightbox}\sphinxstrong{#1} }{\end{sphinxlightbox}}
|
||||||
|
\newenvironment{sphinximportant}[1]
|
||||||
|
{\begin{sphinxlightbox}\sphinxstrong{#1} }{\end{sphinxlightbox}}
|
||||||
|
\newenvironment{sphinxtip}[1]
|
||||||
|
{\begin{sphinxlightbox}\sphinxstrong{#1} }{\end{sphinxlightbox}}
|
||||||
|
% or just use the package options
|
||||||
|
% these are needed for common handling by notice environment of lightbox
|
||||||
|
% and heavybox but they are currently not used by lightbox environment
|
||||||
|
% and there is consequently no corresponding package option
|
||||||
|
\definecolor{sphinxnoteBgColor}{rgb}{1,1,1}
|
||||||
|
\definecolor{sphinxhintBgColor}{rgb}{1,1,1}
|
||||||
|
\definecolor{sphinximportantBgColor}{rgb}{1,1,1}
|
||||||
|
\definecolor{sphinxtipBgColor}{rgb}{1,1,1}
|
||||||
|
|
||||||
|
% Others get more distinction
|
||||||
|
% Code adapted from framed.sty's "snugshade" environment.
|
||||||
|
% Nesting works (inner frames do not allow page breaks).
|
||||||
|
\newenvironment{sphinxheavybox}{\par
|
||||||
|
\setlength{\FrameRule}{\spx@notice@border}%
|
||||||
|
\setlength{\FrameSep}{\dimexpr.6\baselineskip-\FrameRule\relax}
|
||||||
|
\advance\spx@image@maxheight
|
||||||
|
-\dimexpr2\FrameRule
|
||||||
|
+2\FrameSep
|
||||||
|
+\baselineskip\relax % will happen again if nested, needed indeed!
|
||||||
|
% configure framed.sty's parameters to obtain same vertical spacing
|
||||||
|
% as for "light" boxes. We need for this to manually insert parskip glue and
|
||||||
|
% revert a skip done by framed before the frame.
|
||||||
|
\ltx@ifundefined{OuterFrameSep}{}{\OuterFrameSep\z@skip}%
|
||||||
|
\vspace{\FrameHeightAdjust}
|
||||||
|
% copied/adapted from framed.sty's snugshade
|
||||||
|
\def\FrameCommand##1{\hskip\@totalleftmargin
|
||||||
|
\fboxsep\FrameSep \fboxrule\FrameRule
|
||||||
|
\fcolorbox{spx@notice@bordercolor}{spx@notice@bgcolor}{##1}%
|
||||||
|
\hskip-\linewidth \hskip-\@totalleftmargin \hskip\columnwidth}%
|
||||||
|
\savenotes
|
||||||
|
% use a minipage if we are already inside a framed environment
|
||||||
|
\ifspx@inframed
|
||||||
|
\noindent\begin{minipage}{\linewidth}
|
||||||
|
\else
|
||||||
|
% handle case where notice is first thing in a list item (or is quoted)
|
||||||
|
\if@inlabel
|
||||||
|
\noindent\par\vspace{-\baselineskip}
|
||||||
|
\else
|
||||||
|
\vspace{\parskip}
|
||||||
|
\fi
|
||||||
|
\fi
|
||||||
|
\MakeFramed {\spx@inframedtrue
|
||||||
|
\advance\hsize-\width \@totalleftmargin\z@ \linewidth\hsize
|
||||||
|
% minipage initialization copied from LaTeX source code.
|
||||||
|
\@pboxswfalse
|
||||||
|
\let\@listdepth\@mplistdepth \@mplistdepth\z@
|
||||||
|
\@minipagerestore
|
||||||
|
\@setminipage }%
|
||||||
|
}
|
||||||
|
{%
|
||||||
|
\par\unskip
|
||||||
|
\@minipagefalse
|
||||||
|
\endMakeFramed
|
||||||
|
\ifspx@inframed\end{minipage}\fi
|
||||||
|
% set footnotes at bottom of page
|
||||||
|
\spewnotes
|
||||||
|
% arrange for similar spacing below frame as for "light" boxes.
|
||||||
|
\vskip .4\baselineskip
|
||||||
|
}% end of sphinxheavybox environment definition
|
||||||
|
% may be renewenvironment'd by user for complete customization
|
||||||
|
\newenvironment{sphinxwarning}[1]
|
||||||
|
{\begin{sphinxheavybox}\sphinxstrong{#1} }{\end{sphinxheavybox}}
|
||||||
|
\newenvironment{sphinxcaution}[1]
|
||||||
|
{\begin{sphinxheavybox}\sphinxstrong{#1} }{\end{sphinxheavybox}}
|
||||||
|
\newenvironment{sphinxattention}[1]
|
||||||
|
{\begin{sphinxheavybox}\sphinxstrong{#1} }{\end{sphinxheavybox}}
|
||||||
|
\newenvironment{sphinxdanger}[1]
|
||||||
|
{\begin{sphinxheavybox}\sphinxstrong{#1} }{\end{sphinxheavybox}}
|
||||||
|
\newenvironment{sphinxerror}[1]
|
||||||
|
{\begin{sphinxheavybox}\sphinxstrong{#1} }{\end{sphinxheavybox}}
|
||||||
|
% or just use package options
|
||||||
|
|
||||||
|
% the \colorlet of xcolor (if at all loaded) is overkill for our use case
|
||||||
|
\newcommand{\sphinxcolorlet}[2]
|
||||||
|
{\expandafter\let\csname\@backslashchar color@#1\expandafter\endcsname
|
||||||
|
\csname\@backslashchar color@#2\endcsname }
|
||||||
|
|
||||||
|
% the main dispatch for all types of notices
|
||||||
|
\newenvironment{sphinxadmonition}[2]{% #1=type, #2=heading
|
||||||
|
% can't use #1 directly in definition of end part
|
||||||
|
\def\spx@noticetype {#1}%
|
||||||
|
% set parameters of heavybox/lightbox
|
||||||
|
\sphinxcolorlet{spx@notice@bordercolor}{sphinx#1BorderColor}%
|
||||||
|
\sphinxcolorlet{spx@notice@bgcolor}{sphinx#1BgColor}%
|
||||||
|
\spx@notice@border \dimexpr\csname spx@opt@#1border\endcsname\relax
|
||||||
|
% start specific environment, passing the heading as argument
|
||||||
|
\begin{sphinx#1}{#2}}
|
||||||
|
% workaround some LaTeX "feature" of \end command
|
||||||
|
{\edef\spx@temp{\noexpand\end{sphinx\spx@noticetype}}\spx@temp}
|
||||||
|
|
||||||
|
\endinput
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
%% CONTAINER DIRECTIVES
|
||||||
|
%
|
||||||
|
% change this info string if making any custom modification
|
||||||
|
\ProvidesFile{sphinxlatexcontainers.sty}[2021/05/03 containers]
|
||||||
|
|
||||||
|
% The purpose of this file is to provide a dummy environment sphinxclass which
|
||||||
|
% will be inserted for each class in each container directive. The class name
|
||||||
|
% will be passed as the argument to the environment.
|
||||||
|
%
|
||||||
|
% For a class foo, the user can define customised handling of that class by
|
||||||
|
% defining the sphinxclassfoo LaTeX environment.
|
||||||
|
|
||||||
|
\newenvironment{sphinxuseclass}[1]{%
|
||||||
|
\def\sphinxClassFunctionName{sphinxclass#1}%
|
||||||
|
\ltx@ifundefined{\sphinxClassFunctionName}%
|
||||||
|
{}% undefined so do nothing
|
||||||
|
{\expandafter\begin\expandafter{\sphinxClassFunctionName}}%
|
||||||
|
}{%
|
||||||
|
\ltx@ifundefined{\sphinxClassFunctionName}%
|
||||||
|
{}% we did nothing so we keep doing nothing
|
||||||
|
{\expandafter\end\expandafter{\sphinxClassFunctionName}}%
|
||||||
|
}%
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
%% GRAPHICS
|
||||||
|
%
|
||||||
|
% change this info string if making any custom modification
|
||||||
|
\ProvidesFile{sphinxlatexgraphics.sty}[2021/01/27 graphics]
|
||||||
|
|
||||||
|
% Provides support for this output mark-up from Sphinx latex writer:
|
||||||
|
%
|
||||||
|
% - macros:
|
||||||
|
%
|
||||||
|
% - \sphinxfigcaption
|
||||||
|
% - \sphinxincludegraphics
|
||||||
|
%
|
||||||
|
% - environments:
|
||||||
|
%
|
||||||
|
% - sphinxfigure-in-table
|
||||||
|
%
|
||||||
|
% May change:
|
||||||
|
%
|
||||||
|
% - \sphinxcaption (at begin document)
|
||||||
|
%
|
||||||
|
% Also provides:
|
||||||
|
%
|
||||||
|
% - \sphinxsafeincludegraphics (default of \sphinxincludegraphics since 2.0)
|
||||||
|
% - \spx@image@maxheight dimension (used by sphinxlatexadmonitions.sty)
|
||||||
|
% - \spx@image@box scratch box register (also used by sphinxlatexliterals.sty)
|
||||||
|
%
|
||||||
|
% Requires:
|
||||||
|
% \RequirePackage{graphicx}% done in sphinx.sty
|
||||||
|
\RequirePackage{amstext}% needed for \firstchoice@true(false)
|
||||||
|
|
||||||
|
% \sphinxincludegraphics resizes images larger than the TeX \linewidth (which
|
||||||
|
% is adjusted in indented environments), or taller than a certain maximal
|
||||||
|
% height (usually \textheight and this is reduced in the environments which use
|
||||||
|
% framed.sty to avoid infinite loop if image too tall).
|
||||||
|
%
|
||||||
|
% In case height or width options are present the rescaling is done
|
||||||
|
% (since 2.0), in a way keeping the width:height ratio either native from
|
||||||
|
% image or from the width and height options if both were present.
|
||||||
|
%
|
||||||
|
\newdimen\spx@image@maxheight
|
||||||
|
\AtBeginDocument{\spx@image@maxheight\textheight}
|
||||||
|
|
||||||
|
% box scratch register
|
||||||
|
\newbox\spx@image@box
|
||||||
|
\newcommand*{\sphinxsafeincludegraphics}[2][]{%
|
||||||
|
% #1 contains possibly width=, height=, but no scale= since 1.8.4
|
||||||
|
\setbox\spx@image@box\hbox{\includegraphics[#1,draft]{#2}}%
|
||||||
|
\in@false % use some handy boolean flag
|
||||||
|
\ifdim \wd\spx@image@box>\linewidth
|
||||||
|
\in@true % flag to remember to adjust options and set box dimensions
|
||||||
|
% compute height which results from rescaling width to \linewidth
|
||||||
|
% and keep current aspect ratio. multiply-divide in \numexpr uses
|
||||||
|
% temporarily doubled precision, hence no overflow. (of course we
|
||||||
|
% assume \ht is not a few sp's below \maxdimen...(about 16384pt).
|
||||||
|
\edef\spx@image@rescaledheight % with sp units
|
||||||
|
{\the\numexpr\ht\spx@image@box
|
||||||
|
*\linewidth/\wd\spx@image@box sp}%
|
||||||
|
\ifdim\spx@image@rescaledheight>\spx@image@maxheight
|
||||||
|
% the rescaled height will be too big, so it is height which decides
|
||||||
|
% the rescaling factor
|
||||||
|
\def\spx@image@requiredheight{\spx@image@maxheight}% dimen register
|
||||||
|
\edef\spx@image@requiredwidth % with sp units
|
||||||
|
{\the\numexpr\wd\spx@image@box
|
||||||
|
*\spx@image@maxheight/\ht\spx@image@box sp}%
|
||||||
|
% TODO: decide if this commented-out block could be needed due to
|
||||||
|
% rounding in numexpr operations going up
|
||||||
|
% \ifdim\spx@image@requiredwidth>\linewidth
|
||||||
|
% \def\spx@image@requiredwidth{\linewidth}% dimen register
|
||||||
|
% \fi
|
||||||
|
\else
|
||||||
|
\def\spx@image@requiredwidth{\linewidth}% dimen register
|
||||||
|
\let\spx@image@requiredheight\spx@image@rescaledheight% sp units
|
||||||
|
\fi
|
||||||
|
\else
|
||||||
|
% width is ok, let's check height
|
||||||
|
\ifdim\ht\spx@image@box>\spx@image@maxheight
|
||||||
|
\in@true
|
||||||
|
\edef\spx@image@requiredwidth % with sp units
|
||||||
|
{\the\numexpr\wd\spx@image@box
|
||||||
|
*\spx@image@maxheight/\ht\spx@image@box sp}%
|
||||||
|
\def\spx@image@requiredheight{\spx@image@maxheight}% dimen register
|
||||||
|
\fi
|
||||||
|
\fi % end of check of width and height
|
||||||
|
\ifin@
|
||||||
|
\setbox\spx@image@box
|
||||||
|
\hbox{\includegraphics
|
||||||
|
[%#1,% contained only width and/or height and overruled anyhow
|
||||||
|
width=\spx@image@requiredwidth,height=\spx@image@requiredheight]%
|
||||||
|
{#2}}%
|
||||||
|
% \includegraphics does not set box dimensions to the exactly
|
||||||
|
% requested ones, see https://github.com/latex3/latex2e/issues/112
|
||||||
|
\wd\spx@image@box\spx@image@requiredwidth
|
||||||
|
\ht\spx@image@box\spx@image@requiredheight
|
||||||
|
\leavevmode\box\spx@image@box
|
||||||
|
\else
|
||||||
|
% here we do not modify the options, no need to adjust width and height
|
||||||
|
% on output, they will be computed exactly as with "draft" option
|
||||||
|
\setbox\spx@image@box\box\voidb@x % clear memory
|
||||||
|
\includegraphics[#1]{#2}%
|
||||||
|
\fi
|
||||||
|
}%
|
||||||
|
% Use the "safe" one by default (2.0)
|
||||||
|
\def\sphinxincludegraphics{\sphinxsafeincludegraphics}
|
||||||
|
|
||||||
|
|
||||||
|
%% FIGURE IN TABLE
|
||||||
|
%
|
||||||
|
\newenvironment{sphinxfigure-in-table}[1][\linewidth]{%
|
||||||
|
\def\@captype{figure}%
|
||||||
|
\sphinxsetvskipsforfigintablecaption
|
||||||
|
\begin{minipage}{#1}%
|
||||||
|
}{\end{minipage}}
|
||||||
|
% tabulary expands twice contents, we need to prevent double counter stepping
|
||||||
|
\newcommand*\sphinxfigcaption
|
||||||
|
{\ifx\equation$%$% this is trick to identify tabulary first pass
|
||||||
|
\firstchoice@false\else\firstchoice@true\fi
|
||||||
|
\spx@originalcaption }
|
||||||
|
\newcommand*\sphinxsetvskipsforfigintablecaption
|
||||||
|
{\abovecaptionskip\smallskipamount
|
||||||
|
\belowcaptionskip\smallskipamount}
|
||||||
|
|
||||||
|
\endinput
|
||||||
|
|
@ -0,0 +1,69 @@
|
||||||
|
%% INDEX, BIBLIOGRAPHY, APPENDIX, TABLE OF CONTENTS
|
||||||
|
%
|
||||||
|
% change this info string if making any custom modification
|
||||||
|
\ProvidesFile{sphinxlatexindbibtoc.sty}[2021/01/27 index, bib., toc]
|
||||||
|
|
||||||
|
% Provides support for this output mark-up from Sphinx latex writer:
|
||||||
|
%
|
||||||
|
% - environments: (backup defaults or get redefined)
|
||||||
|
%
|
||||||
|
% - sphinxtheindex (direct mark-up or via python.ist or sphinx.xdy)
|
||||||
|
% - sphinxthebibliography
|
||||||
|
%
|
||||||
|
% - macros: (defines defaults)
|
||||||
|
%
|
||||||
|
% - \sphinxmaketitle
|
||||||
|
% - \sphinxtableofcontents
|
||||||
|
% - \sphinxnonalphabeticalgroupname
|
||||||
|
% - \sphinxsymbolsname
|
||||||
|
% - \sphinxnumbersname
|
||||||
|
% - \sphinxcite
|
||||||
|
%
|
||||||
|
% Requires:
|
||||||
|
\RequirePackage{makeidx}
|
||||||
|
|
||||||
|
% fix the double index and bibliography on the table of contents
|
||||||
|
% in jsclasses (Japanese standard document classes)
|
||||||
|
\ifx\@jsc@uplatextrue\@undefined\else
|
||||||
|
\renewenvironment{sphinxtheindex}
|
||||||
|
{\cleardoublepage\phantomsection
|
||||||
|
\begin{theindex}}
|
||||||
|
{\end{theindex}}
|
||||||
|
|
||||||
|
\renewenvironment{sphinxthebibliography}[1]
|
||||||
|
{\cleardoublepage% \phantomsection % not needed here since TeXLive 2010's hyperref
|
||||||
|
\begin{thebibliography}{#1}}
|
||||||
|
{\end{thebibliography}}
|
||||||
|
\fi
|
||||||
|
|
||||||
|
% disable \@chappos in Appendix in pTeX
|
||||||
|
\ifx\kanjiskip\@undefined\else
|
||||||
|
\let\py@OldAppendix=\appendix
|
||||||
|
\renewcommand{\appendix}{
|
||||||
|
\py@OldAppendix
|
||||||
|
\gdef\@chappos{}
|
||||||
|
}
|
||||||
|
\fi
|
||||||
|
|
||||||
|
% make commands known to non-Sphinx document classes
|
||||||
|
\providecommand*{\sphinxmaketitle}{\maketitle}
|
||||||
|
\providecommand*{\sphinxtableofcontents}{\tableofcontents}
|
||||||
|
\ltx@ifundefined{sphinxthebibliography}
|
||||||
|
{\newenvironment
|
||||||
|
{sphinxthebibliography}{\begin{thebibliography}}{\end{thebibliography}}%
|
||||||
|
}
|
||||||
|
{}% else clause of \ltx@ifundefined
|
||||||
|
\ltx@ifundefined{sphinxtheindex}
|
||||||
|
{\newenvironment{sphinxtheindex}{\begin{theindex}}{\end{theindex}}}%
|
||||||
|
{}% else clause of \ltx@ifundefined
|
||||||
|
|
||||||
|
% for usage with xindy: this string gets internationalized in preamble
|
||||||
|
\newcommand*{\sphinxnonalphabeticalgroupname}{}
|
||||||
|
% redefined in preamble, headings for makeindex produced index
|
||||||
|
\newcommand*{\sphinxsymbolsname}{}
|
||||||
|
\newcommand*{\sphinxnumbersname}{}
|
||||||
|
|
||||||
|
\protected\def\sphinxcite{\cite}
|
||||||
|
|
||||||
|
|
||||||
|
\endinput
|
||||||
|
|
@ -0,0 +1,97 @@
|
||||||
|
%% ALPHANUMERIC LIST ITEMS
|
||||||
|
%
|
||||||
|
% change this info string if making any custom modification
|
||||||
|
\ProvidesFile{sphinxlatexlists.sty}[2021/01/27 lists]
|
||||||
|
|
||||||
|
% Provides support for this output mark-up from Sphinx latex writer:
|
||||||
|
% - \sphinxsetlistlabels
|
||||||
|
|
||||||
|
% Dependencies: the \spx@opt@maxlistdepth from sphinx.sty
|
||||||
|
|
||||||
|
\newcommand\sphinxsetlistlabels[5]
|
||||||
|
{% #1 = style, #2 = enum, #3 = enumnext, #4 = prefix, #5 = suffix
|
||||||
|
% #2 and #3 are counters used by enumerate environment e.g. enumi, enumii.
|
||||||
|
% #1 is a macro such as \arabic or \alph
|
||||||
|
% prefix and suffix are strings (by default empty and a dot).
|
||||||
|
\@namedef{the#2}{#1{#2}}%
|
||||||
|
\@namedef{label#2}{#4\@nameuse{the#2}#5}%
|
||||||
|
\@namedef{p@#3}{\@nameuse{p@#2}#4\@nameuse{the#2}#5}%
|
||||||
|
}%
|
||||||
|
|
||||||
|
|
||||||
|
%% MAXLISTDEPTH
|
||||||
|
%
|
||||||
|
% remove LaTeX's cap on nesting depth if 'maxlistdepth' key used.
|
||||||
|
% This is a hack, which works with the standard classes: it assumes \@toodeep
|
||||||
|
% is always used in "true" branches: "\if ... \@toodeep \else .. \fi."
|
||||||
|
|
||||||
|
% will force use the "false" branch (if there is one)
|
||||||
|
\def\spx@toodeep@hack{\fi\iffalse}
|
||||||
|
|
||||||
|
% do nothing if 'maxlistdepth' key not used or if package enumitem loaded.
|
||||||
|
\ifnum\spx@opt@maxlistdepth=\z@\expandafter\@gobbletwo\fi
|
||||||
|
\AtBeginDocument{%
|
||||||
|
\@ifpackageloaded{enumitem}{\remove@to@nnil}{}%
|
||||||
|
\let\spx@toodeepORI\@toodeep
|
||||||
|
\def\@toodeep{%
|
||||||
|
\ifnum\@listdepth<\spx@opt@maxlistdepth\relax
|
||||||
|
\expandafter\spx@toodeep@hack
|
||||||
|
\else
|
||||||
|
\expandafter\spx@toodeepORI
|
||||||
|
\fi}%
|
||||||
|
% define all missing \@list... macros
|
||||||
|
\count@\@ne
|
||||||
|
\loop
|
||||||
|
\ltx@ifundefined{@list\romannumeral\the\count@}
|
||||||
|
{\iffalse}{\iftrue\advance\count@\@ne}%
|
||||||
|
\repeat
|
||||||
|
\loop
|
||||||
|
\ifnum\count@>\spx@opt@maxlistdepth\relax\else
|
||||||
|
\expandafter\let
|
||||||
|
\csname @list\romannumeral\the\count@\expandafter\endcsname
|
||||||
|
\csname @list\romannumeral\the\numexpr\count@-\@ne\endcsname
|
||||||
|
% workaround 2.6--3.2d babel-french issue (fixed in 3.2e; no change needed)
|
||||||
|
\ltx@ifundefined{leftmargin\romannumeral\the\count@}
|
||||||
|
{\expandafter\let
|
||||||
|
\csname leftmargin\romannumeral\the\count@\expandafter\endcsname
|
||||||
|
\csname leftmargin\romannumeral\the\numexpr\count@-\@ne\endcsname}{}%
|
||||||
|
\advance\count@\@ne
|
||||||
|
\repeat
|
||||||
|
% define all missing enum... counters and \labelenum... macros and \p@enum..
|
||||||
|
\count@\@ne
|
||||||
|
\loop
|
||||||
|
\ltx@ifundefined{c@enum\romannumeral\the\count@}
|
||||||
|
{\iffalse}{\iftrue\advance\count@\@ne}%
|
||||||
|
\repeat
|
||||||
|
\loop
|
||||||
|
\ifnum\count@>\spx@opt@maxlistdepth\relax\else
|
||||||
|
\newcounter{enum\romannumeral\the\count@}%
|
||||||
|
\expandafter\def
|
||||||
|
\csname labelenum\romannumeral\the\count@\expandafter\endcsname
|
||||||
|
\expandafter
|
||||||
|
{\csname theenum\romannumeral\the\numexpr\count@\endcsname.}%
|
||||||
|
\expandafter\def
|
||||||
|
\csname p@enum\romannumeral\the\count@\expandafter\endcsname
|
||||||
|
\expandafter
|
||||||
|
{\csname p@enum\romannumeral\the\numexpr\count@-\@ne\expandafter
|
||||||
|
\endcsname\csname theenum\romannumeral\the\numexpr\count@-\@ne\endcsname.}%
|
||||||
|
\advance\count@\@ne
|
||||||
|
\repeat
|
||||||
|
% define all missing labelitem... macros
|
||||||
|
\count@\@ne
|
||||||
|
\loop
|
||||||
|
\ltx@ifundefined{labelitem\romannumeral\the\count@}
|
||||||
|
{\iffalse}{\iftrue\advance\count@\@ne}%
|
||||||
|
\repeat
|
||||||
|
\loop
|
||||||
|
\ifnum\count@>\spx@opt@maxlistdepth\relax\else
|
||||||
|
\expandafter\let
|
||||||
|
\csname labelitem\romannumeral\the\count@\expandafter\endcsname
|
||||||
|
\csname labelitem\romannumeral\the\numexpr\count@-\@ne\endcsname
|
||||||
|
\advance\count@\@ne
|
||||||
|
\repeat
|
||||||
|
\PackageInfo{sphinx}{maximal list depth extended to \spx@opt@maxlistdepth}%
|
||||||
|
\@gobble\@nnil
|
||||||
|
}
|
||||||
|
|
||||||
|
\endinput
|
||||||
|
|
@ -0,0 +1,804 @@
|
||||||
|
%% LITERAL BLOCKS
|
||||||
|
%
|
||||||
|
% change this info string if making any custom modification
|
||||||
|
\ProvidesFile{sphinxlatexliterals.sty}[2021/12/06 code-blocks and parsed literals]
|
||||||
|
|
||||||
|
% Provides support for this output mark-up from Sphinx latex writer:
|
||||||
|
%
|
||||||
|
% - macros:
|
||||||
|
% - \sphinxLiteralBlockLabel
|
||||||
|
% - \sphinxSetupCaptionForVerbatim
|
||||||
|
% - \sphinxSetupCodeBlockInFootnote
|
||||||
|
% - \sphinxhref
|
||||||
|
% - \sphinxnolinkurl
|
||||||
|
% - \sphinxresetverbatimhllines
|
||||||
|
% - \sphinxunactivateextrasandspace
|
||||||
|
% - \sphinxupquote
|
||||||
|
% - \sphinxurl
|
||||||
|
%
|
||||||
|
% - environments:
|
||||||
|
% - sphinxVerbatim
|
||||||
|
% - sphinxVerbatimintable
|
||||||
|
% - sphinxalltt
|
||||||
|
%
|
||||||
|
% Dependency:
|
||||||
|
%
|
||||||
|
% - hyperref (for \phantomsection and \capstart) (loaded later)
|
||||||
|
%
|
||||||
|
% Executes \RequirePackage for:
|
||||||
|
%
|
||||||
|
% - framed
|
||||||
|
% - fancyvrb
|
||||||
|
% - alltt
|
||||||
|
% - upquote
|
||||||
|
% - needspace
|
||||||
|
|
||||||
|
% also in sphinxlatexadmonitions.sty:
|
||||||
|
% This is a workaround to a "feature" of French lists, when literal block
|
||||||
|
% follows immediately; usable generally (does only \par then), a priori...
|
||||||
|
\providecommand*\sphinxvspacefixafterfrenchlists{%
|
||||||
|
\ifvmode\ifdim\lastskip<\z@ \vskip\parskip\fi\else\par\fi
|
||||||
|
}
|
||||||
|
|
||||||
|
% For framing allowing pagebreaks
|
||||||
|
\RequirePackage{framed}
|
||||||
|
% For source code
|
||||||
|
% MEMO: fancyvrb is used mainly to
|
||||||
|
% 1- control horizontal and vertical spacing
|
||||||
|
% 2- optional line numbering
|
||||||
|
% 3- optional line emphasizing
|
||||||
|
% 4- while still allowing expansion of Pygments latex mark-up
|
||||||
|
% Other aspects such as framing, caption handling, codeline wrapping are
|
||||||
|
% added on top of it. We should stop using fancyvrb and implement
|
||||||
|
% 1, 2, 3, 4 by own Sphinx fully native Verbatim. This would allow to solve
|
||||||
|
% limitations with wrapped long code line not allowing page break.
|
||||||
|
\RequirePackage{fancyvrb}
|
||||||
|
% For parsed-literal blocks.
|
||||||
|
\RequirePackage{alltt}
|
||||||
|
% Display "real" single quotes in literal blocks.
|
||||||
|
\RequirePackage{upquote}
|
||||||
|
% Skip to next page if not enough space at bottom
|
||||||
|
\RequirePackage{needspace}
|
||||||
|
|
||||||
|
% Based on use of "fancyvrb.sty"'s Verbatim.
|
||||||
|
% - with framing allowing page breaks ("framed.sty")
|
||||||
|
% - with breaking of long lines (exploits Pygments mark-up),
|
||||||
|
% - with possibly of a top caption, non-separable by pagebreak.
|
||||||
|
% - and usable inside tables or footnotes ("sphinxpackagefootnote.sty").
|
||||||
|
|
||||||
|
% for emphasizing lines
|
||||||
|
\define@key{FV}{hllines}{\def\sphinx@verbatim@checkifhl##1{\in@{, ##1,}{#1}}}
|
||||||
|
% sphinxVerbatim must be usable by third party without requiring hllines set-up
|
||||||
|
\def\sphinxresetverbatimhllines{\def\sphinx@verbatim@checkifhl##1{\in@false}}
|
||||||
|
\sphinxresetverbatimhllines
|
||||||
|
|
||||||
|
% Prior to Sphinx 1.5, \Verbatim and \endVerbatim were modified by Sphinx.
|
||||||
|
% The aliases defined here are used in sphinxVerbatim environment and can
|
||||||
|
% serve as hook-points with no need to modify \Verbatim itself.
|
||||||
|
\let\OriginalVerbatim \Verbatim
|
||||||
|
\let\endOriginalVerbatim\endVerbatim
|
||||||
|
|
||||||
|
% for captions of literal blocks
|
||||||
|
% at start of caption title
|
||||||
|
\newcommand*{\fnum@literalblock}{\literalblockname\nobreakspace\theliteralblock}
|
||||||
|
% this will be overwritten in document preamble by Babel translation
|
||||||
|
\newcommand*{\literalblockname}{Listing }
|
||||||
|
% file extension needed for \caption's good functioning, the file is created
|
||||||
|
% only if a \listof{literalblock}{foo} command is encountered, which is
|
||||||
|
% analogous to \listoffigures, but for the code listings (foo = chosen title.)
|
||||||
|
\newcommand*{\ext@literalblock}{lol}
|
||||||
|
|
||||||
|
% if forced use of minipage encapsulation is needed (e.g. table cells)
|
||||||
|
\newif\ifsphinxverbatimwithminipage \sphinxverbatimwithminipagefalse
|
||||||
|
|
||||||
|
% Framing macro for use with framed.sty's \FrameCommand
|
||||||
|
% - it obeys current indentation,
|
||||||
|
% - frame is \fboxsep separated from the contents,
|
||||||
|
% - the contents use the full available text width,
|
||||||
|
% - #1 = color of frame, #2 = color of background,
|
||||||
|
% - #3 = above frame, #4 = below frame, #5 = within frame,
|
||||||
|
% - #3 and #4 must be already typeset boxes; they must issue \normalcolor
|
||||||
|
% or similar, else, they are under scope of color #1
|
||||||
|
\long\def\spx@fcolorbox #1#2#3#4#5{%
|
||||||
|
\hskip\@totalleftmargin
|
||||||
|
\hskip-\fboxsep\hskip-\fboxrule
|
||||||
|
% use of \color@b@x here is compatible with both xcolor.sty and color.sty
|
||||||
|
\color@b@x {\color{#1}\spx@CustomFBox{#3}{#4}}{\color{#2}}{#5}%
|
||||||
|
\hskip-\fboxsep\hskip-\fboxrule
|
||||||
|
\hskip-\linewidth \hskip-\@totalleftmargin \hskip\columnwidth
|
||||||
|
}%
|
||||||
|
% #1 = for material above frame, such as a caption or a "continued" hint
|
||||||
|
% #2 = for material below frame, such as a caption or "continues on next page"
|
||||||
|
% #3 = actual contents, which will be typeset with a background color
|
||||||
|
\long\def\spx@CustomFBox#1#2#3{%
|
||||||
|
\begingroup
|
||||||
|
\setbox\@tempboxa\hbox{{#3}}% inner braces to avoid color leaks
|
||||||
|
\vbox{#1% above frame
|
||||||
|
% draw frame border _latest_ to avoid pdf viewer issue
|
||||||
|
\kern\fboxrule
|
||||||
|
\hbox{\kern\fboxrule
|
||||||
|
\copy\@tempboxa
|
||||||
|
\kern-\wd\@tempboxa\kern-\fboxrule
|
||||||
|
\vrule\@width\fboxrule
|
||||||
|
\kern\wd\@tempboxa
|
||||||
|
\vrule\@width\fboxrule}%
|
||||||
|
\kern-\dimexpr\ht\@tempboxa+\dp\@tempboxa+\fboxrule\relax
|
||||||
|
\hrule\@height\fboxrule
|
||||||
|
\kern\dimexpr\ht\@tempboxa+\dp\@tempboxa\relax
|
||||||
|
\hrule\@height\fboxrule
|
||||||
|
#2% below frame
|
||||||
|
}%
|
||||||
|
\endgroup
|
||||||
|
}%
|
||||||
|
\def\spx@fcolorbox@put@c#1{% hide width from framed.sty measuring
|
||||||
|
\moveright\dimexpr\fboxrule+.5\wd\@tempboxa\hb@xt@\z@{\hss#1\hss}%
|
||||||
|
}%
|
||||||
|
\def\spx@fcolorbox@put@r#1{% right align with contents, width hidden
|
||||||
|
\moveright\dimexpr\fboxrule+\wd\@tempboxa-\fboxsep\hb@xt@\z@{\hss#1}%
|
||||||
|
}%
|
||||||
|
\def\spx@fcolorbox@put@l#1{% left align with contents, width hidden
|
||||||
|
\moveright\dimexpr\fboxrule+\fboxsep\hb@xt@\z@{#1\hss}%
|
||||||
|
}%
|
||||||
|
%
|
||||||
|
\def\sphinxVerbatim@Continued
|
||||||
|
{\csname spx@fcolorbox@put@\spx@opt@verbatimcontinuedalign\endcsname
|
||||||
|
{\normalcolor\sphinxstylecodecontinued\literalblockcontinuedname}}%
|
||||||
|
\def\sphinxVerbatim@Continues
|
||||||
|
{\csname spx@fcolorbox@put@\spx@opt@verbatimcontinuesalign\endcsname
|
||||||
|
{\normalcolor\sphinxstylecodecontinues\literalblockcontinuesname}}%
|
||||||
|
\def\sphinxVerbatim@Title
|
||||||
|
{\spx@fcolorbox@put@c{\unhcopy\sphinxVerbatim@TitleBox}}%
|
||||||
|
\let\sphinxVerbatim@Before\@empty
|
||||||
|
\let\sphinxVerbatim@After\@empty
|
||||||
|
% Defaults are redefined in document preamble according to language
|
||||||
|
\newcommand*\literalblockcontinuedname{continued from previous page}%
|
||||||
|
\newcommand*\literalblockcontinuesname{continues on next page}%
|
||||||
|
%
|
||||||
|
\def\spx@verbatimfcolorbox{\spx@fcolorbox{VerbatimBorderColor}{VerbatimColor}}%
|
||||||
|
\def\sphinxVerbatim@FrameCommand
|
||||||
|
{\spx@verbatimfcolorbox\sphinxVerbatim@Before\sphinxVerbatim@After}%
|
||||||
|
\def\sphinxVerbatim@FirstFrameCommand
|
||||||
|
{\spx@verbatimfcolorbox\sphinxVerbatim@Before\sphinxVerbatim@Continues}%
|
||||||
|
\def\sphinxVerbatim@MidFrameCommand
|
||||||
|
{\spx@verbatimfcolorbox\sphinxVerbatim@Continued\sphinxVerbatim@Continues}%
|
||||||
|
\def\sphinxVerbatim@LastFrameCommand
|
||||||
|
{\spx@verbatimfcolorbox\sphinxVerbatim@Continued\sphinxVerbatim@After}%
|
||||||
|
|
||||||
|
% For linebreaks inside Verbatim environment from package fancyvrb.
|
||||||
|
\newbox\sphinxcontinuationbox
|
||||||
|
\newbox\sphinxvisiblespacebox
|
||||||
|
\newcommand*\sphinxafterbreak {\copy\sphinxcontinuationbox}
|
||||||
|
|
||||||
|
% Take advantage of the already applied Pygments mark-up to insert
|
||||||
|
% potential linebreaks for TeX processing.
|
||||||
|
% {, <, #, %, $, ' and ": go to next line.
|
||||||
|
% _, }, ^, &, >, -, ~, and \: stay at end of broken line.
|
||||||
|
% Use of \textquotesingle for straight quote.
|
||||||
|
% FIXME: convert this to package options ?
|
||||||
|
\newcommand*\sphinxbreaksbeforelist {%
|
||||||
|
\do\PYGZob\{\do\PYGZlt\<\do\PYGZsh\#\do\PYGZpc\%% {, <, #, %,
|
||||||
|
\do\PYGZdl\$\do\PYGZdq\"% $, "
|
||||||
|
\def\PYGZsq
|
||||||
|
{\discretionary{}{\sphinxafterbreak\textquotesingle}{\textquotesingle}}% '
|
||||||
|
}
|
||||||
|
\newcommand*\sphinxbreaksafterlist {%
|
||||||
|
\do\PYGZus\_\do\PYGZcb\}\do\PYGZca\^\do\PYGZam\&% _, }, ^, &,
|
||||||
|
\do\PYGZgt\>\do\PYGZhy\-\do\PYGZti\~% >, -, ~
|
||||||
|
\do\PYGZbs\\% \
|
||||||
|
}
|
||||||
|
\newcommand*\sphinxbreaksatspecials {%
|
||||||
|
\def\do##1##2%
|
||||||
|
{\def##1{\discretionary{}{\sphinxafterbreak\char`##2}{\char`##2}}}%
|
||||||
|
\sphinxbreaksbeforelist
|
||||||
|
\def\do##1##2%
|
||||||
|
{\def##1{\discretionary{\char`##2}{\sphinxafterbreak}{\char`##2}}}%
|
||||||
|
\sphinxbreaksafterlist
|
||||||
|
}
|
||||||
|
|
||||||
|
\def\sphinx@verbatim@nolig@list {\do \`}%
|
||||||
|
% Some characters . , ; ? ! / are neither pygmentized nor "tex-escaped".
|
||||||
|
% This macro makes them "active" and they will insert potential linebreaks.
|
||||||
|
% Not compatible with math mode (cf \sphinxunactivateextras).
|
||||||
|
\newcommand*\sphinxbreaksbeforeactivelist {}% none
|
||||||
|
\newcommand*\sphinxbreaksafteractivelist {\do\.\do\,\do\;\do\?\do\!\do\/}
|
||||||
|
\newcommand*\sphinxbreaksviaactive {%
|
||||||
|
\def\do##1{\lccode`\~`##1%
|
||||||
|
\lowercase{\def~}{\discretionary{}{\sphinxafterbreak\char`##1}{\char`##1}}%
|
||||||
|
\catcode`##1\active}%
|
||||||
|
\sphinxbreaksbeforeactivelist
|
||||||
|
\def\do##1{\lccode`\~`##1%
|
||||||
|
\lowercase{\def~}{\discretionary{\char`##1}{\sphinxafterbreak}{\char`##1}}%
|
||||||
|
\catcode`##1\active}%
|
||||||
|
\sphinxbreaksafteractivelist
|
||||||
|
\lccode`\~`\~
|
||||||
|
}
|
||||||
|
|
||||||
|
% If the linebreak is at a space, the latter will be displayed as visible
|
||||||
|
% space at end of first line, and a continuation symbol starts next line.
|
||||||
|
\def\spx@verbatim@space {%
|
||||||
|
\nobreak\hskip\z@skip
|
||||||
|
\discretionary{\copy\sphinxvisiblespacebox}{\sphinxafterbreak}
|
||||||
|
{\kern\fontdimen2\font}%
|
||||||
|
}%
|
||||||
|
|
||||||
|
% if the available space on page is less than \literalblockneedspace, insert pagebreak
|
||||||
|
\newcommand{\sphinxliteralblockneedspace}{5\baselineskip}
|
||||||
|
\newcommand{\sphinxliteralblockwithoutcaptionneedspace}{1.5\baselineskip}
|
||||||
|
% The title (caption) is specified from outside as macro \sphinxVerbatimTitle.
|
||||||
|
% \sphinxVerbatimTitle is reset to empty after each use of Verbatim.
|
||||||
|
\newcommand*\sphinxVerbatimTitle {}
|
||||||
|
% This box to typeset the caption before framed.sty multiple passes for framing.
|
||||||
|
\newbox\sphinxVerbatim@TitleBox
|
||||||
|
% This box to measure contents if nested as inner \MakeFramed requires then
|
||||||
|
% minipage encapsulation but too long contents then break outer \MakeFramed
|
||||||
|
\newbox\sphinxVerbatim@ContentsBox
|
||||||
|
% Holder macro for labels of literal blocks. Set-up by LaTeX writer.
|
||||||
|
\newcommand*\sphinxLiteralBlockLabel {}
|
||||||
|
\newcommand*\sphinxSetupCaptionForVerbatim [1]
|
||||||
|
{%
|
||||||
|
\sphinxvspacefixafterfrenchlists
|
||||||
|
\needspace{\sphinxliteralblockneedspace}%
|
||||||
|
% insert a \label via \sphinxLiteralBlockLabel
|
||||||
|
% reset to normal the color for the literal block caption
|
||||||
|
\def\sphinxVerbatimTitle
|
||||||
|
{\py@NormalColor\sphinxcaption{\sphinxLiteralBlockLabel #1}}%
|
||||||
|
}
|
||||||
|
\newcommand*\sphinxSetupCodeBlockInFootnote {%
|
||||||
|
\fvset{fontsize=\footnotesize}\let\caption\sphinxfigcaption
|
||||||
|
\sphinxverbatimwithminipagetrue % reduces vertical spaces
|
||||||
|
% we counteract (this is in a group) the \@normalsize from \caption
|
||||||
|
\let\normalsize\footnotesize\let\@parboxrestore\relax
|
||||||
|
\def\spx@abovecaptionskip{\sphinxverbatimsmallskipamount}%
|
||||||
|
}
|
||||||
|
\newcommand*{\sphinxverbatimsmallskipamount}{\smallskipamount}
|
||||||
|
% serves to implement line highlighting and line wrapping
|
||||||
|
\newcommand\sphinxFancyVerbFormatLine[1]{%
|
||||||
|
\expandafter\sphinx@verbatim@checkifhl\expandafter{\the\FV@CodeLineNo}%
|
||||||
|
\ifin@
|
||||||
|
\sphinxVerbatimHighlightLine{#1}%
|
||||||
|
\else
|
||||||
|
\sphinxVerbatimFormatLine{#1}%
|
||||||
|
\fi
|
||||||
|
}%
|
||||||
|
\newcommand\sphinxVerbatimHighlightLine[1]{%
|
||||||
|
\edef\sphinxrestorefboxsep{\fboxsep\the\fboxsep\relax}%
|
||||||
|
\fboxsep0pt\relax % cf LaTeX bug graphics/4524
|
||||||
|
\colorbox{sphinxVerbatimHighlightColor}%
|
||||||
|
{\sphinxrestorefboxsep\sphinxVerbatimFormatLine{#1}}%
|
||||||
|
% no need to restore \fboxsep here, as this ends up in a \hbox from fancyvrb
|
||||||
|
}%
|
||||||
|
% \sphinxVerbatimFormatLine will be set locally to one of those two:
|
||||||
|
\newcommand\sphinxVerbatimFormatLineWrap{%
|
||||||
|
\hsize\linewidth
|
||||||
|
\ifspx@opt@verbatimforcewraps
|
||||||
|
\expandafter\spx@verb@FormatLineForceWrap
|
||||||
|
\else\expandafter\spx@verb@FormatLineWrap
|
||||||
|
\fi
|
||||||
|
}%
|
||||||
|
\newcommand\sphinxVerbatimFormatLineNoWrap[1]{\hb@xt@\linewidth{\strut #1\hss}}%
|
||||||
|
\long\def\spx@verb@FormatLineWrap#1{%
|
||||||
|
\vtop{\raggedright\hyphenpenalty\z@\exhyphenpenalty\z@
|
||||||
|
\doublehyphendemerits\z@\finalhyphendemerits\z@
|
||||||
|
\strut #1\strut}%
|
||||||
|
}%
|
||||||
|
%
|
||||||
|
% The normal line wrapping allows breaks at spaces and ascii non
|
||||||
|
% letters, non digits. The \raggedright above means there will be
|
||||||
|
% an overfilled line only if some non-breakable "word" was
|
||||||
|
% encountered, which is longer than a line (it is moved always to
|
||||||
|
% be on its own on a new line).
|
||||||
|
%
|
||||||
|
% The "forced" line wrapping will parse the tokens to add potential
|
||||||
|
% breakpoints at each character. As some strings are highlighted,
|
||||||
|
% we have to apply the highlighting character per character, which
|
||||||
|
% requires to manipulate the output of the Pygments LaTeXFormatter.
|
||||||
|
%
|
||||||
|
% Doing this at latex level is complicated. The contents should
|
||||||
|
% be as expected: i.e. some active characters from
|
||||||
|
% \sphinxbreaksviaactive, some Pygments character escapes such as
|
||||||
|
% \PYGZdl{}, and the highlighting \PYG macro with always 2
|
||||||
|
% arguments. No other macros should be there, except perhaps
|
||||||
|
% zero-parameter macros. In particular:
|
||||||
|
% - the texcomments Pygments option must be set to False
|
||||||
|
%
|
||||||
|
% With pdflatex, Unicode input gives multi-bytes characters
|
||||||
|
% where the first byte is active. We support the "utf8" macros
|
||||||
|
% only. "utf8x" is not supported.
|
||||||
|
%
|
||||||
|
% The highlighting macro \PYG will be applied character per
|
||||||
|
% character. Highlighting via a colored background gives thus a
|
||||||
|
% chain of small colored boxes which may cause some artefact in
|
||||||
|
% some pdf viewers. Can't do anything here if we do want the line
|
||||||
|
% break to be possible.
|
||||||
|
%
|
||||||
|
% First a measurement step is done of what would the standard line
|
||||||
|
% wrapping give (i.e line breaks only at spaces and non-letter,
|
||||||
|
% non-digit ascii characters), cf TeX by Topic for the basic
|
||||||
|
% dissecting technique: TeX unfortunately when building a vertical
|
||||||
|
% box does not store in an accessible way what was the maximal
|
||||||
|
% line-width during paragraph building.
|
||||||
|
%
|
||||||
|
% Avoid LaTeX 2021 alteration of \@@par which potentially could break our
|
||||||
|
% measurement step (typically if the para/after hook is configured to use
|
||||||
|
% \vspace). Of course, breakage could happen only from user or package
|
||||||
|
% adding things to basic Sphinx latex. And perhaps spring LaTeX 2021 will
|
||||||
|
% provide a non-hooked \@@par, but this should work anyway and can't be
|
||||||
|
% beaten for speed.
|
||||||
|
\ltx@ifundefined{tex_par:D}
|
||||||
|
% We could use \@ifl@t@r\fmtversion{2020/02/02}{use \tex_par:D}{use \@@par}.
|
||||||
|
{\let\spx@par\@@par}% \@@par is then expected to be TeX's original \par
|
||||||
|
{\expandafter\let\expandafter\spx@par\csname tex_par:D\endcsname}
|
||||||
|
% More hesitation for avoiding the at-start-of-par hooks for our
|
||||||
|
% measurement : 1. with old LaTeX, we can not avoid hooks from everyhook
|
||||||
|
% or similar packages, 2. and perhaps the hooks add stuff which we should
|
||||||
|
% actually measure. Ideally, hooks are for inserting things in margin
|
||||||
|
% which do not change spacing. Most everything else in fact should not be
|
||||||
|
% executed in our scratch box for measurement, such as counter stepping.
|
||||||
|
\ltx@ifundefined{tex_everypar:D}
|
||||||
|
{\let\spx@everypar\everypar}
|
||||||
|
{\expandafter\let\expandafter\spx@everypar\csname tex_everypar:D\endcsname}
|
||||||
|
%
|
||||||
|
% If the max width exceeds the linewidth by more than verbatimmaxoverfull
|
||||||
|
% character widths, or if the min width plus verbatimmaxunderfull character
|
||||||
|
% widths is inferior to linewidth, then we apply the "force wrapping" with
|
||||||
|
% potential line break at each character, else we don't.
|
||||||
|
\long\def\spx@verb@FormatLineForceWrap#1{%
|
||||||
|
% \spx@image@box is a scratch box register that we can use here
|
||||||
|
\global\let\spx@verb@maxwidth\z@
|
||||||
|
\global\let\spx@verb@minwidth\linewidth
|
||||||
|
\setbox\spx@image@box
|
||||||
|
\vtop{\raggedright\hyphenpenalty\z@\exhyphenpenalty\z@
|
||||||
|
\doublehyphendemerits\z@\finalhyphendemerits\z@
|
||||||
|
\spx@everypar{}\noindent\strut #1\strut\spx@par
|
||||||
|
\spx@verb@getwidths}%
|
||||||
|
\ifdim\spx@verb@maxwidth>
|
||||||
|
\dimexpr\linewidth+\spx@opt@verbatimmaxoverfull\fontcharwd\font`X \relax
|
||||||
|
\spx@verb@FormatLineWrap{\spx@verb@wrapPYG #1\spx@verb@wrapPYG}%
|
||||||
|
\else
|
||||||
|
\ifdim\spx@verb@minwidth<
|
||||||
|
\dimexpr\linewidth-\spx@opt@verbatimmaxunderfull\fontcharwd\font`X \relax
|
||||||
|
\spx@verb@FormatLineWrap{\spx@verb@wrapPYG #1\spx@verb@wrapPYG}%
|
||||||
|
\else
|
||||||
|
\spx@verb@FormatLineWrap{#1}%
|
||||||
|
\fi\fi
|
||||||
|
}%
|
||||||
|
% auxiliary paragraph dissector to get max and min widths
|
||||||
|
% but minwidth must not take into account the last line
|
||||||
|
\newbox\spx@scratchbox
|
||||||
|
\def\spx@verb@getwidths {%
|
||||||
|
\unskip\unpenalty
|
||||||
|
\setbox\spx@scratchbox\lastbox
|
||||||
|
\ifvoid\spx@scratchbox
|
||||||
|
\else
|
||||||
|
\setbox\spx@scratchbox\hbox{\unhbox\spx@scratchbox}%
|
||||||
|
\ifdim\spx@verb@maxwidth<\wd\spx@scratchbox
|
||||||
|
\xdef\spx@verb@maxwidth{\number\wd\spx@scratchbox sp}%
|
||||||
|
\fi
|
||||||
|
\expandafter\spx@verb@getwidths@loop
|
||||||
|
\fi
|
||||||
|
}%
|
||||||
|
\def\spx@verb@getwidths@loop {%
|
||||||
|
\unskip\unpenalty
|
||||||
|
\setbox\spx@scratchbox\lastbox
|
||||||
|
\ifvoid\spx@scratchbox
|
||||||
|
\else
|
||||||
|
\setbox\spx@scratchbox\hbox{\unhbox\spx@scratchbox}%
|
||||||
|
\ifdim\spx@verb@maxwidth<\wd\spx@scratchbox
|
||||||
|
\xdef\spx@verb@maxwidth{\number\wd\spx@scratchbox sp}%
|
||||||
|
\fi
|
||||||
|
\ifdim\spx@verb@minwidth>\wd\spx@scratchbox
|
||||||
|
\xdef\spx@verb@minwidth{\number\wd\spx@scratchbox sp}%
|
||||||
|
\fi
|
||||||
|
\expandafter\spx@verb@getwidths@loop
|
||||||
|
\fi
|
||||||
|
}%
|
||||||
|
% auxiliary macros to implement "cut long line even in middle of word"
|
||||||
|
\catcode`Z=3 % safe delimiter
|
||||||
|
\def\spx@verb@wrapPYG{%
|
||||||
|
\futurelet\spx@nexttoken\spx@verb@wrapPYG@i
|
||||||
|
}%
|
||||||
|
\def\spx@verb@wrapPYG@i{%
|
||||||
|
\ifx\spx@nexttoken\spx@verb@wrapPYG\let\next=\@gobble\else
|
||||||
|
\ifx\spx@nexttoken\PYG\let\next=\spx@verb@wrapPYG@PYG@onebyone\else
|
||||||
|
\discretionary{}{\sphinxafterbreak}{}%
|
||||||
|
\let\next\spx@verb@wrapPYG@ii
|
||||||
|
\fi\fi
|
||||||
|
\next
|
||||||
|
}%
|
||||||
|
% Let's recognize active characters. We don't support utf8x only utf8.
|
||||||
|
% And here #1 should not have picked up (non empty) braced contents
|
||||||
|
\long\def\spx@verb@wrapPYG@ii#1{%
|
||||||
|
\ifcat\noexpand~\noexpand#1\relax% active character
|
||||||
|
\expandafter\spx@verb@wrapPYG@active
|
||||||
|
\else % non-active character, control sequence such as \PYGZdl, or empty
|
||||||
|
\expandafter\spx@verb@wrapPYG@one
|
||||||
|
\fi {#1}%
|
||||||
|
}%
|
||||||
|
\long\def\spx@verb@wrapPYG@active#1{%
|
||||||
|
% Let's hope expansion of active character does not really require arguments,
|
||||||
|
% as we certainly don't want to go into expanding upfront token stream anyway.
|
||||||
|
\expandafter\spx@verb@wrapPYG@iii#1{}{}{}{}{}{}{}{}{}Z#1%
|
||||||
|
}%
|
||||||
|
\long\def\spx@verb@wrapPYG@iii#1#2Z{%
|
||||||
|
\ifx\UTFviii@four@octets#1\let\next=\spx@verb@wrapPYG@four\else
|
||||||
|
\ifx\UTFviii@three@octets#1\let\next=\spx@verb@wrapPYG@three\else
|
||||||
|
\ifx\UTFviii@two@octets#1\let\next=\spx@verb@wrapPYG@two\else
|
||||||
|
\let\next=\spx@verb@wrapPYG@one
|
||||||
|
\fi\fi\fi
|
||||||
|
\next
|
||||||
|
}%
|
||||||
|
\long\def\spx@verb@wrapPYG@one #1{#1\futurelet\spx@nexttoken\spx@verb@wrapPYG@i}%
|
||||||
|
\long\def\spx@verb@wrapPYG@two #1#2{#1#2\futurelet\spx@nexttoken\spx@verb@wrapPYG@i}%
|
||||||
|
\long\def\spx@verb@wrapPYG@three #1#2#3{#1#2#3\futurelet\spx@nexttoken\spx@verb@wrapPYG@i}%
|
||||||
|
\long\def\spx@verb@wrapPYG@four #1#2#3#4{#1#2#3#4\futurelet\spx@nexttoken\spx@verb@wrapPYG@i}%
|
||||||
|
% Replace \PYG by itself applied one character at a time! This way breakpoints
|
||||||
|
% can be inserted.
|
||||||
|
\def\spx@verb@wrapPYG@PYG@onebyone#1#2#3{% #1 = \PYG, #2 = highlight spec, #3 = tokens
|
||||||
|
\def\spx@verb@wrapPYG@PYG@spec{{#2}}%
|
||||||
|
\futurelet\spx@nexttoken\spx@verb@wrapPYG@PYG@i#3Z%
|
||||||
|
}%
|
||||||
|
\def\spx@verb@wrapPYG@PYG@i{%
|
||||||
|
\ifx\spx@nexttokenZ\let\next=\spx@verb@wrapPYG@PYG@done\else
|
||||||
|
\discretionary{}{\sphinxafterbreak}{}%
|
||||||
|
\let\next\spx@verb@wrapPYG@PYG@ii
|
||||||
|
\fi
|
||||||
|
\next
|
||||||
|
}%
|
||||||
|
\def\spx@verb@wrapPYG@PYG@doneZ{\futurelet\spx@nexttoken\spx@verb@wrapPYG@i}%
|
||||||
|
\long\def\spx@verb@wrapPYG@PYG@ii#1{%
|
||||||
|
\ifcat\noexpand~\noexpand#1\relax% active character
|
||||||
|
\expandafter\spx@verb@wrapPYG@PYG@active
|
||||||
|
\else % non-active character, control sequence such as \PYGZdl, or empty
|
||||||
|
\expandafter\spx@verb@wrapPYG@PYG@one
|
||||||
|
\fi {#1}%
|
||||||
|
}%
|
||||||
|
\long\def\spx@verb@wrapPYG@PYG@active#1{%
|
||||||
|
% Let's hope expansion of active character does not really require arguments,
|
||||||
|
% as we certainly don't want to go into expanding upfront token stream anyway.
|
||||||
|
\expandafter\spx@verb@wrapPYG@PYG@iii#1{}{}{}{}{}{}{}{}{}Z#1%
|
||||||
|
}%
|
||||||
|
\long\def\spx@verb@wrapPYG@PYG@iii#1#2Z{%
|
||||||
|
\ifx\UTFviii@four@octets#1\let\next=\spx@verb@wrapPYG@PYG@four\else
|
||||||
|
\ifx\UTFviii@three@octets#1\let\next=\spx@verb@wrapPYG@PYG@three\else
|
||||||
|
\ifx\UTFviii@two@octets#1\let\next=\spx@verb@wrapPYG@PYG@two\else
|
||||||
|
\let\next=\spx@verb@wrapPYG@PYG@one
|
||||||
|
\fi\fi\fi
|
||||||
|
\next
|
||||||
|
}%
|
||||||
|
\long\def\spx@verb@wrapPYG@PYG@one#1{%
|
||||||
|
\expandafter\PYG\spx@verb@wrapPYG@PYG@spec{#1}%
|
||||||
|
\futurelet\spx@nexttoken\spx@verb@wrapPYG@PYG@i
|
||||||
|
}%
|
||||||
|
\long\def\spx@verb@wrapPYG@PYG@two#1#2{%
|
||||||
|
\expandafter\PYG\spx@verb@wrapPYG@PYG@spec{#1#2}%
|
||||||
|
\futurelet\spx@nexttoken\spx@verb@wrapPYG@PYG@i
|
||||||
|
}%
|
||||||
|
\long\def\spx@verb@wrapPYG@PYG@three#1#2#3{%
|
||||||
|
\expandafter\PYG\spx@verb@wrapPYG@PYG@spec{#1#2#3}%
|
||||||
|
\futurelet\spx@nexttoken\spx@verb@wrapPYG@PYG@i
|
||||||
|
}%
|
||||||
|
\long\def\spx@verb@wrapPYG@PYG@four#1#2#3#4{%
|
||||||
|
\expandafter\PYG\spx@verb@wrapPYG@PYG@spec{#1#2#3#4}%
|
||||||
|
\futurelet\spx@nexttoken\spx@verb@wrapPYG@PYG@i
|
||||||
|
}%
|
||||||
|
\catcode`Z 11 %
|
||||||
|
%
|
||||||
|
\g@addto@macro\FV@SetupFont{%
|
||||||
|
\sbox\sphinxcontinuationbox {\spx@opt@verbatimcontinued}%
|
||||||
|
\sbox\sphinxvisiblespacebox {\spx@opt@verbatimvisiblespace}%
|
||||||
|
}%
|
||||||
|
\newenvironment{sphinxVerbatim}{%
|
||||||
|
% first, let's check if there is a caption
|
||||||
|
\ifx\sphinxVerbatimTitle\empty
|
||||||
|
\sphinxvspacefixafterfrenchlists
|
||||||
|
\parskip\z@skip
|
||||||
|
\vskip\sphinxverbatimsmallskipamount
|
||||||
|
% there was no caption. Check if nevertheless a label was set.
|
||||||
|
\ifx\sphinxLiteralBlockLabel\empty\else
|
||||||
|
% we require some space to be sure hyperlink target from \phantomsection
|
||||||
|
% will not be separated from upcoming verbatim by a page break
|
||||||
|
\needspace{\sphinxliteralblockwithoutcaptionneedspace}%
|
||||||
|
\phantomsection\sphinxLiteralBlockLabel
|
||||||
|
\fi
|
||||||
|
\else
|
||||||
|
\parskip\z@skip
|
||||||
|
\if t\spx@opt@literalblockcappos
|
||||||
|
\vskip\spx@abovecaptionskip
|
||||||
|
\def\sphinxVerbatim@Before
|
||||||
|
{\sphinxVerbatim@Title\nointerlineskip
|
||||||
|
\kern\dimexpr-\dp\strutbox+\sphinxbelowcaptionspace
|
||||||
|
% if no frame (code-blocks inside table cells), remove
|
||||||
|
% the "verbatimsep" whitespace from the top (better visually)
|
||||||
|
\ifspx@opt@verbatimwithframe\else-\sphinxverbatimsep\fi
|
||||||
|
% caption package adds \abovecaptionskip vspace, remove it
|
||||||
|
\spx@ifcaptionpackage{-\abovecaptionskip}{}\relax}%
|
||||||
|
\else
|
||||||
|
\vskip\sphinxverbatimsmallskipamount
|
||||||
|
\def\sphinxVerbatim@After
|
||||||
|
{\nointerlineskip\kern\dimexpr\dp\strutbox
|
||||||
|
\ifspx@opt@verbatimwithframe\else-\sphinxverbatimsep\fi
|
||||||
|
\spx@ifcaptionpackage{-\abovecaptionskip}{}\relax
|
||||||
|
\sphinxVerbatim@Title}%
|
||||||
|
\fi
|
||||||
|
\def\@captype{literalblock}%
|
||||||
|
\capstart
|
||||||
|
% \sphinxVerbatimTitle must reset color
|
||||||
|
\setbox\sphinxVerbatim@TitleBox
|
||||||
|
\hbox{\begin{minipage}{\linewidth}%
|
||||||
|
% caption package may detect wrongly if top or bottom, so we help it
|
||||||
|
\spx@ifcaptionpackage
|
||||||
|
{\caption@setposition{\spx@opt@literalblockcappos}}{}%
|
||||||
|
\sphinxVerbatimTitle
|
||||||
|
\end{minipage}}%
|
||||||
|
\fi
|
||||||
|
\global\let\sphinxLiteralBlockLabel\empty
|
||||||
|
\global\let\sphinxVerbatimTitle\empty
|
||||||
|
\fboxsep\sphinxverbatimsep \fboxrule\sphinxverbatimborder
|
||||||
|
\ifspx@opt@verbatimwithframe\else\fboxrule\z@\fi
|
||||||
|
\let\FrameCommand \sphinxVerbatim@FrameCommand
|
||||||
|
\let\FirstFrameCommand\sphinxVerbatim@FirstFrameCommand
|
||||||
|
\let\MidFrameCommand \sphinxVerbatim@MidFrameCommand
|
||||||
|
\let\LastFrameCommand \sphinxVerbatim@LastFrameCommand
|
||||||
|
\ifspx@opt@verbatimhintsturnover\else
|
||||||
|
\let\sphinxVerbatim@Continued\@empty
|
||||||
|
\let\sphinxVerbatim@Continues\@empty
|
||||||
|
\fi
|
||||||
|
\ifspx@opt@verbatimwrapslines
|
||||||
|
% fancyvrb's Verbatim puts each input line in (unbreakable) horizontal boxes.
|
||||||
|
% This customization wraps each line from the input in a \vtop, thus
|
||||||
|
% allowing it to wrap and display on two or more lines in the latex output.
|
||||||
|
% - The codeline counter will be increased only once.
|
||||||
|
% - The wrapped material will not break across pages, it is impossible
|
||||||
|
% to achieve this without extensive rewrite of fancyvrb.
|
||||||
|
% - The (not used in sphinx) obeytabs option to Verbatim is
|
||||||
|
% broken by this change (showtabs and tabspace work).
|
||||||
|
\let\sphinxVerbatimFormatLine\sphinxVerbatimFormatLineWrap
|
||||||
|
\let\FV@Space\spx@verbatim@space
|
||||||
|
% Allow breaks at special characters using \PYG... macros.
|
||||||
|
\sphinxbreaksatspecials
|
||||||
|
% Breaks at punctuation characters . , ; ? ! and / (needs catcode activation)
|
||||||
|
\fvset{codes*=\sphinxbreaksviaactive}%
|
||||||
|
\else % end of conditional code for wrapping long code lines
|
||||||
|
\let\sphinxVerbatimFormatLine\sphinxVerbatimFormatLineNoWrap
|
||||||
|
\fi
|
||||||
|
\let\FancyVerbFormatLine\sphinxFancyVerbFormatLine
|
||||||
|
\VerbatimEnvironment
|
||||||
|
% workaround to fancyvrb's check of current list depth
|
||||||
|
\def\@toodeep {\advance\@listdepth\@ne}%
|
||||||
|
% The list environment is needed to control perfectly the vertical space.
|
||||||
|
% Note: \OuterFrameSep used by framed.sty is later set to \topsep hence 0pt.
|
||||||
|
% - if caption: distance from last text baseline to caption baseline is
|
||||||
|
% A+(B-F)+\ht\strutbox, A = \abovecaptionskip (default 10pt), B =
|
||||||
|
% \baselineskip, F is the framed.sty \FrameHeightAdjust macro, default 6pt.
|
||||||
|
% Formula valid for F < 10pt.
|
||||||
|
% - distance of baseline of caption to top of frame is like for tables:
|
||||||
|
% \sphinxbelowcaptionspace (=0.5\baselineskip)
|
||||||
|
% - if no caption: distance of last text baseline to code frame is S+(B-F),
|
||||||
|
% with S = \sphinxverbatimtopskip (=\smallskip)
|
||||||
|
% - and distance from bottom of frame to next text baseline is
|
||||||
|
% \baselineskip+\parskip.
|
||||||
|
% The \trivlist is used to avoid possible "too deeply nested" error.
|
||||||
|
\itemsep \z@skip
|
||||||
|
\topsep \z@skip
|
||||||
|
\partopsep \z@skip
|
||||||
|
% trivlist will set \parsep to \parskip (which itself is set to zero above)
|
||||||
|
% \leftmargin will be set to zero by trivlist
|
||||||
|
\rightmargin\z@
|
||||||
|
\parindent \z@% becomes \itemindent. Default zero, but perhaps overwritten.
|
||||||
|
\trivlist\item\relax
|
||||||
|
\ifspx@inframed\setbox\sphinxVerbatim@ContentsBox\vbox\bgroup
|
||||||
|
\@setminipage\hsize\linewidth
|
||||||
|
% use bulk of minipage paragraph shape restores (this is needed
|
||||||
|
% in indented contexts, at least for some)
|
||||||
|
\textwidth\hsize \columnwidth\hsize \@totalleftmargin\z@
|
||||||
|
\leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip
|
||||||
|
\else
|
||||||
|
\ifsphinxverbatimwithminipage\noindent\begin{minipage}{\linewidth}\fi
|
||||||
|
\MakeFramed {% adapted over from framed.sty's snugshade environment
|
||||||
|
\advance\hsize-\width\@totalleftmargin\z@\linewidth\hsize\@setminipage
|
||||||
|
}%
|
||||||
|
\fi
|
||||||
|
% For grid placement from \strut's in \FancyVerbFormatLine
|
||||||
|
\lineskip\z@skip
|
||||||
|
% active comma should not be overwritten by \@noligs
|
||||||
|
\ifspx@opt@verbatimwrapslines
|
||||||
|
\let\verbatim@nolig@list \sphinx@verbatim@nolig@list
|
||||||
|
\fi
|
||||||
|
% will fetch its optional arguments if any
|
||||||
|
\OriginalVerbatim
|
||||||
|
}
|
||||||
|
{%
|
||||||
|
\endOriginalVerbatim
|
||||||
|
\ifspx@inframed
|
||||||
|
\egroup % finish \sphinxVerbatim@ContentsBox vbox
|
||||||
|
\nobreak % update page totals
|
||||||
|
\ifdim\dimexpr\ht\sphinxVerbatim@ContentsBox+
|
||||||
|
\dp\sphinxVerbatim@ContentsBox+
|
||||||
|
\ht\sphinxVerbatim@TitleBox+
|
||||||
|
\dp\sphinxVerbatim@TitleBox+
|
||||||
|
2\fboxsep+2\fboxrule+
|
||||||
|
% try to account for external frame parameters
|
||||||
|
\FrameSep+\FrameRule+
|
||||||
|
% Usage here of 2 baseline distances is empirical.
|
||||||
|
% In border case where code-block fits barely in remaining space,
|
||||||
|
% it gets framed and looks good but the outer frame may continue
|
||||||
|
% on top of next page and give (if no contents after code-block)
|
||||||
|
% an empty framed line, as testing showed.
|
||||||
|
2\baselineskip+
|
||||||
|
% now add all to accumulated page totals and compare to \pagegoal
|
||||||
|
\pagetotal+\pagedepth>\pagegoal
|
||||||
|
% long contents: do not \MakeFramed. Do make a caption (either before or
|
||||||
|
% after) if title exists. Continuation hints across pagebreaks dropped.
|
||||||
|
% FIXME? a bottom caption may end up isolated at top of next page
|
||||||
|
% (no problem with a top caption, which is default)
|
||||||
|
\spx@opt@verbatimwithframefalse
|
||||||
|
\def\sphinxVerbatim@Title{\noindent\box\sphinxVerbatim@TitleBox\par}%
|
||||||
|
\sphinxVerbatim@Before
|
||||||
|
\noindent\unvbox\sphinxVerbatim@ContentsBox\par
|
||||||
|
\sphinxVerbatim@After
|
||||||
|
\else
|
||||||
|
% short enough contents: use \MakeFramed. As it is nested, this requires
|
||||||
|
% minipage encapsulation.
|
||||||
|
\noindent\begin{minipage}{\linewidth}%
|
||||||
|
\MakeFramed {% Use it now with the fetched contents
|
||||||
|
\advance\hsize-\width\@totalleftmargin\z@\linewidth\hsize\@setminipage
|
||||||
|
}%
|
||||||
|
\unvbox\sphinxVerbatim@ContentsBox
|
||||||
|
% some of this may be superfluous:
|
||||||
|
\par\unskip\@minipagefalse\endMakeFramed
|
||||||
|
\end{minipage}%
|
||||||
|
\fi
|
||||||
|
\else % non-nested \MakeFramed
|
||||||
|
\par\unskip\@minipagefalse\endMakeFramed % from framed.sty snugshade
|
||||||
|
\ifsphinxverbatimwithminipage\end{minipage}\fi
|
||||||
|
\fi
|
||||||
|
\endtrivlist
|
||||||
|
}
|
||||||
|
\newenvironment {sphinxVerbatimNoFrame}
|
||||||
|
{\spx@opt@verbatimwithframefalse
|
||||||
|
\VerbatimEnvironment
|
||||||
|
\begin{sphinxVerbatim}}
|
||||||
|
{\end{sphinxVerbatim}}
|
||||||
|
\newenvironment {sphinxVerbatimintable}
|
||||||
|
{% don't use a frame if in a table cell
|
||||||
|
\spx@opt@verbatimwithframefalse
|
||||||
|
\sphinxverbatimwithminipagetrue
|
||||||
|
% the literal block caption uses \sphinxcaption which is wrapper of \caption,
|
||||||
|
% but \caption must be modified because longtable redefines it to work only
|
||||||
|
% for the own table caption, and tabulary has multiple passes
|
||||||
|
\let\caption\sphinxfigcaption
|
||||||
|
% reduce above caption skip
|
||||||
|
\def\spx@abovecaptionskip{\sphinxverbatimsmallskipamount}%
|
||||||
|
\VerbatimEnvironment
|
||||||
|
\begin{sphinxVerbatim}}
|
||||||
|
{\end{sphinxVerbatim}}
|
||||||
|
|
||||||
|
|
||||||
|
%% PARSED LITERALS
|
||||||
|
% allow long lines to wrap like they do in code-blocks
|
||||||
|
|
||||||
|
% this should be kept in sync with definitions in sphinx.util.texescape
|
||||||
|
\newcommand*\sphinxbreaksattexescapedchars{%
|
||||||
|
\def\do##1##2% put potential break point before character
|
||||||
|
{\def##1{\discretionary{}{\sphinxafterbreak\char`##2}{\char`##2}}}%
|
||||||
|
\do\{\{\do\textless\<\do\#\#\do\%\%\do\$\$% {, <, #, %, $
|
||||||
|
\def\do##1##2% put potential break point after character
|
||||||
|
{\def##1{\discretionary{\char`##2}{\sphinxafterbreak}{\char`##2}}}%
|
||||||
|
\do\_\_\do\}\}\do\textasciicircum\^\do\&\&% _, }, ^, &,
|
||||||
|
\do\textgreater\>\do\textasciitilde\~% >, ~
|
||||||
|
\do\textbackslash\\% \
|
||||||
|
}
|
||||||
|
\newcommand*\sphinxbreaksviaactiveinparsedliteral{%
|
||||||
|
\sphinxbreaksviaactive % by default handles . , ; ? ! /
|
||||||
|
\lccode`\~`\~ %
|
||||||
|
% update \dospecials as it is used by \url
|
||||||
|
% but deactivation will already have been done hence this is unneeded:
|
||||||
|
% \expandafter\def\expandafter\dospecials\expandafter{\dospecials
|
||||||
|
% \sphinxbreaksbeforeactivelist\sphinxbreaksafteractivelist\do\-}%
|
||||||
|
}
|
||||||
|
\newcommand*\sphinxbreaksatspaceinparsedliteral{%
|
||||||
|
\lccode`~32 \lowercase{\let~}\spx@verbatim@space\lccode`\~`\~
|
||||||
|
}
|
||||||
|
\newcommand*{\sphinxunactivateextras}{\let\do\@makeother
|
||||||
|
\sphinxbreaksbeforeactivelist\sphinxbreaksafteractivelist}%
|
||||||
|
% the \catcode13=5\relax (deactivate end of input lines) is left to callers
|
||||||
|
\newcommand*{\sphinxunactivateextrasandspace}{\catcode32=10\relax
|
||||||
|
\sphinxunactivateextras}%
|
||||||
|
% alltt uses a monospace font and linebreaks at dashes (which are escaped
|
||||||
|
% to \sphinxhyphen{} which expands to -\kern\z@) are inhibited with pdflatex.
|
||||||
|
% Not with xelatex (cf \defaultfontfeatures in latex writer), so:
|
||||||
|
\newcommand*{\sphinxhypheninparsedliteral}{\sphinxhyphennobreak}
|
||||||
|
% now for the modified alltt environment
|
||||||
|
\newenvironment{sphinxalltt}
|
||||||
|
{% at start of next line to workaround Emacs/AUCTeX issue with this file
|
||||||
|
\begin{alltt}%
|
||||||
|
\ifspx@opt@parsedliteralwraps
|
||||||
|
\sbox\sphinxcontinuationbox {\spx@opt@verbatimcontinued}%
|
||||||
|
\sbox\sphinxvisiblespacebox {\spx@opt@verbatimvisiblespace}%
|
||||||
|
\let\sphinxhyphen\sphinxhypheninparsedliteral
|
||||||
|
\sphinxbreaksattexescapedchars
|
||||||
|
\sphinxbreaksviaactiveinparsedliteral
|
||||||
|
\sphinxbreaksatspaceinparsedliteral
|
||||||
|
% alltt takes care of the ' as derivative ("prime") in math mode
|
||||||
|
\everymath\expandafter{\the\everymath\sphinxunactivateextrasandspace
|
||||||
|
\catcode`\<=12\catcode`\>=12\catcode`\^=7\catcode`\_=8 }%
|
||||||
|
% not sure if displayed math (align,...) can end up in parsed-literal, anyway
|
||||||
|
\everydisplay\expandafter{\the\everydisplay
|
||||||
|
\catcode13=5 \sphinxunactivateextrasandspace
|
||||||
|
\catcode`\<=12\catcode`\>=12\catcode`\^=7\catcode`\_=8 }%
|
||||||
|
\fi }
|
||||||
|
{\end{alltt}}
|
||||||
|
|
||||||
|
|
||||||
|
%% INLINE MARK-UP
|
||||||
|
%
|
||||||
|
|
||||||
|
% Protect \href's first argument in contexts such as sphinxalltt (or
|
||||||
|
% \sphinxcode). Sphinx uses \#, \%, \& ... always inside \sphinxhref.
|
||||||
|
\protected\def\sphinxhref#1#2{{%
|
||||||
|
\sphinxunactivateextrasandspace % never do \scantokens with active space!
|
||||||
|
% for the \endlinechar business, https://github.com/latex3/latex2e/issues/286
|
||||||
|
\endlinechar\m@ne\everyeof{{\endlinechar13 #2}}% keep catcode regime for #2
|
||||||
|
\scantokens{\href{#1}}% normalise it for #1 during \href expansion
|
||||||
|
}}
|
||||||
|
% Same for \url. And also \nolinkurl for coherence.
|
||||||
|
\protected\def\sphinxurl#1{{%
|
||||||
|
\sphinxunactivateextrasandspace\everyeof{}% (<- precaution for \scantokens)
|
||||||
|
\endlinechar\m@ne\scantokens{\url{#1}}%
|
||||||
|
}}
|
||||||
|
\protected\def\sphinxnolinkurl#1{{%
|
||||||
|
\sphinxunactivateextrasandspace\everyeof{}%
|
||||||
|
\endlinechar\m@ne\scantokens{\nolinkurl{#1}}%
|
||||||
|
}}
|
||||||
|
|
||||||
|
% \sphinxupquote
|
||||||
|
% to obtain straight quotes we execute \@noligs as patched by upquote, and
|
||||||
|
% \scantokens is needed in cases where it would be too late for the macro to
|
||||||
|
% first set catcodes and then fetch its argument. We also make the contents
|
||||||
|
% breakable at non-escaped . , ; ? ! / using \sphinxbreaksviaactive,
|
||||||
|
% and also at \ character (which is escaped to \textbackslash{}).
|
||||||
|
\protected\def\sphinxtextbackslashbreakbefore
|
||||||
|
{\discretionary{}{\sphinxafterbreak\sphinx@textbackslash}{\sphinx@textbackslash}}
|
||||||
|
\protected\def\sphinxtextbackslashbreakafter
|
||||||
|
{\discretionary{\sphinx@textbackslash}{\sphinxafterbreak}{\sphinx@textbackslash}}
|
||||||
|
\let\sphinxtextbackslash\sphinxtextbackslashbreakafter
|
||||||
|
% - is escaped to \sphinxhyphen{} and this default ensures no linebreak
|
||||||
|
% behaviour (also with a non monospace font, or with xelatex)
|
||||||
|
\newcommand*{\sphinxhyphenininlineliteral}{\sphinxhyphennobreak}
|
||||||
|
% the macro must be protected if it ends up used in moving arguments,
|
||||||
|
% in 'alltt' \@noligs is done already, and the \scantokens must be avoided.
|
||||||
|
\protected\def\sphinxupquote#1{{\def\@tempa{alltt}%
|
||||||
|
\ifx\@tempa\@currenvir\else
|
||||||
|
\let\sphinxhyphen\sphinxhyphenininlineliteral
|
||||||
|
\ifspx@opt@inlineliteralwraps
|
||||||
|
% break at . , ; ? ! /
|
||||||
|
\sphinxbreaksviaactive
|
||||||
|
% break also at \
|
||||||
|
\setbox8=\hbox{\textbackslash}%
|
||||||
|
\def\sphinx@textbackslash{\copy8}%
|
||||||
|
\let\textbackslash\sphinxtextbackslash
|
||||||
|
% by default, no continuation symbol on next line but may be added
|
||||||
|
\let\sphinxafterbreak\sphinxafterbreakofinlineliteral
|
||||||
|
% do not overwrite the comma set-up
|
||||||
|
\let\verbatim@nolig@list\sphinx@literal@nolig@list
|
||||||
|
\fi
|
||||||
|
% fix a space-gobbling issue due to LaTeX's original \do@noligs
|
||||||
|
% TODO: using \@noligs as patched by upquote.sty is now unneeded because
|
||||||
|
% either ` and ' are escaped (non-unicode engines) or they don't build
|
||||||
|
% ligatures (unicode engines). Thus remove this and unify handling of `, <, >,
|
||||||
|
% ' and - with the characters . , ; ? ! / as handled via
|
||||||
|
% \sphinxbreaksviaactive.
|
||||||
|
% Hence \sphinx@do@noligs will be removed, or rather replaced with code
|
||||||
|
% inserting discretionaries, as they allow a continuation symbol on start of
|
||||||
|
% next line to achieve common design with code-blocks.
|
||||||
|
\let\do@noligs\sphinx@do@noligs
|
||||||
|
\@noligs\endlinechar\m@ne\everyeof{}% (<- in case inside \sphinxhref)
|
||||||
|
\expandafter\scantokens
|
||||||
|
\fi {{#1}}}}% extra brace pair to fix end-space gobbling issue...
|
||||||
|
\def\sphinx@do@noligs #1{\catcode`#1\active\begingroup\lccode`\~`#1\relax
|
||||||
|
\lowercase{\endgroup\def~{\leavevmode\kern\z@\char`#1 }}}
|
||||||
|
\def\sphinx@literal@nolig@list {\do\`\do\<\do\>\do\'\do\-}%
|
||||||
|
\let\sphinxafterbreakofinlineliteral\empty
|
||||||
|
|
||||||
|
|
||||||
|
\endinput
|
||||||
122
source/frUpwork/project_spec/project_spec/sphinxlatexnumfig.sty
Normal file
122
source/frUpwork/project_spec/project_spec/sphinxlatexnumfig.sty
Normal file
|
|
@ -0,0 +1,122 @@
|
||||||
|
%% NUMBERING OF FIGURES, TABLES, AND LITERAL BLOCKS
|
||||||
|
%
|
||||||
|
% change this info string if making any custom modification
|
||||||
|
\ProvidesFile{sphinxlatexnumfig.sty}[2021/01/27 numbering]
|
||||||
|
|
||||||
|
% Requires: remreset (old LaTeX only)
|
||||||
|
% relates to numfig and numfig_secnum_depth configuration variables
|
||||||
|
|
||||||
|
% LaTeX 2018-04-01 and later provides \@removefromreset
|
||||||
|
\ltx@ifundefined{@removefromreset}
|
||||||
|
{\RequirePackage{remreset}}
|
||||||
|
{}% avoid warning
|
||||||
|
% Everything is delayed to \begin{document} to allow hyperref patches into
|
||||||
|
% \newcounter to solve duplicate label problems for internal hyperlinks to
|
||||||
|
% code listings (literalblock counter). User or extension re-definitions of
|
||||||
|
% \theliteralblock, et al., thus have also to be delayed. (changed at 3.5.0)
|
||||||
|
\AtBeginDocument{%
|
||||||
|
\ltx@ifundefined{c@chapter}
|
||||||
|
{\newcounter{literalblock}}%
|
||||||
|
{\newcounter{literalblock}[chapter]%
|
||||||
|
\def\theliteralblock{\ifnum\c@chapter>\z@\arabic{chapter}.\fi
|
||||||
|
\arabic{literalblock}}%
|
||||||
|
}%
|
||||||
|
\ifspx@opt@nonumfigreset
|
||||||
|
\ltx@ifundefined{c@chapter}{}{%
|
||||||
|
\@removefromreset{figure}{chapter}%
|
||||||
|
\@removefromreset{table}{chapter}%
|
||||||
|
\@removefromreset{literalblock}{chapter}%
|
||||||
|
\ifspx@opt@mathnumfig
|
||||||
|
\@removefromreset{equation}{chapter}%
|
||||||
|
\fi
|
||||||
|
}%
|
||||||
|
\def\thefigure{\arabic{figure}}%
|
||||||
|
\def\thetable {\arabic{table}}%
|
||||||
|
\def\theliteralblock{\arabic{literalblock}}%
|
||||||
|
\ifspx@opt@mathnumfig
|
||||||
|
\def\theequation{\arabic{equation}}%
|
||||||
|
\fi
|
||||||
|
\else
|
||||||
|
\let\spx@preAthefigure\@empty
|
||||||
|
\let\spx@preBthefigure\@empty
|
||||||
|
% \ifspx@opt@usespart % <-- LaTeX writer could pass such a 'usespart' boolean
|
||||||
|
% % as sphinx.sty package option
|
||||||
|
% If document uses \part, (triggered in Sphinx by latex_toplevel_sectioning)
|
||||||
|
% LaTeX core per default does not reset chapter or section
|
||||||
|
% counters at each part.
|
||||||
|
% But if we modify this, we need to redefine \thechapter, \thesection to
|
||||||
|
% include the part number and this will cause problems in table of contents
|
||||||
|
% because of too wide numbering. Simplest is to do nothing.
|
||||||
|
% \fi
|
||||||
|
\ifnum\spx@opt@numfigreset>0
|
||||||
|
\ltx@ifundefined{c@chapter}
|
||||||
|
{}
|
||||||
|
{\g@addto@macro\spx@preAthefigure{\ifnum\c@chapter>\z@\arabic{chapter}.}%
|
||||||
|
\g@addto@macro\spx@preBthefigure{\fi}}%
|
||||||
|
\fi
|
||||||
|
\ifnum\spx@opt@numfigreset>1
|
||||||
|
\@addtoreset{figure}{section}%
|
||||||
|
\@addtoreset{table}{section}%
|
||||||
|
\@addtoreset{literalblock}{section}%
|
||||||
|
\ifspx@opt@mathnumfig
|
||||||
|
\@addtoreset{equation}{section}%
|
||||||
|
\fi%
|
||||||
|
\g@addto@macro\spx@preAthefigure{\ifnum\c@section>\z@\arabic{section}.}%
|
||||||
|
\g@addto@macro\spx@preBthefigure{\fi}%
|
||||||
|
\fi
|
||||||
|
\ifnum\spx@opt@numfigreset>2
|
||||||
|
\@addtoreset{figure}{subsection}%
|
||||||
|
\@addtoreset{table}{subsection}%
|
||||||
|
\@addtoreset{literalblock}{subsection}%
|
||||||
|
\ifspx@opt@mathnumfig
|
||||||
|
\@addtoreset{equation}{subsection}%
|
||||||
|
\fi%
|
||||||
|
\g@addto@macro\spx@preAthefigure{\ifnum\c@subsection>\z@\arabic{subsection}.}%
|
||||||
|
\g@addto@macro\spx@preBthefigure{\fi}%
|
||||||
|
\fi
|
||||||
|
\ifnum\spx@opt@numfigreset>3
|
||||||
|
\@addtoreset{figure}{subsubsection}%
|
||||||
|
\@addtoreset{table}{subsubsection}%
|
||||||
|
\@addtoreset{literalblock}{subsubsection}%
|
||||||
|
\ifspx@opt@mathnumfig
|
||||||
|
\@addtoreset{equation}{subsubsection}%
|
||||||
|
\fi%
|
||||||
|
\g@addto@macro\spx@preAthefigure{\ifnum\c@subsubsection>\z@\arabic{subsubsection}.}%
|
||||||
|
\g@addto@macro\spx@preBthefigure{\fi}%
|
||||||
|
\fi
|
||||||
|
\ifnum\spx@opt@numfigreset>4
|
||||||
|
\@addtoreset{figure}{paragraph}%
|
||||||
|
\@addtoreset{table}{paragraph}%
|
||||||
|
\@addtoreset{literalblock}{paragraph}%
|
||||||
|
\ifspx@opt@mathnumfig
|
||||||
|
\@addtoreset{equation}{paragraph}%
|
||||||
|
\fi%
|
||||||
|
\g@addto@macro\spx@preAthefigure{\ifnum\c@subparagraph>\z@\arabic{subparagraph}.}%
|
||||||
|
\g@addto@macro\spx@preBthefigure{\fi}%
|
||||||
|
\fi
|
||||||
|
\ifnum\spx@opt@numfigreset>5
|
||||||
|
\@addtoreset{figure}{subparagraph}%
|
||||||
|
\@addtoreset{table}{subparagraph}%
|
||||||
|
\@addtoreset{literalblock}{subparagraph}%
|
||||||
|
\ifspx@opt@mathnumfig
|
||||||
|
\@addtoreset{equation}{subparagraph}%
|
||||||
|
\fi%
|
||||||
|
\g@addto@macro\spx@preAthefigure{\ifnum\c@subsubparagraph>\z@\arabic{subsubparagraph}.}%
|
||||||
|
\g@addto@macro\spx@preBthefigure{\fi}%
|
||||||
|
\fi
|
||||||
|
\expandafter\g@addto@macro
|
||||||
|
\expandafter\spx@preAthefigure\expandafter{\spx@preBthefigure}%
|
||||||
|
\let\thefigure\spx@preAthefigure
|
||||||
|
\let\thetable\spx@preAthefigure
|
||||||
|
\let\theliteralblock\spx@preAthefigure
|
||||||
|
\g@addto@macro\thefigure{\arabic{figure}}%
|
||||||
|
\g@addto@macro\thetable{\arabic{table}}%
|
||||||
|
\g@addto@macro\theliteralblock{\arabic{literalblock}}%
|
||||||
|
\ifspx@opt@mathnumfig
|
||||||
|
\let\theequation\spx@preAthefigure
|
||||||
|
\g@addto@macro\theequation{\arabic{equation}}%
|
||||||
|
\fi
|
||||||
|
\fi
|
||||||
|
}% end of big \AtBeginDocument
|
||||||
|
|
||||||
|
\endinput
|
||||||
245
source/frUpwork/project_spec/project_spec/sphinxlatexobjects.sty
Normal file
245
source/frUpwork/project_spec/project_spec/sphinxlatexobjects.sty
Normal file
|
|
@ -0,0 +1,245 @@
|
||||||
|
%% MODULE RELEASE DATA AND OBJECT DESCRIPTIONS
|
||||||
|
%
|
||||||
|
% change this info string if making any custom modification
|
||||||
|
\ProvidesFile{sphinxlatexobjects.sty}[2022/01/13 documentation environments]
|
||||||
|
|
||||||
|
% Provides support for this output mark-up from Sphinx latex writer:
|
||||||
|
%
|
||||||
|
% - environments
|
||||||
|
%
|
||||||
|
% - fulllineitems
|
||||||
|
% - productionlist
|
||||||
|
% - optionlist
|
||||||
|
% - DUlineblock (also "lineblock")
|
||||||
|
%
|
||||||
|
% - macros
|
||||||
|
%
|
||||||
|
% - \DUrole
|
||||||
|
% - various legacy support macros related to author and release
|
||||||
|
% data of documented objects and modules.
|
||||||
|
|
||||||
|
% \moduleauthor{name}{email}
|
||||||
|
\newcommand{\moduleauthor}[2]{}
|
||||||
|
|
||||||
|
% \sectionauthor{name}{email}
|
||||||
|
\newcommand{\sectionauthor}[2]{}
|
||||||
|
|
||||||
|
% Allow the release number to be specified independently of the
|
||||||
|
% \date{}. This allows the date to reflect the document's date and
|
||||||
|
% release to specify the release that is documented.
|
||||||
|
%
|
||||||
|
\newcommand{\py@release}{\releasename\space\version}
|
||||||
|
\newcommand{\version}{}% part of \py@release, used by title page and headers
|
||||||
|
% \releaseinfo is used on titlepage (sphinxmanual.cls, sphinxhowto.cls)
|
||||||
|
\newcommand{\releaseinfo}{}
|
||||||
|
\newcommand{\setreleaseinfo}[1]{\renewcommand{\releaseinfo}{#1}}
|
||||||
|
% this is inserted via template and #1=release config variable
|
||||||
|
\newcommand{\release}[1]{\renewcommand{\version}{#1}}
|
||||||
|
% this is defined by template to 'releasename' latex_elements key
|
||||||
|
\newcommand{\releasename}{}
|
||||||
|
% Fix issue in case release and releasename deliberately left blank
|
||||||
|
\newcommand{\sphinxheadercomma}{, }% used in fancyhdr header definition
|
||||||
|
\newcommand{\sphinxifemptyorblank}[1]{%
|
||||||
|
% test after one expansion of macro #1 if contents is empty or spaces
|
||||||
|
\if&\expandafter\@firstofone\detokenize\expandafter{#1}&%
|
||||||
|
\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi}%
|
||||||
|
\AtBeginDocument {%
|
||||||
|
\sphinxifemptyorblank{\releasename}
|
||||||
|
{\sphinxifemptyorblank{\version}{\let\sphinxheadercomma\empty}{}}
|
||||||
|
{}%
|
||||||
|
}%
|
||||||
|
|
||||||
|
% Allow specification of the author's address separately from the
|
||||||
|
% author's name. This can be used to format them differently, which
|
||||||
|
% is a good thing.
|
||||||
|
%
|
||||||
|
\newcommand{\py@authoraddress}{}
|
||||||
|
\newcommand{\authoraddress}[1]{\renewcommand{\py@authoraddress}{#1}}
|
||||||
|
|
||||||
|
% {fulllineitems} is the main environment for object descriptions.
|
||||||
|
%
|
||||||
|
% With 4.0.0 \pysigline (and \pysiglinewithargsret), used in a fulllineitems
|
||||||
|
% environment the #1 will already be of the width which is computed here, i.e.
|
||||||
|
% the available width on line, so the \makebox becomes a bit superfluous
|
||||||
|
\newcommand{\py@itemnewline}[1]{% macro used as \makelabel in fulllineitems
|
||||||
|
% Memo: this presupposes \itemindent is 0pt
|
||||||
|
\kern\labelsep % because \@labels core latex box does \hskip-\labelsep
|
||||||
|
\makebox[\dimexpr\linewidth+\labelwidth\relax][l]{#1}%
|
||||||
|
\kern-\labelsep % because at end of \@labels box there is \hskip\labelsep
|
||||||
|
}
|
||||||
|
|
||||||
|
\newenvironment{fulllineitems}{%
|
||||||
|
\begin{list}{}{\labelwidth \leftmargin
|
||||||
|
\rightmargin \z@ \topsep -\parskip \partopsep \parskip
|
||||||
|
\itemsep -\parsep
|
||||||
|
\let\makelabel=\py@itemnewline}%
|
||||||
|
}{\end{list}}
|
||||||
|
|
||||||
|
% Signatures, possibly multi-line
|
||||||
|
%
|
||||||
|
% For legacy reasons Sphinx uses LaTeX \list and \item's for signatures
|
||||||
|
% This is delicate:
|
||||||
|
% - the actual item label is not typeset immediately by \item but later as part
|
||||||
|
% of the \everypar which will be triggered by either next paragraph or a manual
|
||||||
|
% \leavevmode, or if nothing in-between by the next \item,
|
||||||
|
% - \begingroup <set-up>\item[foo] <setup>\endgroup leads to errors,
|
||||||
|
% - vertical space depends on \parskip and \itemsep values in somewhat
|
||||||
|
% subtle manners.
|
||||||
|
%
|
||||||
|
% Since the 2022/01/13 version things are simpler as \parskip is simply set
|
||||||
|
% to zero during execution of \pysigline/\pysiglinewithargsret
|
||||||
|
%
|
||||||
|
% Parameter for separation via \itemsep of multiple signatures with common desc
|
||||||
|
\newlength\sphinxsignaturesep
|
||||||
|
\setlength\sphinxsignaturesep{\smallskipamount}
|
||||||
|
% latex.py outputs mark-up like this:
|
||||||
|
% \pysigstartsignatures <signatures> \pysigstopsignatures <actual desc>
|
||||||
|
\newcommand{\pysigstartsignatures}{%
|
||||||
|
% store current \parskip and \itemsep
|
||||||
|
\edef\pysig@restore@itemsep@and@parskip{%
|
||||||
|
\itemsep\the\itemsep\relax
|
||||||
|
\parskip\the\parskip\relax
|
||||||
|
}%
|
||||||
|
% set them to control the spacing between signatures sharing common desc
|
||||||
|
\parskip\z@skip
|
||||||
|
\itemsep\sphinxsignaturesep
|
||||||
|
}
|
||||||
|
\newcommand{\pysigstopsignatures}{%
|
||||||
|
% 1) encourage a pagebreak in an attempt to try to avoid last
|
||||||
|
% signature ending up separated from description (due to voodoo next)
|
||||||
|
\penalty-100
|
||||||
|
% 2) some voodoo to separate last signature from description in a manner
|
||||||
|
% robust with respect to the latter being itself a LaTeX list object
|
||||||
|
\leavevmode\par\kern-\baselineskip\item[\strut]
|
||||||
|
%
|
||||||
|
\leavevmode
|
||||||
|
% it is important \leavevmode was issued before the \parskip reset, and
|
||||||
|
% it is also needed for the case of an object desc itself a LaTeX \list
|
||||||
|
% now restore \itemsep and \parskip
|
||||||
|
\pysig@restore@itemsep@and@parskip
|
||||||
|
}
|
||||||
|
%
|
||||||
|
% Use a \parbox to accomodate long argument list in signatures
|
||||||
|
% LaTeX did not imagine that an \item label could need multi-line rendering
|
||||||
|
\newlength{\py@argswidth}
|
||||||
|
\newcommand{\py@sigparams}[2]{%
|
||||||
|
% The \py@argswidth has been computed in \pysiglinewithargsret to make the
|
||||||
|
% argument list use full available width
|
||||||
|
\parbox[t]{\py@argswidth}{\raggedright #1\sphinxcode{)}#2\strut}%
|
||||||
|
% final strut is to help get correct vertical separation
|
||||||
|
}
|
||||||
|
\newcommand{\pysigline}[1]{%
|
||||||
|
% as \py@argswidth is available, we use it but no "args" here
|
||||||
|
% the \relax\relax is because \py@argswidth is a "skip" variable
|
||||||
|
% this will make the label occupy the full available linewidth
|
||||||
|
\py@argswidth=\dimexpr\linewidth+\labelwidth\relax\relax
|
||||||
|
\item[{\parbox[t]{\py@argswidth}{\raggedright #1\strut}}]
|
||||||
|
\pysigadjustitemsep
|
||||||
|
}
|
||||||
|
\newcommand{\pysiglinewithargsret}[3]{%
|
||||||
|
\settowidth{\py@argswidth}{#1\sphinxcode{(}}%
|
||||||
|
\py@argswidth=\dimexpr\linewidth+\labelwidth-\py@argswidth\relax\relax
|
||||||
|
\item[{#1\sphinxcode{(}\py@sigparams{#2}{#3}\strut}]
|
||||||
|
\pysigadjustitemsep
|
||||||
|
}
|
||||||
|
\newcommand{\pysigadjustitemsep}{%
|
||||||
|
% adjust \itemsep to control the separation with the next signature
|
||||||
|
% sharing common description
|
||||||
|
\ifsphinxsigismultiline
|
||||||
|
% inside a multiline signature, no extra vertical spacing
|
||||||
|
% ("multiline" here does not refer to possibly long
|
||||||
|
% list of arguments, but to a cpp domain feature)
|
||||||
|
\itemsep\z@skip
|
||||||
|
\else
|
||||||
|
\itemsep\sphinxsignaturesep
|
||||||
|
\fi
|
||||||
|
}
|
||||||
|
\newif\ifsphinxsigismultiline
|
||||||
|
\newcommand{\pysigstartmultiline}{\sphinxsigismultilinetrue}%
|
||||||
|
\newcommand{\pysigstopmultiline}{\sphinxsigismultilinefalse\itemsep\sphinxsignaturesep}%
|
||||||
|
|
||||||
|
% Production lists
|
||||||
|
%
|
||||||
|
\newenvironment{productionlist}{%
|
||||||
|
% \def\sphinxoptional##1{{\Large[}##1{\Large]}}
|
||||||
|
\def\production##1##2{\\\sphinxcode{\sphinxupquote{##1}}&::=&\sphinxcode{\sphinxupquote{##2}}}%
|
||||||
|
\def\productioncont##1{\\& &\sphinxcode{\sphinxupquote{##1}}}%
|
||||||
|
\parindent=2em
|
||||||
|
\indent
|
||||||
|
\setlength{\LTpre}{0pt}%
|
||||||
|
\setlength{\LTpost}{0pt}%
|
||||||
|
\begin{longtable}[l]{lcl}
|
||||||
|
}{%
|
||||||
|
\end{longtable}
|
||||||
|
}
|
||||||
|
|
||||||
|
% Definition lists; requested by AMK for HOWTO documents. Probably useful
|
||||||
|
% elsewhere as well, so keep in in the general style support.
|
||||||
|
%
|
||||||
|
\newenvironment{definitions}{%
|
||||||
|
\begin{description}%
|
||||||
|
\def\term##1{\item[{##1}]\mbox{}\\*[0mm]}%
|
||||||
|
}{%
|
||||||
|
\end{description}%
|
||||||
|
}
|
||||||
|
|
||||||
|
%% FROM DOCTUTILS LATEX WRITER
|
||||||
|
%
|
||||||
|
% The following is stuff copied from docutils' latex writer.
|
||||||
|
%
|
||||||
|
\newcommand{\optionlistlabel}[1]{\normalfont\bfseries #1 \hfill}% \bf deprecated
|
||||||
|
\newenvironment{optionlist}[1]
|
||||||
|
{\begin{list}{}
|
||||||
|
{\setlength{\labelwidth}{#1}
|
||||||
|
\setlength{\rightmargin}{1cm}
|
||||||
|
\setlength{\leftmargin}{\rightmargin}
|
||||||
|
\addtolength{\leftmargin}{\labelwidth}
|
||||||
|
\addtolength{\leftmargin}{\labelsep}
|
||||||
|
\renewcommand{\makelabel}{\optionlistlabel}}
|
||||||
|
}{\end{list}}
|
||||||
|
|
||||||
|
\newlength{\lineblockindentation}
|
||||||
|
\setlength{\lineblockindentation}{2.5em}
|
||||||
|
\newenvironment{lineblock}[1]
|
||||||
|
{\begin{list}{}
|
||||||
|
{\setlength{\partopsep}{\parskip}
|
||||||
|
\addtolength{\partopsep}{\baselineskip}
|
||||||
|
\topsep0pt\itemsep0.15\baselineskip\parsep0pt
|
||||||
|
\leftmargin#1\relax}
|
||||||
|
\raggedright}
|
||||||
|
{\end{list}}
|
||||||
|
|
||||||
|
% From docutils.writers.latex2e
|
||||||
|
% inline markup (custom roles)
|
||||||
|
% \DUrole{#1}{#2} tries \DUrole#1{#2}
|
||||||
|
\providecommand*{\DUrole}[2]{%
|
||||||
|
\ifcsname DUrole\detokenize{#1}\endcsname
|
||||||
|
\csname DUrole\detokenize{#1}\endcsname{#2}%
|
||||||
|
\else% backwards compatibility: try \docutilsrole#1{#2}
|
||||||
|
\ifcsname docutilsrole\detokenize{#1}\endcsname
|
||||||
|
\csname docutilsrole\detokenize{#1}\endcsname{#2}%
|
||||||
|
\else
|
||||||
|
#2%
|
||||||
|
\fi
|
||||||
|
\fi
|
||||||
|
}
|
||||||
|
|
||||||
|
\providecommand*{\DUprovidelength}[2]{%
|
||||||
|
\ifdefined#1\else\newlength{#1}\setlength{#1}{#2}\fi
|
||||||
|
}
|
||||||
|
|
||||||
|
\DUprovidelength{\DUlineblockindent}{2.5em}
|
||||||
|
\ifdefined\DUlineblock\else
|
||||||
|
\newenvironment{DUlineblock}[1]{%
|
||||||
|
\list{}{\setlength{\partopsep}{\parskip}
|
||||||
|
\addtolength{\partopsep}{\baselineskip}
|
||||||
|
\setlength{\topsep}{0pt}
|
||||||
|
\setlength{\itemsep}{0.15\baselineskip}
|
||||||
|
\setlength{\parsep}{0pt}
|
||||||
|
\setlength{\leftmargin}{#1}}
|
||||||
|
\raggedright
|
||||||
|
}
|
||||||
|
{\endlist}
|
||||||
|
\fi
|
||||||
|
|
||||||
|
\endinput
|
||||||
|
|
@ -0,0 +1,100 @@
|
||||||
|
%% TOPIC AND CONTENTS BOXES
|
||||||
|
%
|
||||||
|
% change this info string if making any custom modification
|
||||||
|
\ProvidesFile{sphinxlatexshadowbox.sty}[2021/01/27 sphinxShadowBox]
|
||||||
|
|
||||||
|
% Provides support for this output mark-up from Sphinx latex writer:
|
||||||
|
%
|
||||||
|
% - sphinxShadowBox (environment)
|
||||||
|
%
|
||||||
|
% Dependencies (they do not need to be defined at time of loading):
|
||||||
|
%
|
||||||
|
% - of course the various colour and dimension options handled via sphinx.sty
|
||||||
|
% - dimension register \spx@image@maxheight from sphinxlatexgraphics.sty
|
||||||
|
% - \savenotes/\spewnotes from sphinxpackagefootnote
|
||||||
|
% - \ifspx@inframed defined in sphinx.sty
|
||||||
|
%
|
||||||
|
% Requires:
|
||||||
|
\RequirePackage{framed}
|
||||||
|
|
||||||
|
% Again based on use of "framed.sty", this allows breakable framed boxes.
|
||||||
|
\long\def\spx@ShadowFBox#1{%
|
||||||
|
\leavevmode\begingroup
|
||||||
|
% first we frame the box #1
|
||||||
|
\setbox\@tempboxa
|
||||||
|
\hbox{\vrule\@width\sphinxshadowrule
|
||||||
|
\vbox{\hrule\@height\sphinxshadowrule
|
||||||
|
\kern\sphinxshadowsep
|
||||||
|
\hbox{\kern\sphinxshadowsep #1\kern\sphinxshadowsep}%
|
||||||
|
\kern\sphinxshadowsep
|
||||||
|
\hrule\@height\sphinxshadowrule}%
|
||||||
|
\vrule\@width\sphinxshadowrule}%
|
||||||
|
% Now we add the shadow, like \shadowbox from fancybox.sty would do
|
||||||
|
\dimen@\dimexpr.5\sphinxshadowrule+\sphinxshadowsize\relax
|
||||||
|
\hbox{\vbox{\offinterlineskip
|
||||||
|
\hbox{\copy\@tempboxa\kern-.5\sphinxshadowrule
|
||||||
|
% add shadow on right side
|
||||||
|
\lower\sphinxshadowsize
|
||||||
|
\hbox{\vrule\@height\ht\@tempboxa \@width\dimen@}%
|
||||||
|
}%
|
||||||
|
\kern-\dimen@ % shift back vertically to bottom of frame
|
||||||
|
% and add shadow at bottom
|
||||||
|
\moveright\sphinxshadowsize
|
||||||
|
\vbox{\hrule\@width\wd\@tempboxa \@height\dimen@}%
|
||||||
|
}%
|
||||||
|
% move left by the size of right shadow so shadow adds no width
|
||||||
|
\kern-\sphinxshadowsize
|
||||||
|
}%
|
||||||
|
\endgroup
|
||||||
|
}
|
||||||
|
|
||||||
|
% use framed.sty to allow page breaks in frame+shadow
|
||||||
|
% works well inside Lists and Quote-like environments
|
||||||
|
% produced by ``topic'' directive (or local contents)
|
||||||
|
% could nest if LaTeX writer authorized it
|
||||||
|
\newenvironment{sphinxShadowBox}
|
||||||
|
{\def\FrameCommand {\spx@ShadowFBox }%
|
||||||
|
\advance\spx@image@maxheight
|
||||||
|
-\dimexpr2\sphinxshadowrule
|
||||||
|
+2\sphinxshadowsep
|
||||||
|
+\sphinxshadowsize
|
||||||
|
+\baselineskip\relax
|
||||||
|
% configure framed.sty not to add extra vertical spacing
|
||||||
|
\ltx@ifundefined{OuterFrameSep}{}{\OuterFrameSep\z@skip}%
|
||||||
|
% the \trivlist will add the vertical spacing on top and bottom which is
|
||||||
|
% typical of center environment as used in Sphinx <= 1.4.1
|
||||||
|
% the \noindent has the effet of an extra blank line on top, to
|
||||||
|
% imitate closely the layout from Sphinx <= 1.4.1; the \FrameHeightAdjust
|
||||||
|
% will put top part of frame on this baseline.
|
||||||
|
\def\FrameHeightAdjust {\baselineskip}%
|
||||||
|
% use package footnote to handle footnotes
|
||||||
|
\savenotes
|
||||||
|
\trivlist\item\noindent
|
||||||
|
% use a minipage if we are already inside a framed environment
|
||||||
|
\ifspx@inframed\begin{minipage}{\linewidth}\fi
|
||||||
|
\MakeFramed {\spx@inframedtrue
|
||||||
|
% framed.sty puts into "\width" the added width (=2shadowsep+2shadowrule)
|
||||||
|
% adjust \hsize to what the contents must use
|
||||||
|
\advance\hsize-\width
|
||||||
|
% adjust LaTeX parameters to behave properly in indented/quoted contexts
|
||||||
|
\FrameRestore
|
||||||
|
% typeset the contents as in a minipage (Sphinx <= 1.4.1 used a minipage and
|
||||||
|
% itemize/enumerate are therein typeset more tightly, we want to keep
|
||||||
|
% that). We copy-paste from LaTeX source code but don't do a real minipage.
|
||||||
|
\@pboxswfalse
|
||||||
|
\let\@listdepth\@mplistdepth \@mplistdepth\z@
|
||||||
|
\@minipagerestore
|
||||||
|
\@setminipage
|
||||||
|
}%
|
||||||
|
}%
|
||||||
|
{% insert the "endminipage" code
|
||||||
|
\par\unskip
|
||||||
|
\@minipagefalse
|
||||||
|
\endMakeFramed
|
||||||
|
\ifspx@inframed\end{minipage}\fi
|
||||||
|
\endtrivlist
|
||||||
|
% output the stored footnotes
|
||||||
|
\spewnotes
|
||||||
|
}
|
||||||
|
|
||||||
|
\endinput
|
||||||
|
|
@ -0,0 +1,83 @@
|
||||||
|
%% TITLES
|
||||||
|
%
|
||||||
|
% change this info string if making any custom modification
|
||||||
|
\ProvidesFile{sphinxlatexstyleheadings.sty}[2021/01/27 headings]
|
||||||
|
|
||||||
|
\RequirePackage[nobottomtitles*]{titlesec}
|
||||||
|
\@ifpackagelater{titlesec}{2016/03/15}%
|
||||||
|
{\@ifpackagelater{titlesec}{2016/03/21}%
|
||||||
|
{}%
|
||||||
|
{\newif\ifsphinx@ttlpatch@ok
|
||||||
|
\IfFileExists{etoolbox.sty}{%
|
||||||
|
\RequirePackage{etoolbox}%
|
||||||
|
\patchcmd{\ttlh@hang}{\parindent\z@}{\parindent\z@\leavevmode}%
|
||||||
|
{\sphinx@ttlpatch@oktrue}{}%
|
||||||
|
\ifsphinx@ttlpatch@ok
|
||||||
|
\patchcmd{\ttlh@hang}{\noindent}{}{}{\sphinx@ttlpatch@okfalse}%
|
||||||
|
\fi
|
||||||
|
}{}%
|
||||||
|
\ifsphinx@ttlpatch@ok
|
||||||
|
\typeout{^^J Package Sphinx Info: ^^J
|
||||||
|
**** titlesec 2.10.1 successfully patched for bugfix ****^^J}%
|
||||||
|
\else
|
||||||
|
\AtEndDocument{\PackageWarningNoLine{sphinx}{^^J%
|
||||||
|
******** titlesec 2.10.1 has a bug, (section numbers disappear) ......|^^J%
|
||||||
|
******** and Sphinx could not patch it, perhaps because your local ...|^^J%
|
||||||
|
******** copy is already fixed without a changed release date. .......|^^J%
|
||||||
|
******** If not, you must update titlesec! ...........................|}}%
|
||||||
|
\fi
|
||||||
|
}%
|
||||||
|
}{}
|
||||||
|
|
||||||
|
% Augment the sectioning commands used to get our own font family in place,
|
||||||
|
% and reset some internal data items (\titleformat from titlesec package)
|
||||||
|
\titleformat{\section}{\Large\py@HeaderFamily}%
|
||||||
|
{\py@TitleColor\thesection}{0.5em}{\py@TitleColor}
|
||||||
|
\titleformat{\subsection}{\large\py@HeaderFamily}%
|
||||||
|
{\py@TitleColor\thesubsection}{0.5em}{\py@TitleColor}
|
||||||
|
\titleformat{\subsubsection}{\py@HeaderFamily}%
|
||||||
|
{\py@TitleColor\thesubsubsection}{0.5em}{\py@TitleColor}
|
||||||
|
% By default paragraphs (and subsubsections) will not be numbered because
|
||||||
|
% sphinxmanual.cls and sphinxhowto.cls set secnumdepth to 2
|
||||||
|
\titleformat{\paragraph}{\py@HeaderFamily}%
|
||||||
|
{\py@TitleColor\theparagraph}{0.5em}{\py@TitleColor}
|
||||||
|
\titleformat{\subparagraph}{\py@HeaderFamily}%
|
||||||
|
{\py@TitleColor\thesubparagraph}{0.5em}{\py@TitleColor}
|
||||||
|
|
||||||
|
|
||||||
|
% Since Sphinx 1.5, users should use HeaderFamily key to 'sphinxsetup' rather
|
||||||
|
% than defining their own \py@HeaderFamily command (which is still possible).
|
||||||
|
% Memo: \py@HeaderFamily is also used by \maketitle as defined in
|
||||||
|
% sphinxmanual.cls/sphinxhowto.cls
|
||||||
|
\newcommand{\py@HeaderFamily}{\spx@opt@HeaderFamily}
|
||||||
|
|
||||||
|
% This sets up the fancy chapter headings that make the documents look
|
||||||
|
% at least a little better than the usual LaTeX output.
|
||||||
|
\@ifpackagewith{fncychap}{Bjarne}{
|
||||||
|
\ChNameVar {\raggedleft\normalsize \py@HeaderFamily}
|
||||||
|
\ChNumVar {\raggedleft\Large \py@HeaderFamily}
|
||||||
|
\ChTitleVar{\raggedleft\Large \py@HeaderFamily}
|
||||||
|
% This creates (numbered) chapter heads without the leading \vspace*{}:
|
||||||
|
\def\@makechapterhead#1{%
|
||||||
|
{\parindent \z@ \raggedright \normalfont
|
||||||
|
\ifnum \c@secnumdepth >\m@ne
|
||||||
|
\if@mainmatter
|
||||||
|
\DOCH
|
||||||
|
\fi
|
||||||
|
\fi
|
||||||
|
\interlinepenalty\@M
|
||||||
|
\if@mainmatter
|
||||||
|
\DOTI{#1}%
|
||||||
|
\else%
|
||||||
|
\DOTIS{#1}%
|
||||||
|
\fi
|
||||||
|
}}
|
||||||
|
}{}% <-- "false" clause of \@ifpackagewith
|
||||||
|
|
||||||
|
% fix fncychap's bug which uses prematurely the \textwidth value
|
||||||
|
\@ifpackagewith{fncychap}{Bjornstrup}
|
||||||
|
{\AtBeginDocument{\mylen\textwidth\advance\mylen-2\myhi}}%
|
||||||
|
{}% <-- "false" clause of \@ifpackagewith
|
||||||
|
|
||||||
|
|
||||||
|
\endinput
|
||||||
|
|
@ -0,0 +1,79 @@
|
||||||
|
%% PAGE STYLING
|
||||||
|
%
|
||||||
|
% change this info string if making any custom modification
|
||||||
|
\ProvidesFile{sphinxlatexstylepage.sty}[2021/01/27 page styling]
|
||||||
|
|
||||||
|
% Separate paragraphs by space by default.
|
||||||
|
\IfFileExists{parskip-2001-04-09.sty}% since September 2018 TeXLive update
|
||||||
|
% new parskip.sty, but let it rollback to old one.
|
||||||
|
% hopefully TeX installation not broken and LaTeX kernel not too old
|
||||||
|
{\RequirePackage{parskip}[=v1]}
|
||||||
|
% standard one from 1989. Admittedly \section of article/book gives possibly
|
||||||
|
% anomalous spacing, but we can't require September 2018 release for some time.
|
||||||
|
{\RequirePackage{parskip}}
|
||||||
|
|
||||||
|
% Style parameters and macros used by most documents here
|
||||||
|
\raggedbottom
|
||||||
|
\sloppy
|
||||||
|
\hbadness = 5000 % don't print trivial gripes
|
||||||
|
|
||||||
|
% Require package fancyhdr except under memoir class
|
||||||
|
\@ifclassloaded{memoir}{}{\RequirePackage{fancyhdr}}
|
||||||
|
% Use \pagestyle{normal} as the primary pagestyle for text.
|
||||||
|
% Redefine the 'normal' header/footer style when using "fancyhdr" package:
|
||||||
|
\@ifpackageloaded{fancyhdr}{%
|
||||||
|
\ltx@ifundefined{c@chapter}
|
||||||
|
{% no \chapter, "howto" (non-Japanese) docclass
|
||||||
|
\fancypagestyle{plain}{
|
||||||
|
\fancyhf{}
|
||||||
|
\fancyfoot[C]{{\py@HeaderFamily\thepage}}
|
||||||
|
\renewcommand{\headrulewidth}{0pt}
|
||||||
|
\renewcommand{\footrulewidth}{0pt}
|
||||||
|
}
|
||||||
|
% Same as 'plain', this way we can use it in template
|
||||||
|
% FIXME: shouldn't this have a running header with Name and Release like 'manual'?
|
||||||
|
\fancypagestyle{normal}{
|
||||||
|
\fancyhf{}
|
||||||
|
\fancyfoot[C]{{\py@HeaderFamily\thepage}}
|
||||||
|
\renewcommand{\headrulewidth}{0pt}
|
||||||
|
\renewcommand{\footrulewidth}{0pt}
|
||||||
|
}
|
||||||
|
}%
|
||||||
|
{% classes with \chapter command
|
||||||
|
\fancypagestyle{normal}{
|
||||||
|
\fancyhf{}
|
||||||
|
\fancyfoot[RO]{{\py@HeaderFamily\thepage}}
|
||||||
|
\fancyfoot[LO]{{\py@HeaderFamily\nouppercase{\rightmark}}}
|
||||||
|
\fancyhead[RO]{{\py@HeaderFamily \@title\sphinxheadercomma\py@release}}
|
||||||
|
\if@twoside
|
||||||
|
\fancyfoot[LE]{{\py@HeaderFamily\thepage}}
|
||||||
|
\fancyfoot[RE]{{\py@HeaderFamily\nouppercase{\leftmark}}}
|
||||||
|
\fancyhead[LE]{{\py@HeaderFamily \@title\sphinxheadercomma\py@release}}
|
||||||
|
\fi
|
||||||
|
\renewcommand{\headrulewidth}{0.4pt}
|
||||||
|
\renewcommand{\footrulewidth}{0.4pt}
|
||||||
|
% define chaptermark with \@chappos when \@chappos is available for Japanese
|
||||||
|
\ltx@ifundefined{@chappos}{}
|
||||||
|
{\def\chaptermark##1{\markboth{\@chapapp\space\thechapter\space\@chappos\space ##1}{}}}
|
||||||
|
}
|
||||||
|
% Update the plain style so we get the page number & footer line,
|
||||||
|
% but not a chapter or section title. This is to keep the first
|
||||||
|
% page of a chapter `clean.'
|
||||||
|
\fancypagestyle{plain}{
|
||||||
|
\fancyhf{}
|
||||||
|
\fancyfoot[RO]{{\py@HeaderFamily\thepage}}
|
||||||
|
\if@twoside\fancyfoot[LE]{{\py@HeaderFamily\thepage}}\fi
|
||||||
|
\renewcommand{\headrulewidth}{0pt}
|
||||||
|
\renewcommand{\footrulewidth}{0.4pt}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{% no fancyhdr: memoir class
|
||||||
|
% Provide default for 'normal' style simply as an alias of 'plain' style
|
||||||
|
% This way we can use \pagestyle{normal} in LaTeX template
|
||||||
|
\def\ps@normal{\ps@plain}
|
||||||
|
% Users of memoir class are invited to redefine 'normal' style in preamble
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
\endinput
|
||||||
|
|
@ -0,0 +1,134 @@
|
||||||
|
%% TEXT STYLING
|
||||||
|
%
|
||||||
|
% change this info string if making any custom modification
|
||||||
|
\ProvidesFile{sphinxlatexstyletext.sty}[2021/12/06 text styling]
|
||||||
|
|
||||||
|
% Basically everything here consists of macros which are part of the latex
|
||||||
|
% markup produced by the Sphinx latex writer
|
||||||
|
|
||||||
|
% Some custom font markup commands.
|
||||||
|
\protected\def\sphinxstrong#1{\textbf{#1}}
|
||||||
|
\protected\def\sphinxcode#1{\texttt{#1}}
|
||||||
|
\protected\def\sphinxbfcode#1{\textbf{\sphinxcode{#1}}}
|
||||||
|
\protected\def\sphinxemail#1{\textsf{#1}}
|
||||||
|
\protected\def\sphinxtablecontinued#1{\textsf{#1}}
|
||||||
|
\protected\def\sphinxtitleref#1{\emph{#1}}
|
||||||
|
\protected\def\sphinxmenuselection#1{\emph{#1}}
|
||||||
|
\protected\def\sphinxguilabel#1{\emph{#1}}
|
||||||
|
\protected\def\sphinxkeyboard#1{\sphinxcode{#1}}
|
||||||
|
\protected\def\sphinxaccelerator#1{\underline{#1}}
|
||||||
|
\protected\def\sphinxcrossref#1{\emph{#1}}
|
||||||
|
\protected\def\sphinxtermref#1{\emph{#1}}
|
||||||
|
% \optional is used for ``[, arg]``, i.e. desc_optional nodes.
|
||||||
|
\long\protected\def\sphinxoptional#1{%
|
||||||
|
{\textnormal{\Large[}}{#1}\hspace{0.5mm}{\textnormal{\Large]}}}
|
||||||
|
|
||||||
|
% additional customizable styling
|
||||||
|
\def\sphinxstyleindexentry #1{\texttt{#1}}
|
||||||
|
\def\sphinxstyleindexextra #1{ (\emph{#1})}
|
||||||
|
\def\sphinxstyleindexpageref #1{, \pageref{#1}}
|
||||||
|
\def\sphinxstyleindexpagemain#1{\textbf{#1}}
|
||||||
|
\def\spxentry{\@backslashchar spxentry}% let to \sphinxstyleindexentry in index
|
||||||
|
\def\spxextra{\@backslashchar spxextra}% let to \sphinxstyleindexextra in index
|
||||||
|
\def\sphinxstyleindexlettergroup #1%
|
||||||
|
{{\Large\sffamily#1}\nopagebreak\vspace{1mm}}
|
||||||
|
\def\sphinxstyleindexlettergroupDefault #1%
|
||||||
|
{{\Large\sffamily\sphinxnonalphabeticalgroupname}\nopagebreak\vspace{1mm}}
|
||||||
|
\protected\def\sphinxstyletopictitle #1{\textbf{#1}\par\medskip}
|
||||||
|
\let\sphinxstylesidebartitle\sphinxstyletopictitle
|
||||||
|
\protected\def\sphinxstyleothertitle #1{\textbf{#1}}
|
||||||
|
\protected\def\sphinxstylesidebarsubtitle #1{~\\\textbf{#1} \smallskip}
|
||||||
|
% \text.. commands do not allow multiple paragraphs
|
||||||
|
\protected\def\sphinxstyletheadfamily {\sffamily}
|
||||||
|
\protected\def\sphinxstyleemphasis #1{\emph{#1}}
|
||||||
|
\protected\def\sphinxstyleliteralemphasis#1{\emph{\sphinxcode{#1}}}
|
||||||
|
\protected\def\sphinxstylestrong #1{\textbf{#1}}
|
||||||
|
\protected\def\sphinxstyleliteralstrong#1{\sphinxbfcode{#1}}
|
||||||
|
\protected\def\sphinxstyleabbreviation #1{\textsc{#1}}
|
||||||
|
\protected\def\sphinxstyleliteralintitle#1{\sphinxcode{#1}}
|
||||||
|
\newcommand*\sphinxstylecodecontinued[1]{\footnotesize(#1)}%
|
||||||
|
\newcommand*\sphinxstylecodecontinues[1]{\footnotesize(#1)}%
|
||||||
|
% figure legend comes after caption and may contain arbitrary body elements
|
||||||
|
\newenvironment{sphinxlegend}{\par\small}{\par}
|
||||||
|
% reduce hyperref "Token not allowed in a PDF string" warnings on PDF builds
|
||||||
|
\AtBeginDocument{\pdfstringdefDisableCommands{%
|
||||||
|
% all "protected" macros possibly ending up in section titles should be here
|
||||||
|
% TODO: examine if \sphinxhref, \sphinxurl, \sphinnolinkurl should be handled
|
||||||
|
\let\sphinxstyleemphasis \@firstofone
|
||||||
|
\let\sphinxstyleliteralemphasis \@firstofone
|
||||||
|
\let\sphinxstylestrong \@firstofone
|
||||||
|
\let\sphinxstyleliteralstrong \@firstofone
|
||||||
|
\let\sphinxstyleabbreviation \@firstofone
|
||||||
|
\let\sphinxstyleliteralintitle \@firstofone
|
||||||
|
\let\sphinxupquote \@firstofone
|
||||||
|
\let\sphinxstrong \@firstofone
|
||||||
|
\let\sphinxcode \@firstofone
|
||||||
|
\let\sphinxbfcode \@firstofone
|
||||||
|
\let\sphinxemail \@firstofone
|
||||||
|
\let\sphinxcrossref \@firstofone
|
||||||
|
\let\sphinxtermref \@firstofone
|
||||||
|
\let\sphinxhyphen\sphinxhyphenforbookmarks
|
||||||
|
}}
|
||||||
|
|
||||||
|
% Special characters
|
||||||
|
%
|
||||||
|
% The \kern\z@ is to prevent en-dash and em-dash TeX ligatures.
|
||||||
|
% A linebreak can occur after the dash in regular text (this is
|
||||||
|
% normal behaviour of "-" in TeX, it is not related to \kern\z@).
|
||||||
|
%
|
||||||
|
% Parsed-literals and inline literals also use the \sphinxhyphen
|
||||||
|
% but linebreaks there are prevented due to monospace font family.
|
||||||
|
% (xelatex needs a special addition, cf. sphinxlatexliterals.sty)
|
||||||
|
%
|
||||||
|
% Inside code-blocks, dashes are escaped via another macro, from
|
||||||
|
% Pygments latex output (search for \PYGZhy in sphinxlatexliterals.sty),
|
||||||
|
% and are configured to allow linebreaks despite the monospace font.
|
||||||
|
% (the #1 swallows the {} from \sphinxhyphen{} mark-up)
|
||||||
|
\protected\def\sphinxhyphen#1{-\kern\z@}
|
||||||
|
\protected\def\sphinxhyphennobreak#1{\mbox{-}}
|
||||||
|
% The {} from texescape mark-up is kept, else -- gives en-dash in PDF bookmark
|
||||||
|
\def\sphinxhyphenforbookmarks{-}
|
||||||
|
|
||||||
|
% For curly braces inside \index macro
|
||||||
|
\def\sphinxleftcurlybrace{\{}
|
||||||
|
\def\sphinxrightcurlybrace{\}}
|
||||||
|
|
||||||
|
% Declare Unicode characters used by linux tree command to pdflatex utf8/utf8x
|
||||||
|
\def\spx@bd#1#2{%
|
||||||
|
\leavevmode
|
||||||
|
\begingroup
|
||||||
|
\ifx\spx@bd@height \@undefined\def\spx@bd@height{\baselineskip}\fi
|
||||||
|
\ifx\spx@bd@width \@undefined\setbox0\hbox{0}\def\spx@bd@width{\wd0 }\fi
|
||||||
|
\ifx\spx@bd@thickness\@undefined\def\spx@bd@thickness{.6\p@}\fi
|
||||||
|
\ifx\spx@bd@lower \@undefined\def\spx@bd@lower{\dp\strutbox}\fi
|
||||||
|
\lower\spx@bd@lower#1{#2}%
|
||||||
|
\endgroup
|
||||||
|
}%
|
||||||
|
\@namedef{sphinx@u2500}% BOX DRAWINGS LIGHT HORIZONTAL
|
||||||
|
{\spx@bd{\vbox to\spx@bd@height}
|
||||||
|
{\vss\hrule\@height\spx@bd@thickness
|
||||||
|
\@width\spx@bd@width\vss}}%
|
||||||
|
\@namedef{sphinx@u2502}% BOX DRAWINGS LIGHT VERTICAL
|
||||||
|
{\spx@bd{\hb@xt@\spx@bd@width}
|
||||||
|
{\hss\vrule\@height\spx@bd@height
|
||||||
|
\@width \spx@bd@thickness\hss}}%
|
||||||
|
\@namedef{sphinx@u2514}% BOX DRAWINGS LIGHT UP AND RIGHT
|
||||||
|
{\spx@bd{\hb@xt@\spx@bd@width}
|
||||||
|
{\hss\raise.5\spx@bd@height
|
||||||
|
\hb@xt@\z@{\hss\vrule\@height.5\spx@bd@height
|
||||||
|
\@width \spx@bd@thickness\hss}%
|
||||||
|
\vbox to\spx@bd@height{\vss\hrule\@height\spx@bd@thickness
|
||||||
|
\@width.5\spx@bd@width\vss}}}%
|
||||||
|
\@namedef{sphinx@u251C}% BOX DRAWINGS LIGHT VERTICAL AND RIGHT
|
||||||
|
{\spx@bd{\hb@xt@\spx@bd@width}
|
||||||
|
{\hss
|
||||||
|
\hb@xt@\z@{\hss\vrule\@height\spx@bd@height
|
||||||
|
\@width \spx@bd@thickness\hss}%
|
||||||
|
\vbox to\spx@bd@height{\vss\hrule\@height\spx@bd@thickness
|
||||||
|
\@width.5\spx@bd@width\vss}}}%
|
||||||
|
\protected\def\sphinxunichar#1{\@nameuse{sphinx@u#1}}%
|
||||||
|
|
||||||
|
% Tell TeX about pathological hyphenation cases:
|
||||||
|
\hyphenation{Base-HTTP-Re-quest-Hand-ler}
|
||||||
|
|
||||||
|
\endinput
|
||||||
481
source/frUpwork/project_spec/project_spec/sphinxlatextables.sty
Normal file
481
source/frUpwork/project_spec/project_spec/sphinxlatextables.sty
Normal file
|
|
@ -0,0 +1,481 @@
|
||||||
|
%% TABLES (WITH SUPPORT FOR MERGED CELLS OF GENERAL CONTENTS)
|
||||||
|
%
|
||||||
|
% change this info string if making any custom modification
|
||||||
|
\ProvidesFile{sphinxlatextables.sty}[2021/01/27 tables]%
|
||||||
|
|
||||||
|
% Provides support for this output mark-up from Sphinx latex writer
|
||||||
|
% and table templates:
|
||||||
|
%
|
||||||
|
% - the tabulary and longtable environments from the eponymous packages
|
||||||
|
% - the varwidth environment
|
||||||
|
% - the >{} etc mark-up possible in tabularcolumns is from array package
|
||||||
|
% which is loaded by longtable and tabulary
|
||||||
|
% - \X, \Y, T column types; others (L, C, R, J) are from tabulary package
|
||||||
|
% - \sphinxaftertopcaption
|
||||||
|
% - \sphinxatlongtableend
|
||||||
|
% - \sphinxatlongtablestart
|
||||||
|
% - \sphinxattableend
|
||||||
|
% - \sphinxattablestart
|
||||||
|
% - \sphinxcapstartof
|
||||||
|
% - \sphinxcolwidth
|
||||||
|
% - \sphinxlongtablecapskipadjust
|
||||||
|
% - \sphinxmultirow
|
||||||
|
% - \sphinxstartmulticolumn
|
||||||
|
% - \sphinxstopmulticolumn
|
||||||
|
% - \sphinxtablestrut
|
||||||
|
% - \sphinxthecaptionisattop
|
||||||
|
% - \sphinxthelongtablecaptionisattop
|
||||||
|
%
|
||||||
|
% Executes \RequirePackage for:
|
||||||
|
%
|
||||||
|
% - tabulary
|
||||||
|
% - longtable
|
||||||
|
% - varwidth
|
||||||
|
%
|
||||||
|
% Extends tabulary and longtable via patches and custom macros to support
|
||||||
|
% merged cells possibly containing code-blocks in complex tables
|
||||||
|
|
||||||
|
\RequirePackage{tabulary}
|
||||||
|
% tabulary has a bug with its re-definition of \multicolumn in its first pass
|
||||||
|
% which is not \long. But now Sphinx does not use LaTeX's \multicolumn but its
|
||||||
|
% own macro. Hence we don't even need to patch tabulary. See
|
||||||
|
% sphinxpackagemulticell.sty
|
||||||
|
% X or S (Sphinx) may have meanings if some table package is loaded hence
|
||||||
|
% \X was chosen to avoid possibility of conflict
|
||||||
|
\newcolumntype{\X}[2]{p{\dimexpr
|
||||||
|
(\linewidth-\arrayrulewidth)*#1/#2-\tw@\tabcolsep-\arrayrulewidth\relax}}
|
||||||
|
\newcolumntype{\Y}[1]{p{\dimexpr
|
||||||
|
#1\dimexpr\linewidth-\arrayrulewidth\relax-\tw@\tabcolsep-\arrayrulewidth\relax}}
|
||||||
|
% using here T (for Tabulary) feels less of a problem than the X could be
|
||||||
|
\newcolumntype{T}{J}%
|
||||||
|
% For tables allowing pagebreaks
|
||||||
|
\RequirePackage{longtable}
|
||||||
|
% User interface to set-up whitespace before and after tables:
|
||||||
|
\newcommand*\sphinxtablepre {0pt}%
|
||||||
|
\newcommand*\sphinxtablepost{\medskipamount}%
|
||||||
|
% Space from caption baseline to top of table or frame of literal-block
|
||||||
|
\newcommand*\sphinxbelowcaptionspace{.5\sphinxbaselineskip}%
|
||||||
|
% as one can not use \baselineskip from inside longtable (it is zero there)
|
||||||
|
% we need \sphinxbaselineskip, which defaults to \baselineskip
|
||||||
|
\def\sphinxbaselineskip{\baselineskip}%
|
||||||
|
% The following is to ensure that, whether tabular(y) or longtable:
|
||||||
|
% - if a caption is on top of table:
|
||||||
|
% a) the space between its last baseline and the top rule of table is
|
||||||
|
% exactly \sphinxbelowcaptionspace
|
||||||
|
% b) the space from last baseline of previous text to first baseline of
|
||||||
|
% caption is exactly \parskip+\baselineskip+ height of a strut.
|
||||||
|
% c) the caption text will wrap at width \LTcapwidth (4in)
|
||||||
|
% - make sure this works also if "caption" package is loaded by user
|
||||||
|
% (with its width or margin option taking place of \LTcapwidth role)
|
||||||
|
% TODO: obtain same for caption of literal block: a) & c) DONE, b) TO BE DONE
|
||||||
|
%
|
||||||
|
% To modify space below such top caption, adjust \sphinxbelowcaptionspace
|
||||||
|
% To add or remove space above such top caption, adjust \sphinxtablepre:
|
||||||
|
% notice that \abovecaptionskip, \belowcaptionskip, \LTpre are **ignored**
|
||||||
|
% A. Table with longtable
|
||||||
|
\def\sphinxatlongtablestart
|
||||||
|
{\par
|
||||||
|
\vskip\parskip
|
||||||
|
\vskip\dimexpr\sphinxtablepre\relax % adjust vertical position
|
||||||
|
\vbox{}% get correct baseline from above
|
||||||
|
\LTpre\z@skip\LTpost\z@skip % set to zero longtable's own skips
|
||||||
|
\edef\sphinxbaselineskip{\dimexpr\the\dimexpr\baselineskip\relax\relax}%
|
||||||
|
}%
|
||||||
|
% Compatibility with caption package
|
||||||
|
\def\sphinxthelongtablecaptionisattop{%
|
||||||
|
\spx@ifcaptionpackage{\noalign{\vskip-\belowcaptionskip}}{}%
|
||||||
|
}%
|
||||||
|
% Achieves exactly \sphinxbelowcaptionspace below longtable caption
|
||||||
|
\def\sphinxlongtablecapskipadjust
|
||||||
|
{\dimexpr-\dp\strutbox
|
||||||
|
-\spx@ifcaptionpackage{\abovecaptionskip}{\sphinxbaselineskip}%
|
||||||
|
+\sphinxbelowcaptionspace\relax}%
|
||||||
|
\def\sphinxatlongtableend{\@nobreakfalse % latex3/latex2e#173
|
||||||
|
\prevdepth\z@\vskip\sphinxtablepost\relax}%
|
||||||
|
% B. Table with tabular or tabulary
|
||||||
|
\def\sphinxattablestart{\par\vskip\dimexpr\sphinxtablepre\relax}%
|
||||||
|
\let\sphinxattableend\sphinxatlongtableend
|
||||||
|
% This is used by tabular and tabulary templates
|
||||||
|
\newcommand*\sphinxcapstartof[1]{%
|
||||||
|
\vskip\parskip
|
||||||
|
\vbox{}% force baselineskip for good positioning by capstart of hyperanchor
|
||||||
|
% hyperref puts the anchor 6pt above this baseline; in case of caption
|
||||||
|
% this baseline will be \ht\strutbox above first baseline of caption
|
||||||
|
\def\@captype{#1}%
|
||||||
|
\capstart
|
||||||
|
% move back vertically, as tabular (or its caption) will compensate
|
||||||
|
\vskip-\baselineskip\vskip-\parskip
|
||||||
|
}%
|
||||||
|
\def\sphinxthecaptionisattop{% locate it after \sphinxcapstartof
|
||||||
|
\spx@ifcaptionpackage
|
||||||
|
{\caption@setposition{t}%
|
||||||
|
\vskip\baselineskip\vskip\parskip % undo those from \sphinxcapstartof
|
||||||
|
\vskip-\belowcaptionskip % anticipate caption package skip
|
||||||
|
% caption package uses a \vbox, not a \vtop, so "single line" case
|
||||||
|
% gives different result from "multi-line" without this:
|
||||||
|
\nointerlineskip
|
||||||
|
}%
|
||||||
|
{}%
|
||||||
|
}%
|
||||||
|
\def\sphinxthecaptionisatbottom{% (not finalized; for template usage)
|
||||||
|
\spx@ifcaptionpackage{\caption@setposition{b}}{}%
|
||||||
|
}%
|
||||||
|
% The aim of \sphinxcaption is to apply to tabular(y) the maximal width
|
||||||
|
% of caption as done by longtable
|
||||||
|
\def\sphinxtablecapwidth{\LTcapwidth}%
|
||||||
|
\newcommand\sphinxcaption{\@dblarg\spx@caption}%
|
||||||
|
\long\def\spx@caption[#1]#2{%
|
||||||
|
\noindent\hb@xt@\linewidth{\hss
|
||||||
|
\vtop{\@tempdima\dimexpr\sphinxtablecapwidth\relax
|
||||||
|
% don't exceed linewidth for the caption width
|
||||||
|
\ifdim\@tempdima>\linewidth\hsize\linewidth\else\hsize\@tempdima\fi
|
||||||
|
% longtable ignores \abovecaptionskip/\belowcaptionskip, so do the same here
|
||||||
|
\abovecaptionskip\sphinxabovecaptionskip % \z@skip
|
||||||
|
\belowcaptionskip\sphinxbelowcaptionskip % \z@skip
|
||||||
|
\caption[{#1}]%
|
||||||
|
{\strut\ignorespaces#2\ifhmode\unskip\@finalstrut\strutbox\fi}%
|
||||||
|
}\hss}%
|
||||||
|
\par\prevdepth\dp\strutbox
|
||||||
|
}%
|
||||||
|
\def\sphinxabovecaptionskip{\z@skip}% Do not use! Flagged for removal
|
||||||
|
\def\sphinxbelowcaptionskip{\z@skip}% Do not use! Flagged for removal
|
||||||
|
% This wrapper of \abovecaptionskip is used in sphinxVerbatim for top
|
||||||
|
% caption, and with another value in sphinxVerbatimintable
|
||||||
|
% TODO: To unify space above caption of a code-block with the one above
|
||||||
|
% caption of a table/longtable, \abovecaptionskip must not be used
|
||||||
|
% This auxiliary will get renamed and receive a different meaning
|
||||||
|
% in future.
|
||||||
|
\def\spx@abovecaptionskip{\abovecaptionskip}%
|
||||||
|
% Achieve \sphinxbelowcaptionspace below a caption located above a tabular
|
||||||
|
% or a tabulary
|
||||||
|
\newcommand\sphinxaftertopcaption
|
||||||
|
{%
|
||||||
|
\spx@ifcaptionpackage
|
||||||
|
{\par\prevdepth\dp\strutbox\nobreak\vskip-\abovecaptionskip}{\nobreak}%
|
||||||
|
\vskip\dimexpr\sphinxbelowcaptionspace\relax
|
||||||
|
\vskip-\baselineskip\vskip-\parskip
|
||||||
|
}%
|
||||||
|
% varwidth is crucial for our handling of general contents in merged cells
|
||||||
|
\RequirePackage{varwidth}
|
||||||
|
% but addition of a compatibility patch with hyperref is needed
|
||||||
|
% (tested with varwidth v 0.92 Mar 2009)
|
||||||
|
\AtBeginDocument {%
|
||||||
|
\let\@@vwid@Hy@raisedlink\Hy@raisedlink
|
||||||
|
\long\def\@vwid@Hy@raisedlink#1{\@vwid@wrap{\@@vwid@Hy@raisedlink{#1}}}%
|
||||||
|
\edef\@vwid@setup{%
|
||||||
|
\let\noexpand\Hy@raisedlink\noexpand\@vwid@Hy@raisedlink % HYPERREF !
|
||||||
|
\unexpanded\expandafter{\@vwid@setup}}%
|
||||||
|
}%
|
||||||
|
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% --- MULTICOLUMN ---
|
||||||
|
% standard LaTeX's \multicolumn
|
||||||
|
% 1. does not allow verbatim contents,
|
||||||
|
% 2. interacts very poorly with tabulary.
|
||||||
|
%
|
||||||
|
% It is needed to write own macros for Sphinx: to allow code-blocks in merged
|
||||||
|
% cells rendered by tabular/longtable, and to allow multi-column cells with
|
||||||
|
% paragraphs to be taken into account sanely by tabulary algorithm for column
|
||||||
|
% widths.
|
||||||
|
%
|
||||||
|
% This requires quite a bit of hacking. First, in Sphinx, the multi-column
|
||||||
|
% contents will *always* be wrapped in a varwidth environment. The issue
|
||||||
|
% becomes to pass it the correct target width. We must trick tabulary into
|
||||||
|
% believing the multicolumn is simply separate columns, else tabulary does not
|
||||||
|
% incorporate the contents in its algorithm. But then we must clear the
|
||||||
|
% vertical rules...
|
||||||
|
%
|
||||||
|
% configuration of tabulary
|
||||||
|
\setlength{\tymin}{3\fontcharwd\font`0 }% minimal width of "squeezed" columns
|
||||||
|
\setlength{\tymax}{10000pt}% allow enough room for paragraphs to "compete"
|
||||||
|
% we need access to tabulary's final computed width. \@tempdima is too volatile
|
||||||
|
% to hope it has kept tabulary's value when \sphinxcolwidth needs it.
|
||||||
|
\newdimen\sphinx@TY@tablewidth
|
||||||
|
\def\tabulary{%
|
||||||
|
\def\TY@final{\sphinx@TY@tablewidth\@tempdima\tabular}%
|
||||||
|
\let\endTY@final\endtabular
|
||||||
|
\TY@tabular}%
|
||||||
|
% next hack is needed only if user has set latex_use_latex_multicolumn to True:
|
||||||
|
% it fixes tabulary's bug with \multicolumn defined "short" in first pass. (if
|
||||||
|
% upstream tabulary adds a \long, our extra one causes no harm)
|
||||||
|
\def\sphinx@tempa #1\def\multicolumn#2#3#4#5#6#7#8#9\sphinx@tempa
|
||||||
|
{\def\TY@tab{#1\long\def\multicolumn####1####2####3{\multispan####1\relax}#9}}%
|
||||||
|
\expandafter\sphinx@tempa\TY@tab\sphinx@tempa
|
||||||
|
%
|
||||||
|
% TN. 1: as \omit is never executed, Sphinx multicolumn does not need to worry
|
||||||
|
% like standard multicolumn about |l| vs l|. On the other hand it assumes
|
||||||
|
% columns are separated by a | ... (if not it will add extraneous
|
||||||
|
% \arrayrulewidth space for each column separation in its estimate of available
|
||||||
|
% width).
|
||||||
|
%
|
||||||
|
% TN. 1b: as Sphinx multicolumn uses neither \omit nor \span, it can not
|
||||||
|
% (easily) get rid of extra macros from >{...} or <{...} between columns. At
|
||||||
|
% least, it has been made compatible with colortbl's \columncolor.
|
||||||
|
%
|
||||||
|
% TN. 2: tabulary's second pass is handled like tabular/longtable's single
|
||||||
|
% pass, with the difference that we hacked \TY@final to set in
|
||||||
|
% \sphinx@TY@tablewidth the final target width as computed by tabulary. This is
|
||||||
|
% needed only to handle columns with a "horizontal" specifier: "p" type columns
|
||||||
|
% (inclusive of tabulary's LJRC) holds the target column width in the
|
||||||
|
% \linewidth dimension.
|
||||||
|
%
|
||||||
|
% TN. 3: use of \begin{sphinxmulticolumn}...\end{sphinxmulticolumn} mark-up
|
||||||
|
% would need some hacking around the fact that groups can not span across table
|
||||||
|
% cells (the code does inserts & tokens, see TN1b). It was decided to keep it
|
||||||
|
% simple with \sphinxstartmulticolumn...\sphinxstopmulticolumn.
|
||||||
|
%
|
||||||
|
% MEMO about nesting: if sphinxmulticolumn is encountered in a nested tabular
|
||||||
|
% inside a tabulary it will think to be at top level in the tabulary. But
|
||||||
|
% Sphinx generates no nested tables, and if some LaTeX macro uses internally a
|
||||||
|
% tabular this will not have a \sphinxstartmulticolumn within it!
|
||||||
|
%
|
||||||
|
\def\sphinxstartmulticolumn{%
|
||||||
|
\ifx\equation$% $ tabulary's first pass
|
||||||
|
\expandafter\sphinx@TYI@start@multicolumn
|
||||||
|
\else % either not tabulary or tabulary's second pass
|
||||||
|
\expandafter\sphinx@start@multicolumn
|
||||||
|
\fi
|
||||||
|
}%
|
||||||
|
\def\sphinxstopmulticolumn{%
|
||||||
|
\ifx\equation$% $ tabulary's first pass
|
||||||
|
\expandafter\sphinx@TYI@stop@multicolumn
|
||||||
|
\else % either not tabulary or tabulary's second pass
|
||||||
|
\ignorespaces
|
||||||
|
\fi
|
||||||
|
}%
|
||||||
|
\def\sphinx@TYI@start@multicolumn#1{%
|
||||||
|
% use \gdef always to avoid stack space build up
|
||||||
|
\gdef\sphinx@tempa{#1}\begingroup\setbox\z@\hbox\bgroup
|
||||||
|
}%
|
||||||
|
\def\sphinx@TYI@stop@multicolumn{\egroup % varwidth was used with \tymax
|
||||||
|
\xdef\sphinx@tempb{\the\dimexpr\wd\z@/\sphinx@tempa}% per column width
|
||||||
|
\endgroup
|
||||||
|
\expandafter\sphinx@TYI@multispan\expandafter{\sphinx@tempa}%
|
||||||
|
}%
|
||||||
|
\def\sphinx@TYI@multispan #1{%
|
||||||
|
\kern\sphinx@tempb\ignorespaces % the per column occupied width
|
||||||
|
\ifnum#1>\@ne % repeat, taking into account subtleties of TeX's & ...
|
||||||
|
\expandafter\sphinx@TYI@multispan@next\expandafter{\the\numexpr#1-\@ne\expandafter}%
|
||||||
|
\fi
|
||||||
|
}%
|
||||||
|
\def\sphinx@TYI@multispan@next{&\relax\sphinx@TYI@multispan}%
|
||||||
|
%
|
||||||
|
% Now the branch handling either the second pass of tabulary or the single pass
|
||||||
|
% of tabular/longtable. This is the delicate part where we gather the
|
||||||
|
% dimensions from the p columns either set-up by tabulary or by user p column
|
||||||
|
% or Sphinx \X, \Y columns. The difficulty is that to get the said width, the
|
||||||
|
% template must be inserted (other hacks would be horribly complicated except
|
||||||
|
% if we rewrote crucial parts of LaTeX's \@array !) and we can not do
|
||||||
|
% \omit\span like standard \multicolumn's easy approach. Thus we must cancel
|
||||||
|
% the \vrule separators. Also, perhaps the column specifier is of the l, c, r
|
||||||
|
% type, then we attempt an ad hoc rescue to give varwidth a reasonable target
|
||||||
|
% width.
|
||||||
|
\def\sphinx@start@multicolumn#1{%
|
||||||
|
\gdef\sphinx@multiwidth{0pt}\gdef\sphinx@tempa{#1}\sphinx@multispan{#1}%
|
||||||
|
}%
|
||||||
|
\def\sphinx@multispan #1{%
|
||||||
|
\ifnum#1=\@ne\expandafter\sphinx@multispan@end
|
||||||
|
\else\expandafter\sphinx@multispan@next
|
||||||
|
\fi {#1}%
|
||||||
|
}%
|
||||||
|
\def\sphinx@multispan@next #1{%
|
||||||
|
% trick to recognize L, C, R, J or p, m, b type columns
|
||||||
|
\ifdim\baselineskip>\z@
|
||||||
|
\gdef\sphinx@tempb{\linewidth}%
|
||||||
|
\else
|
||||||
|
% if in an l, r, c type column, try and hope for the best
|
||||||
|
\xdef\sphinx@tempb{\the\dimexpr(\ifx\TY@final\@undefined\linewidth\else
|
||||||
|
\sphinx@TY@tablewidth\fi-\arrayrulewidth)/\sphinx@tempa
|
||||||
|
-\tw@\tabcolsep-\arrayrulewidth\relax}%
|
||||||
|
\fi
|
||||||
|
\noindent\kern\sphinx@tempb\relax
|
||||||
|
\xdef\sphinx@multiwidth
|
||||||
|
{\the\dimexpr\sphinx@multiwidth+\sphinx@tempb+\tw@\tabcolsep+\arrayrulewidth}%
|
||||||
|
% hack the \vline and the colortbl macros
|
||||||
|
\sphinx@hack@vline\sphinx@hack@CT&\relax
|
||||||
|
% repeat
|
||||||
|
\expandafter\sphinx@multispan\expandafter{\the\numexpr#1-\@ne}%
|
||||||
|
}%
|
||||||
|
% packages like colortbl add group levels, we need to "climb back up" to be
|
||||||
|
% able to hack the \vline and also the colortbl inserted tokens. This creates
|
||||||
|
% empty space whether or not the columns were | separated:
|
||||||
|
\def\sphinx@hack@vline{\ifnum\currentgrouptype=6\relax
|
||||||
|
\kern\arrayrulewidth\arrayrulewidth\z@\else\aftergroup\sphinx@hack@vline\fi}%
|
||||||
|
\def\sphinx@hack@CT{\ifnum\currentgrouptype=6\relax
|
||||||
|
\let\CT@setup\sphinx@CT@setup\else\aftergroup\sphinx@hack@CT\fi}%
|
||||||
|
% It turns out \CT@row@color is not expanded contrarily to \CT@column@color
|
||||||
|
% during LaTeX+colortbl preamble preparation, hence it would be possible for
|
||||||
|
% \sphinx@CT@setup to discard only the column color and choose to obey or not
|
||||||
|
% row color and cell color. It would even be possible to propagate cell color
|
||||||
|
% to row color for the duration of the Sphinx multicolumn... the (provisional?)
|
||||||
|
% choice has been made to cancel the colortbl colours for the multicolumn
|
||||||
|
% duration.
|
||||||
|
\def\sphinx@CT@setup #1\endgroup{\endgroup}% hack to remove colour commands
|
||||||
|
\def\sphinx@multispan@end#1{%
|
||||||
|
% first, trace back our steps horizontally
|
||||||
|
\noindent\kern-\dimexpr\sphinx@multiwidth\relax
|
||||||
|
% and now we set the final computed width for the varwidth environment
|
||||||
|
\ifdim\baselineskip>\z@
|
||||||
|
\xdef\sphinx@multiwidth{\the\dimexpr\sphinx@multiwidth+\linewidth}%
|
||||||
|
\else
|
||||||
|
\xdef\sphinx@multiwidth{\the\dimexpr\sphinx@multiwidth+
|
||||||
|
(\ifx\TY@final\@undefined\linewidth\else
|
||||||
|
\sphinx@TY@tablewidth\fi-\arrayrulewidth)/\sphinx@tempa
|
||||||
|
-\tw@\tabcolsep-\arrayrulewidth\relax}%
|
||||||
|
\fi
|
||||||
|
% we need to remove colour set-up also for last cell of the multi-column
|
||||||
|
\aftergroup\sphinx@hack@CT
|
||||||
|
}%
|
||||||
|
\newcommand*\sphinxcolwidth[2]{%
|
||||||
|
% this dimension will always be used for varwidth, and serves as maximum
|
||||||
|
% width when cells are merged either via multirow or multicolumn or both,
|
||||||
|
% as always their contents is wrapped in varwidth environment.
|
||||||
|
\ifnum#1>\@ne % multi-column (and possibly also multi-row)
|
||||||
|
% we wrote our own multicolumn code especially to handle that (and allow
|
||||||
|
% verbatim contents)
|
||||||
|
\ifx\equation$%$
|
||||||
|
\tymax % first pass of tabulary (cf MEMO above regarding nesting)
|
||||||
|
\else % the \@gobble thing is for compatibility with standard \multicolumn
|
||||||
|
\sphinx@multiwidth\@gobble{#1/#2}%
|
||||||
|
\fi
|
||||||
|
\else % single column multirow
|
||||||
|
\ifx\TY@final\@undefined % not a tabulary.
|
||||||
|
\ifdim\baselineskip>\z@
|
||||||
|
% in a p{..} type column, \linewidth is the target box width
|
||||||
|
\linewidth
|
||||||
|
\else
|
||||||
|
% l, c, r columns. Do our best.
|
||||||
|
\dimexpr(\linewidth-\arrayrulewidth)/#2-
|
||||||
|
\tw@\tabcolsep-\arrayrulewidth\relax
|
||||||
|
\fi
|
||||||
|
\else % in tabulary
|
||||||
|
\ifx\equation$%$% first pass
|
||||||
|
\tymax % it is set to a big value so that paragraphs can express themselves
|
||||||
|
\else
|
||||||
|
% second pass.
|
||||||
|
\ifdim\baselineskip>\z@
|
||||||
|
\linewidth % in a L, R, C, J column or a p, \X, \Y ...
|
||||||
|
\else
|
||||||
|
% we have hacked \TY@final to put in \sphinx@TY@tablewidth the table width
|
||||||
|
\dimexpr(\sphinx@TY@tablewidth-\arrayrulewidth)/#2-
|
||||||
|
\tw@\tabcolsep-\arrayrulewidth\relax
|
||||||
|
\fi
|
||||||
|
\fi
|
||||||
|
\fi
|
||||||
|
\fi
|
||||||
|
}%
|
||||||
|
% fallback default in case user has set latex_use_latex_multicolumn to True:
|
||||||
|
% \sphinxcolwidth will use this only inside LaTeX's standard \multicolumn
|
||||||
|
\def\sphinx@multiwidth #1#2{\dimexpr % #1 to gobble the \@gobble (!)
|
||||||
|
(\ifx\TY@final\@undefined\linewidth\else\sphinx@TY@tablewidth\fi
|
||||||
|
-\arrayrulewidth)*#2-\tw@\tabcolsep-\arrayrulewidth\relax}%
|
||||||
|
|
||||||
|
%%%%%%%%%%%%%%%%%%
|
||||||
|
% --- MULTIROW ---
|
||||||
|
% standard \multirow
|
||||||
|
% 1. does not allow verbatim contents,
|
||||||
|
% 2. does not allow blank lines in its argument,
|
||||||
|
% 3. its * specifier means to typeset "horizontally" which is very
|
||||||
|
% bad for paragraph content. 2016 version has = specifier but it
|
||||||
|
% must be used with p type columns only, else results are bad,
|
||||||
|
% 4. it requires manual intervention if the contents is too long to fit
|
||||||
|
% in the asked-for number of rows.
|
||||||
|
% 5. colour panels (either from \rowcolor or \columncolor) will hide
|
||||||
|
% the bottom part of multirow text, hence manual tuning is needed
|
||||||
|
% to put the multirow insertion at the _bottom_.
|
||||||
|
%
|
||||||
|
% The Sphinx solution consists in always having contents wrapped
|
||||||
|
% in a varwidth environment so that it makes sense to estimate how many
|
||||||
|
% lines it will occupy, and then ensure by insertion of suitable struts
|
||||||
|
% that the table rows have the needed height. The needed mark-up is done
|
||||||
|
% by LaTeX writer, which has its own id for the merged cells.
|
||||||
|
%
|
||||||
|
% The colour issue is solved by clearing colour panels in all cells,
|
||||||
|
% whether or not the multirow is single-column or multi-column.
|
||||||
|
%
|
||||||
|
% In passing we obtain baseline alignements across rows (only if
|
||||||
|
% \arraystretch is 1, as LaTeX's does not obey \arraystretch in "p"
|
||||||
|
% multi-line contents, only first and last line...)
|
||||||
|
%
|
||||||
|
% TODO: examine the situation with \arraystretch > 1. The \extrarowheight
|
||||||
|
% is hopeless for multirow anyhow, it makes baseline alignment strictly
|
||||||
|
% impossible.
|
||||||
|
\newcommand\sphinxmultirow[2]{\begingroup
|
||||||
|
% #1 = nb of spanned rows, #2 = Sphinx id of "cell", #3 = contents
|
||||||
|
% but let's fetch #3 in a way allowing verbatim contents !
|
||||||
|
\def\sphinx@nbofrows{#1}\def\sphinx@cellid{#2}%
|
||||||
|
\afterassignment\sphinx@multirow\let\next=
|
||||||
|
}%
|
||||||
|
\def\sphinx@multirow {%
|
||||||
|
\setbox\z@\hbox\bgroup\aftergroup\sphinx@@multirow\strut
|
||||||
|
}%
|
||||||
|
\def\sphinx@@multirow {%
|
||||||
|
% The contents, which is a varwidth environment, has been captured in
|
||||||
|
% \box0 (a \hbox).
|
||||||
|
% We have with \sphinx@cellid an assigned unique id. The goal is to give
|
||||||
|
% about the same height to all the involved rows.
|
||||||
|
% For this Sphinx will insert a \sphinxtablestrut{cell_id} mark-up
|
||||||
|
% in LaTeX file and the expansion of the latter will do the suitable thing.
|
||||||
|
\dimen@\dp\z@
|
||||||
|
\dimen\tw@\ht\@arstrutbox
|
||||||
|
\advance\dimen@\dimen\tw@
|
||||||
|
\advance\dimen\tw@\dp\@arstrutbox
|
||||||
|
\count@=\dimen@ % type conversion dim -> int
|
||||||
|
\count\tw@=\dimen\tw@
|
||||||
|
\divide\count@\count\tw@ % TeX division truncates
|
||||||
|
\advance\dimen@-\count@\dimen\tw@
|
||||||
|
% 1300sp is about 0.02pt. For comparison a rule default width is 0.4pt.
|
||||||
|
% (note that if \count@ holds 0, surely \dimen@>1300sp)
|
||||||
|
\ifdim\dimen@>1300sp \advance\count@\@ne \fi
|
||||||
|
% now \count@ holds the count L of needed "lines"
|
||||||
|
% and \sphinx@nbofrows holds the number N of rows
|
||||||
|
% we have L >= 1 and N >= 1
|
||||||
|
% if L is a multiple of N, ... clear what to do !
|
||||||
|
% else write L = qN + r, 1 <= r < N and we will
|
||||||
|
% arrange for each row to have enough space for:
|
||||||
|
% q+1 "lines" in each of the first r rows
|
||||||
|
% q "lines" in each of the (N-r) bottom rows
|
||||||
|
% for a total of (q+1) * r + q * (N-r) = q * N + r = L
|
||||||
|
% It is possible that q == 0.
|
||||||
|
\count\tw@\count@
|
||||||
|
% the TeX division truncates
|
||||||
|
\divide\count\tw@\sphinx@nbofrows\relax
|
||||||
|
\count4\count\tw@ % q
|
||||||
|
\multiply\count\tw@\sphinx@nbofrows\relax
|
||||||
|
\advance\count@-\count\tw@ % r
|
||||||
|
\expandafter\xdef\csname sphinx@tablestrut_\sphinx@cellid\endcsname
|
||||||
|
{\noexpand\sphinx@tablestrut{\the\count4}{\the\count@}{\sphinx@cellid}}%
|
||||||
|
\dp\z@\z@
|
||||||
|
% this will use the real height if it is >\ht\@arstrutbox
|
||||||
|
\sphinxtablestrut{\sphinx@cellid}\box\z@
|
||||||
|
\endgroup % group was opened in \sphinxmultirow
|
||||||
|
}%
|
||||||
|
\newcommand*\sphinxtablestrut[1]{%
|
||||||
|
% #1 is a "cell_id", i.e. the id of a merged group of table cells
|
||||||
|
\csname sphinx@tablestrut_#1\endcsname
|
||||||
|
}%
|
||||||
|
% LaTeX typesets the table row by row, hence each execution can do
|
||||||
|
% an update for the next row.
|
||||||
|
\newcommand*\sphinx@tablestrut[3]{\begingroup
|
||||||
|
% #1 = q, #2 = (initially) r, #3 = cell_id, q+1 lines in first r rows
|
||||||
|
% if #2 = 0, create space for max(q,1) table lines
|
||||||
|
% if #2 > 0, create space for q+1 lines and decrement #2
|
||||||
|
\leavevmode
|
||||||
|
\count@#1\relax
|
||||||
|
\ifnum#2=\z@
|
||||||
|
\ifnum\count@=\z@\count@\@ne\fi
|
||||||
|
\else
|
||||||
|
% next row will be with a #2 decremented by one
|
||||||
|
\expandafter\xdef\csname sphinx@tablestrut_#3\endcsname
|
||||||
|
{\noexpand\sphinx@tablestrut{#1}{\the\numexpr#2-\@ne}{#3}}%
|
||||||
|
\advance\count@\@ne
|
||||||
|
\fi
|
||||||
|
\vrule\@height\ht\@arstrutbox
|
||||||
|
\@depth\dimexpr\count@\ht\@arstrutbox+\count@\dp\@arstrutbox-\ht\@arstrutbox\relax
|
||||||
|
\@width\z@
|
||||||
|
\endgroup
|
||||||
|
% we need this to avoid colour panels hiding bottom parts of multirow text
|
||||||
|
\sphinx@hack@CT
|
||||||
|
}%
|
||||||
|
|
||||||
|
\endinput
|
||||||
128
source/frUpwork/project_spec/project_spec/sphinxmanual.cls
Normal file
128
source/frUpwork/project_spec/project_spec/sphinxmanual.cls
Normal file
|
|
@ -0,0 +1,128 @@
|
||||||
|
%
|
||||||
|
% sphinxmanual.cls for Sphinx (https://www.sphinx-doc.org/)
|
||||||
|
%
|
||||||
|
|
||||||
|
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
|
||||||
|
\ProvidesClass{sphinxmanual}[2019/12/01 v2.3.0 Document class (Sphinx manual)]
|
||||||
|
|
||||||
|
% chapters starting at odd pages (overridden by 'openany' document option)
|
||||||
|
\PassOptionsToClass{openright}{\sphinxdocclass}
|
||||||
|
|
||||||
|
% 'oneside' option overriding the 'twoside' default
|
||||||
|
\newif\if@oneside
|
||||||
|
\DeclareOption{oneside}{\@onesidetrue}
|
||||||
|
% Pass remaining document options to the parent class.
|
||||||
|
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\sphinxdocclass}}
|
||||||
|
\ProcessOptions\relax
|
||||||
|
|
||||||
|
% Defaults two-side document
|
||||||
|
\if@oneside
|
||||||
|
% nothing to do (oneside is the default)
|
||||||
|
\else
|
||||||
|
\PassOptionsToClass{twoside}{\sphinxdocclass}
|
||||||
|
\fi
|
||||||
|
|
||||||
|
\LoadClass{\sphinxdocclass}
|
||||||
|
|
||||||
|
% Set some sane defaults for section numbering depth and TOC depth. You can
|
||||||
|
% reset these counters in your preamble.
|
||||||
|
%
|
||||||
|
\setcounter{secnumdepth}{2}
|
||||||
|
\setcounter{tocdepth}{1}
|
||||||
|
|
||||||
|
% Adapt \and command to the flushright context of \sphinxmaketitle, to
|
||||||
|
% avoid ragged line endings if author names do not fit all on one single line
|
||||||
|
\DeclareRobustCommand{\and}{%
|
||||||
|
\end{tabular}\kern-\tabcolsep
|
||||||
|
\allowbreak
|
||||||
|
\hskip\dimexpr1em+\tabcolsep\@plus.17fil\begin{tabular}[t]{c}%
|
||||||
|
}%
|
||||||
|
% If it is desired that each author name be on its own line, use in preamble:
|
||||||
|
%\DeclareRobustCommand{\and}{%
|
||||||
|
% \end{tabular}\kern-\tabcolsep\\\begin{tabular}[t]{c}%
|
||||||
|
%}%
|
||||||
|
% Change the title page to look a bit better, and fit in with the fncychap
|
||||||
|
% ``Bjarne'' style a bit better.
|
||||||
|
%
|
||||||
|
\newcommand{\sphinxmaketitle}{%
|
||||||
|
\let\sphinxrestorepageanchorsetting\relax
|
||||||
|
\ifHy@pageanchor\def\sphinxrestorepageanchorsetting{\Hy@pageanchortrue}\fi
|
||||||
|
\hypersetup{pageanchor=false}% avoid duplicate destination warnings
|
||||||
|
\begin{titlepage}%
|
||||||
|
\let\footnotesize\small
|
||||||
|
\let\footnoterule\relax
|
||||||
|
\noindent\rule{\textwidth}{1pt}\par
|
||||||
|
\begingroup % for PDF information dictionary
|
||||||
|
\def\endgraf{ }\def\and{\& }%
|
||||||
|
\pdfstringdefDisableCommands{\def\\{, }}% overwrite hyperref setup
|
||||||
|
\hypersetup{pdfauthor={\@author}, pdftitle={\@title}}%
|
||||||
|
\endgroup
|
||||||
|
\begin{flushright}%
|
||||||
|
\sphinxlogo
|
||||||
|
\py@HeaderFamily
|
||||||
|
{\Huge \@title \par}
|
||||||
|
{\itshape\LARGE \py@release\releaseinfo \par}
|
||||||
|
\vfill
|
||||||
|
{\LARGE
|
||||||
|
\begin{tabular}[t]{c}
|
||||||
|
\@author
|
||||||
|
\end{tabular}\kern-\tabcolsep
|
||||||
|
\par}
|
||||||
|
\vfill\vfill
|
||||||
|
{\large
|
||||||
|
\@date \par
|
||||||
|
\vfill
|
||||||
|
\py@authoraddress \par
|
||||||
|
}%
|
||||||
|
\end{flushright}%\par
|
||||||
|
\@thanks
|
||||||
|
\end{titlepage}%
|
||||||
|
\setcounter{footnote}{0}%
|
||||||
|
\let\thanks\relax\let\maketitle\relax
|
||||||
|
%\gdef\@thanks{}\gdef\@author{}\gdef\@title{}
|
||||||
|
\clearpage
|
||||||
|
\ifdefined\sphinxbackoftitlepage\sphinxbackoftitlepage\fi
|
||||||
|
\if@openright\cleardoublepage\else\clearpage\fi
|
||||||
|
\sphinxrestorepageanchorsetting
|
||||||
|
}
|
||||||
|
|
||||||
|
\newcommand{\sphinxtableofcontents}{%
|
||||||
|
\pagenumbering{roman}%
|
||||||
|
\begingroup
|
||||||
|
\parskip \z@skip
|
||||||
|
\sphinxtableofcontentshook
|
||||||
|
\tableofcontents
|
||||||
|
\endgroup
|
||||||
|
% before resetting page counter, let's do the right thing.
|
||||||
|
\if@openright\cleardoublepage\else\clearpage\fi
|
||||||
|
\pagenumbering{arabic}%
|
||||||
|
}
|
||||||
|
|
||||||
|
% This is needed to get the width of the section # area wide enough in the
|
||||||
|
% library reference. Doing it here keeps it the same for all the manuals.
|
||||||
|
%
|
||||||
|
\newcommand{\sphinxtableofcontentshook}{%
|
||||||
|
\renewcommand*\l@section{\@dottedtocline{1}{1.5em}{2.6em}}%
|
||||||
|
\renewcommand*\l@subsection{\@dottedtocline{2}{4.1em}{3.5em}}%
|
||||||
|
}
|
||||||
|
|
||||||
|
% Fix the bibliography environment to add an entry to the Table of
|
||||||
|
% Contents.
|
||||||
|
% For a report document class this environment is a chapter.
|
||||||
|
%
|
||||||
|
\newenvironment{sphinxthebibliography}[1]{%
|
||||||
|
\if@openright\cleardoublepage\else\clearpage\fi
|
||||||
|
% \phantomsection % not needed here since TeXLive 2010's hyperref
|
||||||
|
\begin{thebibliography}{#1}%
|
||||||
|
\addcontentsline{toc}{chapter}{\bibname}}{\end{thebibliography}}
|
||||||
|
|
||||||
|
% Same for the indices.
|
||||||
|
% The memoir class already does this, so we don't duplicate it in that case.
|
||||||
|
%
|
||||||
|
\@ifclassloaded{memoir}
|
||||||
|
{\newenvironment{sphinxtheindex}{\begin{theindex}}{\end{theindex}}}
|
||||||
|
{\newenvironment{sphinxtheindex}{%
|
||||||
|
\if@openright\cleardoublepage\else\clearpage\fi
|
||||||
|
\phantomsection % needed as no chapter, section, ... created
|
||||||
|
\begin{theindex}%
|
||||||
|
\addcontentsline{toc}{chapter}{\indexname}}{\end{theindex}}}
|
||||||
21
source/frUpwork/project_spec/project_spec/sphinxmessages.sty
Normal file
21
source/frUpwork/project_spec/project_spec/sphinxmessages.sty
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
%
|
||||||
|
% sphinxmessages.sty
|
||||||
|
%
|
||||||
|
% message resources for Sphinx
|
||||||
|
%
|
||||||
|
\ProvidesPackage{sphinxmessages}[2019/01/04 v2.0 Localized LaTeX macros (Sphinx team)]
|
||||||
|
|
||||||
|
\renewcommand{\literalblockcontinuedname}{continued from previous page}
|
||||||
|
\renewcommand{\literalblockcontinuesname}{continues on next page}
|
||||||
|
\renewcommand{\sphinxnonalphabeticalgroupname}{Non\sphinxhyphen{}alphabetical}
|
||||||
|
\renewcommand{\sphinxsymbolsname}{Symbols}
|
||||||
|
\renewcommand{\sphinxnumbersname}{Numbers}
|
||||||
|
\def\pageautorefname{page}
|
||||||
|
|
||||||
|
\addto\captionsenglish{\renewcommand{\figurename}{Fig.\@{} }}
|
||||||
|
\def\fnum@figure{\figurename\thefigure{}}
|
||||||
|
|
||||||
|
\addto\captionsenglish{\renewcommand{\tablename}{Table }}
|
||||||
|
\def\fnum@table{\tablename\thetable{}}
|
||||||
|
|
||||||
|
\addto\captionsenglish{\renewcommand{\literalblockname}{Listing}}
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
%% OPTIONS FOR GEOMETRY
|
||||||
|
%
|
||||||
|
% change this info string if making any custom modification
|
||||||
|
\ProvidesFile{sphinxoptionsgeometry.sty}[2021/01/27 geometry]
|
||||||
|
|
||||||
|
% geometry
|
||||||
|
\ifx\kanjiskip\@undefined
|
||||||
|
\PassOptionsToPackage{%
|
||||||
|
hmargin={\unexpanded{\spx@opt@hmargin}},%
|
||||||
|
vmargin={\unexpanded{\spx@opt@vmargin}},%
|
||||||
|
marginpar=\unexpanded{\spx@opt@marginpar}}
|
||||||
|
{geometry}
|
||||||
|
\else
|
||||||
|
% set text width for Japanese documents to be integer multiple of 1zw
|
||||||
|
% and text height to be integer multiple of \baselineskip
|
||||||
|
% the execution is delayed to \sphinxsetup then geometry.sty
|
||||||
|
\normalsize\normalfont
|
||||||
|
\newcommand*\sphinxtextwidthja[1]{%
|
||||||
|
\if@twocolumn\tw@\fi
|
||||||
|
\dimexpr
|
||||||
|
\numexpr\dimexpr\paperwidth-\tw@\dimexpr#1\relax\relax/
|
||||||
|
\dimexpr\if@twocolumn\tw@\else\@ne\fi zw\relax
|
||||||
|
zw\relax}%
|
||||||
|
\newcommand*\sphinxmarginparwidthja[1]{%
|
||||||
|
\dimexpr\numexpr\dimexpr#1\relax/\dimexpr1zw\relax zw\relax}%
|
||||||
|
\newcommand*\sphinxtextlinesja[1]{%
|
||||||
|
\numexpr\@ne+\dimexpr\paperheight-\topskip-\tw@\dimexpr#1\relax\relax/
|
||||||
|
\baselineskip\relax}%
|
||||||
|
\ifx\@jsc@uplatextrue\@undefined\else
|
||||||
|
% the way we found in order for the papersize special written by
|
||||||
|
% geometry in the dvi file to be correct in case of jsbook class
|
||||||
|
\ifnum\mag=\@m\else % do nothing special if nomag class option or 10pt
|
||||||
|
\PassOptionsToPackage{truedimen}{geometry}%
|
||||||
|
\fi
|
||||||
|
\fi
|
||||||
|
\PassOptionsToPackage{%
|
||||||
|
hmarginratio={1:1},%
|
||||||
|
textwidth=\unexpanded{\sphinxtextwidthja{\spx@opt@hmargin}},%
|
||||||
|
vmarginratio={1:1},%
|
||||||
|
lines=\unexpanded{\sphinxtextlinesja{\spx@opt@vmargin}},%
|
||||||
|
marginpar=\unexpanded{\sphinxmarginparwidthja{\spx@opt@marginpar}},%
|
||||||
|
footskip=2\baselineskip,%
|
||||||
|
}{geometry}%
|
||||||
|
\AtBeginDocument
|
||||||
|
{% update a dimension used by the jsclasses
|
||||||
|
\ifx\@jsc@uplatextrue\@undefined\else\fullwidth\textwidth\fi
|
||||||
|
% for some reason, jreport normalizes all dimensions with \@settopoint
|
||||||
|
\@ifclassloaded{jreport}
|
||||||
|
{\@settopoint\textwidth\@settopoint\textheight\@settopoint\marginparwidth}
|
||||||
|
{}% <-- "false" clause of \@ifclassloaded
|
||||||
|
}%
|
||||||
|
\fi
|
||||||
|
|
||||||
|
\endinput
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
%% Bookmarks and hyperlinks
|
||||||
|
%
|
||||||
|
% change this info string if making any custom modification
|
||||||
|
\ProvidesFile{sphinxoptionshyperref.sty}[2021/01/27 hyperref]
|
||||||
|
|
||||||
|
% to make pdf with correct encoded bookmarks in Japanese
|
||||||
|
% this should precede the hyperref package
|
||||||
|
\ifx\kanjiskip\@undefined
|
||||||
|
% for non-Japanese: make sure bookmarks are ok also with lualatex
|
||||||
|
\PassOptionsToPackage{pdfencoding=unicode}{hyperref}
|
||||||
|
\else
|
||||||
|
\RequirePackage{atbegshi}
|
||||||
|
\ifx\ucs\@undefined
|
||||||
|
\ifnum 42146=\euc"A4A2
|
||||||
|
\AtBeginShipoutFirst{\special{pdf:tounicode EUC-UCS2}}
|
||||||
|
\else
|
||||||
|
\AtBeginShipoutFirst{\special{pdf:tounicode 90ms-RKSJ-UCS2}}
|
||||||
|
\fi
|
||||||
|
\else
|
||||||
|
\AtBeginShipoutFirst{\special{pdf:tounicode UTF8-UCS2}}
|
||||||
|
\fi
|
||||||
|
\fi
|
||||||
|
|
||||||
|
\ifx\@jsc@uplatextrue\@undefined\else
|
||||||
|
\PassOptionsToPackage{setpagesize=false}{hyperref}
|
||||||
|
\fi
|
||||||
|
|
||||||
|
% These options can be overridden inside 'hyperref' key
|
||||||
|
% or by later use of \hypersetup.
|
||||||
|
\PassOptionsToPackage{colorlinks,breaklinks,%
|
||||||
|
linkcolor=InnerLinkColor,filecolor=OuterLinkColor,%
|
||||||
|
menucolor=OuterLinkColor,urlcolor=OuterLinkColor,%
|
||||||
|
citecolor=InnerLinkColor}{hyperref}
|
||||||
|
|
||||||
|
\endinput
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
%% CYRILLIC IN NON-CYRILLIC DOCUMENTS (pdflatex only)
|
||||||
|
%
|
||||||
|
% refs: https://tex.stackexchange.com/q/460271/
|
||||||
|
\ProvidesPackage{sphinxpackagecyrillic}%
|
||||||
|
[2018/11/21 v2.0 support for Cyrillic in non-Cyrillic documents]
|
||||||
|
\RequirePackage{kvoptions}
|
||||||
|
\SetupKeyvalOptions{prefix=spx@cyropt@} % use \spx@cyropt@ prefix
|
||||||
|
\DeclareBoolOption[false]{Xtwo}
|
||||||
|
\DeclareBoolOption[false]{TtwoA}
|
||||||
|
\DeclareDefaultOption{\@unknownoptionerror}
|
||||||
|
\ProcessLocalKeyvalOptions* % ignore class options
|
||||||
|
|
||||||
|
\ifspx@cyropt@Xtwo
|
||||||
|
% original code by tex.sx user egreg (updated 2019/10/28):
|
||||||
|
% https://tex.stackexchange.com/a/460325/
|
||||||
|
% 159 Cyrillic glyphs as available in X2 TeX 8bit font encoding
|
||||||
|
% This assumes inputenc loaded with utf8 option, or LaTeX release
|
||||||
|
% as recent as 2018/04/01 which does it automatically.
|
||||||
|
\@tfor\next:=%
|
||||||
|
{Ё}{Ђ}{Є}{Ѕ}{І}{Ј}{Љ}{Њ}{Ћ}{Ў}{Џ}{А}{Б}{В}{Г}{Д}{Е}{Ж}{З}{И}{Й}%
|
||||||
|
{К}{Л}{М}{Н}{О}{П}{Р}{С}{Т}{У}{Ф}{Х}{Ц}{Ч}{Ш}{Щ}{Ъ}{Ы}{Ь}{Э}{Ю}%
|
||||||
|
{Я}{а}{б}{в}{г}{д}{е}{ж}{з}{и}{й}{к}{л}{м}{н}{о}{п}{р}{с}{т}{у}%
|
||||||
|
{ф}{х}{ц}{ч}{ш}{щ}{ъ}{ы}{ь}{э}{ю}{я}{ё}{ђ}{є}{ѕ}{і}{ј}{љ}{њ}{ћ}%
|
||||||
|
{ў}{џ}{Ѣ}{ѣ}{Ѫ}{ѫ}{Ѵ}{ѵ}{Ґ}{ґ}{Ғ}{ғ}{Ҕ}{ҕ}{Җ}{җ}{Ҙ}{ҙ}{Қ}{қ}{Ҝ}{ҝ}%
|
||||||
|
{Ҟ}{ҟ}{Ҡ}{ҡ}{Ң}{ң}{Ҥ}{ҥ}{Ҧ}{ҧ}{Ҩ}{ҩ}{Ҫ}{ҫ}{Ҭ}{ҭ}{Ү}{ү}{Ұ}{ұ}{Ҳ}{ҳ}%
|
||||||
|
{Ҵ}{ҵ}{Ҷ}{ҷ}{Ҹ}{ҹ}{Һ}{һ}{Ҽ}{ҽ}{Ҿ}{ҿ}{Ӏ}{Ӄ}{ӄ}{Ӆ}{ӆ}{Ӈ}{ӈ}{Ӌ}{ӌ}%
|
||||||
|
{Ӎ}{ӎ}{Ӕ}{ӕ}{Ә}{ә}{Ӡ}{ӡ}{Ө}{ө}\do
|
||||||
|
{%
|
||||||
|
\begingroup\def\IeC{\protect\DeclareTextSymbolDefault}%
|
||||||
|
\protected@edef\@temp{\endgroup
|
||||||
|
\@ifl@t@r{\fmtversion}{2019/10/01}{\csname u8:\next\endcsname}{\next}}%
|
||||||
|
\@temp{X2}%
|
||||||
|
}%
|
||||||
|
\else
|
||||||
|
\ifspx@cyropt@TtwoA
|
||||||
|
% original code by tex.sx user jfbu:
|
||||||
|
% https://tex.stackexchange.com/a/460305/
|
||||||
|
% 63*2+1=127 Cyrillic glyphs as found in T2A 8bit TeX font-encoding
|
||||||
|
\@tfor\@tempa:=%
|
||||||
|
{ae}{a}{b}{chrdsc}{chvcrs}{ch}{c}{dje}{dze}{dzhe}{d}{erev}{ery}{e}%
|
||||||
|
{f}{ghcrs}{gup}{g}{hdsc}{hrdsn}{h}{ie}{ii}{ishrt}{i}{je}%
|
||||||
|
{kbeak}{kdsc}{kvcrs}{k}{lje}{l}{m}{ndsc}{ng}{nje}{n}{otld}{o}{p}{r}%
|
||||||
|
{schwa}{sdsc}{sftsn}{shch}{shha}{sh}{s}{tshe}{t}{ushrt}{u}{v}%
|
||||||
|
{ya}{yhcrs}{yi}{yo}{yu}{y}{zdsc}{zhdsc}{zh}{z}\do
|
||||||
|
{%
|
||||||
|
\expandafter\DeclareTextSymbolDefault\expandafter
|
||||||
|
{\csname cyr\@tempa\endcsname}{T2A}%
|
||||||
|
\expandafter\uppercase\expandafter{\expandafter
|
||||||
|
\def\expandafter\@tempa\expandafter{\@tempa}}%
|
||||||
|
\expandafter\DeclareTextSymbolDefault\expandafter
|
||||||
|
{\csname CYR\@tempa\endcsname}{T2A}%
|
||||||
|
}%
|
||||||
|
\DeclareTextSymbolDefault{\CYRpalochka}{T2A}%
|
||||||
|
\fi\fi
|
||||||
|
\endinput
|
||||||
|
|
@ -0,0 +1,396 @@
|
||||||
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
|
\ProvidesPackage{sphinxpackagefootnote}%
|
||||||
|
[2021/02/04 v1.1d footnotehyper adapted to sphinx (Sphinx team)]
|
||||||
|
% Provides support for this output mark-up from Sphinx latex writer:
|
||||||
|
% - footnote environment
|
||||||
|
% - savenotes environment (table templates)
|
||||||
|
% - \sphinxfootnotemark
|
||||||
|
%
|
||||||
|
%%
|
||||||
|
%% Package: sphinxpackagefootnote
|
||||||
|
%% Version: based on footnotehyper.sty 2021/02/04 v1.1d
|
||||||
|
%% as available at https://www.ctan.org/pkg/footnotehyper
|
||||||
|
%% License: the one applying to Sphinx
|
||||||
|
%%
|
||||||
|
%% Refer to the PDF documentation at https://www.ctan.org/pkg/footnotehyper for
|
||||||
|
%% the code comments.
|
||||||
|
%%
|
||||||
|
%% Differences:
|
||||||
|
%% 1. a partial tabulary compatibility layer added (enough for Sphinx mark-up),
|
||||||
|
%% 2. use of \spx@opt@BeforeFootnote from sphinx.sty,
|
||||||
|
%% 3. use of \sphinxunactivateextrasandspace from sphinx.sty,
|
||||||
|
%% 4. macro definition \sphinxfootnotemark,
|
||||||
|
%% 5. macro definition \sphinxlongtablepatch
|
||||||
|
%% 6. replaced some \undefined by \@undefined
|
||||||
|
\newif\iffootnotehyperparse\footnotehyperparsetrue
|
||||||
|
\DeclareOption*{\PackageWarning{sphinxpackagefootnote}{Option `\CurrentOption' is unknown}}%
|
||||||
|
\ProcessOptions\relax
|
||||||
|
\newbox\FNH@notes
|
||||||
|
\newtoks\FNH@toks % 1.1c
|
||||||
|
\newdimen\FNH@width
|
||||||
|
\let\FNH@colwidth\columnwidth
|
||||||
|
\newif\ifFNH@savingnotes
|
||||||
|
\AtBeginDocument {%
|
||||||
|
\let\FNH@latex@footnote \footnote
|
||||||
|
\let\FNH@latex@footnotetext\footnotetext
|
||||||
|
\let\FNH@H@@footnotetext \@footnotetext
|
||||||
|
\let\FNH@H@@mpfootnotetext \@mpfootnotetext
|
||||||
|
\newenvironment{savenotes}
|
||||||
|
{\FNH@savenotes\ignorespaces}{\FNH@spewnotes\ignorespacesafterend}%
|
||||||
|
\let\spewnotes \FNH@spewnotes
|
||||||
|
\let\footnote \FNH@footnote
|
||||||
|
\let\footnotetext \FNH@footnotetext
|
||||||
|
\let\endfootnote \FNH@endfntext
|
||||||
|
\let\endfootnotetext\FNH@endfntext
|
||||||
|
\@ifpackageloaded{hyperref}
|
||||||
|
{\ifHy@hyperfootnotes
|
||||||
|
\let\FNH@H@@footnotetext\H@@footnotetext
|
||||||
|
\let\FNH@H@@mpfootnotetext\H@@mpfootnotetext
|
||||||
|
\else
|
||||||
|
\let\FNH@hyper@fntext\FNH@nohyp@fntext
|
||||||
|
\fi}%
|
||||||
|
{\let\FNH@hyper@fntext\FNH@nohyp@fntext}%
|
||||||
|
}%
|
||||||
|
\def\FNH@hyper@fntext{\FNH@fntext\FNH@hyper@fntext@i}%
|
||||||
|
\def\FNH@nohyp@fntext{\FNH@fntext\FNH@nohyp@fntext@i}%
|
||||||
|
\def\FNH@fntext #1{%
|
||||||
|
\ifx\ifmeasuring@\@undefined
|
||||||
|
\expandafter\@secondoftwo\else\expandafter\@firstofone\fi
|
||||||
|
% these two lines modified for Sphinx (tabulary compatibility):
|
||||||
|
{\ifmeasuring@\expandafter\@gobbletwo\else\expandafter\@firstofone\fi}%
|
||||||
|
{\ifx\equation$\expandafter\@gobbletwo\fi #1}%$
|
||||||
|
}%
|
||||||
|
\long\def\FNH@hyper@fntext@i#1{%
|
||||||
|
\global\setbox\FNH@notes\vbox
|
||||||
|
{\unvbox\FNH@notes
|
||||||
|
\FNH@startnote
|
||||||
|
\@makefntext
|
||||||
|
{\rule\z@\footnotesep\ignorespaces
|
||||||
|
\ifHy@nesting\expandafter\ltx@firstoftwo
|
||||||
|
\else\expandafter\ltx@secondoftwo
|
||||||
|
\fi
|
||||||
|
{\expandafter\hyper@@anchor\expandafter{\Hy@footnote@currentHref}{#1}}%
|
||||||
|
{\Hy@raisedlink
|
||||||
|
{\expandafter\hyper@@anchor\expandafter{\Hy@footnote@currentHref}%
|
||||||
|
{\relax}}%
|
||||||
|
\let\@currentHref\Hy@footnote@currentHref
|
||||||
|
\let\@currentlabelname\@empty
|
||||||
|
#1}%
|
||||||
|
\@finalstrut\strutbox
|
||||||
|
}%
|
||||||
|
\FNH@endnote
|
||||||
|
}%
|
||||||
|
}%
|
||||||
|
\long\def\FNH@nohyp@fntext@i#1{%
|
||||||
|
\global\setbox\FNH@notes\vbox
|
||||||
|
{\unvbox\FNH@notes
|
||||||
|
\FNH@startnote
|
||||||
|
\@makefntext{\rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
|
||||||
|
\FNH@endnote
|
||||||
|
}%
|
||||||
|
}%
|
||||||
|
\def\FNH@startnote{%
|
||||||
|
\hsize\FNH@colwidth
|
||||||
|
\interlinepenalty\interfootnotelinepenalty
|
||||||
|
\reset@font\footnotesize
|
||||||
|
\floatingpenalty\@MM
|
||||||
|
\@parboxrestore
|
||||||
|
\protected@edef\@currentlabel{\csname p@\@mpfn\endcsname\@thefnmark}%
|
||||||
|
\color@begingroup
|
||||||
|
}%
|
||||||
|
\def\FNH@endnote{\color@endgroup}%
|
||||||
|
\def\FNH@savenotes{%
|
||||||
|
\begingroup
|
||||||
|
\ifFNH@savingnotes\else
|
||||||
|
\FNH@savingnotestrue
|
||||||
|
\let\@footnotetext \FNH@hyper@fntext
|
||||||
|
\let\@mpfootnotetext \FNH@hyper@fntext
|
||||||
|
\let\H@@mpfootnotetext\FNH@nohyp@fntext
|
||||||
|
\FNH@width\columnwidth
|
||||||
|
\let\FNH@colwidth\FNH@width
|
||||||
|
\global\setbox\FNH@notes\box\voidb@x
|
||||||
|
\let\FNH@thempfn\thempfn
|
||||||
|
\let\FNH@mpfn\@mpfn
|
||||||
|
\ifx\@minipagerestore\relax\let\@minipagerestore\@empty\fi
|
||||||
|
\expandafter\def\expandafter\@minipagerestore\expandafter{%
|
||||||
|
\@minipagerestore
|
||||||
|
\let\thempfn\FNH@thempfn
|
||||||
|
\let\@mpfn\FNH@mpfn
|
||||||
|
}%
|
||||||
|
\fi
|
||||||
|
}%
|
||||||
|
\def\FNH@spewnotes {%
|
||||||
|
\if@endpe\ifx\par\@@par\FNH@toks{}\else
|
||||||
|
\FNH@toks\expandafter{\expandafter
|
||||||
|
\def\expandafter\par\expandafter{\par}\@endpetrue}%
|
||||||
|
\expandafter\expandafter\expandafter
|
||||||
|
\FNH@toks
|
||||||
|
\expandafter\expandafter\expandafter
|
||||||
|
{\expandafter\the\expandafter\FNH@toks
|
||||||
|
\expandafter\def\expandafter\@par\expandafter{\@par}}%
|
||||||
|
\expandafter\expandafter\expandafter
|
||||||
|
\FNH@toks
|
||||||
|
\expandafter\expandafter\expandafter
|
||||||
|
{\expandafter\the\expandafter\FNH@toks
|
||||||
|
\expandafter\everypar\expandafter{\the\everypar}}\fi
|
||||||
|
\else\FNH@toks{}\fi
|
||||||
|
\expandafter
|
||||||
|
\endgroup\the\FNH@toks
|
||||||
|
\ifFNH@savingnotes\else
|
||||||
|
\ifvoid\FNH@notes\else
|
||||||
|
\begingroup
|
||||||
|
\let\@makefntext\@empty
|
||||||
|
\let\@finalstrut\@gobble
|
||||||
|
\let\rule\@gobbletwo
|
||||||
|
\ifx\@footnotetext\@mpfootnotetext
|
||||||
|
\expandafter\FNH@H@@mpfootnotetext
|
||||||
|
\else
|
||||||
|
\expandafter\FNH@H@@footnotetext
|
||||||
|
\fi{\unvbox\FNH@notes}%
|
||||||
|
\endgroup
|
||||||
|
\fi
|
||||||
|
\fi
|
||||||
|
}%
|
||||||
|
\def\FNH@footnote@envname {footnote}%
|
||||||
|
\def\FNH@footnotetext@envname{footnotetext}%
|
||||||
|
\def\FNH@footnote{%
|
||||||
|
% this line added for Sphinx:
|
||||||
|
\spx@opt@BeforeFootnote
|
||||||
|
\ifx\@currenvir\FNH@footnote@envname
|
||||||
|
\expandafter\FNH@footnoteenv
|
||||||
|
\else
|
||||||
|
\expandafter\FNH@latex@footnote
|
||||||
|
\fi
|
||||||
|
}%
|
||||||
|
\def\FNH@footnoteenv{%
|
||||||
|
% this line added for Sphinx (footnotes in parsed literal blocks):
|
||||||
|
\catcode13=5 \sphinxunactivateextrasandspace
|
||||||
|
\@ifnextchar[%
|
||||||
|
\FNH@footnoteenv@i %]
|
||||||
|
{\stepcounter\@mpfn
|
||||||
|
\protected@xdef\@thefnmark{\thempfn}%
|
||||||
|
\@footnotemark
|
||||||
|
\def\FNH@endfntext@fntext{\@footnotetext}%
|
||||||
|
\FNH@startfntext}%
|
||||||
|
}%
|
||||||
|
\def\FNH@footnoteenv@i[#1]{%
|
||||||
|
\begingroup
|
||||||
|
\csname c@\@mpfn\endcsname #1\relax
|
||||||
|
\unrestored@protected@xdef\@thefnmark{\thempfn}%
|
||||||
|
\endgroup
|
||||||
|
\@footnotemark
|
||||||
|
\def\FNH@endfntext@fntext{\@footnotetext}%
|
||||||
|
\FNH@startfntext
|
||||||
|
}%
|
||||||
|
\def\FNH@footnotetext{%
|
||||||
|
\ifx\@currenvir\FNH@footnotetext@envname
|
||||||
|
\expandafter\FNH@footnotetextenv
|
||||||
|
\else
|
||||||
|
\expandafter\FNH@latex@footnotetext
|
||||||
|
\fi
|
||||||
|
}%
|
||||||
|
\def\FNH@footnotetextenv{%
|
||||||
|
\@ifnextchar[%
|
||||||
|
\FNH@footnotetextenv@i %]
|
||||||
|
{\protected@xdef\@thefnmark{\thempfn}%
|
||||||
|
\def\FNH@endfntext@fntext{\@footnotetext}%
|
||||||
|
\FNH@startfntext}%
|
||||||
|
}%
|
||||||
|
\def\FNH@footnotetextenv@i[#1]{%
|
||||||
|
\begingroup
|
||||||
|
\csname c@\@mpfn\endcsname #1\relax
|
||||||
|
\unrestored@protected@xdef\@thefnmark{\thempfn}%
|
||||||
|
\endgroup
|
||||||
|
\ifFNH@savingnotes
|
||||||
|
\def\FNH@endfntext@fntext{\FNH@nohyp@fntext}%
|
||||||
|
\else
|
||||||
|
\def\FNH@endfntext@fntext{\FNH@H@@footnotetext}%
|
||||||
|
\fi
|
||||||
|
\FNH@startfntext
|
||||||
|
}%
|
||||||
|
\def\FNH@startfntext{%
|
||||||
|
\setbox\z@\vbox\bgroup
|
||||||
|
\FNH@startnote
|
||||||
|
\FNH@prefntext
|
||||||
|
\rule\z@\footnotesep\ignorespaces
|
||||||
|
}%
|
||||||
|
\def\FNH@endfntext {%
|
||||||
|
\@finalstrut\strutbox
|
||||||
|
\FNH@postfntext
|
||||||
|
\FNH@endnote
|
||||||
|
\egroup
|
||||||
|
\begingroup
|
||||||
|
\let\@makefntext\@empty\let\@finalstrut\@gobble\let\rule\@gobbletwo
|
||||||
|
\FNH@endfntext@fntext {\unvbox\z@}%
|
||||||
|
\endgroup
|
||||||
|
}%
|
||||||
|
\let\FNH@prefntext\@empty
|
||||||
|
\let\FNH@postfntext\@empty
|
||||||
|
\AtBeginDocument{\iffootnotehyperparse\expandafter\FNH@check\fi}%
|
||||||
|
\def\FNH@safeif#1{%
|
||||||
|
\iftrue\csname if#1\endcsname\csname fi\endcsname\expandafter\@firstoftwo
|
||||||
|
\else\csname fi\endcsname\expandafter\@secondoftwo
|
||||||
|
\fi
|
||||||
|
}%
|
||||||
|
\def\FNH@check{%
|
||||||
|
\ifx\@makefntextFB\@undefined\expandafter\FNH@check@
|
||||||
|
\else\expandafter\FNH@frenchb@
|
||||||
|
\fi
|
||||||
|
}%
|
||||||
|
\def\FNH@frenchb@{%
|
||||||
|
\def\FNH@prefntext{%
|
||||||
|
\localleftbox{}%
|
||||||
|
\let\FBeverypar@save\FBeverypar@quote
|
||||||
|
\let\FBeverypar@quote\relax
|
||||||
|
\FNH@safeif{FB@koma}%
|
||||||
|
{\FNH@safeif{FBFrenchFootnotes}%
|
||||||
|
{\ifx\footnote\thanks
|
||||||
|
\let\@@makefnmark\@@makefnmarkTH
|
||||||
|
\@makefntextTH{} % space as in french.ldf
|
||||||
|
\else
|
||||||
|
\let\@@makefnmark\@@makefnmarkFB
|
||||||
|
\@makefntextFB{} % space as in french.ldf
|
||||||
|
\fi
|
||||||
|
}{\let\@@makefnmark\@@makefnmarkORI
|
||||||
|
\@makefntextORI{}% no space as in french.ldf
|
||||||
|
}%
|
||||||
|
}%
|
||||||
|
{\FNH@safeif{FBFrenchFootnotes}%
|
||||||
|
{\@makefntextFB{}}%
|
||||||
|
{\@makefntextORI{}}%
|
||||||
|
}%
|
||||||
|
}%
|
||||||
|
\def\FNH@postfntext{%
|
||||||
|
\let\FBeverypar@quote\FBeverypar@save
|
||||||
|
\localleftbox{\FBeveryline@quote}%
|
||||||
|
}%
|
||||||
|
}%
|
||||||
|
\def\FNH@check@{%
|
||||||
|
\expandafter\FNH@check@a\@makefntext{1.2!3?4,}%
|
||||||
|
\FNH@@@1.2!3?4,\FNH@@@\relax
|
||||||
|
}%
|
||||||
|
\long\def\FNH@check@a #11.2!3?4,#2\FNH@@@#3{%
|
||||||
|
\ifx\relax#3\expandafter\FNH@checkagain@
|
||||||
|
\else
|
||||||
|
\def\FNH@prefntext{#1}\def\FNH@postfntext{#2}%
|
||||||
|
\expandafter\FNH@check@b
|
||||||
|
\fi
|
||||||
|
}%
|
||||||
|
\def\FNH@checkagain@{%
|
||||||
|
\expandafter\FNH@checkagain@a
|
||||||
|
\detokenize\expandafter{\@makefntext{1.2!3?4,}}\relax\FNH@@@
|
||||||
|
}%
|
||||||
|
\edef\FNH@temp{\noexpand\FNH@checkagain@a ##1\string{1.2!3?4,\string}}%
|
||||||
|
\expandafter\def\FNH@temp#2#3\FNH@@@{%
|
||||||
|
\ifx\relax#2%
|
||||||
|
\def\FNH@prefntext{\@makefntext{}}%
|
||||||
|
\else\FNH@bad@makefntext@alert
|
||||||
|
\fi
|
||||||
|
}%
|
||||||
|
\def\FNH@check@b #1\relax{%
|
||||||
|
\expandafter\expandafter\expandafter\FNH@check@c
|
||||||
|
\expandafter\meaning\expandafter\FNH@prefntext
|
||||||
|
\meaning\FNH@postfntext1.2!3?4,\FNH@check@c\relax
|
||||||
|
}%
|
||||||
|
\def\FNH@check@c #11.2!3?4,#2#3\relax{%
|
||||||
|
\ifx\FNH@check@c#2\else\FNH@bad@makefntext@alert\fi
|
||||||
|
}%
|
||||||
|
% slight reformulation for Sphinx
|
||||||
|
\def\FNH@bad@makefntext@alert{%
|
||||||
|
\PackageWarningNoLine{sphinxpackagefootnote}%
|
||||||
|
{Footnotes will be sub-optimal, sorry. This is due to the document class or^^J
|
||||||
|
some package modifying macro \string\@makefntext.^^J
|
||||||
|
You can try to report this incompatibility at^^J
|
||||||
|
https://github.com/sphinx-doc/sphinx with this info:}%
|
||||||
|
\typeout{\meaning\@makefntext}%
|
||||||
|
\let\FNH@prefntext\@empty\let\FNH@postfntext\@empty
|
||||||
|
}%
|
||||||
|
% this macro from original footnote.sty is not used anymore by Sphinx
|
||||||
|
% but for simplicity sake let's just keep it as is
|
||||||
|
\def\makesavenoteenv{\@ifnextchar[\FNH@msne@ii\FNH@msne@i}%]
|
||||||
|
\def\FNH@msne@i #1{%
|
||||||
|
\expandafter\let\csname FNH$#1\expandafter\endcsname %$
|
||||||
|
\csname #1\endcsname
|
||||||
|
\expandafter\let\csname endFNH$#1\expandafter\endcsname %$
|
||||||
|
\csname end#1\endcsname
|
||||||
|
\FNH@msne@ii[#1]{FNH$#1}%$
|
||||||
|
}%
|
||||||
|
\def\FNH@msne@ii[#1]#2{%
|
||||||
|
\expandafter\edef\csname#1\endcsname{%
|
||||||
|
\noexpand\savenotes
|
||||||
|
\expandafter\noexpand\csname#2\endcsname
|
||||||
|
}%
|
||||||
|
\expandafter\edef\csname end#1\endcsname{%
|
||||||
|
\expandafter\noexpand\csname end#2\endcsname
|
||||||
|
\noexpand\expandafter
|
||||||
|
\noexpand\spewnotes
|
||||||
|
\noexpand\if@endpe\noexpand\@endpetrue\noexpand\fi
|
||||||
|
}%
|
||||||
|
}%
|
||||||
|
%
|
||||||
|
% some extras for Sphinx :
|
||||||
|
% \sphinxfootnotemark: usable in section titles and silently removed from TOCs.
|
||||||
|
\def\sphinxfootnotemark [#1]%
|
||||||
|
{\ifx\thepage\relax\else\sphinxfootref{#1}\fi}%
|
||||||
|
% \sphinxfootref:
|
||||||
|
% - \spx@opt@BeforeFootnote is from BeforeFootnote sphinxsetup option
|
||||||
|
% - \ref:
|
||||||
|
% the latex.py writer inserts a \phantomsection\label{<scope>.<num>}
|
||||||
|
% whenever
|
||||||
|
% - the footnote was explicitly numbered in sources,
|
||||||
|
% - or it was in restrained context and is rendered using footnotetext
|
||||||
|
%
|
||||||
|
% These are the two types of footnotes that \sphinxfootnotemark must
|
||||||
|
% handle. But for explicitly numbered footnotes the same number
|
||||||
|
% can be found in document. So a secondary part in <scope> is updated
|
||||||
|
% at each novel such footnote to know what is the target from then on
|
||||||
|
% for \sphinxfootnotemark and already encountered [1], or [2],...
|
||||||
|
%
|
||||||
|
% LaTeX package varioref is not supported by hyperref (from its doc: "There
|
||||||
|
% are too many problems with varioref. Nobody has time to sort them out.
|
||||||
|
% Therefore this package is now unsupported.") So we will simply use our own
|
||||||
|
% macros to access the page number of footnote text and decide whether to print
|
||||||
|
% it. \pagename is internationalized by latex-babel.
|
||||||
|
\def\spx@thefnmark#1#2{%
|
||||||
|
% #1=label for reference, #2=page where footnote was printed
|
||||||
|
\ifx\spx@tempa\spx@tempb
|
||||||
|
% same page
|
||||||
|
#1%
|
||||||
|
\else
|
||||||
|
\sphinxthefootnotemark{#1}{#2}%
|
||||||
|
\fi
|
||||||
|
}%
|
||||||
|
\def\sphinxfootref@get #1#2#3#4#5\relax{%
|
||||||
|
\def\sphinxfootref@label{#1}%
|
||||||
|
\def\sphinxfootref@page {#2}%
|
||||||
|
\def\sphinxfootref@Href {#4}%
|
||||||
|
}%
|
||||||
|
\protected\def\sphinxfootref#1{% #1 always explicit number in Sphinx usage
|
||||||
|
\spx@opt@BeforeFootnote
|
||||||
|
\ltx@ifundefined{r@\thesphinxscope.#1}%
|
||||||
|
{\gdef\@thefnmark{?}\H@@footnotemark}%
|
||||||
|
{\expandafter\expandafter\expandafter\sphinxfootref@get
|
||||||
|
\csname r@\thesphinxscope.#1\endcsname\relax
|
||||||
|
\edef\spx@tempa{\thepage}\edef\spx@tempb{\sphinxfootref@page}%
|
||||||
|
\protected@xdef\@thefnmark{\spx@thefnmark{\sphinxfootref@label}{\sphinxfootref@page}}%
|
||||||
|
\let\spx@@makefnmark\@makefnmark
|
||||||
|
\def\@makefnmark{%
|
||||||
|
\hyper@linkstart{link}{\sphinxfootref@Href}%
|
||||||
|
\spx@@makefnmark
|
||||||
|
\hyper@linkend
|
||||||
|
}%
|
||||||
|
\H@@footnotemark
|
||||||
|
\let\@makefnmark\spx@@makefnmark
|
||||||
|
}%
|
||||||
|
}%
|
||||||
|
\AtBeginDocument{%
|
||||||
|
% let hyperref less complain
|
||||||
|
\pdfstringdefDisableCommands{\def\sphinxfootnotemark [#1]{}}%
|
||||||
|
% to obtain hyperlinked footnotes in longtable environment we must replace
|
||||||
|
% hyperref's patch of longtable's patch of \@footnotetext by our own
|
||||||
|
\let\LT@p@ftntext\FNH@hyper@fntext
|
||||||
|
% this *requires* longtable to be used always wrapped in savenotes environment
|
||||||
|
}%
|
||||||
|
\endinput
|
||||||
|
%%
|
||||||
|
%% End of file `sphinxpackagefootnote.sty'.
|
||||||
4
source/frontmatter.rst
Normal file
4
source/frontmatter.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
This is the front matter
|
||||||
|
==============================
|
||||||
|
|
||||||
|
I want to see what I can put in here
|
||||||
31
source/index.rst
Normal file
31
source/index.rst
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
..
|
||||||
|
These specifications are based on The National Master Specification (NMS) is the most comprehensive master specification in Canada, serving as an easy-to-use framework for writing construction project specifications.
|
||||||
|
|
||||||
|
For more information on these specifications please visit - https://nrc.canada.ca/en/certifications-evaluations-standards/canadian-national-master-construction-specification
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
..
|
||||||
|
This is where I will be adding any other text and image substitutions that will be needed throughout the "typical" specification
|
||||||
|
|
||||||
|
.. |Title| replace:: Title of the Report
|
||||||
|
.. |SubTitle| replace:: Subtitle of the Report
|
||||||
|
|
||||||
|
|
||||||
|
|Title|
|
||||||
|
==========================
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 3
|
||||||
|
:caption: Table of Contents
|
||||||
|
:name: mastertoc
|
||||||
|
:numbered:
|
||||||
|
:glob:
|
||||||
|
|
||||||
|
frontmatter
|
||||||
|
111136.10
|
||||||
|
260500
|
||||||
|
260521
|
||||||
|
260526
|
||||||
|
|
||||||
Loading…
Add table
Reference in a new issue