Commit 1dc893d5 authored by Alija Sabic's avatar Alija Sabic
Browse files

Add example for crossrefernces, move content to be executed only once to...

Add example for crossrefernces, move content to be executed only once to preamble (acronyms, etc.; note: \input)
parent cfc95a43
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
# latexmkrc # latexmkrc
$builddir = $ENV{'BUILDDIR'}; $builddir = $ENV{'BUILDDIR'};
$depsfile = $ENV{'DEPSFILE'}; $depsfile = $ENV{'DEPSFILE'};
$bibdirs = $ENV{'BIBDIRS'};
$viewer = $ENV{'VIEWER'};
$recorder = 1; $recorder = 1;
$pdf_mode = 1; $pdf_mode = 1;
...@@ -12,9 +14,9 @@ $silence_logfile_warnings = 0; ...@@ -12,9 +14,9 @@ $silence_logfile_warnings = 0;
$use_make_for_missing_files = 1; $use_make_for_missing_files = 1;
$out_dir = $builddir; $out_dir = $builddir;
$deps_file = "$out_dir/$depsfile.deps"; $deps_file = "$out_dir/$depsfile.deps";
@BIBINPUTS = ('.',$ENV{'BIBDIRS'}); @BIBINPUTS = ('.',$bibdirs);
$pdflatex = 'pdflatex %O -interaction=nonstopmode -synctex=1 -file-line-error %S'; $pdflatex = 'pdflatex %O -interaction=nonstopmode -synctex=1 -file-line-error %S';
$pdf_previewer = $ENV{'VIEWER'}; $pdf_previewer = $viewer;
push @generated_exts, 'lol', 'sta', 'synctex.gz'; push @generated_exts, 'lol', 'sta', 'synctex.gz';
\ No newline at end of file
...@@ -16,12 +16,12 @@ VIEWER = xdg-open ...@@ -16,12 +16,12 @@ VIEWER = xdg-open
LATEXMK_COND = @export DEPSFILE=$(notdir $(basename $(TARGET))) && \ LATEXMK_COND = @export DEPSFILE=$(notdir $(basename $(TARGET))) && \
$(if $(strip $(TARGET)), \ $(if $(strip $(TARGET)), \
$(call LATEXMK, $(basename $(TARGET).tex )$1), \ $(call LATEXMK, $(basename $(TARGET).tex )$1), \
$(call LATEXMK, $(BASENAME)$1) \ $(call LATEXMK, $(BASENAME)$1) \
&& echo $(INSTRUCTIONS)) && echo '\e[1A' && echo $(INSTRUCTIONS))
LATEXMK_ERRS = $(if $(strip $1), \ LATEXMK_ERRS = $(if $(strip $1), \
$(call LOG, $(BUILDDIR)/$(basename $1).log), \ $(call LOG, $(BUILDDIR)/$(notdir $(basename $1)).log), \
$(call LOG, $(BUILDDIR)/$(basename $(BASENAME)).log) \ $(call LOG, $(BUILDDIR)/$(basename $(BASENAME)).log) \
) )
......
No preview for this file type
...@@ -62,7 +62,6 @@ ...@@ -62,7 +62,6 @@
% ---------------------------------------------------------------------------------------------------------------------------- % ----------------------------------------------------------------------------------------------------------------------------
% Miscellaneous % Miscellaneous
% ---------------------------------------------------------------------------------------------------------------------------- % ----------------------------------------------------------------------------------------------------------------------------
\RequirePackage{blindtext}
\RequirePackage{fhtw} \RequirePackage{fhtw}
\RequirePackage{graphicx} \RequirePackage{graphicx}
\RequirePackage{textcomp} \RequirePackage{textcomp}
......
\documentclass{standalone} \documentclass{standalone}
\usepackage{booktabs,tabu,multirow,multicol,xfrac} \usepackage{preamble}
\usepackage[binary-units]{siunitx}
\sisetup{quotient-mode=fraction,fraction-function=\sfrac,product-units=single,exponent-product=\times}
\begin{document} \begin{document}
......
\documentclass{standalone} \documentclass{standalone}
\usepackage{booktabs,tabu,multirow,multicol,xfrac} \usepackage{preamble}
\usepackage[binary-units]{siunitx}
\sisetup{quotient-mode=fraction,fraction-function=\sfrac,product-units=single,exponent-product=\times}
\usepackage{acro}
\onlyifstandalone{\input{acronyms}}
\begin{document} \begin{document}
......
\documentclass[class=book,crop=false]{standalone} \documentclass[class=book,crop=false]{standalone}
\usepackage{blindtext}
\usepackage{preamble} \usepackage{preamble}
\usepackage{blindtext}
\onlyifstandalone{
\usepackage{xr}
\externaldocument{chapter02}
}
\begin{document} \begin{document}
\chapter{Introduction} \chapter{Introduction}
Example crossreference to Chapter \ref{ch:content} showing how to crossreference
content between chapters when compiling individually (cf. \texttt{\textbackslash onlyifstandalone\{\}}).
\newline
\blindtext \blindtext
\section{First} \section{First}
......
...@@ -3,10 +3,11 @@ ...@@ -3,10 +3,11 @@
\usepackage[subpreambles,sort]{standalone} \usepackage[subpreambles,sort]{standalone}
\usepackage{preamble} \usepackage{preamble}
\usepackage[graphicx]{realboxes} \usepackage[graphicx]{realboxes}
\usepackage{blindtext}
\begin{document} \begin{document}
\chapter{Content}\label{content} \chapter{Content}\label{ch:content}
This chapter provides examples on This chapter provides examples on
...@@ -152,22 +153,21 @@ ...@@ -152,22 +153,21 @@
\section{Tables}\label{sec:tables} \section{Tables}\label{sec:tables}
See simple table (Table \ref{tab:table1}, and more advanced, rotated example table (Table See simple table (Table \ref{tab:bandgab}, and more advanced, rotated example table (Table
\ref{tab:table2})). \ref{tab:siunits})).
\begin{table} \begin{table}
\centering \centering
% \resizebox {\textwidth} {!} {\input{bandgab}}
\input{bandgab} \input{bandgab}
\caption{The bandgab of some semiconductors.} \caption{The bandgab of some semiconductors.}
\label{tab:table1} \label{tab:bandgab}
\end{table} \end{table}
\begin{table} \begin{table}
\centering \centering
\Rotatebox{90}{\resizebox {1.5\textwidth} {!} {\input{siunits}}} \Rotatebox{90}{\resizebox {1.5\textwidth} {!} {\input{siunits}}}
\caption{\acs{SI} base units} \caption{\acs{SI} base units}
\label{tab:table2} \label{tab:siunits}
\end{table} \end{table}
\cleardoublepage \cleardoublepage
......
\documentclass[class=book,crop=false]{standalone} \documentclass[class=book,crop=false]{standalone}
\usepackage{blindtext}
\usepackage{preamble} \usepackage{preamble}
\usepackage{blindtext}
\begin{document} \begin{document}
......
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