2
\documentclass{article}
\usepackage{tikz,mathtools}

\begin{document} \Large $\begin{aligned}&=mathbf{(\hspace{1pt}\underline{\phantom{x_{1}}}\hspace{1pt},\hspace{1pt}\underline{\phantom{x_{1}}}\hspace{1pt},\hspace{1pt}\underline{\phantom{x_{1}}}\hspace{1pt}\vspace{-10pt},\hspace{1pt}\ldots\hspace{1pt},\hspace{1pt}\underline{\phantom{x_{1}}}\hspace{1pt})}\\
\end{aligned}$

\end{document}

This outputs:

enter image description here

How can I drop the commas and ldots in line with the underlining?

  • 1
    You could replace the commas by \raisebox{-0.5ex}{,}, say, and you do not need tikz here. – user121799 Feb 3 at 19:11
  • 1
    @Marmot, that was the trick I needed. Yes this is apart of a larger program showing that the number of subsets of a set containing n elements is 2^{n} by mapping each subset to an n-tuple. – MathScholar Feb 3 at 19:16
  • I'd rather raise the lines – egreg Feb 3 at 21:05
2

We can replace the \underline with a \rule

\documentclass{article}
%\usepackage{tikz,mathtools}
\newcommand*{\myrule}{\, \rule{1em}{1pt}\,}
\begin{document} \Large 

$=(\myrule ,\myrule ,\ldots,\myrule)$
\end{document}

enter image description here

1

I'd rather raise the lines:

\documentclass{article}
\usepackage{amsmath,mathtools}

\makeatletter
\newcommand{\placeholder}{%
  \mspace{1mu}%
  \begingroup
  \sbox\z@{$\m@th\mspace{16mu}$}%
  \sbox\tw@{$,$}%
  \rule[0.2\ht\tw@]{\wd\z@}{0.6\ht\tw@}%
  \endgroup
  \mspace{1mu}
}
\makeatother
\begin{document}

$(\placeholder,\placeholder,\placeholder,\dots,\placeholder)$

\end{document}

enter image description here

The rules are 60% of the height of the comma and raised 20% thereof, to avoid too big black bands; the total width is 18mu (one em in the symbol font), but the rule itself is 16mu wide to leave 1mu side bearing.

0

Part of the problem may be that the underlining is quite low. If you use a 1pt rule at the text depth, it looks decent to me:

\documentclass{article}
\usepackage{mathtools}

\newlength{\mywidth}
\newlength{\mydepth}

\begin{document}
\Large
\settowidth{\mywidth}{$x_1$}
\settodepth{\mydepth}{$x_1$}

$\begin{aligned}
  &=\mathbf{(\hspace{1pt}\rule[-\mydepth]{\mywidth}{0.5pt}\hspace{1pt},
    \hspace{1pt}\rule[-\mydepth]{\mywidth}{0.5pt}\hspace{1pt},
    \hspace{1pt}\rule[-\mydepth]{\mywidth}{0.5pt}\hspace{1pt},
    \hspace{1pt}\ldots\hspace{1pt},
    \hspace{1pt}\rule[-\mydepth]{\mywidth}{0.5pt}\hspace{1pt})}\\
\end{aligned}$

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.