| 1 |
% metaphor-doc.tex |
| 2 |
\documentclass{article} |
| 3 |
\usepackage[index]{metaphor} |
| 4 |
\usepackage{hyperref} |
| 5 |
\hypersetup{ |
| 6 |
linkcolor=blue, |
| 7 |
urlcolor=blue, |
| 8 |
colorlinks=true |
| 9 |
} |
| 10 |
\usepackage[margin=1in]{geometry} |
| 11 |
\usepackage{listings} |
| 12 |
\lstset{ |
| 13 |
language=[LaTeX]TeX, |
| 14 |
basicstyle=\ttfamily\small, |
| 15 |
% numbers=left, |
| 16 |
% numberstyle=\tiny, |
| 17 |
% stepnumber=1, |
| 18 |
% numbersep=5pt, |
| 19 |
breaklines=true |
| 20 |
} |
| 21 |
|
| 22 |
\title{The \texttt{metaphor} Package} |
| 23 |
\author{Andrew W. Lounsbury, \texttt{[email protected]}} |
| 24 |
\date{v1.0, 2026/03/25} |
| 25 |
|
| 26 |
\begin{document} |
| 27 |
\maketitle |
| 28 |
\tableofcontents |
| 29 |
\bigskip |
| 30 |
|
| 31 |
\section{Introduction} |
| 32 |
This package is licensed with \href{https://ctan.org/license/lppl1.3c}{LPPL 1.3c}, and provides commands that typeset conceptual metaphors and their mappings. |
| 33 |
|
| 34 |
\section{Dependencies} |
| 35 |
This package requires \href{https://ctan.org/pkg/imakeidx}{imakeidx}, \href{https://ctan.org/pkg/kvoptions}{kvoptions}, and \href{https://ctan.org/pkg/tabularx}{tabularx}. |
| 36 |
|
| 37 |
\section{Package Options} |
| 38 |
\begin{description} |
| 39 |
\item[\texttt{index}] Defines an index named \texttt{metaphors} of all metaphors and metonyms in the document made using the commands in \S\ref{subsec:metaphor} and \S\ref{subsec:metonym}. |
| 40 |
\begin{lstlisting} |
| 41 |
\makeindex[name=metaphors,title=Index of Metaphors and Metonyms] |
| 42 |
\end{lstlisting} |
| 43 |
Print the index with |
| 44 |
\begin{lstlisting} |
| 45 |
\printindex[metaphors] |
| 46 |
\end{lstlisting} |
| 47 |
and add the index to the table of contents with |
| 48 |
\begin{lstlisting} |
| 49 |
\addcontentsline{toc}{<secunit>}{Index of Metaphors and Metonyms} |
| 50 |
\end{lstlisting} |
| 51 |
\item[\texttt{indextitle=<title>}] Sets the title of the Metaphor/Metonymy index. Default: \texttt{Index of Metaphors and Metonyms}. Note that curly braces \{\dots\} are required for index titles with spaces. |
| 52 |
\item[\texttt{borders}] Enables table borders. |
| 53 |
|
| 54 |
Default: |
| 55 |
|
| 56 |
\metaphor{love is a journey}\footnote{\cite[p.~9]{kovecses2010}} |
| 57 |
\begin{metaphormapping}{journey}{love} |
| 58 |
\map{the travelers}{the lovers} |
| 59 |
\map{the vehicle}{the love relationship itself} |
| 60 |
\map{the distance covered}{the progress made} |
| 61 |
\map{the obstacles encountered}{the difficulties experienced} |
| 62 |
\map{decisions about which way to go}{choices about what to do} |
| 63 |
\map{the destination of the journey}{the goal(s) of the relationship} |
| 64 |
\end{metaphormapping} |
| 65 |
with borders: |
| 66 |
|
| 67 |
\makeatletter |
| 68 |
\metaphor@borderstrue |
| 69 |
\makeatother |
| 70 |
\metaphor{love is a journey} |
| 71 |
\begin{metaphormapping}{journey}{love} |
| 72 |
\map{the travelers}{the lovers} |
| 73 |
\map{the vehicle}{the love relationship itself} |
| 74 |
\map{the distance covered}{the progress made} |
| 75 |
\map{the obstacles encountered}{the difficulties experienced} |
| 76 |
\map{decisions about which way to go}{choices about what to do} |
| 77 |
\map{the destination of the journey}{the goal(s) of the relationship} |
| 78 |
\end{metaphormapping} |
| 79 |
|
| 80 |
\item[\texttt{thickness=<length>}] Sets border thickness. Default: \texttt{0.4pt} |
| 81 |
|
| 82 |
Example: \texttt{thickness=1.5pt} |
| 83 |
\makeatletter |
| 84 |
{ |
| 85 |
\renewcommand*\metaphor@thickness{1.5pt} |
| 86 |
|
| 87 |
\metaphor{love is a journey} |
| 88 |
\begin{metaphormapping}{journey}{love} |
| 89 |
\map{the travelers}{the lovers} |
| 90 |
\map{the vehicle}{the love relationship itself} |
| 91 |
\map{the distance covered}{the progress made} |
| 92 |
\map{the obstacles encountered}{the difficulties experienced} |
| 93 |
\map{decisions about which way to go}{choices about what to do} |
| 94 |
\map{the destination of the journey}{the goal(s) of the relationship} |
| 95 |
\end{metaphormapping} |
| 96 |
} |
| 97 |
\makeatletter |
| 98 |
\metaphor@bordersfalse |
| 99 |
\makeatother |
| 100 |
|
| 101 |
\item[\texttt{rowheight=<factor>}] Controls vertical spacing between rows. |
| 102 |
|
| 103 |
Default: \texttt{1.0} |
| 104 |
|
| 105 |
\metaphor{ideas are food}\footnote{\cite[p.~83]{kovecses2010}} |
| 106 |
\begin{metaphormapping}{ideas}{food} |
| 107 |
\map{cooking}{thinking} |
| 108 |
\map{swallowing}{accepting} |
| 109 |
\map{chewing}{considering} |
| 110 |
\map{digesting}{understanding} |
| 111 |
\map{nourishment}{mental well-being} |
| 112 |
\end{metaphormapping} |
| 113 |
\newpage |
| 114 |
Example: \texttt{rowheight=2.0} |
| 115 |
|
| 116 |
\makeatletter |
| 117 |
{ |
| 118 |
\metaphor{ideas are food} |
| 119 |
\renewcommand*\metaphor@rowheight{2.0} |
| 120 |
\begin{metaphormapping}{ideas}{food} |
| 121 |
\map{cooking}{thinking} |
| 122 |
\map{swallowing}{accepting} |
| 123 |
\map{chewing}{considering} |
| 124 |
\map{digesting}{understanding} |
| 125 |
\map{nourishment}{mental well-being} |
| 126 |
\end{metaphormapping} |
| 127 |
} |
| 128 |
\makeatother |
| 129 |
\item[\texttt{small} and \texttt{footnotesize}] Respectively apply the \texttt{\textbackslash{}small} and \texttt{\textbackslash{}footnotesize} font sizes. |
| 130 |
|
| 131 |
Default: |
| 132 |
|
| 133 |
\metaphor{social organizations are plants}\footnote{\cite[p.~10]{kovecses2010}} |
| 134 |
\begin{metaphormapping}{plant}{social organization} |
| 135 |
\map{the whole plant}{the entire organization} |
| 136 |
\map{a part of the plant}{a part of the organization} |
| 137 |
\map{growth of the plant}{development of the organization} |
| 138 |
\map{removing a part of the plant}{reducing the organization} |
| 139 |
\map{the root of the plant}{the origin of the organization} |
| 140 |
\map{the flowering}{the best stage, the most successful stage} |
| 141 |
\map{the fruits or crops}{the beneficial consequences} |
| 142 |
\end{metaphormapping} |
| 143 |
\texttt{small}: |
| 144 |
|
| 145 |
\makeatletter |
| 146 |
\metaphor@smalltrue |
| 147 |
\metaphor{social organizations are plants} |
| 148 |
\begin{metaphormapping}{plant}{social organization} |
| 149 |
\map{the whole plant}{the entire organization} |
| 150 |
\map{a part of the plant}{a part of the organization} |
| 151 |
\map{growth of the plant}{development of the organization} |
| 152 |
\map{removing a part of the plant}{reducing the organization} |
| 153 |
\map{the root of the plant}{the origin of the organization} |
| 154 |
\map{the flowering}{the best stage, the most successful stage} |
| 155 |
\map{the fruits or crops}{the beneficial consequences} |
| 156 |
\end{metaphormapping} |
| 157 |
\metaphor@smallfalse |
| 158 |
\makeatother |
| 159 |
\texttt{footnotesize}: |
| 160 |
|
| 161 |
\makeatletter |
| 162 |
\metaphor@footnotesizetrue |
| 163 |
\metaphor{social organizations are plants} |
| 164 |
\begin{metaphormapping}{plant}{social organization} |
| 165 |
\map{the whole plant}{the entire organization} |
| 166 |
\map{a part of the plant}{a part of the organization} |
| 167 |
\map{growth of the plant}{development of the organization} |
| 168 |
\map{removing a part of the plant}{reducing the organization} |
| 169 |
\map{the root of the plant}{the origin of the organization} |
| 170 |
\map{the flowering}{the best stage, the most successful stage} |
| 171 |
\map{the fruits or crops}{the beneficial consequences} |
| 172 |
\end{metaphormapping} |
| 173 |
\metaphor@footnotesizefalse |
| 174 |
\makeatother |
| 175 |
|
| 176 |
\item[\texttt{xcols}] Converts the table from a \texttt{tabular} environment to a \texttt{tabularx} environment with columns of type \texttt{X} and with a table width of $\langle$\textit{table-width}$\rangle \cdot$\texttt{\textbackslash{}textwidth}: |
| 177 |
|
| 178 |
Default: |
| 179 |
|
| 180 |
\metaphor{a target is a source} |
| 181 |
\begin{metaphormapping}[0.5]{source}{target} |
| 182 |
\map{Lorem ipsum dolor sit amet, consectetur adipiscing elit.}{Lorem ipsum dolor sit amet, consectetur adipiscing elit.} |
| 183 |
\end{metaphormapping} |
| 184 |
\begin{lstlisting} |
| 185 |
\documentclass{article} |
| 186 |
\usepackage[xcols]{metaphor} |
| 187 |
|
| 188 |
\begin{document} |
| 189 |
\metaphor{a target is a source} |
| 190 |
\begin{metaphormapping}[<table-width>]{source}{target} |
| 191 |
\map{Lorem ipsum dolor sit amet, consectetur adipiscing elit.}{Lorem ipsum dolor sit amet, consectetur adipiscing elit.} |
| 192 |
\end{metaphormapping} |
| 193 |
\end{document} |
| 194 |
\end{lstlisting} |
| 195 |
Example: \texttt{table-width=0.5} |
| 196 |
|
| 197 |
\metaphor{a target is a source} |
| 198 |
\makeatletter |
| 199 |
\metaphor@xcolstrue |
| 200 |
\begin{metaphormapping}[0.5]{source}{target} |
| 201 |
\map{Lorem ipsum dolor sit amet, consectetur adipiscing elit.}{Lorem ipsum dolor sit amet, consectetur adipiscing elit.} |
| 202 |
\end{metaphormapping} |
| 203 |
\metaphor@xcolsfalse |
| 204 |
\makeatother |
| 205 |
\end{description} |
| 206 |
|
| 207 |
\section{Commands and Environments} |
| 208 |
\subsection{The \texttt{metaphor} command} \label{subsec:metaphor} |
| 209 |
\begin{lstlisting} |
| 210 |
\NewDocumentCommand{\metaphor}{m}{% |
| 211 |
\ifmetaphor@index |
| 212 |
\index[metaphors]{\textsc{#1}}% |
| 213 |
\textsc{#1} |
| 214 |
\else |
| 215 |
\textsc{#1} |
| 216 |
\fi |
| 217 |
} |
| 218 |
\end{lstlisting} |
| 219 |
Example: \metaphor{time is money} |
| 220 |
|
| 221 |
\subsection{The \texttt{metonym} command} \label{subsec:metonym} |
| 222 |
\begin{lstlisting} |
| 223 |
\NewDocumentCommand{\metonym}{m}{% |
| 224 |
\ifmetaphor@index |
| 225 |
\index[metaphors]{\textsc{#1}}% |
| 226 |
\textsc{#1} |
| 227 |
\else |
| 228 |
\textsc{#1} |
| 229 |
\fi |
| 230 |
} |
| 231 |
\end{lstlisting} |
| 232 |
Example: \metonym{a part for the whole} |
| 233 |
|
| 234 |
\subsection{The \texttt{metaphormapping} environment and the \texttt{map} command} |
| 235 |
\begin{lstlisting} |
| 236 |
\documentclass{article} |
| 237 |
\usepackage{metaphor} |
| 238 |
|
| 239 |
\begin{document} |
| 240 |
\metaphor{a target is a source} |
| 241 |
\begin{metaphormapping}{source}{target} |
| 242 |
\map{hello world}{lorem ipsum dolor sit amet} |
| 243 |
\end{metaphormapping} |
| 244 |
\end{document} |
| 245 |
\end{lstlisting} |
| 246 |
\metaphor{a target is a source} |
| 247 |
\begin{metaphormapping}{source}{target} |
| 248 |
\map{hello world}{lorem ipsum dolor sit amet} |
| 249 |
\end{metaphormapping} |
| 250 |
|
| 251 |
\begin{lstlisting} |
| 252 |
\documentclass{article} |
| 253 |
\usepackage{metaphor} |
| 254 |
|
| 255 |
\begin{document} |
| 256 |
\metaphor{anger is a hot fluid in a container} |
| 257 |
\begin{metaphormapping} |
| 258 |
{hot fluid in a container}{anger} |
| 259 |
\map{the physical container}{the angry person's body} |
| 260 |
\map{the top of the container}{the rational self of the angry person} |
| 261 |
\map{the hot fluid inside the container}{the anger} |
| 262 |
\map{the degree of fluid heat}{the intensity of anger} |
| 263 |
\map{the cause of increase in fluid heat}{the cause of anger} |
| 264 |
\end{metaphormapping} |
| 265 |
\end{document} |
| 266 |
\end{lstlisting} |
| 267 |
\metaphor{anger is a hot fluid in a container}\footnote{\cite[p.~123]{kovecses2010}} |
| 268 |
\begin{metaphormapping}{hot fluid in a container}{anger} |
| 269 |
\map{the physical container}{the angry person's body} |
| 270 |
\map{the top of the container}{the rational self of the angry person} |
| 271 |
\map{the hot fluid inside the container}{the anger} |
| 272 |
\map{the degree of fluid heat}{the intensity of anger} |
| 273 |
\map{the cause of increase in fluid heat}{the cause of anger} |
| 274 |
\end{metaphormapping} |
| 275 |
|
| 276 |
\printindex[metaphors] |
| 277 |
\addcontentsline{toc}{section}{Index of Metaphors and Metonyms} |
| 278 |
|
| 279 |
\begin{thebibliography}{9} |
| 280 |
\bibitem{kovecses2010} |
| 281 |
Zolt\'an K\"ovecses, |
| 282 |
\textit{Metaphor: A Practical Introduction}, |
| 283 |
Oxford University Press, 2010. |
| 284 |
\end{thebibliography} |
| 285 |
\end{document} |