# Tag Info

147

I know this question has been answered very extensively. But not what I wanted or thought was the question based on the title. Therefore if others get in here looking for a possibility for colouring behind a word than this snippet is much easier: \colorbox{blue!30}{blue} or \textcolor{blue!30}{blue} resulting in: This is possible by only adding \...

115

You can just \underline a \hspace: \documentclass{article} \begin{document} Name \underline{\hspace{3cm}} Signature \underline{\hspace{3cm}} \end{document}

87

The cancel package seems to do exactly what you want: \documentclass{article} \usepackage{cancel} \begin{document} $$\cancel{2x}$$ $$\cancel{1234567890}$$ \end{document} If you're not satisfied with how the cancellation starts below the 1 and ends above the 0, have a look at Diagonal strikeout starting too low and ending too high.

64

I assume this was done by design, seeing as the introduction of hyperlinks may clutter the user's view of the actual text. Moreover, not all hyperlink typesetting is printable - as you've mentioned, the PDF hyperlink is merely "a rectangular area of the page that is mouse-aware". However, if you want to do this, there are two options available Manual You ...

57

(Disclaimer: It may be considered a typographically bad practice to underline text.) I can think of two ways to do this. ulem This option is good if you want a fast solution. Use \dotuline or \dashuline from the package ulem. \documentclass{article} \usepackage[normalem]{ulem} % [normalem] prevents the package from changing the default behavior of `\...

56

\underline{<stuff>} underlines a box containing <stuff>. However, this also implies that <stuff> with descenders pushes the underline lower. \smash{<stuff>} removes any depth (and height) from <stuff>, allowing for the regular non-descender depth of the underline: \underline{\smash{<stuff>}} Alternatively, the soul ...

55

We could do for each letter: Produce the underlining Overwrite the line with the same but bolder letter or with a left and right shifted one, but in background or white color Write the letter So we would get an underline with matching gaps. Here I modified the soul approach of Marco in this way, just for a demonstration what I mean, which could be ...

41

You can use \rule: \rule[<raise height>]{<width>}{<height>} For example \rule{2in}{.5pt} will give you the sort of thing you want. The optional argument can be used to raise (positive value) or lower (negative value) the rule. Sometimes lowering it slightly looks better.

40

There is also the cancel package: \usepackage{cancel} ... \cancel{text} The solution to Diagonal strikeout starting too low and ending too high is another option to consider.

36

Best package for the job is manuscript \documentclass{article} \usepackage{manuscript,lipsum} \begin{document} \lipsum[1-3] \end{document}

32

You can use the contour package for this. If you load it with the outline option, you'll get "proper" outlines (as opposed to several offset copies of your text). \documentclass{article} \usepackage[outline]{contour} \usepackage{amsmath} \contourlength{.4pt} \begin{document} \textcolor{yellow}{\contour{blue}{Some Words}} \end{document}

31

You can also use pgfornaments; a little example taken almost verbatim from the package page: \documentclass{article} \usepackage[object=vectorian]{pgfornament} \usetikzlibrary{shapes.geometric,calc} \begin{document} \begin{center} \begin{tikzpicture}[color=red!50!black,every node/.style={inner sep=0pt}] \node[minimum size=10cm,inner sep=0pt](vecbox){};...

30

The \ul command from the soul package has troubles with Umlauts -- the \uline command from the ulem package doesn't and therefore seems to be the better option for those not exclusively writing in English.

30

here a solution which works also with pdflatex and using the advantages of the package soul: \setcounter{errorcontextlines}{999} \documentclass{article} \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc} \usepackage{soul} \makeatletter \DeclareRobustCommand*\myul{% \def\SOUL@everyspace{\underline{\space}\kern\z@} \def\SOUL@everytoken{% \...

30

Simply because I found it useful here is a modification of Stefans answer above that lets you control the depth, thickness and width of the underline. This might be useful, for example, with a larger or bolder font. The syntax is: \varul<width>[depth][thickness]{stuff} where: <width> is optional and given as a multiple of 1/100 em, e.g. <10&...

30


30

I used libertineotf and XeLaTeX, but you can use, of course, any font. Just to get you started: MWE \PassOptionsToPackage{dvipsnames}{xcolor} \documentclass[tikz,border=5pt]{standalone} \usetikzlibrary{decorations.text} \usepackage{libertineotf} \begin{document} \begin{tikzpicture} \begin{scope} \draw[color=gray,fill=MidnightBlue] (0,0) circle (3.5cm); \...

28

Let's make soul work less: \documentclass{article} \usepackage{xparse,soul} \ExplSyntaxOn \NewDocumentCommand{\ulns}{m} { \seq_set_split:Nnn \l_tmpa_seq { ~ } { #1 } \seq_map_inline:Nn \l_tmpa_seq { \ul{##1}~ } \unskip } \ExplSyntaxOff \begin{document} \ulns{The quick brown fox jumped} over the lazy dog. \end{document} Basically, the argument is ...

27

Similar but slower. \documentclass[tikz]{standalone} \usetikzlibrary{decorations.text} \usepackage{fontspec,amssymb} \setmainfont{OptimusPrinceps} \definecolor{byublue}{RGB}{0 34 85} \newfontfamily\bolderfont{OptimusPrincepsSemiBold} \begin{document} \begin{tikzpicture} \begin{scope} \draw[color=gray,fill=byublue] (0,0) circle (3.5cm); \draw[color=gray,...

27

Declare \normalem at the appropriate point in the document body. (The correspondent macro to switch to "underlined" emphasis is \ULforem.) \documentclass{article} \usepackage{ulem} \begin{document} Some \emph{emphasised} text. \normalem Some \emph{emphasised} text. \ULforem Some \emph{emphasised} text. \end{document}

24

This is for within an equation (I got it off of another forum) and requires amsmath and ulem to be active. The strike is quite long, so using it next to an arrow is troublesome. \text{\sout{$TEXT$}}

24

cancel is intended for indicating mathematic cancellation, and consequently only works in math mode; it also strikes out diagnoally. soul and ulem seem pretty similar. One basic semantic difference between them is that ulem per default changes the definition of \emph{...} to underline its argument instead of putting it in italics. This seems to aim at the ...

24

Another alternative is package pdfrender: It needs pdfTeX or LuaTeX in PDF mode. It works for Type 1 fonts by changing their rendering mode, thus PK fonts or rules are not supported. Paragraphs, line breaks and even page breaks are supported. Works with LaTeX or plain TeX based formats. Available both as switch \pdfrender and as macro \textpdfrender similar ...

24

Package soul provides an underlining macro \textul/\ul with the same depth. The following example copies the driver to \textulw/\ulw and leaves the spaces without underline: \documentclass{article} \usepackage{soul} \makeatletter \DeclareRobustCommand*{\textulw}{% \SOUL@ulwsetup \SOUL@ } \newcommand*{\SOUL@ulwsetup}{% \SOUL@setup \let\SOUL@preamble\...

23

As I learned from the exam class's documentation, you can do this: \makebox[0.5\textwidth]{Name:\enspace\hrulefill} which allows you to control how much space the entire construction takes up, rather than just the underlined part.

23

You can use the mdframed package; a little example: \documentclass{article} \usepackage{mdframed} \usepackage{lipsum}% just to generate text for the example \newmdenv[ topline=false, bottomline=false, skipabove=\topsep, skipbelow=\topsep ]{siderules} \begin{document} \lipsum[4] \begin{siderules} \lipsum[1-5] \end{siderules} \lipsum[4] \end{...

23

With tcolorbox: \documentclass{article} \usepackage[many]{tcolorbox} \usepackage{xcolor} \usepackage{varwidth} \usepackage{environ} \usepackage{xparse} \newlength{\bubblewidth} \AtBeginDocument{\setlength{\bubblewidth}{.75\textwidth}} \definecolor{bubblegreen}{RGB}{103,184,104} \definecolor{bubblegray}{RGB}{241,240,240} \newcommand{\bubble}[4]{% \tcbox[ ...

Only top voted, non community-wiki answers of a minimum length are eligible