0

See this answer: https://tex.stackexchange.com/a/304506/215887.

I wanted to use the following command in the answer:

\newcommand{\?}{%
  \makebox[0pt][l]{%
    \sbox0{.}\sbox2{?}%
    \hspace{-.1\wd2}%
    \raisebox{1.1\ht0}[0pt]{%
      \clipbox*{{-.1\wd2} {1.1\ht0} {1.1\width} {1.1\height}}{?}%
    }%
  }%
  \phantom{?}%
}

in the following standalone document:

\documentclass[preview, varwidth, border=1cm]{standalone}

\usepackage{trimclip} \newcommand{\dotlessque}{% \makebox[0pt][l]{% \sbox0{.}\sbox2{?}% \hspace{-.1\wd2}% \raisebox{1.1\ht0}[0pt]{% \clipbox*{{-.1\wd2} {1.1\ht0} {1.1\width} {1.1\height}}{?}% }% }% \phantom{?}% }

\begin{document} \dotlessque \end{document}

The code works in an article document, but it only renders whitespace in the above standalone document. How to make it work in a standalone document?

oneofvalts
  • 67
  • 8

1 Answers1

2

I confirm your observation, while this one does work:

result

%\documentclass[preview, varwidth, border=1cm]{standalone}
\documentclass[ border=1cm]{standalone}

\usepackage{trimclip} \newcommand{\dotlessque}{% \makebox[0pt][l]{% \sbox0{.}\sbox2{?}% \hspace{-.1\wd2}% \raisebox{1.1\ht0}[0pt]{% \clipbox*{{-.1\wd2} {1.1\ht0} {1.1\width} {1.1\height}}{?}% }% }% \phantom{?}% }

\begin{document} \dotlessque \end{document}

MS-SPO
  • 11,519
  • 1
    Oh that was easy (: Yes, I've never thought options would be the cause. It seems also the case that preview option is innocent, varwidth is the problem. Though, I now realize my document desperately needs varwidth option. – oneofvalts Feb 26 '23 at 15:09