Add \figwide, \tabwide

This commit is contained in:
2024-09-24 11:27:56 +02:00
parent 964681c2ec
commit 348f8b4b49
2 changed files with 20 additions and 0 deletions

View File

@@ -12,6 +12,7 @@
\usepackage{bookmark} % Manage bookmarks
\usepackage{import} % Allow relative paths
\usepackage{pdfpages} % Include PDFs
\usepackage{rotating} % Landscape images and tables
% Formatting
\usepackage[autostyle]{csquotes} % For quotes

View File

@@ -51,6 +51,15 @@
\end{figure}%
}
\RenewDocumentCommand{\figwide}{O{1} O{htbp} m m O{}}{% #1 = width, #2 = position, #3 = filename, #4 = caption, #5 = additional caption
\begin{sidewaysfigure}[#2]
\centering%
\includegraphics[width=#1\linewidth]{#3}%
\caption[#5]{#4#5}%
\label{fig:#3}%
\end{sidewaysfigure}%
}
% example:
% \begin{subfigs}{label}{Fig title}[Subfig titles]
% \subfig{subfig1}%
@@ -93,6 +102,7 @@
labelfont={sf,bf,up}, % sans-serif, bold, upright
}
% Tables
\RenewDocumentEnvironment{tab}{O{htbp} m m O{}}{% #1 = position, #2 = label, #3 = title, #4 = additional caption
\begin{table}[#1]%
\centering%
@@ -101,3 +111,12 @@
}{%
\end{table}%
}
\RenewDocumentEnvironment{tabwide}{O{htbp} m m O{}}{% #1 = position, #2 = label, #3 = title, #4 = additional caption
\begin{sidewaystable}[#1]%
\centering%
\caption{#3#4}%
\label{tab:#2}%
}{%
\end{sidewaystable}%
}