Commit 0b23c96f authored by Alija Sabic's avatar Alija Sabic
Browse files

Add dynamic targets to Makefile, externalize content via standalone (build of...

Add dynamic targets to Makefile, externalize content via standalone (build of single files (standalone) and main file (subfile) functioning, but no chapter (subfile)
parent 94b5f34e
# Ignore
*/**/build
build/*
# Allow
!build/*.pdf
......@@ -15,4 +15,4 @@ $pdflatex = 'pdflatex %O -interaction=nonstopmode -synctex=1 -file-line-error %S
$pdf_previewer = $ENV{'VIEWER'};
# push @generated_exts, 'lol', 'synctex.gz';
push @generated_exts, 'blg', 'fls', 'lol', 'cut', 'nav', 'snm', 'vrb', 'synctex.gz';
\ No newline at end of file
push @generated_exts, 'blg', 'fls', 'lol', 'cut', 'nav', 'snm', 'sta', 'vrb', 'synctex.gz';
\ No newline at end of file
......@@ -2,28 +2,30 @@ BASENAME = demo
BUILDDIR = build
# Environment
TEXDIRS = resources/tex:resources/latex-sty:resources/listings:resources/latex:resources/images:resources/tables:resources/latex
TEXDIRS = resources/tex:resources/latex-sty:resources/listings:resources/latex:resources/images:resources/tables:resources/latex:resources/figures
BIBDIRS = resources/latex/
BSTDIR = resources/latex-bst/
BSTDIR = resources/latex-bst/
# cf. latexmkrc
LATEXMKS = export TARGET=$(basename $(notdir $1)).pdf && $(call LATEXMK, $(basename $1)$2)
LATEXMK = latexmk $1
VIEWER = xdg-open
LATEXMK = latexmk $1
VIEWER = xdg-open
# main targets
all: $(BASENAME).build
pv: $(BASENAME).pv
pvc: $(BASENAME).pvc
view: $(BASENAME).view
preview: $(BASENAME).preview
clean: $(BASENAME).clean
distclean: $(BASENAME).distclean
# dynamic targets
%.build:
$(call LATEXMKS, $@, )
%.pv:
%.view:
$(call LATEXMKS, $@, -pv)
%.pvc:
%.preview:
$(call LATEXMKS, $@, -pvc)
%.clean:
......
No preview for this file type
\documentclass[a4paper,11pt]{book}
% ----------------------------------------------------------------------------------------------------------------------------
% Document Setup
% ----------------------------------------------------------------------------------------------------------------------------
\usepackage[subpreambles,sort]{standalone}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% ----------------------------------------------------------------------------------------------------------------------------
......@@ -49,7 +55,7 @@
\usepackage{graphicx}
\usepackage{textcomp}
% \usepackage{hyperref}
\usepackage{standalone}
% \usepackage{adjustbox}
\usepackage[graphicx]{realboxes}
......@@ -73,6 +79,8 @@
% Document
% ----------------------------------------------------------------------------------------------------------------------------
\begin{document}
\def\biblio{}
\def\bibliolist{}
% Add acronyms used in images or not used at all by adding to the list
\acuse{FHTW,FG,SI}
......
\documentclass[tikz, border=10pt]{standalone}
\usetikzlibrary{arrows}
\usetikzlibrary{shapes}
% \usetikzlibrary{arrows}
% \usetikzlibrary{shapes}
\begin{document}
\tikzstyle{block} = [draw, fill=blue!20, rectangle, minimum height=3em, minimum width=6em]
......@@ -30,4 +32,5 @@
\draw [->] (y) |- (measurements);
\draw [->] (measurements) -| node[pos=0.99] {$-$} node [near end] {$y_m$} (sum);
\end{tikzpicture}
\end{document}
\ No newline at end of file
% Author: Marek Fiser <tikz at marekfiser.cz>
% MESIF protocol: http://en.wikipedia.org/wiki/MESIF_protocol
\documentclass[tikz, border=10pt]{standalone}
\usetikzlibrary{arrows}
% \usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3cm,
thick,main node/.style={circle,fill=blue!20,draw,
font=\sffamily\Large\bfseries,minimum size=15mm}]
\node[main node] (M) {M};
\node[main node] (E) [below of=M] {E};
\node[main node] (S) [below of=E] {S};
\node[main node] (F) [below of=S] {F};
\node[main node] (I) [below of=F] {I};
\path[every node/.style={font=\sffamily\small,
fill=white,inner sep=1pt}]
% Right-hand-side arrows rendered from top to bottom to
......@@ -28,7 +25,6 @@
edge [loop right] node[right=1mm] {BusRd/-} (S)
edge [bend left=40] node[right=1mm] {BusRdX/Flush} (I)
(F) edge [bend left=30] node[right=1mm] {BusRdX/Flush} (I)
% Left-hand-side arrows rendered from bottom to top to
% achieve proper rendering of labels over arrows.
(I) edge [bend left=65] node[left=1mm] {PrWr/BusRdX} (M)
......
......@@ -23,7 +23,23 @@
\newcommand{\biblio}{
\bibliographystyle{./../../resources/latex-bst/IEEEtranSNC}
% \bibliographystyle{./../resources/latex-bst/IEEEtranSNC}
% \bibliographystyle{ksfh_nat}
\bibliography{../resources/latex/references}
\bibliography{references}
}
\newcommand{\bibliolist}{
\biblio{}
\def\acrotitle{List of Acronyms}
\chapter*{\acrotitle}
\printacronyms[heading=none]
\listoffigures
\begingroup
\let\clearpage\relax
\listoftables
\renewcommand{\lstlistlistingname}{List of Listings}
\lstlistoflistings
\endgroup
}
\ No newline at end of file
\documentclass{standalone}
% \usepackage{booktabs,tabu,multirow,multicol,xfrac}
% \usepackage{booktabs}
% \usepackage{tabu}
% \usepackage{multirow}
% \usepackage{multicol}
% \usepackage{xfrac}
% \usepackage[binary-units]{siunitx}
% \sisetup{quotient-mode=fraction,fraction-function=\sfrac,product-units=single,exponent-product=\times}
\begin{document}
......
......@@ -12,4 +12,11 @@
\section{Second}
\blindtext
\blindtext
\blindtext
\blindtext
\blindtext
\blindtext
\end{document}
\ No newline at end of file
\makeatletter \def\input@path{{../}}\makeatother
\documentclass[../demo.tex]{subfiles}
\documentclass[demo.tex]{subfiles}
% \usepackage[class=book]{standalone}
% \usepackage[subpreambles]{standalone}
\begin{document}
......@@ -19,6 +21,7 @@
\end{itemize}
\item Figures (cf. Section \ref{sec:figures})
\item Syntax Highlighting (cf. Section \ref{sec:source code})
\item Tables (cf. Section \ref{sec:tables})
\item and many more.
\end{itemize}
......@@ -88,22 +91,23 @@
\begin{figure}
\centering
\resizebox {0.75\textwidth} {!} {\includestandalone{mesif}}
\resizebox {0.75\textwidth} {!} {\input{mesif}}
% \input{mesif}
\caption{MESIF protocol, \textcopyright~Marek Fiser, marekfiser.cz}
\label{fig:mesif}
\end{figure}
\begin{figure}
\centering
\resizebox {0.65\textwidth} {!} {\includestandalone{timingtable}}
\caption{SR flip-flop timing diagram (provided by the \texttt{timingtable} package)}
\resizebox {0.65\textwidth} {!} {\input{timingtable}}
\caption{SR flip-flop timing diagram}% (provided by the \texttt{timingtable} package)}
\label{fig:timingtable}
\end{figure}
\begin{figure}
\centering
\resizebox {0.75\textwidth} {!} {\includestandalone{control-system}}
% \caption{Control system principle, http://www.texample.net/tikz/examples/control-system-principles/}
\resizebox {0.75\textwidth} {!} {\input{control-system}}
\caption{Control system principle} %, http://www.texample.net/tikz/examples/control-system-principles/}
\label{fig:control-system}
\end{figure}
......@@ -120,18 +124,19 @@
\begin{table}
\centering\scriptsize
\resizebox {\textwidth} {!} {\includestandalone{bandgab}}
\resizebox {\textwidth} {!} {\input{bandgab}}
\caption{The bandgab of some semiconductors.}
\label{tab:table1}
\end{table}
% \begin{adjustbox}{angle=90}
\begin{table}
\centering\scriptsize
\Rotatebox{90}{\resizebox {1.6\textwidth} {!} {\includestandalone{siunits}}}
\caption{\acs{SI} base units}
\label{tab:table2}
\end{table}
% \end{adjustbox}
\begin{table}
\centering\scriptsize
\Rotatebox{90}{\resizebox {1.4\textwidth} {!} {\input{siunits}}}
\caption{\acs{SI} base units}
\label{tab:table2}
\end{table}
% \biblio{}
\bibliolist{}
\end{document}
\ No newline at end of file
......@@ -12,4 +12,11 @@
\section{Second}
\blindtext
\blindtext
\blindtext
\blindtext
\blindtext
\blindtext
\end{document}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment