1

Is it possible to do something like this in Latex? enter image description here

COOKIE
  • 111
  • 2

2 Answers2

1

enter image description here

\documentclass[12pt, a4paper]{article}
\begin{document}
I want them on the same row, side by side. 
\vspace{0.5cm}

\begin{minipage}[t]{0.05\textwidth} \line(1,0){50}\ \end{minipage} \hfill \begin{minipage}[t]{0.55\textwidth} \line(1,0){250}\ \end{minipage} \end{document}

EDIT --for bold lines

\documentclass[12pt, a4paper]{article}
\begin{document}
I want them on the same row, side by side. 
\vspace{0.5cm}

\begin{minipage}[t]{0.05\textwidth} \linethickness{2pt}\line(1,0){40}\ \end{minipage} \hfill \begin{minipage}[t]{0.55\textwidth} \linethickness{2pt}\line(1,0){250}\ \end{minipage} \end{document}

enter image description here

Second Method

\documentclass[12pt, a4paper]{article}
\begin{document}

\setlength{\unitlength}{.4in} \begin{picture}(7,5)(0,0) \linethickness{2pt} \put(0,0){\line(1,0){1}} \put(5,0){\line(1,0){10}}

\end{picture} \end{document}

enter image description here

js bibra
  • 21,280
  • Thanks, could you explain how to position the lines. I'm also getting underfull/overflow hbox warning – COOKIE Mar 03 '21 at 01:32
  • the answer was in the context of your one line question -- the warnings can be avoided by experimenting with the length of the line given within the second pair of braces -- if desired you can ask a more detailed new question -- in case the answer meets the requirement predicted in your question you may like to accept the answer – js bibra Mar 03 '21 at 02:02
  • sorry, could I add on to my original question, to make the lines a specific distance apart? – COOKIE Mar 03 '21 at 02:05
  • a new question is desirable to attract a larger audience -- your present question has already been marked for closure – js bibra Mar 03 '21 at 02:06
0

This is, admitedly, more TeX than LaTeX, but:

\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}

\vrule width 1cm height 4pt depth -1pt\hspace*{4cm}\vrule width 6cm height 4pt depth -1pt\relax

% you can play with height and depth for the position with respect % to the baseline and the thickness See the baseline: \vrule width 1cm height 4pt depth -1pt\hspace*{2cm}p\vrule width 5cm height 4pt depth -1pt\relax

See the baseline: \vrule width 1cm height 1pt depth 1pt\hspace*{2cm}p\vrule width 5cm height 1pt depth 1pt\relax \end{document}

enter image description here

Rmano
  • 40,848
  • 3
  • 64
  • 125