Compare commits

..

No commits in common. "main" and "v1.2.2" have entirely different histories.
main ... v1.2.2

34 changed files with 5877 additions and 592 deletions

View File

@ -12,10 +12,9 @@ exclude =
__pycache__,
build,
dist,
.conda,
.venv,
venv,
docs/source/api
.conda
.venv
venv
# Enable specific plugins or options
# Example: Enabling flake8-docstrings

View File

@ -7,47 +7,12 @@ on:
branches: [main]
jobs:
build-ubuntu-no-optional-dependencies:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", 3.13]
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install from source and install pytest
run: |
python -m pip install --upgrade pip
python -m pip install -e .
python -m pip install pytest lxml requests
- name: Run tests with pytest (no matplotlib, no pandas)
run: |
pytest tests/test_rendering_markdown.py::test_markdown_styling
pytest tests/test_rendering_markdown.py::test_markdown_table
- name: Install matplotlib
run: |
python -m pip install matplotlib
- name: Run tests with pytest rendering equations (with matplotlib)
run: |
pytest tests/test_rendering_markdown.py::test_markdown_equations
build-ubuntu:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", 3.13]
python-version: ["3.10", 3.11, 3.12, 3.13]
steps:
- name: Check out code
@ -59,7 +24,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install LaTeX
run: sudo apt-get install -y texlive-latex-extra texlive-fonts-recommended lmodern texlive-xetex texlive-science
run: sudo apt-get install -y texlive-latex-extra texlive-fonts-extra lmodern texlive-xetex texlive-science
- name: Install Python dependencies
run: |
@ -79,122 +44,5 @@ jobs:
uses: actions/upload-artifact@v4
if: strategy.job-index == 0
with:
name: rendering-results-ubuntu
name: rendering-results
path: tests/out/test_*_render*
build-windows:
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Cache MiKTeX Portable
uses: actions/cache@v4
id: miktex
with:
path: C:\tmp\cache
key: miktex-portable-${{ runner.os }}-24.1-x64
- if: ${{ steps.miktex.outputs.cache-hit != 'true' }}
name: Set up MiKTeX Portable
run: |
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest https://www.nonan.net/w/files/miktex-portable-Win-x64.zip -OutFile miktex-portable-Win-x64.zip
Expand-Archive miktex-portable-Win-x64.zip -DestinationPath C:\tmp\cache\
- name: Copy miktex directory
run: |
robocopy C:\tmp\cache\miktex-portable C:\tmp\test_miktex\miktex-portable /E /NFL /NDL
if ($LASTEXITCODE -eq 1) { exit 0 }
- name: Add miktex to PATH
run: |
echo "PATH=$PATH;C:\tmp\test_miktex\miktex-portable\texmfs\install\miktex\bin\x64;C:\Program Files\Git\usr\bin" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: test xelatex
run: xelatex --version
- name: Install Python dependencies
run: |
python -m pip install -e .[dev]
- name: Run tests with pytest
run: pytest
- name: Upload rendered files
uses: actions/upload-artifact@v4
if: strategy.job-index == 0
with:
name: rendering-results-windows
path: tests/out/test_*_render*.pdf
build-docs:
if: github.event_name == 'push'
needs: build-ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download rendering outputs
uses: actions/download-artifact@v4
with:
name: rendering-results-ubuntu
path: docs/build/html/files/
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.x"
- name: Install package and dependencies
run: pip install .[doc_build]
- name: Generate Class List
run: python ./docs/source/generate_class_list.py
- name: Build Docs
run: |
mkdir -p docs/source/media
cp media/* docs/source/media/
mkdir -p docs/source/tests
cp tests/test_rendering_example*.py docs/source/tests/
cp LICENSE docs/source/LICENSE.md
cd docs
sphinx-apidoc -o source/ ../src/ -M --no-toc
rm ./source/*.rst
make html
touch ./build/html/.nojekyll
mkdir -p ./build/html/_autogenerated
cp ./build/html/api/* ./build/html/_autogenerated/
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/build/html
deploy:
if: github.event_name == 'push'
needs: build-docs
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

View File

@ -10,10 +10,6 @@ jobs:
name: Build and publish
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/${{ github.event.repository.name }}/
steps:
- uses: actions/checkout@v3

4
.gitignore vendored
View File

@ -69,8 +69,7 @@ instance/
.scrapy
# Sphinx documentation
docs/build/
docs/source/api/
docs/_build/
# PyBuilder
.pybuilder/
@ -133,4 +132,3 @@ pyModbusTCP_old/
test.py
test_*.ipynb
settings.json
tests/out/test*

View File

@ -1,30 +1,30 @@
# Pyladoc
## Description
Pyladoc is a Python package for programmatically generating HTML and
PDF/LaTeX output. This package specifically targets applications where reports
or results with Pandas tables and Matplotlib figures are generated
to be displayed as a website and as a PDF document without involving any manual
Pyladoc is a python package for programmatically generating HTML and
PDF/LaTeX output. This package targets specifically applications where reports
or results with Pandas-tables and Matplotlib-figures are generated
to be displayed as website and as PDF document without involving any manual
formatting steps.
This package focuses on the "Document in Code" approach for cases
where a lot of calculations and data handling is done but not a lot of
document text needs to be displayed. The multiline string capability of Python
handles this very well. In comparison to "Code in Document" templates,
Python tools support this approach out of the box—similar to docstrings.
handles this very well. In comparison to "Code in Document"-templates
python tools supports this approach out of the box - similar doch docstrings.
LaTeX is used as the backend for PDF generation. There are excellent engines for
rendering HTML to PDF, but even if there is no requirement for
accurate typesetting, placing programmatically generated content of variable
composition and element sizes on fixed-size pages without manual intervention
As backend for PDF generation LaTeX is used. There are excellent engines for
rendering HTML to PDF, but even if there is no requirement for an
accurate typesetting and what not, placing programmatically content of variable
composition and element sizes on fixed size pages without manual intervention
is a hard problem where LaTeX is superior.
## Example outputs
[![example output](media/output_example.png)](https://nonannet.github.io/pyladoc/files/test_latex_render1.pdf)
[![example output](docs/output_example.png)](https://raw.githubusercontent.com/Nonannet/pyladoc/refs/heads/main/tests/out/test_latex_render1.pdf)
- HTML: [test_html_render1.html](https://nonannet.github.io/pyladoc/files/test_html_render1.html)
- PDF: [test_latex_render1.pdf](https://nonannet.github.io/pyladoc/files/test_latex_render1.pdf) ([LaTeX](https://nonannet.github.io/pyladoc/files/test_html_render1.tex))
- HTML: [test_html_render1.html](https://html-preview.github.io/?url=https://github.com/Nonannet/pyladoc/blob/main/tests/out/test_html_render1.html) ([code](https://github.com/Nonannet/pyladoc/blob/main/tests/out/test_html_render1.html))
- PDF: [test_latex_render1.pdf](https://raw.githubusercontent.com/Nonannet/pyladoc/refs/heads/main/tests/out/test_latex_render1.pdf) ([code](https://github.com/Nonannet/pyladoc/blob/main/tests/out/test_html_render1.tex))
The documents are generated by the script [tests/test_rendering_example1_doc.py](tests/test_rendering_example1_doc.py).
@ -34,17 +34,17 @@ The documents are generated by the script [tests/test_rendering_example1_doc.py]
- Tables (Pandas, Markdown or HTML)
- Matplotlib figures
- LaTeX equations (block or inline)
- Named references for figures, tables, and equations
- Named references for figures, tables and equations
### Key Features
- HTML and PDF/LaTeX rendering of the same document
- Single file output including figures
- Figure and equation embedding in HTML by inline SVG, SVG in Base64, or PNG in Base64
- Figure and equation embedding in HTML by inline SVG, SVG in Base64 or PNG in Base64
- Figure embedding in LaTeX as PGF/TikZ
- Tested on Linux and Windows
### Usage Scenarios
- Web services
- Webservices
- Report generation for lab equipment
## Installation
@ -54,30 +54,23 @@ It can be installed with pip:
pip install pyladoc
```
As well as with conda:
```bash
conda install conda-forge::pyladoc
```
## Dependencies
Pyladoc depends on the markdown package.
Optional dependencies are:
- Matplotlib Python package for rendering LaTeX equations for HTML output
- Matplotlib python package for rendering LaTeX equations for HTML output
- LaTeX for exporting to PDF or exporting Matplotlib figures to LaTeX (PGF/TikZ rendering)
- Pandas and Jinja2 for rendering Pandas tables
- Matplotlib for rendering Matplotlib figures (obviously)
- Pandas and Matplotlib for including Pandas Tables and Matplotlib figures (obviously)
For the included template, the `miktex` LaTeX distribution works on Windows
and the following LaTeX setup works on Ubuntu (both tested in CI):
For the included template the following LaTeX setup works on Ubuntu:
```bash
sudo apt-get update
sudo apt-get install -y texlive-latex-extra texlive-fonts-recommended lmodern texlive-xetex texlive-science
sudo apt-get install -y texlive-latex-extra texlive-fonts-extra lmodern texlive-xetex texlive-science
```
## Usage
It is easy to use, as the following example code shows:
It is easy to use as the following example code shows:
```python
import pyladoc
@ -113,7 +106,7 @@ doc.to_pdf('test.pdf')
```
## Contributing
Contributions are welcome; please open an issue or submit a pull request on GitHub.
Contributions are welcome, please open an issue or submit a pull request on GitHub.
## Developer Guide
To get started with developing the `pyladoc` package, follow these steps.
@ -125,14 +118,14 @@ git clone https://github.com/Nonannet/pyladoc.git
cd pyladoc
```
It's recommended to set up a venv:
It's recommended to setup an venv:
```bash
python -m venv .venv
source .venv/bin/activate # On Windows use `.venv\Scripts\activate`
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
```
Install the package and development dependencies while keeping files in the
Install the package and dev-dependencies while keeping files in the
current directory:
```bash

View File

@ -1,20 +0,0 @@
# 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)

View File

@ -1,35 +0,0 @@
@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

View File

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 99 KiB

View File

@ -1,33 +0,0 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
import os
import sys
sys.path.insert(0, os.path.abspath("../src/"))
project = 'pyladoc'
copyright = '2025, Nicolas Kruse'
author = 'Nicolas Kruse'
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon", "sphinx_autodoc_typehints", "myst_parser"]
templates_path = ['_templates']
exclude_patterns = []
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
# html_theme = 'alabaster'
html_theme = 'pydata_sphinx_theme'
html_static_path = ['_static']
autodoc_inherit_docstrings = True
autoclass_content = 'both'

View File

@ -1,78 +0,0 @@
import importlib
import inspect
import fnmatch
from io import TextIOWrapper
import os
def write_classes(f: TextIOWrapper, patterns: list[str], module_name: str, title: str, description: str = '', exclude: list[str] = []) -> None:
"""Write the classes to the file."""
module = importlib.import_module(module_name)
classes = [
name for name, obj in inspect.getmembers(module, inspect.isclass)
if (obj.__module__ == module_name and
any(fnmatch.fnmatch(name, pat) for pat in patterns if pat not in exclude) and
obj.__doc__ and '(Automatic generated stub)' not in obj.__doc__)
]
if description:
f.write(f'{description}\n\n')
write_dochtree(f, title, classes)
for cls in classes:
with open(f'docs/source/api/{cls}.md', 'w') as f2:
f2.write(f'# {module_name}.{cls}\n')
f2.write('```{eval-rst}\n')
f2.write(f'.. autoclass:: {module_name}.{cls}\n')
f2.write(' :members:\n')
f2.write(' :undoc-members:\n')
f2.write(' :show-inheritance:\n')
f2.write(' :inherited-members:\n')
f2.write('```\n\n')
def write_functions(f: TextIOWrapper, patterns: list[str], module_name: str, title: str, description: str = '', exclude: list[str] = []) -> None:
"""Write the classes to the file."""
module = importlib.import_module(module_name)
functions = [
name for name, obj in inspect.getmembers(module, inspect.isfunction)
if (obj.__module__ == module_name and
any(fnmatch.fnmatch(name, pat) for pat in patterns if pat not in exclude))
]
if description:
f.write(f'{description}\n\n')
write_dochtree(f, title, functions)
for func in functions:
if not func.startswith('_'):
with open(f'docs/source/api/{func}.md', 'w') as f2:
f2.write(f'# {module_name}.{func}\n')
f2.write('```{eval-rst}\n')
f2.write(f'.. autofunction:: {module_name}.{func}\n')
f2.write('```\n\n')
def write_dochtree(f: TextIOWrapper, title: str, items: list[str]):
f.write('```{toctree}\n')
f.write(':maxdepth: 1\n')
f.write(f':caption: {title}:\n')
for text in items:
if not text.startswith('_'):
f.write(f"{text}\n")
f.write('```\n\n')
if __name__ == "__main__":
# Ensure the output directory exists
os.makedirs('docs/source/api', exist_ok=True)
with open('docs/source/api/index.md', 'w') as f:
f.write('# Classes and functions\n\n')
write_classes(f, ['DocumentWriter'], 'pyladoc', title='DocumentWriter Class')
write_functions(f, ['*'], 'pyladoc', title='Functions')
write_functions(f, ['*'], 'pyladoc.latex', title='Submodule latex')

View File

@ -1,9 +0,0 @@
```{toctree}
:maxdepth: 1
:hidden:
api/index
repo
```
```{include} ../../README.md
```

View File

@ -1,3 +0,0 @@
# Code repository
Code repository is on GitHub: [github.com/Nonannet/pyladoc](https://github.com/Nonannet/pyladoc).

View File

@ -1,6 +1,6 @@
[project]
name = "pyladoc"
version = "1.2.4"
version = "1.2.2"
authors = [
{ name="Nicolas Kruse", email="nicolas.kruse@nonan.net" },
]
@ -24,18 +24,11 @@ dev = [
"matplotlib>=3.1.1",
"pandas>=2.0.0", "Jinja2",
]
doc_build = [
"sphinx",
"pydata_sphinx_theme",
"sphinx-autodoc-typehints",
"myst-parser"
]
[project.urls]
Homepage = "https://github.com/Nonannet/pyladoc"
Repository = "https://github.com/Nonannet/pyladoc"
Issues = "https://github.com/Nonannet/pyladoc/issues"
documentation = "https://nonannet.github.io/pyladoc/"
[build-system]
requires = ["setuptools>=61.0", "wheel"]
@ -45,7 +38,7 @@ build-backend = "setuptools.build_meta"
where = ["src"]
[tool.setuptools.package-data]
pyladoc = ["templates/*", "py.typed"]
pyladoc = ["templates/*"]
[tool.mypy]
files = ["src"]

View File

@ -33,7 +33,6 @@ else:
Table = DataFrame | Styler
except ImportError:
Table = DataFrame
Styler = None
try:
import matplotlib.pyplot as plt
@ -90,9 +89,8 @@ def _save_figure(fig: Figure, buff: io.BytesIO, figure_format: FFormat, font_fam
yield ax.xaxis.label
yield ax.yaxis.label
yield from ax.get_xticklabels() + ax.get_yticklabels()
legend = ax.get_legend()
legend: Mpl_Legend = ax.get_legend()
if legend:
assert isinstance(legend, Mpl_Legend)
yield from legend.get_texts()
# Store current figure settings
@ -247,40 +245,30 @@ def _create_document_writer() -> 'DocumentWriter':
return new_dwr
def inject_to_template(fields_dict: dict[str, str],
template_path: str = '',
internal_template: str = '',
template_string: str = '',
) -> str:
def inject_to_template(content: str, template_path: str = '', internal_template: str = '') -> str:
"""
injects content fields into a template. The placeholder <!--CONTENT-->
injects a content string into a template. The placeholder <!--CONTENT-->
will be replaced by the content. If the placeholder is prefixed with a
'%' comment character, this character will be replaced as well.
Args:
fields_dict: A dictionary with field names as keys and content as values
template_path: Path to a template file
internal_template: Path to a internal default template
template_string: A template string to use directly
Returns:
Template with included content
"""
assert isinstance(fields_dict, dict), 'fields_dict must be a dictionary'
if template_path:
with open(template_path, 'r') as f:
template = f.read()
elif internal_template:
template = _get_pkgutil_string(internal_template)
elif template_string:
template = template_string
else:
raise Exception('No template provided')
def replace_field(match: re.Match[str]) -> str:
return fields_dict.get(match.group(1), match.group(0))
return re.sub(r"(?:\%+\s*)?\<!--(.*?)-->", replace_field, template, 0, re.MULTILINE)
assert '<!--CONTENT-->' in template, 'No <!--CONTENT--> expression in template located'
prep_template = re.sub(r"\%?\s*<!--CONTENT-->", '<!--CONTENT-->', template)
return prep_template.replace('<!--CONTENT-->', content)
class DocumentWriter():
@ -487,8 +475,8 @@ class DocumentWriter():
centered: Whether to center the table in LaTeX output
"""
assert Table and isinstance(table, Table), 'Table has to be a pandas DataFrame oder DataFrame Styler'
styler = table if Styler and isinstance(table, Styler) else getattr(table, 'style', None) # type: ignore[truthy-function]
assert Styler and isinstance(styler, Styler), 'Jinja2 package is required for rendering pandas tables' # type: ignore[truthy-function]
styler = table if isinstance(table, Styler) else getattr(table, 'style', None)
assert isinstance(styler, Styler), 'Jinja2 package is required for rendering tables'
def render_to_html() -> str:
caption_prefix, reference = self._add_item(ref_id, ref_type, prefix_pattern)
@ -621,7 +609,7 @@ class DocumentWriter():
Args:
text: The markdown text to add
section_class: The HTML-class and LaTeX-environment name for the text section
section_class: The class for the text section
"""
norm_text = _normalize_text_indent(str(text))
@ -633,7 +621,8 @@ class DocumentWriter():
return html
def render_to_latex() -> str:
html = render_to_html()
html = _markdown_to_html(
self._equation_embedding_reescaping(norm_text))
return latex.from_html(html)
self._doc.append([render_to_html, render_to_latex])
@ -684,37 +673,27 @@ class DocumentWriter():
def to_pdf(self, file_path: str,
font_family: Literal[None, 'serif', 'sans-serif'] = None,
table_renderer: TRenderer = 'simple',
latex_template_path: str = '',
fields_dict: dict[str, str] = {},
figure_scale: float = 1,
engine: latex.LatexEngine = 'pdflatex') -> bool:
latex_template_path: str = '') -> bool:
"""
Export the document to a PDF file using LaTeX.
Args:
file_path: The path to save the PDF file to
font_family: Overwrites the front family for figures and the template
table_renderer: The renderer for tables (simple: renderer with column type
guessing for text and numbers; pandas: using the internal pandas LaTeX renderer)
latex_template_path: Path to a LaTeX template file. The
expression <!--CONTENT--> will be replaced by the generated content.
If no path is provided a default template is used.
fields_dict: A dictionary with field names as keys and content as values
replacing the placeholders <!--KEY--> in the template.
figure_scale: Scaling factor for the figure size
engine: LaTeX engine (pdflatex, lualatex, xelatex or tectonic)
Returns:
True if the PDF file was successfully created
"""
content = self.to_latex(font_family, table_renderer, figure_scale)
latex_code = inject_to_template({'CONTENT': content} | fields_dict,
latex_code = inject_to_template(self.to_latex(font_family, table_renderer),
latex_template_path,
internal_template='templates/default_template.tex')
'templates/default_template.tex')
if font_family == 'sans-serif':
latex_code = latex.inject_latex_command(latex_code, '\\renewcommand{\\familydefault}{\\sfdefault}')
success, errors, warnings = latex.compile(latex_code, file_path, engine=engine)
success, errors, warnings = latex.compile(latex_code, file_path)
if not success:
print('Errors:')

View File

@ -1,5 +1,6 @@
from html.parser import HTMLParser
from typing import Generator, Any, Literal, get_args, TYPE_CHECKING
from typing import Generator, Any
from pandas.io.formats.style import Styler
import re
import os
import shutil
@ -7,15 +8,9 @@ import subprocess
import tempfile
from .latex_escaping import unicode_to_latex_dict, latex_escape_dict
if TYPE_CHECKING:
from pandas.io.formats.style import Styler
else:
try:
from pandas.io.formats.style import Styler
except ImportError:
Styler = None
LatexEngine = Literal['pdflatex', 'lualatex', 'xelatex', 'tectonic']
def basic_formatter(value: Any) -> str:
return escape_text(str(value))
def to_ascii(text: str) -> str:
@ -118,16 +113,13 @@ def render_pandas_styler_table(df_style: Styler, caption: str = '', label: str =
Returns:
The LaTeX code.
"""
assert Styler, 'Jinja2 package is required for rendering pandas tables' # type: ignore[truthy-function]
assert isinstance(df_style, Styler), 'df_style has to be of type Styler'
def iter_table(table: dict[str, Any]) -> Generator[str, None, None]:
yield '\\begin{table}\n'
if centering:
yield '\\centering\n'
# Guess column type
numeric = re.compile('^[<>\\-\u2212]?\\s*(?:\\d+,?)+(?:\\.\\d+)?(?:\\s\\D.*)?$')
numeric = re.compile(r'^[<>]?\s*(?:\d+,?)+(?:\.\d+)?(?:\s\D.*)?$')
formats = ['S' if all(
(numeric.match(line[ci]['display_value'].strip()) for line in table['body'])
) else 'l' for ci in range(len(table['body'][0])) if table['body'][0][ci]['is_visible']]
@ -191,7 +183,6 @@ def from_html(html_code: str) -> str:
self.header_flag = False
self.attr_dict: dict[str, str] = {}
self.equation_flag = False
self.class_name: str = ''
def handle_starttag(self, tag: str, attrs: list[tuple[str, str | None]]) -> None:
self.attr_dict = {k: v if v else '' for k, v in attrs}
@ -218,10 +209,6 @@ def from_html(html_code: str) -> str:
self.latex_code.append("\n\n\\noindent\\rule[0.5ex]{\\linewidth}{1pt}\n\n")
elif tag == 'latex':
self.equation_flag = True
elif tag == 'div':
self.class_name = self.attr_dict.get('class', '')
if self.class_name:
self.latex_code.append(f"\n\\begin{{{self.class_name}}}\n")
def handle_endtag(self, tag: str) -> None:
if tag in html_to_latex:
@ -247,9 +234,6 @@ def from_html(html_code: str) -> str:
self.latex_code.append("}")
elif tag == 'latex':
self.equation_flag = False
elif tag == 'div':
if self.class_name:
self.latex_code.append(f"\n\\end{{{self.class_name}}}\n")
def handle_data(self, data: str) -> None:
if self.equation_flag:
@ -264,7 +248,7 @@ def from_html(html_code: str) -> str:
return ''.join(parser.latex_code)
def compile(latex_code: str, output_file: str = '', encoding: str = 'utf-8', engine: LatexEngine = 'pdflatex') -> tuple[bool, list[str], list[str]]:
def compile(latex_code: str, output_file: str = '', encoding: str = 'utf-8') -> tuple[bool, list[str], list[str]]:
"""
Compiles LaTeX code to a PDF file.
@ -272,7 +256,6 @@ def compile(latex_code: str, output_file: str = '', encoding: str = 'utf-8', eng
latex_code: The LaTeX code to compile.
output_file: The output file path.
encoding: The encoding of the LaTeX code.
engine: LaTeX engine (pdflatex, lualatex, xelatex or tectonic)
Returns:
A tuple with three elements:
@ -281,13 +264,8 @@ def compile(latex_code: str, output_file: str = '', encoding: str = 'utf-8', eng
- A list of warnings.
"""
assert engine in get_args(LatexEngine), "engine must be pdflatex, lualatex, xelatex or tectonic"
with tempfile.TemporaryDirectory() as tmp_path:
if engine == 'tectonic':
command = ['tectonic', '--outdir', tmp_path, '-']
else:
command = [engine, '--halt-on-error', '--output-directory', tmp_path]
command = ['pdflatex', '-halt-on-error', '--output-directory', tmp_path]
errors: list[str] = []
warnings: list[str] = []
@ -325,17 +303,6 @@ def compile(latex_code: str, output_file: str = '', encoding: str = 'utf-8', eng
def inject_latex_command(text: str, command: str) -> str:
"""
Injects a provided LaTeX code under the last line
starting with \\usepackage.
Args:
text: input LaTeX code
command: code to inject
Returns:
LaTeX code with injected command
"""
lines = text.splitlines()
last_package_index = -1

View File

@ -68,8 +68,7 @@ unicode_to_latex_dict = {
'£': r'{\pounds}',
'¥': r'{\yen}',
'\u00A0': r'~', # Non-breaking space
'\u2007': ' ', # Figure space
'\u2212': '-' # Unicode minus sign
'\u2007': ' ' # Figure space
}
latex_escape_dict = {

View File

View File

@ -16,17 +16,11 @@
\usepackage{booktabs} % For professional-looking tables
\usepackage{pgf} % For using pgf grafics
\usepackage{textcomp, gensymb} % provides \degree symbol
\usepackage{xcolor} % For colored text
\sisetup{
table-align-text-post = false
}
% Define fine print environment
\newenvironment{fineprint}
{\par\vspace{0.5\baselineskip}\noindent\footnotesize\color{gray}}
{\par\vspace{0.5\baselineskip}}
% Geometry Settings
\geometry{margin=1in} % 1-inch margins

View File

@ -21,12 +21,6 @@
padding-bottom: 50px;
}
div.fineprint
{
font-size: smaller;
color: grey;
}
div h1
{
font-size: 32px;

View File

@ -50,7 +50,7 @@ def validate_html(html_string: str, validate_online: bool = False, check_for: li
assert tag_type in tags, f"Tag {tag_type} not found in the html code"
if validate_online:
test_page = pyladoc.inject_to_template({'CONTENT': html_string}, internal_template='templates/test_template.html')
test_page = pyladoc.inject_to_template(html_string, internal_template='templates/test_template.html')
validation_result = validate_html_with_w3c(test_page)
assert 'messages' in validation_result, 'Validate request failed'
if validation_result['messages']:

View File

@ -1,3 +0,0 @@
# Rendering Test Outputs
This is the target directory for the test renderings.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,613 @@
\section{Thermal Conductivity of Mixtures}
The determination of the thermal conductivity of gas mixtures is a central aspect of modeling
transport phenomena, particularly in high-temperature and high-pressure processes. Among the
most established approaches is the empirical equation introduced by Wassiljewa, which was
subsequently refined by Mason and Saxena to improve its applicability to multicomponent systems.
This model offers a reliable means of estimating the thermal conductivity of gas mixtures based
on the properties of the pure components and their molar interactions.
The thermal conductivity of a gas mixture, denoted by \(\lambda_{\text{mix}}\), can expressed as
shown in equation \ref{eq:lambda-mixture}.
\begin{equation}\label{eq:lambda-mixture}\lambda_{ ext{mix}} = \sum_{i=1}^{n} \frac{x_i \lambda_i}{\sum_{j=1}^{n} x_j \Phi_{ij}}\end{equation}
In this equation, \(x_i\) represents the molar fraction of component \(i\) within the mixture,
while \(\lambda_i\) denotes the thermal conductivity of the pure substance \(i\). The denominator
contains the interaction parameter \(\Phi_{ij}\), which describes the influence of component
\(j\) on the transport properties of component \(i\).
The interaction parameter \(\Phi_{ij}\) is given by the relation shown in equation \ref{eq:interaction-parameter}.
\begin{equation}\label{eq:interaction-parameter}\Phi_{ij} = \frac{1}{\sqrt{8}} \left(1 + \frac{M_i}{M_j} \right)^{-1/2} \left[ 1 + \left( \frac{\lambda_i}{\lambda_j} \right)^{1/2} \left( \frac{M_j}{M_i} \right)^{1/4} \right]^2\end{equation}
Here, \(M_i\) and \(M_j\) are the molar masses of the components \(i\) and \(j\), respectively.
Molar masses and thermal conductivity of the pure substances are listed in table \ref{table:gas-probs}.
The structure of this expression illustrates the nonlinear dependence of the interaction term on
both the molar mass ratio and the square root of the conductivity ratio of the involved species.
\begin{table}
\centering
\caption{Properties of some gases}
\label{table:gas-probs}
\begin{tabular}{lSS}
\toprule
\text{Gas} & \text{Molar mass in g/mol} & \text{Thermal conductivity in W/m/K} \\
\midrule
H2 & 2.016 & 0.1805 \\
O2 & 32.00 & 0.0263 \\
N2 & 28.02 & 0.0258 \\
CO2 & 44.01 & 0.0166 \\
CH4 & 16.04 & 0.0341 \\
Ar & 39.95 & 0.0177 \\
He & 4.0026 & 0.1513 \\
\bottomrule
\end{tabular}
\end{table}This formulation acknowledges that the transport properties of a gas mixture are not a simple
linear combination of the individual conductivities. Rather, they are governed by intermolecular
interactions, which affect the energy exchange and diffusion behavior of each component. These
interactions are particularly significant at elevated pressures or in cases where the gas components
exhibit widely differing molecular masses or transport properties.
The equation proposed by Wassiljewa and refined by Mason and Saxena assumes that binary interactions
dominate the behavior of the mixture, while higher-order (three-body or more) interactions are
neglected. It also presumes that the gases approximate ideal behavior, although in practical
applications, moderate deviations from ideality are tolerated without significant loss of accuracy.
In figure \ref{fig:mixture} the resulting thermal conductivity of an H2/CO2-mixture is shown.
\begin{figure}
\centering
\begingroup%
\makeatletter%
\begin{pgfpicture}%
\pgfpathrectangle{\pgfpointorigin}{\pgfqpoint{6.400000in}{4.800000in}}%
\pgfusepath{use as bounding box, clip}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetmiterjoin%
\definecolor{currentfill}{rgb}{1.000000,1.000000,1.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.000000pt}%
\definecolor{currentstroke}{rgb}{1.000000,1.000000,1.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{6.400000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{6.400000in}{4.800000in}}%
\pgfpathlineto{\pgfqpoint{0.000000in}{4.800000in}}%
\pgfpathlineto{\pgfqpoint{0.000000in}{0.000000in}}%
\pgfpathclose%
\pgfusepath{fill}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetmiterjoin%
\definecolor{currentfill}{rgb}{1.000000,1.000000,1.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.000000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetstrokeopacity{0.000000}%
\pgfsetdash{}{0pt}%
\pgfpathmoveto{\pgfqpoint{0.800000in}{0.528000in}}%
\pgfpathlineto{\pgfqpoint{5.760000in}{0.528000in}}%
\pgfpathlineto{\pgfqpoint{5.760000in}{4.224000in}}%
\pgfpathlineto{\pgfqpoint{0.800000in}{4.224000in}}%
\pgfpathlineto{\pgfqpoint{0.800000in}{0.528000in}}%
\pgfpathclose%
\pgfusepath{fill}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetroundjoin%
\definecolor{currentfill}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfsys@defobject{currentmarker}{\pgfqpoint{0.000000in}{-0.048611in}}{\pgfqpoint{0.000000in}{0.000000in}}{%
\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{0.000000in}{-0.048611in}}%
\pgfusepath{stroke,fill}%
}%
\begin{pgfscope}%
\pgfsys@transformshift{1.025455in}{0.528000in}%
\pgfsys@useobject{currentmarker}{}%
\end{pgfscope}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=1.025455in,y=0.430778in,,top]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}0}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetroundjoin%
\definecolor{currentfill}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfsys@defobject{currentmarker}{\pgfqpoint{0.000000in}{-0.048611in}}{\pgfqpoint{0.000000in}{0.000000in}}{%
\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{0.000000in}{-0.048611in}}%
\pgfusepath{stroke,fill}%
}%
\begin{pgfscope}%
\pgfsys@transformshift{1.927273in}{0.528000in}%
\pgfsys@useobject{currentmarker}{}%
\end{pgfscope}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=1.927273in,y=0.430778in,,top]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}20}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetroundjoin%
\definecolor{currentfill}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfsys@defobject{currentmarker}{\pgfqpoint{0.000000in}{-0.048611in}}{\pgfqpoint{0.000000in}{0.000000in}}{%
\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{0.000000in}{-0.048611in}}%
\pgfusepath{stroke,fill}%
}%
\begin{pgfscope}%
\pgfsys@transformshift{2.829091in}{0.528000in}%
\pgfsys@useobject{currentmarker}{}%
\end{pgfscope}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=2.829091in,y=0.430778in,,top]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}40}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetroundjoin%
\definecolor{currentfill}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfsys@defobject{currentmarker}{\pgfqpoint{0.000000in}{-0.048611in}}{\pgfqpoint{0.000000in}{0.000000in}}{%
\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{0.000000in}{-0.048611in}}%
\pgfusepath{stroke,fill}%
}%
\begin{pgfscope}%
\pgfsys@transformshift{3.730909in}{0.528000in}%
\pgfsys@useobject{currentmarker}{}%
\end{pgfscope}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=3.730909in,y=0.430778in,,top]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}60}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetroundjoin%
\definecolor{currentfill}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfsys@defobject{currentmarker}{\pgfqpoint{0.000000in}{-0.048611in}}{\pgfqpoint{0.000000in}{0.000000in}}{%
\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{0.000000in}{-0.048611in}}%
\pgfusepath{stroke,fill}%
}%
\begin{pgfscope}%
\pgfsys@transformshift{4.632727in}{0.528000in}%
\pgfsys@useobject{currentmarker}{}%
\end{pgfscope}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=4.632727in,y=0.430778in,,top]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}80}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetroundjoin%
\definecolor{currentfill}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfsys@defobject{currentmarker}{\pgfqpoint{0.000000in}{-0.048611in}}{\pgfqpoint{0.000000in}{0.000000in}}{%
\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{0.000000in}{-0.048611in}}%
\pgfusepath{stroke,fill}%
}%
\begin{pgfscope}%
\pgfsys@transformshift{5.534545in}{0.528000in}%
\pgfsys@useobject{currentmarker}{}%
\end{pgfscope}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=5.534545in,y=0.430778in,,top]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}100}}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=3.280000in,y=0.240809in,,top]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}H2 molar fraction / %}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetroundjoin%
\definecolor{currentfill}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfsys@defobject{currentmarker}{\pgfqpoint{-0.048611in}{0.000000in}}{\pgfqpoint{-0.000000in}{0.000000in}}{%
\pgfpathmoveto{\pgfqpoint{-0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{-0.048611in}{0.000000in}}%
\pgfusepath{stroke,fill}%
}%
\begin{pgfscope}%
\pgfsys@transformshift{0.800000in}{0.868203in}%
\pgfsys@useobject{currentmarker}{}%
\end{pgfscope}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=0.305168in, y=0.815441in, left, base]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}0.025}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetroundjoin%
\definecolor{currentfill}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfsys@defobject{currentmarker}{\pgfqpoint{-0.048611in}{0.000000in}}{\pgfqpoint{-0.000000in}{0.000000in}}{%
\pgfpathmoveto{\pgfqpoint{-0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{-0.048611in}{0.000000in}}%
\pgfusepath{stroke,fill}%
}%
\begin{pgfscope}%
\pgfsys@transformshift{0.800000in}{1.380710in}%
\pgfsys@useobject{currentmarker}{}%
\end{pgfscope}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=0.305168in, y=1.327949in, left, base]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}0.050}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetroundjoin%
\definecolor{currentfill}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfsys@defobject{currentmarker}{\pgfqpoint{-0.048611in}{0.000000in}}{\pgfqpoint{-0.000000in}{0.000000in}}{%
\pgfpathmoveto{\pgfqpoint{-0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{-0.048611in}{0.000000in}}%
\pgfusepath{stroke,fill}%
}%
\begin{pgfscope}%
\pgfsys@transformshift{0.800000in}{1.893218in}%
\pgfsys@useobject{currentmarker}{}%
\end{pgfscope}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=0.305168in, y=1.840456in, left, base]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}0.075}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetroundjoin%
\definecolor{currentfill}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfsys@defobject{currentmarker}{\pgfqpoint{-0.048611in}{0.000000in}}{\pgfqpoint{-0.000000in}{0.000000in}}{%
\pgfpathmoveto{\pgfqpoint{-0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{-0.048611in}{0.000000in}}%
\pgfusepath{stroke,fill}%
}%
\begin{pgfscope}%
\pgfsys@transformshift{0.800000in}{2.405725in}%
\pgfsys@useobject{currentmarker}{}%
\end{pgfscope}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=0.305168in, y=2.352964in, left, base]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}0.100}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetroundjoin%
\definecolor{currentfill}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfsys@defobject{currentmarker}{\pgfqpoint{-0.048611in}{0.000000in}}{\pgfqpoint{-0.000000in}{0.000000in}}{%
\pgfpathmoveto{\pgfqpoint{-0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{-0.048611in}{0.000000in}}%
\pgfusepath{stroke,fill}%
}%
\begin{pgfscope}%
\pgfsys@transformshift{0.800000in}{2.918233in}%
\pgfsys@useobject{currentmarker}{}%
\end{pgfscope}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=0.305168in, y=2.865472in, left, base]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}0.125}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetroundjoin%
\definecolor{currentfill}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfsys@defobject{currentmarker}{\pgfqpoint{-0.048611in}{0.000000in}}{\pgfqpoint{-0.000000in}{0.000000in}}{%
\pgfpathmoveto{\pgfqpoint{-0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{-0.048611in}{0.000000in}}%
\pgfusepath{stroke,fill}%
}%
\begin{pgfscope}%
\pgfsys@transformshift{0.800000in}{3.430741in}%
\pgfsys@useobject{currentmarker}{}%
\end{pgfscope}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=0.305168in, y=3.377979in, left, base]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}0.150}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetroundjoin%
\definecolor{currentfill}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfsys@defobject{currentmarker}{\pgfqpoint{-0.048611in}{0.000000in}}{\pgfqpoint{-0.000000in}{0.000000in}}{%
\pgfpathmoveto{\pgfqpoint{-0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{-0.048611in}{0.000000in}}%
\pgfusepath{stroke,fill}%
}%
\begin{pgfscope}%
\pgfsys@transformshift{0.800000in}{3.943248in}%
\pgfsys@useobject{currentmarker}{}%
\end{pgfscope}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=0.305168in, y=3.890487in, left, base]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}0.175}}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=0.249612in,y=2.376000in,,bottom,rotate=90.000000]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}Thermal Conductivity / (W/m·K)}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfpathrectangle{\pgfqpoint{0.800000in}{0.528000in}}{\pgfqpoint{4.960000in}{3.696000in}}%
\pgfusepath{clip}%
\pgfsetrectcap%
\pgfsetroundjoin%
\pgfsetlinewidth{1.505625pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfpathmoveto{\pgfqpoint{1.025455in}{0.696000in}}%
\pgfpathlineto{\pgfqpoint{1.071001in}{0.697319in}}%
\pgfpathlineto{\pgfqpoint{1.116547in}{0.698664in}}%
\pgfpathlineto{\pgfqpoint{1.162094in}{0.700036in}}%
\pgfpathlineto{\pgfqpoint{1.207640in}{0.701436in}}%
\pgfpathlineto{\pgfqpoint{1.253186in}{0.702865in}}%
\pgfpathlineto{\pgfqpoint{1.298733in}{0.704324in}}%
\pgfpathlineto{\pgfqpoint{1.344279in}{0.705814in}}%
\pgfpathlineto{\pgfqpoint{1.389826in}{0.707335in}}%
\pgfpathlineto{\pgfqpoint{1.435372in}{0.708889in}}%
\pgfpathlineto{\pgfqpoint{1.480918in}{0.710476in}}%
\pgfpathlineto{\pgfqpoint{1.526465in}{0.712098in}}%
\pgfpathlineto{\pgfqpoint{1.572011in}{0.713757in}}%
\pgfpathlineto{\pgfqpoint{1.617557in}{0.715452in}}%
\pgfpathlineto{\pgfqpoint{1.663104in}{0.717186in}}%
\pgfpathlineto{\pgfqpoint{1.708650in}{0.718960in}}%
\pgfpathlineto{\pgfqpoint{1.754197in}{0.720775in}}%
\pgfpathlineto{\pgfqpoint{1.799743in}{0.722632in}}%
\pgfpathlineto{\pgfqpoint{1.845289in}{0.724534in}}%
\pgfpathlineto{\pgfqpoint{1.890836in}{0.726482in}}%
\pgfpathlineto{\pgfqpoint{1.936382in}{0.728476in}}%
\pgfpathlineto{\pgfqpoint{1.981928in}{0.730520in}}%
\pgfpathlineto{\pgfqpoint{2.027475in}{0.732615in}}%
\pgfpathlineto{\pgfqpoint{2.073021in}{0.734763in}}%
\pgfpathlineto{\pgfqpoint{2.118567in}{0.736966in}}%
\pgfpathlineto{\pgfqpoint{2.164114in}{0.739226in}}%
\pgfpathlineto{\pgfqpoint{2.209660in}{0.741545in}}%
\pgfpathlineto{\pgfqpoint{2.255207in}{0.743926in}}%
\pgfpathlineto{\pgfqpoint{2.300753in}{0.746371in}}%
\pgfpathlineto{\pgfqpoint{2.346299in}{0.748883in}}%
\pgfpathlineto{\pgfqpoint{2.391846in}{0.751464in}}%
\pgfpathlineto{\pgfqpoint{2.437392in}{0.754118in}}%
\pgfpathlineto{\pgfqpoint{2.482938in}{0.756847in}}%
\pgfpathlineto{\pgfqpoint{2.528485in}{0.759656in}}%
\pgfpathlineto{\pgfqpoint{2.574031in}{0.762546in}}%
\pgfpathlineto{\pgfqpoint{2.619578in}{0.765523in}}%
\pgfpathlineto{\pgfqpoint{2.665124in}{0.768589in}}%
\pgfpathlineto{\pgfqpoint{2.710670in}{0.771749in}}%
\pgfpathlineto{\pgfqpoint{2.756217in}{0.775008in}}%
\pgfpathlineto{\pgfqpoint{2.801763in}{0.778370in}}%
\pgfpathlineto{\pgfqpoint{2.847309in}{0.781840in}}%
\pgfpathlineto{\pgfqpoint{2.892856in}{0.785423in}}%
\pgfpathlineto{\pgfqpoint{2.938402in}{0.789124in}}%
\pgfpathlineto{\pgfqpoint{2.983949in}{0.792951in}}%
\pgfpathlineto{\pgfqpoint{3.029495in}{0.796909in}}%
\pgfpathlineto{\pgfqpoint{3.075041in}{0.801005in}}%
\pgfpathlineto{\pgfqpoint{3.120588in}{0.805247in}}%
\pgfpathlineto{\pgfqpoint{3.166134in}{0.809642in}}%
\pgfpathlineto{\pgfqpoint{3.211680in}{0.814198in}}%
\pgfpathlineto{\pgfqpoint{3.257227in}{0.818926in}}%
\pgfpathlineto{\pgfqpoint{3.302773in}{0.823834in}}%
\pgfpathlineto{\pgfqpoint{3.348320in}{0.828933in}}%
\pgfpathlineto{\pgfqpoint{3.393866in}{0.834235in}}%
\pgfpathlineto{\pgfqpoint{3.439412in}{0.839752in}}%
\pgfpathlineto{\pgfqpoint{3.484959in}{0.845496in}}%
\pgfpathlineto{\pgfqpoint{3.530505in}{0.851484in}}%
\pgfpathlineto{\pgfqpoint{3.576051in}{0.857729in}}%
\pgfpathlineto{\pgfqpoint{3.621598in}{0.864249in}}%
\pgfpathlineto{\pgfqpoint{3.667144in}{0.871063in}}%
\pgfpathlineto{\pgfqpoint{3.712691in}{0.878191in}}%
\pgfpathlineto{\pgfqpoint{3.758237in}{0.885655in}}%
\pgfpathlineto{\pgfqpoint{3.803783in}{0.893479in}}%
\pgfpathlineto{\pgfqpoint{3.849330in}{0.901690in}}%
\pgfpathlineto{\pgfqpoint{3.894876in}{0.910317in}}%
\pgfpathlineto{\pgfqpoint{3.940422in}{0.919392in}}%
\pgfpathlineto{\pgfqpoint{3.985969in}{0.928951in}}%
\pgfpathlineto{\pgfqpoint{4.031515in}{0.939034in}}%
\pgfpathlineto{\pgfqpoint{4.077062in}{0.949685in}}%
\pgfpathlineto{\pgfqpoint{4.122608in}{0.960953in}}%
\pgfpathlineto{\pgfqpoint{4.168154in}{0.972893in}}%
\pgfpathlineto{\pgfqpoint{4.213701in}{0.985566in}}%
\pgfpathlineto{\pgfqpoint{4.259247in}{0.999042in}}%
\pgfpathlineto{\pgfqpoint{4.304793in}{1.013399in}}%
\pgfpathlineto{\pgfqpoint{4.350340in}{1.028727in}}%
\pgfpathlineto{\pgfqpoint{4.395886in}{1.045125in}}%
\pgfpathlineto{\pgfqpoint{4.441433in}{1.062710in}}%
\pgfpathlineto{\pgfqpoint{4.486979in}{1.081614in}}%
\pgfpathlineto{\pgfqpoint{4.532525in}{1.101991in}}%
\pgfpathlineto{\pgfqpoint{4.578072in}{1.124018in}}%
\pgfpathlineto{\pgfqpoint{4.623618in}{1.147903in}}%
\pgfpathlineto{\pgfqpoint{4.669164in}{1.173889in}}%
\pgfpathlineto{\pgfqpoint{4.714711in}{1.202263in}}%
\pgfpathlineto{\pgfqpoint{4.760257in}{1.233369in}}%
\pgfpathlineto{\pgfqpoint{4.805803in}{1.267615in}}%
\pgfpathlineto{\pgfqpoint{4.851350in}{1.305499in}}%
\pgfpathlineto{\pgfqpoint{4.896896in}{1.347625in}}%
\pgfpathlineto{\pgfqpoint{4.942443in}{1.394741in}}%
\pgfpathlineto{\pgfqpoint{4.987989in}{1.447778in}}%
\pgfpathlineto{\pgfqpoint{5.033535in}{1.507912in}}%
\pgfpathlineto{\pgfqpoint{5.079082in}{1.576651in}}%
\pgfpathlineto{\pgfqpoint{5.124628in}{1.655955in}}%
\pgfpathlineto{\pgfqpoint{5.170174in}{1.748426in}}%
\pgfpathlineto{\pgfqpoint{5.215721in}{1.857582in}}%
\pgfpathlineto{\pgfqpoint{5.261267in}{1.988306in}}%
\pgfpathlineto{\pgfqpoint{5.306814in}{2.147564in}}%
\pgfpathlineto{\pgfqpoint{5.352360in}{2.345643in}}%
\pgfpathlineto{\pgfqpoint{5.397906in}{2.598377in}}%
\pgfpathlineto{\pgfqpoint{5.443453in}{2.931436in}}%
\pgfpathlineto{\pgfqpoint{5.488999in}{3.389276in}}%
\pgfpathlineto{\pgfqpoint{5.534545in}{4.056000in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetrectcap%
\pgfsetmiterjoin%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfpathmoveto{\pgfqpoint{0.800000in}{0.528000in}}%
\pgfpathlineto{\pgfqpoint{0.800000in}{4.224000in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetrectcap%
\pgfsetmiterjoin%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfpathmoveto{\pgfqpoint{5.760000in}{0.528000in}}%
\pgfpathlineto{\pgfqpoint{5.760000in}{4.224000in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetrectcap%
\pgfsetmiterjoin%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfpathmoveto{\pgfqpoint{0.800000in}{0.528000in}}%
\pgfpathlineto{\pgfqpoint{5.760000in}{0.528000in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetrectcap%
\pgfsetmiterjoin%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfpathmoveto{\pgfqpoint{0.800000in}{4.224000in}}%
\pgfpathlineto{\pgfqpoint{5.760000in}{4.224000in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\end{pgfpicture}%
\makeatother%
\endgroup%
\caption{Thermal Conductivity of H2/CO2 mixtures}
\label{fig:mixture}
\end{figure}In engineering practice, the accurate determination of \(\lambda_{\text{mix}}\) is essential
for the prediction of heat transfer in systems such as membrane modules, chemical reactors, and
combustion chambers. In the context of membrane-based gas separation, for instance, the thermal
conductivity of the gas mixture influences the local temperature distribution, which in turn affects
both the permeation behavior and the structural stability of the membrane.
It is important to note that the calculated mixture conductivity reflects only the gas phase
behavior. In porous systems such as carbon membranes, additional effects must be considered.
These include the solid-phase thermal conduction through the membrane matrix, radiative transport
in pore channels at high temperatures, and transport in the Knudsen regime for narrow pores.
To account for these complexities, models based on effective medium theory, such as those of
Maxwell-Eucken or Bruggeman, are frequently employed. These models combine the conductivities of
individual phases (gas and solid) with geometrical factors that reflect the morphology of the
porous structure.
\noindent\rule[0.5ex]{\linewidth}{1pt}
Expanded by more or less sensible AI jabbering; based on: \href{https://doi.org/10.14279/depositonce-7390}{doi:10.14279/depositonce-7390}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,589 @@
\section{Special characters}
{\"o} {\"a} {\"u} {\"O} {\"A} {\"U} {\ss} @ $\Delta$
$\pi$ $\approx$ $\pm$ $\Delta$ $\Sigma$
{\pounds} {\yen} \$
{\OE}
\section{Link}
This is a hyperlink: \href{https://www.nonan.net}{nonan.net}
\section{Table}
\begin{tabular}{rll}\toprule
Anz. & Typ & Beschreibung \\
\midrule
12 & BK9050 & Buskoppler \\
2 & KL1104 & 4 Digitaleing{\"a}nge \\
2 & KL2404 & 4 Digitalausg{\"a}nge (0,5 A) \\
3 & KL2424 & 4 Digitalausg{\"a}nge (2 A) \\
2 & KL4004 & 4 Analogausg{\"a}nge \\
1 & KL4002 & 2 Analogausg{\"a}nge \\
22 & KL9188 & Potenzialverteilungsklemme \\
1 & KL9100 & Potenzialeinspeiseklemme \\
3 & KL3054 & 4 Analogeing{\"a}nge \\
5 & KL3214 & PT100 4 Temperatureing{\"a}nge (3-Leiter) \\
3 & KL3202 & PT100 2 Temperatureing{\"a}nge (3-Leiter) \\
1 & KL2404 & 4 Digitalausg{\"a}nge \\
2 & KL9010 & Endklemme \\
\bottomrule
\end{tabular}
\noindent\rule[0.5ex]{\linewidth}{1pt}
\section{Equations}
This line represents a reference to the equation \ref{eq:test1}.
\begin{equation}\label{eq:test1}y = a + b * \sum_{i=0}^{\infty} a_i x^i\end{equation}\begin{figure}
\centering
\begingroup%
\makeatletter%
\begin{pgfpicture}%
\pgfpathrectangle{\pgfpointorigin}{\pgfqpoint{6.400000in}{4.800000in}}%
\pgfusepath{use as bounding box, clip}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetmiterjoin%
\definecolor{currentfill}{rgb}{1.000000,1.000000,1.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.000000pt}%
\definecolor{currentstroke}{rgb}{1.000000,1.000000,1.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{6.400000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{6.400000in}{4.800000in}}%
\pgfpathlineto{\pgfqpoint{0.000000in}{4.800000in}}%
\pgfpathlineto{\pgfqpoint{0.000000in}{0.000000in}}%
\pgfpathclose%
\pgfusepath{fill}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetmiterjoin%
\definecolor{currentfill}{rgb}{1.000000,1.000000,1.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.000000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetstrokeopacity{0.000000}%
\pgfsetdash{}{0pt}%
\pgfpathmoveto{\pgfqpoint{0.800000in}{0.528000in}}%
\pgfpathlineto{\pgfqpoint{5.760000in}{0.528000in}}%
\pgfpathlineto{\pgfqpoint{5.760000in}{4.224000in}}%
\pgfpathlineto{\pgfqpoint{0.800000in}{4.224000in}}%
\pgfpathlineto{\pgfqpoint{0.800000in}{0.528000in}}%
\pgfpathclose%
\pgfusepath{fill}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfpathrectangle{\pgfqpoint{0.800000in}{0.528000in}}{\pgfqpoint{4.960000in}{3.696000in}}%
\pgfusepath{clip}%
\pgfsetbuttcap%
\pgfsetmiterjoin%
\definecolor{currentfill}{rgb}{0.839216,0.152941,0.156863}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.000000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetstrokeopacity{0.000000}%
\pgfsetdash{}{0pt}%
\pgfpathmoveto{\pgfqpoint{1.025455in}{0.528000in}}%
\pgfpathlineto{\pgfqpoint{1.974737in}{0.528000in}}%
\pgfpathlineto{\pgfqpoint{1.974737in}{1.936000in}}%
\pgfpathlineto{\pgfqpoint{1.025455in}{1.936000in}}%
\pgfpathlineto{\pgfqpoint{1.025455in}{0.528000in}}%
\pgfpathclose%
\pgfusepath{fill}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfpathrectangle{\pgfqpoint{0.800000in}{0.528000in}}{\pgfqpoint{4.960000in}{3.696000in}}%
\pgfusepath{clip}%
\pgfsetbuttcap%
\pgfsetmiterjoin%
\definecolor{currentfill}{rgb}{0.121569,0.466667,0.705882}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.000000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetstrokeopacity{0.000000}%
\pgfsetdash{}{0pt}%
\pgfpathmoveto{\pgfqpoint{2.212057in}{0.528000in}}%
\pgfpathlineto{\pgfqpoint{3.161340in}{0.528000in}}%
\pgfpathlineto{\pgfqpoint{3.161340in}{4.048000in}}%
\pgfpathlineto{\pgfqpoint{2.212057in}{4.048000in}}%
\pgfpathlineto{\pgfqpoint{2.212057in}{0.528000in}}%
\pgfpathclose%
\pgfusepath{fill}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfpathrectangle{\pgfqpoint{0.800000in}{0.528000in}}{\pgfqpoint{4.960000in}{3.696000in}}%
\pgfusepath{clip}%
\pgfsetbuttcap%
\pgfsetmiterjoin%
\definecolor{currentfill}{rgb}{0.839216,0.152941,0.156863}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.000000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetstrokeopacity{0.000000}%
\pgfsetdash{}{0pt}%
\pgfpathmoveto{\pgfqpoint{3.398660in}{0.528000in}}%
\pgfpathlineto{\pgfqpoint{4.347943in}{0.528000in}}%
\pgfpathlineto{\pgfqpoint{4.347943in}{1.584000in}}%
\pgfpathlineto{\pgfqpoint{3.398660in}{1.584000in}}%
\pgfpathlineto{\pgfqpoint{3.398660in}{0.528000in}}%
\pgfpathclose%
\pgfusepath{fill}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfpathrectangle{\pgfqpoint{0.800000in}{0.528000in}}{\pgfqpoint{4.960000in}{3.696000in}}%
\pgfusepath{clip}%
\pgfsetbuttcap%
\pgfsetmiterjoin%
\definecolor{currentfill}{rgb}{1.000000,0.498039,0.054902}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.000000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetstrokeopacity{0.000000}%
\pgfsetdash{}{0pt}%
\pgfpathmoveto{\pgfqpoint{4.585263in}{0.528000in}}%
\pgfpathlineto{\pgfqpoint{5.534545in}{0.528000in}}%
\pgfpathlineto{\pgfqpoint{5.534545in}{2.464000in}}%
\pgfpathlineto{\pgfqpoint{4.585263in}{2.464000in}}%
\pgfpathlineto{\pgfqpoint{4.585263in}{0.528000in}}%
\pgfpathclose%
\pgfusepath{fill}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetroundjoin%
\definecolor{currentfill}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfsys@defobject{currentmarker}{\pgfqpoint{0.000000in}{-0.048611in}}{\pgfqpoint{0.000000in}{0.000000in}}{%
\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{0.000000in}{-0.048611in}}%
\pgfusepath{stroke,fill}%
}%
\begin{pgfscope}%
\pgfsys@transformshift{1.500096in}{0.528000in}%
\pgfsys@useobject{currentmarker}{}%
\end{pgfscope}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=1.500096in,y=0.430778in,,top]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}apple}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetroundjoin%
\definecolor{currentfill}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfsys@defobject{currentmarker}{\pgfqpoint{0.000000in}{-0.048611in}}{\pgfqpoint{0.000000in}{0.000000in}}{%
\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{0.000000in}{-0.048611in}}%
\pgfusepath{stroke,fill}%
}%
\begin{pgfscope}%
\pgfsys@transformshift{2.686699in}{0.528000in}%
\pgfsys@useobject{currentmarker}{}%
\end{pgfscope}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=2.686699in,y=0.430778in,,top]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}blueberry}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetroundjoin%
\definecolor{currentfill}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfsys@defobject{currentmarker}{\pgfqpoint{0.000000in}{-0.048611in}}{\pgfqpoint{0.000000in}{0.000000in}}{%
\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{0.000000in}{-0.048611in}}%
\pgfusepath{stroke,fill}%
}%
\begin{pgfscope}%
\pgfsys@transformshift{3.873301in}{0.528000in}%
\pgfsys@useobject{currentmarker}{}%
\end{pgfscope}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=3.873301in,y=0.430778in,,top]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}cherry}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetroundjoin%
\definecolor{currentfill}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfsys@defobject{currentmarker}{\pgfqpoint{0.000000in}{-0.048611in}}{\pgfqpoint{0.000000in}{0.000000in}}{%
\pgfpathmoveto{\pgfqpoint{0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{0.000000in}{-0.048611in}}%
\pgfusepath{stroke,fill}%
}%
\begin{pgfscope}%
\pgfsys@transformshift{5.059904in}{0.528000in}%
\pgfsys@useobject{currentmarker}{}%
\end{pgfscope}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=5.059904in,y=0.430778in,,top]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}orange}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetroundjoin%
\definecolor{currentfill}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfsys@defobject{currentmarker}{\pgfqpoint{-0.048611in}{0.000000in}}{\pgfqpoint{-0.000000in}{0.000000in}}{%
\pgfpathmoveto{\pgfqpoint{-0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{-0.048611in}{0.000000in}}%
\pgfusepath{stroke,fill}%
}%
\begin{pgfscope}%
\pgfsys@transformshift{0.800000in}{0.528000in}%
\pgfsys@useobject{currentmarker}{}%
\end{pgfscope}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=0.614412in, y=0.475238in, left, base]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}0}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetroundjoin%
\definecolor{currentfill}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfsys@defobject{currentmarker}{\pgfqpoint{-0.048611in}{0.000000in}}{\pgfqpoint{-0.000000in}{0.000000in}}{%
\pgfpathmoveto{\pgfqpoint{-0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{-0.048611in}{0.000000in}}%
\pgfusepath{stroke,fill}%
}%
\begin{pgfscope}%
\pgfsys@transformshift{0.800000in}{1.232000in}%
\pgfsys@useobject{currentmarker}{}%
\end{pgfscope}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=0.526047in, y=1.179238in, left, base]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}20}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetroundjoin%
\definecolor{currentfill}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfsys@defobject{currentmarker}{\pgfqpoint{-0.048611in}{0.000000in}}{\pgfqpoint{-0.000000in}{0.000000in}}{%
\pgfpathmoveto{\pgfqpoint{-0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{-0.048611in}{0.000000in}}%
\pgfusepath{stroke,fill}%
}%
\begin{pgfscope}%
\pgfsys@transformshift{0.800000in}{1.936000in}%
\pgfsys@useobject{currentmarker}{}%
\end{pgfscope}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=0.526047in, y=1.883238in, left, base]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}40}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetroundjoin%
\definecolor{currentfill}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfsys@defobject{currentmarker}{\pgfqpoint{-0.048611in}{0.000000in}}{\pgfqpoint{-0.000000in}{0.000000in}}{%
\pgfpathmoveto{\pgfqpoint{-0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{-0.048611in}{0.000000in}}%
\pgfusepath{stroke,fill}%
}%
\begin{pgfscope}%
\pgfsys@transformshift{0.800000in}{2.640000in}%
\pgfsys@useobject{currentmarker}{}%
\end{pgfscope}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=0.526047in, y=2.587238in, left, base]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}60}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetroundjoin%
\definecolor{currentfill}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfsys@defobject{currentmarker}{\pgfqpoint{-0.048611in}{0.000000in}}{\pgfqpoint{-0.000000in}{0.000000in}}{%
\pgfpathmoveto{\pgfqpoint{-0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{-0.048611in}{0.000000in}}%
\pgfusepath{stroke,fill}%
}%
\begin{pgfscope}%
\pgfsys@transformshift{0.800000in}{3.344000in}%
\pgfsys@useobject{currentmarker}{}%
\end{pgfscope}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=0.526047in, y=3.291238in, left, base]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}80}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetroundjoin%
\definecolor{currentfill}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfsys@defobject{currentmarker}{\pgfqpoint{-0.048611in}{0.000000in}}{\pgfqpoint{-0.000000in}{0.000000in}}{%
\pgfpathmoveto{\pgfqpoint{-0.000000in}{0.000000in}}%
\pgfpathlineto{\pgfqpoint{-0.048611in}{0.000000in}}%
\pgfusepath{stroke,fill}%
}%
\begin{pgfscope}%
\pgfsys@transformshift{0.800000in}{4.048000in}%
\pgfsys@useobject{currentmarker}{}%
\end{pgfscope}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=0.437682in, y=3.995238in, left, base]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}100}}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=0.382126in,y=2.376000in,,bottom,rotate=90.000000]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}fruit supply}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetrectcap%
\pgfsetmiterjoin%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfpathmoveto{\pgfqpoint{0.800000in}{0.528000in}}%
\pgfpathlineto{\pgfqpoint{0.800000in}{4.224000in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetrectcap%
\pgfsetmiterjoin%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfpathmoveto{\pgfqpoint{5.760000in}{0.528000in}}%
\pgfpathlineto{\pgfqpoint{5.760000in}{4.224000in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetrectcap%
\pgfsetmiterjoin%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfpathmoveto{\pgfqpoint{0.800000in}{0.528000in}}%
\pgfpathlineto{\pgfqpoint{5.760000in}{0.528000in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetrectcap%
\pgfsetmiterjoin%
\pgfsetlinewidth{0.803000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetdash{}{0pt}%
\pgfpathmoveto{\pgfqpoint{0.800000in}{4.224000in}}%
\pgfpathlineto{\pgfqpoint{5.760000in}{4.224000in}}%
\pgfusepath{stroke}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=3.280000in,y=4.307333in,,base]{\color{textcolor}{\sffamily\fontsize{12.000000}{14.400000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}Fruit supply by kind and color}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetmiterjoin%
\definecolor{currentfill}{rgb}{1.000000,1.000000,1.000000}%
\pgfsetfillcolor{currentfill}%
\pgfsetfillopacity{0.800000}%
\pgfsetlinewidth{1.003750pt}%
\definecolor{currentstroke}{rgb}{0.800000,0.800000,0.800000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetstrokeopacity{0.800000}%
\pgfsetdash{}{0pt}%
\pgfpathmoveto{\pgfqpoint{4.729510in}{3.297460in}}%
\pgfpathlineto{\pgfqpoint{5.662778in}{3.297460in}}%
\pgfpathquadraticcurveto{\pgfqpoint{5.690556in}{3.297460in}}{\pgfqpoint{5.690556in}{3.325238in}}%
\pgfpathlineto{\pgfqpoint{5.690556in}{4.126778in}}%
\pgfpathquadraticcurveto{\pgfqpoint{5.690556in}{4.154556in}}{\pgfqpoint{5.662778in}{4.154556in}}%
\pgfpathlineto{\pgfqpoint{4.729510in}{4.154556in}}%
\pgfpathquadraticcurveto{\pgfqpoint{4.701732in}{4.154556in}}{\pgfqpoint{4.701732in}{4.126778in}}%
\pgfpathlineto{\pgfqpoint{4.701732in}{3.325238in}}%
\pgfpathquadraticcurveto{\pgfqpoint{4.701732in}{3.297460in}}{\pgfqpoint{4.729510in}{3.297460in}}%
\pgfpathlineto{\pgfqpoint{4.729510in}{3.297460in}}%
\pgfpathclose%
\pgfusepath{stroke,fill}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=4.849091in,y=3.993477in,left,base]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}Fruit color}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetmiterjoin%
\definecolor{currentfill}{rgb}{0.839216,0.152941,0.156863}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.000000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetstrokeopacity{0.000000}%
\pgfsetdash{}{0pt}%
\pgfpathmoveto{\pgfqpoint{4.757287in}{3.789620in}}%
\pgfpathlineto{\pgfqpoint{5.035065in}{3.789620in}}%
\pgfpathlineto{\pgfqpoint{5.035065in}{3.886842in}}%
\pgfpathlineto{\pgfqpoint{4.757287in}{3.886842in}}%
\pgfpathlineto{\pgfqpoint{4.757287in}{3.789620in}}%
\pgfpathclose%
\pgfusepath{fill}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=5.146176in,y=3.789620in,left,base]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}red}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetmiterjoin%
\definecolor{currentfill}{rgb}{0.121569,0.466667,0.705882}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.000000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetstrokeopacity{0.000000}%
\pgfsetdash{}{0pt}%
\pgfpathmoveto{\pgfqpoint{4.757287in}{3.585762in}}%
\pgfpathlineto{\pgfqpoint{5.035065in}{3.585762in}}%
\pgfpathlineto{\pgfqpoint{5.035065in}{3.682985in}}%
\pgfpathlineto{\pgfqpoint{4.757287in}{3.682985in}}%
\pgfpathlineto{\pgfqpoint{4.757287in}{3.585762in}}%
\pgfpathclose%
\pgfusepath{fill}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=5.146176in,y=3.585762in,left,base]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}blue}}%
\end{pgfscope}%
\begin{pgfscope}%
\pgfsetbuttcap%
\pgfsetmiterjoin%
\definecolor{currentfill}{rgb}{1.000000,0.498039,0.054902}%
\pgfsetfillcolor{currentfill}%
\pgfsetlinewidth{0.000000pt}%
\definecolor{currentstroke}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{currentstroke}%
\pgfsetstrokeopacity{0.000000}%
\pgfsetdash{}{0pt}%
\pgfpathmoveto{\pgfqpoint{4.757287in}{3.381905in}}%
\pgfpathlineto{\pgfqpoint{5.035065in}{3.381905in}}%
\pgfpathlineto{\pgfqpoint{5.035065in}{3.479127in}}%
\pgfpathlineto{\pgfqpoint{4.757287in}{3.479127in}}%
\pgfpathlineto{\pgfqpoint{4.757287in}{3.381905in}}%
\pgfpathclose%
\pgfusepath{fill}%
\end{pgfscope}%
\begin{pgfscope}%
\definecolor{textcolor}{rgb}{0.000000,0.000000,0.000000}%
\pgfsetstrokecolor{textcolor}%
\pgfsetfillcolor{textcolor}%
\pgftext[x=5.146176in,y=3.381905in,left,base]{\color{textcolor}{\sffamily\fontsize{10.000000}{12.000000}\selectfont\catcode`\^=\active\def^{\ifmmode\sp\else\^{}\fi}\catcode`\%=\active\def%{\%}orange}}%
\end{pgfscope}%
\end{pgfpicture}%
\makeatother%
\endgroup%
\caption{Bar chart with individual bar colors}
\end{figure}\begin{table}
\centering
\caption{This is a example table}
\label{table:example1}
\begin{tabular}{lSSSSSS}
\toprule
\text{Row1} & \text{Row2} & \text{Row3} & \text{Row4} & \text{Row5} & \text{Row6} & \text{Row7} \\
\midrule
Line1 & 120 & 12 g/km & 5 stars & 3.500000 & 1850 kg & 600 Nm \\
Line2 & 95 km/h & {\textgreater} 150 g/km & 4 stars & 7.800000 & 1500 kg & 250 Nm \\
Line3 & 110 & 110 g/km & 5 stars & 8.500000 & 1400 kg & 280 Nm \\
Line4 & 105 km/h & 1140 g/km & 4.5 stars & 6.900000 & 1600 kg & 320 Nm \\
Line5 & 130 & 13.05 g/km & 5 stars & 4.200000 & 1700 kg & 450 Nm \\
\bottomrule
\end{tabular}
\end{table}

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,5 @@
<h1>Special caracters</h1>
<p>Umlaute: ÖÄÜ öäü</p>
<p>Other: ß, €, @, $, %, ~, µ</p>
<p>Units: m³, cm²</p>
<p>Controll characters: <, >, ", ', &, |, /, \</p>

View File

@ -0,0 +1,39 @@
<h1>Source Equations</h1>
<ol>
<li>$4(3x + 2) - 5(x - 1) = 3x + 14$</li>
<li>$
rac{2y + 5}{4} +
rac{3y - 1}{2} = 5$</li>
<li>$
rac{5}{x + 2} +
rac{2}{x - 2} = 3$</li>
<li>$8(3b - 5) + 4(b + 2) = 60$</li>
<li>$2c^2 - 3c - 5 = 0$</li>
<li>$4(2d - 1) + 5(3d + 2) = 7d + 28$</li>
<li>$q^2 + 6q + 9 = 16$</li>
</ol>
<h1>Result Equations</h1>
<ol>
<li>$x =
rac{1}{4}$</li>
<li>$y =
rac{17}{8}$</li>
<li>$z =
rac{7}{3}$</li>
<li>$x = 1$ or $x = -6$</li>
<li>$a =
rac{1}{3}$ or $a = 2$</li>
<li>$x = -
rac{2}{3}$ or $x = 3$</li>
<li>$b =
rac{23}{7}$</li>
</ol>
<h1>Step by Step</h1>
<ol>
<li>Distribute: $12x + 8 - 5x + 5 = 3x + 14$</li>
<li>Combine like terms: $7x + 13 = 3x + 14$</li>
<li>Subtract $3x$: $4x + 13 = 14$</li>
<li>Subtract $13$: $4x = 1$</li>
<li>Divide by $4$: $x =
rac{1}{4}$</li>
</ol>

View File

@ -0,0 +1,44 @@
<p>Below is an in-depth explanation of the AArch64 (ARM64)
unconditional branch instruction—often simply called the
“B” instruction—and how its 26bit immediate field (imm26)
is laid out and later relocated during linking.</p>
<hr>
<h2>Instruction Layout</h2>
<p>The unconditional branch in AArch64 is encoded in a 32bit
instruction. Its layout is as follows:</p>
<pre><code>Bits: 31 26 25 0
+-------------+------------------------------+
| Opcode | imm26 |
+-------------+------------------------------+
</code></pre>
<ul>
<li><strong>Opcode (bits 31:26):</strong></li>
<li>For a plain branch (<code>B</code>), the opcode is <code>000101</code>.</li>
<li>
<p>For a branch with link (<code>BL</code>), which saves the return
address (i.e., a call), the opcode is <code>100101</code>.
These 6 bits determine the instruction type.</p>
</li>
<li>
<p><strong>Immediate Field (imm26, bits 25:0):</strong></p>
</li>
<li>This 26bit field holds a signed immediate value.</li>
<li>
<p><strong>Offset Calculation:</strong> At runtime, the processor:</p>
<ol>
<li><strong>Shifts</strong> the 26bit immediate left by 2 bits.
(Because instructions are 4-byte aligned,
the two least-significant bits are always zero.)</li>
<li><strong>Sign-extends</strong> the resulting 28bit value to
the full register width (typically 64 bits).</li>
<li><strong>Adds</strong> this value to the program counter
(PC) to obtain the branch target.</li>
</ol>
</li>
<li>
<p><strong>Reach:</strong></p>
</li>
<li>With a 26bit signed field thats effectively 28 bits
after the shift, the branch can cover a range
of approximately ±128 MB from the current instruction.</li>
</ul>

View File

@ -0,0 +1,77 @@
<h2>Klemmen</h2>
<table>
<thead>
<tr>
<th style="text-align: right;">Anz.</th>
<th>Typ</th>
<th>Beschreibung</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: right;">12</td>
<td>BK9050</td>
<td>Buskoppler</td>
</tr>
<tr>
<td style="text-align: right;">2</td>
<td>KL1104</td>
<td>4 Digitaleingänge</td>
</tr>
<tr>
<td style="text-align: right;">2</td>
<td>KL2404</td>
<td>4 Digitalausgänge (0,5 A)</td>
</tr>
<tr>
<td style="text-align: right;">3</td>
<td>KL2424</td>
<td>4 Digitalausgänge (2 A)</td>
</tr>
<tr>
<td style="text-align: right;">2</td>
<td>KL4004</td>
<td>4 Analogausgänge</td>
</tr>
<tr>
<td style="text-align: right;">1</td>
<td>KL4002</td>
<td>2 Analogausgänge</td>
</tr>
<tr>
<td style="text-align: right;">22</td>
<td>KL9188</td>
<td>Potenzialverteilungsklemme</td>
</tr>
<tr>
<td style="text-align: right;">1</td>
<td>KL9100</td>
<td>Potenzialeinspeiseklemme</td>
</tr>
<tr>
<td style="text-align: right;">3</td>
<td>KL3054</td>
<td>4 Analogeingänge</td>
</tr>
<tr>
<td style="text-align: right;">5</td>
<td>KL3214</td>
<td>PT100 4 Temperatureingänge (3-Leiter)</td>
</tr>
<tr>
<td style="text-align: right;">3</td>
<td>KL3202</td>
<td>PT100 2 Temperatureingänge (3-Leiter)</td>
</tr>
<tr>
<td style="text-align: right;">1</td>
<td>KL2404</td>
<td>4 Digitalausgänge</td>
</tr>
<tr>
<td style="text-align: right;">2</td>
<td>KL9010</td>
<td>Endklemme</td>
</tr>
</tbody>
</table>

View File

@ -158,7 +158,7 @@ def test_html_render():
if WRITE_RESULT_FILES:
with open('tests/out/test_html_render1.html', 'w', encoding='utf-8') as f:
f.write(pyladoc.inject_to_template({'CONTENT': html_code}, internal_template='templates/test_template.html'))
f.write(pyladoc.inject_to_template(html_code, internal_template='templates/test_template.html'))
def test_latex_render():
@ -168,9 +168,7 @@ def test_latex_render():
with open('tests/out/test_html_render1.tex', 'w', encoding='utf-8') as f:
f.write(doc.to_latex())
assert doc.to_pdf('tests/out/test_latex_render1.pdf', font_family='serif')
else:
assert doc.to_pdf('', font_family='serif') # Write only to temp folder
assert doc.to_pdf('tests/out/test_latex_render1.pdf', font_family='serif')
if __name__ == '__main__':

View File

@ -71,23 +71,16 @@ def make_document():
mydataset = {
'Row1': ["Line1", "Line2", "Line3", "Line4", "Line5"],
'Row2': [120, '95 km/h', 110, '105 km/h', 130],
'Row3': ['12 g/km', '> 150 g/km', '-110 g/km', '1140 g/km', '\u221213.05 g/km'],
'Row3': ['12 g/km', '> 150 g/km', '110 g/km', '1140 g/km', '13.05 g/km'],
'Row4': ['5 stars', '4 stars', '5 stars', '4.5 stars', '5 stars'],
'Row5': [3.5, 7.8, 8.5, 6.9, 4.2],
'Row6': ['1850 kg', '150 kg', '140 kg', '1600 kg', '17.55 kg'],
'Row7': ['600 Nm', '250 Nm', '280,8 Nm', '320 Nm', '450 Nm']
'Row6': ['1850 kg', '1500 kg', '1400 kg', '1600 kg', '1700 kg'],
'Row7': ['600 Nm', '250 Nm', '280 Nm', '320 Nm', '450 Nm']
}
df = pd.DataFrame(mydataset)
doc.add_table(df.style.hide(axis="index"), 'This is a example table', 'example1')
doc.add_text("This is a fine print test text section. It uses smaller text and uses grey color. This is a fine print test"
"text section. It uses smaller text and uses grey color.", section_class='fineprint')
doc.add_text("Standard text section. This is normal text without any special formatting. It uses the default text size and color.")
doc.add_markdown("This is a **fine print** test text section. It uses **smaller text** and uses **grey** color.", section_class='fineprint')
return doc
@ -99,23 +92,17 @@ def test_html_render():
if WRITE_RESULT_FILES:
with open('tests/out/test_html_render2.html', 'w', encoding='utf-8') as f:
f.write(pyladoc.inject_to_template({'CONTENT': html_code}, internal_template='templates/test_template.html'))
f.write(pyladoc.inject_to_template(html_code, internal_template='templates/test_template.html'))
def test_latex_render():
doc = make_document()
latex_code = doc.to_latex()
assert r'\begin{tabular}{lSSSSSS}' in latex_code, "Table format not correct in LaTeX output"
if WRITE_RESULT_FILES:
with open('tests/out/test_html_render2.tex', 'w', encoding='utf-8') as f:
f.write(latex_code)
f.write(doc.to_latex())
assert doc.to_pdf('tests/out/test_latex_render2.pdf', font_family='serif')
else:
assert doc.to_pdf('', font_family='serif') # Write only to temp folder
assert doc.to_pdf('tests/out/test_latex_render2.pdf', font_family='serif')
if __name__ == '__main__':

View File

@ -1,86 +0,0 @@
import pyladoc
def test_inject_to_template_html():
template = """
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><!--TITLE--></title>
</head>
<!-- some comment -->
<body>
<!--CONTENT-->
</body>
</html>
"""
content = "Hello, World!"
title = "Test Title"
result = pyladoc.inject_to_template({'CONTENT': content, 'TITLE': title}, template_string=template)
print(result)
assert "Hello, World!" in result
assert "<!-- some comment -->" in result # Keep unrelated HTML comments
assert "<title>Test Title</title>" in result
def test_inject_to_template_latex():
template = """
\\documentclass[a4paper,12pt]{article}
% Packages
\\usepackage[utf8]{inputenc}
\\usepackage[T1]{fontenc}
\\usepackage{lmodern} % Load Latin Modern font
\\usepackage{graphicx} % For including images
\\usepackage{amsmath} % For mathematical symbols
\\usepackage{amssymb} % For additional symbols
\\usepackage{hyperref} % For hyperlinks
\\usepackage{caption} % For customizing captions
\\usepackage{geometry} % To set margins
\\usepackage{natbib} % For citations
\\usepackage{float} % For fixing figure positions
\\usepackage{siunitx} % For scientific units
\\usepackage{booktabs} % For professional-looking tables
\\usepackage{pgf} % For using pgf grafics
\\usepackage{textcomp, gensymb} % provides \\degree symbol
\\sisetup{
table-align-text-post = false
}
% Geometry Settings
\\geometry{margin=1in} % 1-inch margins
% Title and Author Information
\\title{<!--PROJECT-->}
<!--AUTHOR-->
\\date{\\today}
\begin{document}
% Title Page
\\maketitle
% <!--CONTENT-->
\\end{document}
"""
content = "Hello, World!"
project_name = "Test Project"
author_name = "Otto"
result = pyladoc.inject_to_template(
{'CONTENT': content, 'PROJECT': project_name, 'AUTHOR': author_name},
template_string=template)
print(result)
assert "\nOtto\n" in result
assert "\\title{Test Project}\n" in result
assert "Hello, World!" in result