I want to type two strings in mono-spaced font and I want a line that make a subdivision of these two strings without altering how they are without this line.
I know that it is a bit unclear but this is the best that I've done so farbut there are two things that I don't know how to do.
- I want that the distance between the 2nd and the 4th lines (i.e the two strings) to be like the normal line spacing (i.e. the 1st, the 3rd and the 5th lines should have no height)
In order to maintain the distance between characters constant even in case of a line between them I forced a space between letters. The goal should be to have no space between characters even if they have the line between them.
\documentclass[preview]{standalone} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{pmboxdraw} \usepackage{newunicodechar} \newunicodechar{└}{\textSFii} \newunicodechar{─}{\textSFx} \newunicodechar{┐}{\textSFiii} \begin{document} \texttt{~~~~~~~│}\par \texttt{5'\ldots G │ A N T C\ldots 3'}\par \texttt{~~~~~~~└─────┐ }\par \texttt{3'\ldots C T N A │ G\ldots 5'}\par \texttt{~~~~~~~~~~~~~│} \end{document}
The solution could be with TikZ. The only requirement is that it should works with PDFLaTeX.
Edit 1:
This is the code after I followed the answer from Percusse but there is a problem with \ldots
.
\documentclass[tikz]{standalone}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\foreach \x[count=\xi] in {5',\ldots,G,A,N,T,C,\ldots,3'}{\node[inner sep=0] (u-\xi) at (0.3*\xi,0.5){\x};}
\foreach \x[count=\xi] in {3',\ldots,C,T,N,A,G,\ldots,5'}{\node[inner sep=0] (d-\xi) at (0.3*\xi,0){\x};}
\draw ($(u-3.north)!0.5!(u-4.north)$)|-($(u-5)!0.5!(d-5)$)-|($(d-6.south)!0.5!(d-7.south)$);
\end{tikzpicture}
\end{document}
Edit 2:
Even if I still have a problem with \ldots
, I marked the answer by Percusse the accepted one. The one proposed by marmot is also good but require a double compilation for obvious reasons.