diff --git a/README.md b/README.md new file mode 100644 index 00000000..2b70bb10 --- /dev/null +++ b/README.md @@ -0,0 +1,57 @@ +# Matematyka + +Przed Państwem kod źródłowy mojej strony z notatkami z matematyki. +Zapraszam do oglądania i komentowania! + +## Thing about PDF customization + +
Start here later + + +ChatGPT +To customize the title page generated by Sphinx when creating a PDF via make latexpdf, you can modify the LaTeX template used for the title page. Sphinx allows you to override the default LaTeX templates by providing your own custom template. + +Follow these steps to customize the title page: + +Step 1: Locate Sphinx's LaTeX Template Files +Find the sphinx directory in your Python installation. You can usually locate it within the site-packages directory of your Python environment. + +Inside the sphinx directory, navigate to texinputs. + +Step 2: Copy Default Template +Locate the sphinxmanual.cls or sphinxhowto.cls file (depending on the type of document you're generating). + +Copy this file to your Sphinx documentation project directory. Name the copied file something like custom_sphinxmanual.cls to avoid confusion. + +Step 3: Modify the Title Page in the Copied Template +Open the copied file (custom_sphinxmanual.cls) in a text editor and find the section related to the title page. It might look something like this: + +latex +Copy code +\renewcommand{\maketitle}{ + % Title page contents... +} +Modify the contents within the \maketitle command to customize the title page. You can change the layout, add or remove elements, or alter formatting as needed. + +Step 4: Use the Custom Template +In your conf.py file in the Sphinx project directory, add or modify the latex_elements variable to specify the use of the custom template: + +python +Copy code +latex_elements = { + 'papersize': 'letterpaper', + 'pointsize': '10pt', + 'classoptions': ',openany', + 'babel': '\\usepackage[english]{babel}', + 'preamble': '\\input{preamble.tex}', + 'sphinxsetup': 'VerbatimBorderColor={rgb}{1,1,1}', + 'maketitle': '\\input{custom_sphinxmanual.cls}', # Use the custom template +} +Replace 'custom_sphinxmanual.cls' with the name of your custom template file. + +Step 5: Generate the PDF +Regenerate the documentation using make clean followed by make latexpdf. This will use the modified template to generate the PDF, including the customized title page. + +Ensure to adjust the LaTeX commands in the copied file (custom_sphinxmanual.cls) as per your requirements. This method allows you to have full control over the title page layout and contents in your Sphinx-generated PDF. + +