From 348f8b4b4918415472ad9ebecf0376fb3ea108e1 Mon Sep 17 00:00:00 2001 From: Erwan Normand Date: Tue, 24 Sep 2024 11:27:56 +0200 Subject: [PATCH] Add \figwide, \tabwide --- config/content.tex | 1 + config/thesis_commands.tex | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/config/content.tex b/config/content.tex index ee178b3..75906ec 100644 --- a/config/content.tex +++ b/config/content.tex @@ -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 diff --git a/config/thesis_commands.tex b/config/thesis_commands.tex index 5445d66..e5d0020 100644 --- a/config/thesis_commands.tex +++ b/config/thesis_commands.tex @@ -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}% +}