"""
This type stub file was generated by pyright.
"""

import os
import warnings
import sphinx.builders.latex.nodes
from __future__ import annotations
from os import path
from typing import Any, TYPE_CHECKING
from docutils.frontend import OptionParser
from sphinx import addnodes, highlighting, package_dir
from sphinx.builders import Builder
from sphinx.builders.latex.constants import ADDITIONAL_SETTINGS, DEFAULT_SETTINGS, SHORTHANDOFF
from sphinx.builders.latex.theming import Theme, ThemeFactory
from sphinx.builders.latex.util import ExtBabel
from sphinx.config import Config, ENUM
from sphinx.environment.adapters.asset import ImageAdapter
from sphinx.errors import NoUri, SphinxError
from sphinx.locale import _, __
from sphinx.util import logging, texescape
from sphinx.util.console import bold, darkgreen
from sphinx.util.display import progress_message, status_iterator
from sphinx.util.docutils import SphinxFileOutput, new_document
from sphinx.util.fileutil import copy_asset_file
from sphinx.util.i18n import format_date
from sphinx.util.nodes import inline_all_toctrees
from sphinx.util.osutil import SEP, make_filename_from_project
from sphinx.util.template import LaTeXRenderer
from sphinx.writers.latex import LaTeXTranslator, LaTeXWriter
from docutils import nodes
from collections.abc import Iterable
from docutils.nodes import Node
from sphinx.application import Sphinx

"""LaTeX builder."""
if TYPE_CHECKING:
    ...
XINDY_LANG_OPTIONS = ...
XINDY_CYRILLIC_SCRIPTS = ...
logger = ...
class LaTeXBuilder(Builder):
    """
    Builds LaTeX output to create PDF.
    """
    name = ...
    format = ...
    epilog = ...
    if os.name == 'posix':
        ...
    supported_image_types = ...
    supported_remote_images = ...
    default_translator_class = LaTeXTranslator
    def init(self) -> None:
        ...
    
    def get_outdated_docs(self) -> str | list[str]:
        ...
    
    def get_target_uri(self, docname: str, typ: str | None = ...) -> str:
        ...
    
    def get_relative_uri(self, from_: str, to: str, typ: str | None = ...) -> str:
        ...
    
    def init_document_data(self) -> None:
        ...
    
    def init_context(self) -> None:
        ...
    
    def update_context(self) -> None:
        """Update template variables for .tex file just before writing."""
        ...
    
    def init_babel(self) -> None:
        ...
    
    def init_multilingual(self) -> None:
        ...
    
    def write_stylesheet(self) -> None:
        ...
    
    def copy_assets(self) -> None:
        ...
    
    def write(self, *ignored: Any) -> None:
        ...
    
    def get_contentsname(self, indexfile: str) -> str:
        ...
    
    def update_doc_context(self, title: str, author: str, theme: Theme) -> None:
        ...
    
    def assemble_doctree(self, indexfile: str, toctree_only: bool, appendices: list[str]) -> nodes.document:
        ...
    
    def finish(self) -> None:
        ...
    
    @progress_message(__('copying TeX support files'))
    def copy_support_files(self) -> None:
        """copy TeX support files from texinputs."""
        ...
    
    @progress_message(__('copying additional files'))
    def copy_latex_additional_files(self) -> None:
        ...
    
    def copy_image_files(self) -> None:
        ...
    
    def write_message_catalog(self) -> None:
        ...
    


def validate_config_values(app: Sphinx, config: Config) -> None:
    ...

def validate_latex_theme_options(app: Sphinx, config: Config) -> None:
    ...

def install_packages_for_ja(app: Sphinx) -> None:
    """Install packages for Japanese."""
    ...

def default_latex_engine(config: Config) -> str:
    """ Better default latex_engine settings for specific languages. """
    ...

def default_latex_docclass(config: Config) -> dict[str, str]:
    """ Better default latex_docclass settings for specific languages. """
    ...

def default_latex_use_xindy(config: Config) -> bool:
    """ Better default latex_use_xindy settings for specific engines. """
    ...

def default_latex_documents(config: Config) -> list[tuple[str, str, str, str, str]]:
    """ Better default latex_documents settings. """
    ...

def setup(app: Sphinx) -> dict[str, Any]:
    ...

