A bit hacky, but with the dashrule
package and \rotatebox
macro from graphicx
you can achieve something like the following (MWE taken from the other question you linked):
\documentclass[demo]{beamer}
\usepackage{dashrule}
\begin{document}
\begin{columns}[c]
\begin{column}{0.5\textwidth}
\includegraphics<1>[width=0.35\textwidth]{picture.jpg}
\end{column}
\rotatebox{-90}{\hskip-1.8cm\hdashrule[0.2ex]{5cm}{1pt}{3mm}}
\begin{column}{0.50\textwidth}
\hskip10pt
\includegraphics<1>[width=0.35\textwidth]{picture.jpg}
\end{column}
\end{columns}
\end{document}
You need to enclose the \hdashrule
macro into a rotatebox and manually adjust the starting point of the rule after the rotation with a \hskip
.
You can control the dashing factor, thickness, length, etc. of the rule via the \hdashrule
command parameters explained in the package documentation.
TikZ solution
Just for fun, here is a TikZ based alternative solution:
\documentclass[demo]{beamer}
\usepackage{tikz}
\newcommand{\vdashrule}[1]{\tikz[remember picture]\draw[dashed,thick,overlay](current page.north)--+(0,-#1);}
\begin{document}
\begin{columns}[c]
\begin{column}{0.5\textwidth}
\includegraphics<1>[width=0.35\textwidth]{picture.jpg}
\end{column}
\vdashrule{3.5}
\begin{column}{0.50\textwidth}
\hskip10pt
\includegraphics<1>[width=0.35\textwidth]{picture.jpg}
\end{column}
\end{columns}
\end{document}
I just defined a \vdashrule
command that takes advantage of the overlay
and remember picture
TikZ options, which let you anchor the rule to frame borders (or everywhere else in the frame, if you like).
The length of the rule is specified with an argument and the style can be controlled via the TikZ options.
The visual result is pretty much the same as the previous screenshot.
The first thing to try is, of course, reducing the arrow lengths. If all else fails, use \mathclap
that, however, requires ampersand replacement
; or enclose the diagram in an lrbox
.
I'll show all three possibilities.
\documentclass[12pt,a4paper]{article}
\usepackage{mathtools}
\usepackage{tikz-cd}
\newsavebox{\wideeqbox}
\newcommand{\sample}{Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor
in reprehenderit in voluptate.}
\begin{document}
\sample
\[
\mathclap{
\begin{tikzcd}[ampersand replacement=\&]
\bullet \dar \rar \&
\bullet \dar \rar \&
\bullet \dar \rar \&
\bullet \dar \rar \&
\bullet \dar \rar \&
\bullet \dar \rar \&
\bullet \dar \rar \&
\bullet \dar \rar \&
\bullet \dar \rar \&
\bullet \dar \\
\bullet \rar \&
\bullet \rar \&
\bullet \rar \&
\bullet \rar \&
\bullet \rar \&
\bullet \rar \&
\bullet \rar \&
\bullet \rar \&
\bullet \rar \&
\bullet
\end{tikzcd}
}
\]
\sample
\[
\begin{lrbox}{\wideeqbox}
$\begin{tikzcd}
\bullet \dar \rar &
\bullet \dar \rar &
\bullet \dar \rar &
\bullet \dar \rar &
\bullet \dar \rar &
\bullet \dar \rar &
\bullet \dar \rar &
\bullet \dar \rar &
\bullet \dar \rar &
\bullet \dar \\
\bullet \rar &
\bullet \rar &
\bullet \rar &
\bullet \rar &
\bullet \rar &
\bullet \rar &
\bullet \rar &
\bullet \rar &
\bullet \rar &
\bullet
\end{tikzcd}$
\end{lrbox}
\makebox[0pt]{\usebox{\wideeqbox}}
\]
\sample
\[
\begin{tikzcd}[column sep=2em,row sep=1.5em]
\bullet \dar \rar &
\bullet \dar \rar &
\bullet \dar \rar &
\bullet \dar \rar &
\bullet \dar \rar &
\bullet \dar \rar &
\bullet \dar \rar &
\bullet \dar \rar &
\bullet \dar \rar &
\bullet \dar \\
\bullet \rar &
\bullet \rar &
\bullet \rar &
\bullet \rar &
\bullet \rar &
\bullet \rar &
\bullet \rar &
\bullet \rar &
\bullet \rar &
\bullet
\end{tikzcd}
\]
\sample
\end{document}
The lrbox
solution can be packaged into an environment:
\newsavebox{\wideeqbox}
\newenvironment{wideeq}
{\begin{displaymath}\begin{lrbox}{\wideeqbox}$\displaystyle}
{$\end{lrbox}\makebox[0pt]{\usebox{\wideeqbox}}\end{displaymath}}
Then
text
\begin{wideeq}
\begin{tikzcd}
...
\end{tikzcd}
\end{wideeq}
text
will do. Any math mode material can be used.
Best Answer
I introduce (hardwire) the skew into the macro
\pcol@hfil
, where the.8
and.2
values (2 occurrences each) were previously.5
.This "fix" can likewise be accomplished with
xpatch
: