Last active
May 6, 2022 22:59
-
-
Save kasnder/e03d7f0fb828be371a2d1237ad60f4cd to your computer and use it in GitHub Desktop.
Responsive figures for ACM TAPS submission. UPDATE: While this script theoretically works, the TAPS system is actually not compatible with it (despite it being legitimate Latex code).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%insert before \begin{document} | |
\usepackage{wrapfig} | |
\makeatletter% | |
\newenvironment{responsivefig}[2]{% | |
\if@twocolumn% | |
\begin{figure}% | |
\else% | |
\wrapfigure{#1}{#2}% | |
\fi% | |
}{% | |
\if@twocolumn% | |
\end{figure}% | |
\else% | |
\endwrapfigure% | |
\fi% | |
}% | |
\makeatother |
UPDATE: While this script theoretically works, the TAPS system is actually not compatible with it (despite it being legitimate Latex code).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When submitting academic articles to the Association for Computing Machinery (ACM), one now needs to provide a LaTex document that can be compiled into both single-column HTML and two-column PDF.
This snippet creates a responsive figure that is compatible with both formats. For the HTML, this snippet creates a figure around which the rest of the text flows on the left-hand side, using the
wrapfig
package. For the PDF, this snippet chooses the standardfigure
environment.Integrate with: