mit Python und Latex ein PDF erstellen
ja das stimmt und mit den Kommandos wird dann ein Template geöffnet, mit dem das Dokument dann gefüllt wird.
Aber selbst wenn ich Python den Code änder und den Text manuell eingebe, wird kein pdf erzeugt.
Aber selbst wenn ich Python den Code änder und den Text manuell eingebe, wird kein pdf erzeugt.
Code: Alles auswählen
LATEX_TEMPLATE = string.Template(
r'''$options
\documentclass{$documentclass} % din a4, 11 pt, one-sided,
\begin{document}
\large\textcolor[RGB]{0,147,178}{\textbf{Einnahmen / Ausgaben f"ur Monat August 2018}}\\
\end{document}
'''
)
Das wäre die template.tex. Datei
und das ist noch die dazugehörige .cls Datei
Code: Alles auswählen
\newcommand{\Name}{Test Project}
\newcommand{\Address}{Nowhere
Not-here-steet 45
655589, no-city}
\newcommand{\Notes}{Project good!}
\documentclass{test} % din a4, 11 pt, one-sided,
\begin{document}
\large\textcolor[RGB]{0,147,178}{\textbf{Einnahmen / Ausgaben f"ur Monat August 2018}}\\
\end{document}
Code: Alles auswählen
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{test}
\LoadClass[12pt,a4paper]{article}
\RequirePackage[left=2.5cm,right=2.5cm,top=3.5cm,bottom=3.5cm]{geometry}
\RequirePackage[ngerman]{babel}
\RequirePackage[T1]{fontenc}
\RequirePackage[latin1]{inputenc}
\let\ori@document=\document
\renewcommand{\document}{
\ori@document % Begin document
\Name\\
\Address\\
\Notes\\
\Contact\\
}
\endinput
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6800 64-bit) (preloaded format=pdflatex 2018.8.31) 4 SEP 2018 16:38
entering extended mode
**./.build/template.tex
(.build/template.tex
LaTeX2e <2018-04-01> patch level 5
(test.cls
Document Class: test
("C:\Users\Illgoutz\AppData\Local\Programs\MiKTeX 2.9\tex\latex\base\article.cl
s"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
("C:\Users\Illgoutz\AppData\Local\Programs\MiKTeX 2.9\tex\latex\base\size11.clo
"
File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
("C:\Users\Illgoutz\AppData\Local\Programs\MiKTeX 2.9\tex\latex\geometry\geomet
ry.sty"
Package: geometry 2018/04/16 v5.8 Page Geometry
("C:\Users\Illgoutz\AppData\Local\Programs\MiKTeX 2.9\tex\latex\graphics\keyval
.sty"
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
("C:\Users\Illgoutz\AppData\Local\Programs\MiKTeX 2.9\tex\generic\oberdiek\ifpd
f.sty"
Package: ifpdf 2017/03/15 v3.2 Provides the ifpdf switch
)
("C:\Users\Illgoutz\AppData\Local\Programs\MiKTeX 2.9\tex\generic\oberdiek\ifvt
ex.sty"
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
("C:\Users\Illgoutz\AppData\Local\Programs\MiKTeX 2.9\tex\generic\ifxetex\ifxet
ex.sty"
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count88
\Gm@cntv=\count89
\c@Gm@tempcnt=\count90
\Gm@bindingoffset=\dimen103
\Gm@wd@mp=\dimen104
\Gm@odd@mp=\dimen105
\Gm@even@mp=\dimen106
\Gm@layoutwidth=\dimen107
\Gm@layoutheight=\dimen108
\Gm@layouthoffset=\dimen109
\Gm@layoutvoffset=\dimen110
\Gm@dimlist=\toks15
("C:\Users\Illgoutz\AppData\Local\Programs\MiKTeX 2.9\tex\latex\geometry\geomet
ry.cfg"))
("C:\Users\Illgoutz\AppData\Local\Programs\MiKTeX 2.9\tex\generic\babel\babel.s
ty"
Package: babel 2018/06/05 3.22 The Babel package
("C:\Users\Illgoutz\AppData\Local\Programs\MiKTeX 2.9\tex\generic\babel\switch.
def"
File: switch.def 2018/06/05 3.22 Babel switching mechanism
)
*************************************
* Local config file bblopts.cfg used
*
("C:\Users\Illgoutz\AppData\Local\Programs\MiKTeX 2.9\tex\latex\arabi\bblopts.c
fg"
File: bblopts.cfg 2005/09/08 v0.1 add Arabic and Farsi to "declared" options of
babel
)
("C:\Users\Illgoutz\AppData\Local\Programs\MiKTeX 2.9\tex\latex\babel-german\ng
erman.ldf"
Language: ngerman 2018/03/29 v2.10 German support for babel (post-1996 orthogra
phy)
("C:\Users\Illgoutz\AppData\Local\Programs\MiKTeX 2.9\tex\latex\babel-german\ng
ermanb.ldf"
Language: ngermanb 2018/03/29 v2.10 German support for babel (post-1996 orthogr
aphy)
("C:\Users\Illgoutz\AppData\Local\Programs\MiKTeX 2.9\tex\generic\babel\babel.d
ef"
File: babel.def 2018/06/05 3.22 Babel common definitions
\babel@savecnt=\count91
\U@D=\dimen111
("C:\Users\Illgoutz\AppData\Local\Programs\MiKTeX 2.9\tex\generic\babel\txtbabe
l.def")
\bbl@dirlevel=\count92
)
Package babel Info: Making " an active character on input line 121.
)))
("C:\Users\Illgoutz\AppData\Local\Programs\MiKTeX 2.9\tex\latex\base\fontenc.st
y"
Package: fontenc 2017/04/05 v2.0i Standard LaTeX package
("C:\Users\Illgoutz\AppData\Local\Programs\MiKTeX 2.9\tex\latex\base\t1enc.def"
File: t1enc.def 2017/04/05 v2.0i Standard LaTeX file
LaTeX Font Info: Redeclaring font encoding T1 on input line 48.
))
("C:\Users\Illgoutz\AppData\Local\Programs\MiKTeX 2.9\tex\latex\base\inputenc.s
ty"
Package: inputenc 2018/04/06 v1.3b Input encoding file
\inpenc@prehook=\toks16
\inpenc@posthook=\toks17
("C:\Users\Illgoutz\AppData\Local\Programs\MiKTeX 2.9\tex\latex\base\latin1.def
"
File: latin1.def 2018/04/06 v1.3b Input encoding file
))) (template.aux)
\openout1 = `template.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 9.
LaTeX Font Info: ... okay on input line 9.
LaTeX Font Info: Checking
- __blackjack__
- User
- Beiträge: 13100
- Registriert: Samstag 2. Juni 2018, 10:21
- Wohnort: 127.0.0.1
- Kontaktdaten:
@Georg31: Also ich bekomme da einen Fehler weil '\Contact' nicht definiert ist.
„All religions are the same: religion is basically guilt, with different holidays.” — Cathy Ladman