# autolatex - svg2pdf+layers+tex_inkscape.transdef2 # -*- coding: utf-8 -*- # # Copyright (C) 1998-2026 Stephane Galland # # This program is free library; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; see the file COPYING. If not, # write to the Free Software Foundation, Inc., 59 Temple Place - Suite # 330, Boston, MA 02111-1307, USA. --- input_extensions: - '.svglt' - '.svg_lt' - '.svglayerstex' - '.svgtexlayers' - '.svg+layers+tex' - '.svg+tex+layers' - '.layers.tex.svg' - '.tex.layers.svg' - '+layers+tex.svg' - '+tex+layers.svg' - '.svgzlt' - '.svgz_lt' - '.svgzlayerstex' - '.svgztexlayers' - '.svgz+layers+tex' - '.svgz+tex+layers' - '.layers.tex.svgz' - '.tex.layers.svgz' - '+layers+tex.svgz' - '+tex+layers.svgz' output_extensions for pdf: - .pdftex_t output_extensions for eps: - .pstex_t all_output_files: - ${outwoext}.pdftex_t - ${outwoext}.pstex_t - ${outwoext}_*.pdf - ${outwoext}_*.eps - ${outwoext}_*.pdf_tex - ${outwoext}_*.ps_tex translator_python_dependencies: - from autolatex2.translators.svg.svgutils import SvgUtils translator_function: | if _pdfmode: opt = '--export-type=pdf' else: opt = '--export-type=eps' SvgUtils.create_pdftex_for_layered_svg( _in, _out, _outwoext, _outdir, _outexts, _pdfmode, False, # not TeX mode lambda ink_identifier, ink_svg_file, ink_output_file, opt: \ Runner.run_command( 'inkscape', '--export-id', ink_identifier, '--export-id-only', '--export-area-page', opt, '--export-filename=' + ink_output_file, '--export-latex', "--file=" + ink_svg_file), opt) ...