mkdoc adapted

This commit is contained in:
Dirk Alders 2020-02-04 14:52:47 +01:00
parent 5dfda18440
commit c2056035dc
6 changed files with 64 additions and 41 deletions

17
.project Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>bin</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>

5
.pydevproject Normal file
View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python interpreter</pydev_property>
</pydev_project>

View File

@ -2,7 +2,6 @@
\usepackage[utf8]{inputenc} \usepackage[utf8]{inputenc}
\usepackage{eso-pic} %% AddtoShipPicture nutzen \usepackage{eso-pic} %% AddtoShipPicture nutzen
\usepackage{url}
\usepackage{eurosym} \usepackage{eurosym}
\usepackage{booktabs} \usepackage{booktabs}
\usepackage{xcolor} \usepackage{xcolor}
@ -63,7 +62,7 @@
% } % }
%\Verteiler { %\Verteiler {
% } % }
%\MeinZeichen {\tiny\url{\VAR{full_folder}}} %\MeinZeichen {\small{\VAR{filename}}}
%\IhrZeichen {Zeichen} %\IhrZeichen {Zeichen}
%\IhrSchreiben {dd.mm.yyyy} %\IhrSchreiben {dd.mm.yyyy}
@ -73,7 +72,7 @@
\begin{document} \begin{document}
\ClearShipoutPicture \ClearShipoutPicture
\AddToShipoutPicture{\put(50,40){\tiny\url{\VAR{full_folder}}}} %\AddToShipoutPicture{\put(50,40){\tiny{\tt \VAR{full_folder}}}}
\begin{g-brief} \begin{g-brief}
Brieftext. Brieftext.

View File

@ -14,7 +14,6 @@
\usepackage{graphicx} \usepackage{graphicx}
\usepackage{longtable} %lange Tabellen über mehrere Seiten erstellen \usepackage{longtable} %lange Tabellen über mehrere Seiten erstellen
\usepackage{lastpage} \usepackage{lastpage}
\usepackage{url}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Selbst definierte Style-Dateien % Selbst definierte Style-Dateien
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -25,11 +24,11 @@
\renewcommand{\headrulewidth}{0.0pt} \renewcommand{\headrulewidth}{0.0pt}
\renewcommand{\footrulewidth}{0.0pt} \renewcommand{\footrulewidth}{0.0pt}
\thicklines \thicklines
\put(60,52){\framebox(480,735){}} \put(50,42){\framebox(500,755){}}
\put(49,76){\rotatebox{90}{\makebox(100,7)[l]{\scriptsize\url{\VAR{full_path}}}}} \put(39,66){\rotatebox{90}{\makebox(100,7)[l]{\scriptsize{\tt \VAR{full_folder}}}}}
\put(545,104){\rotatebox{90}{\makebox(100,22)[l]{\bfseries #1\,(\thepage/\,\pageref{LastPage})}}} \put(555,94){\rotatebox{90}{\makebox(100,22)[l]{\bfseries #1\,(\thepage/\,\pageref{LastPage})}}}
\put(545,76){\includegraphics[height=20pt]{icons/#2}} \put(555,66){\includegraphics[height=20pt]{icons/#2}}
\put(75,40){\makebox(100,7)[l]{\scriptsize \today }} \put(65,30){\makebox(100,7)[l]{\scriptsize \today }}
} }
} }
{ {
@ -62,6 +61,7 @@
\setlength{\oddsidemargin}{2.35cm} \addtolength{\oddsidemargin}{-1in} \setlength{\oddsidemargin}{2.35cm} \addtolength{\oddsidemargin}{-1in}
\setlength{\evensidemargin}{2.35cm} \addtolength{\evensidemargin}{-1in} \setlength{\evensidemargin}{2.35cm} \addtolength{\evensidemargin}{-1in}
\addtolength{\topmargin}{1.1cm} \addtolength{\topmargin}{1.1cm}
\setlength{\parskip}{0,75em}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Überschriftformatierung % Überschriftformatierung

View File

@ -141,33 +141,33 @@ Sascha Frank & Course serial \\
\end{columns} \end{columns}
} }
\subsection{Pictures} %\subsection{Pictures}
\frame{\frametitle{pictures in latex beamer class} %\frame{\frametitle{pictures in latex beamer class}
\begin{figure} %\begin{figure}
\includegraphics[scale=0.5]{PIC1} %\includegraphics[scale=0.5]{PIC1}
\caption{show an example picture} %\caption{show an example picture}
\end{figure}} %\end{figure}}
%
\subsection{joining picture and lists} %\subsection{joining picture and lists}
%
\frame{ %\frame{
\frametitle{pictures and lists in beamer class} %\frametitle{pictures and lists in beamer class}
\begin{columns} %\begin{columns}
\begin{column}{5cm} %\begin{column}{5cm}
\begin{itemize} %\begin{itemize}
\item<1-> subject 1 %\item<1-> subject 1
\item<3-> subject 2 %\item<3-> subject 2
\item<5-> subject 3 %\item<5-> subject 3
\end{itemize} %\end{itemize}
\vspace{3cm} %\vspace{3cm}
\end{column} %\end{column}
\begin{column}{5cm} %\begin{column}{5cm}
\begin{overprint} %\begin{overprint}
\includegraphics<2>{PIC1} %\includegraphics<2>{PIC1}
\includegraphics<4>{PIC2} %\includegraphics<4>{PIC2}
\includegraphics<6>{PIC3} %\includegraphics<6>{PIC3}
\end{overprint} %\end{overprint}
\end{column} %\end{column}
\end{columns}} %\end{columns}}
\end{document} \end{document}

10
mkdoc
View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
# -*- coding: UTF-8 -*- # -*- coding: UTF-8 -*-
import jinja2 import jinja2
@ -8,8 +8,8 @@ import shutil
import time import time
TYPES = [u'brief', u'merkblatt', u'präsentation'] TYPES = ['brief', 'merkblatt', 'präsentation']
TARGET_EXTENTION = u'.tex' TARGET_EXTENTION = '.tex'
def mkdir(path): def mkdir(path):
@ -32,6 +32,7 @@ def get_path_replace_list():
full_path = os.path.join(home_path, p) full_path = os.path.join(home_path, p)
if os.path.islink(full_path): if os.path.islink(full_path):
rv.append( (os.path.realpath(full_path), os.path.join(HOME_PATH_REPLACEMENT, p)) ) rv.append( (os.path.realpath(full_path), os.path.join(HOME_PATH_REPLACEMENT, p)) )
rv.sort(reverse=True)
return rv return rv
@ -55,6 +56,7 @@ if __name__ == "__main__":
if full_path.startswith(original): if full_path.startswith(original):
full_path = replacement + full_path[len(original):] full_path = replacement + full_path[len(original):]
break break
full_path = full_path.replace('~', '$\\sim$').replace('_', '\_')
full_folder = os.path.dirname(full_path) full_folder = os.path.dirname(full_path)
filename = os.path.splitext(os.path.basename(target_file))[0] filename = os.path.splitext(os.path.basename(target_file))[0]
short_date = time.strftime('%d.%m.%Y') short_date = time.strftime('%d.%m.%Y')
@ -81,7 +83,7 @@ if __name__ == "__main__":
full_path=full_path, full_path=full_path,
full_folder=full_folder, full_folder=full_folder,
filename=filename, filename=filename,
short_date=short_date).encode('UTF-8')) short_date=short_date))
if options.type == 'merkblatt': if options.type == 'merkblatt':
shutil.copytree(os.path.join(static_path, options.type), os.path.join(os.path.dirname(target_file), 'icons')) shutil.copytree(os.path.join(static_path, options.type), os.path.join(os.path.dirname(target_file), 'icons'))
else: else: