Featured Book

LaTeX Beginners Guide

Who is online

In total there are 16 users online :: 1 registered, 0 hidden and 15 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: Google [Bot] and 15 guests

Partner Sites

TeXwelt - Fragen und Antworten goLaTeX
TeXblog
TeXnicCenter
TeXample

CSS border-right equivalent

Add tags Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)

CSS border-right equivalent

Postby Toshiro on Sat May 12th, 2012

Hello!

I would like to annotate text in the following manner:

annotated.png
annotated.png (5.08 KiB) Viewed 646 times

I'm aware of \underline and \overline, but I need to make a border on the right side, like in the attached image, so it looks like an unbroken chain of "__|¯¯|__|¯¯|__".

Thank you.
Toshiro
 
Posts: 1
Joined: Sat May 12th, 2012

Re: CSS border-right equivalent

Postby Stefan_K on Sat May 12th, 2012

Hi Toshiro,

welcome to the board!

A quick and easy way would be to define a TikZ matrix for the characters, where each character is a node which can be referred to, for drawing such a path.

For example:

Code: Select all  •  Open in writeLaTeX
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}
  \matrix (m) [matrix of nodes]{
    A & B & C & D & E\\};
  \draw (m-1-1.north west) -- (m-1-1.north east) -- (m-1-1.south east)
    -- (m-1-2.south west) -- (m-1-2.south east) -- (m-1-2.north east)
    -- (m-1-5.north east);
\end{tikzpicture}
\end{document
}


path.png
path.png (1.75 KiB) Viewed 645 times


Stefan
LaTeX Community Administrator
User avatar
Stefan_K
Site Admin
 
Posts: 6387
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany


Return to Text Formatting

Who is online

Users browsing this forum: Google [Bot] and 15 guests