diff --git a/conf.py b/conf.py --- a/conf.py +++ b/conf.py @@ -235,18 +235,28 @@ # -- Options for LaTeX output ------------------------------------------------ +latex_engine = 'xelatex' latex_elements = { # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', + 'maxlistdepth': '8', + 'figure_align':'ht!', # The font size ('10pt', '11pt' or '12pt'). # # 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. # - # 'preamble': '', + 'preamble': r''' +\usepackage[export]{adjustbox} +\let\oincludegraphics\includegraphics +\renewcommand{\includegraphics}[2][]{ + \oincludegraphics[#1,max width=\linewidth,max height=\textheight]{#2} +} + ''', + 'tableofcontents':'\sphinxtableofcontents', # Latex figure (float) alignment # @@ -260,6 +270,11 @@ (master_doc, 'kritaManual.tex', project, author, 'manual'), ] +latex_show_pagerefs=True +# copy latex scripts to build dir +latex_additional_files = [ + "latexImageMakefile", +] # -- Internationalization Options -------------------------------------------- diff --git a/latexImageMakefile b/latexImageMakefile new file mode 100644 --- /dev/null +++ b/latexImageMakefile @@ -0,0 +1,37 @@ +# Makefile Krita docs latex-imageconvert +# Convert all non standard image formats to latex friendly +# +# Latex can work with svg, but inkscape is needed! +# +WDIR=${PWD} + +SVGCC=inkscape +# image conversion +SIPS=sips +CONVERT=convert + + +SVGToPDF := $(wildcard *.svg) +GIFToPNG := $(wildcard *.gif) +svgConverted := $(SVGToPDF:.svg=.pdf) +gifConverted := $(GIFToPNG:.gif=.png) + +all: $(gifConverted) $(svgConverted) + # Modify paths from original tex file + sed -i -e 's/}\.svg/}\.pdf/g; s/}\.gif/}\.png/g' kritaManual.tex + sed -i -e 's/^LATEXMKOPTS.*$//LATEXMKOPTS=-xelatex -interaction=nonstopmode/' Makefile + # compile TeX file + # xelatex kritaManual.tex -interaction nonstopmode + +%.pdf: %.svg + $(SVGCC) $(WDIR)/$< -z -A $(WDIR)/$@ + +%.png: %.gif +ifeq ($(TERM_PROGRAM),Apple_Terminal) + $(SIPS) -s format png $< --out $@ +else + $(CONVERT) $< -flatten PNG32:$@ +endif + +clean: + rm $(gifConverted) $(svgConverted) diff --git a/reference_manual/dockers/palette_docker.rst b/reference_manual/dockers/palette_docker.rst --- a/reference_manual/dockers/palette_docker.rst +++ b/reference_manual/dockers/palette_docker.rst @@ -30,10 +30,10 @@ .. versionadded:: 4.0 - * Double |mouseleft| a swatch will call up the edit window where you can change the color, the name, the id and whether it's a spot color. On a group this will allow you to set the group name. - * |mouseleft| drag will allow you to drag and drop swatches and groups to order them. - * Pressing the :guilabel:`+` icon will allow you to add a new swatch. - * Pressing the Folder icon will allow you to add a new group. +* Double |mouseleft| a swatch will call up the edit window where you can change the color, the name, the id and whether it's a spot color. On a group this will allow you to set the group name. +* |mouseleft| drag will allow you to drag and drop swatches and groups to order them. +* Pressing the :guilabel:`+` icon will allow you to add a new swatch. +* Pressing the Folder icon will allow you to add a new group. The edit and new color dialogs ask for the following: diff --git a/reference_manual/list_supported_tablets.rst b/reference_manual/list_supported_tablets.rst --- a/reference_manual/list_supported_tablets.rst +++ b/reference_manual/list_supported_tablets.rst @@ -31,6 +31,7 @@ .. list-table:: :header-rows: 1 + :widths: 1 2 1 * - Brand - Model