14

\documentclass{article} \begin{document} $\underline{\nabla}$ \end{document}


10

Put the \textenglish{aaa} block inside the same \uline: \documentclass[a4paper,numbers=noenddot]{scrartcl} \usepackage{fontspec} \PassOptionsToPackage{normalem}{ulem} \usepackage{ulem} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands. \defaultfontfeatures{Scale=MatchUppercase, Ligatures=TeX} \newfontfamily\hebrewfont[Script=Hebrew]{David CLM ...


7

The syntax of the proposed command is \segments[<width>]{<string>}{<segments>;<segments>;...} where <width> is the width of the cells (default 1em), <string> is the string to typeset and <segments> is a list of cells to underline. Such a list consists of single numbers or <number>-<number> to mean the ...


6

I'd go with array, with a special purpose command: \documentclass{scrartcl} \usepackage{mathtools} \usepackage{array} \newcommand{\ssep}{\lvert\;} \newcommand{\result}[2]{% \mathrlap{\underline{\underline{\mathstrut\hphantom{#1=#2}}}}% #1 & = & #2% } \begin{document} \begin{equation*} \setlength{\arraycolsep}{0pt} \begin{array}{r >{{}}c&...


6

Use \undeline{{} ...} when you want the binary spacing. Otherwise, the + (similarly a -) in \undeline{+5}, etc is treated as a unary operator. Code: \documentclass{article} \begin{document} \begin{equation}\label{eq:OrdenaAlpha} \begin{array}{lrl} \alpha^{0} = \alpha & = (+6 \quad -1 \quad +4 \quad -5 \quad \underline{{}-2} \quad \...


5

Here's one idea. In the MWE, you can adjust the .7em specification to change the size of both the underscore and the \mygap. \documentclass{article} \usepackage{tabstackengine,amssymb} \stackMath \newcommand\udash[2][\hrulefill]{\stackunder{#2}{\makebox[.7em]{#1}}} \newcommand\mygap{\udash[]{}} \begin{document} \[ \langle\tabbedShortunderstack{ \udash{x}&...


5

The dashundergaps package is built on top of the ulem package you can use \useunder macro like this \documentclass{article} \usepackage[dot]{dashundergaps} \def\MyText{ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam a venenatis lacus. Nunc vitae mollis neque. Maecenas vel arcu erat. In bibendum cursus interdum. Orci varius natoque ...


5

This just copies the definition of \underbrace adding an extra argument to hold the text and then finally using the text rather than the central part of the brace. \documentclass{article} \makeatletter \def\zzunderbrace#1#2{\mathop{\vtop{\m@th\ialign{##\crcr $\hfil\displaystyle{#1}\hfil$\crcr \noalign{\kern3\p@\nointerlineskip}% \zzupbracefill{#2}\...


5

The call to \ulcenterline causes a new paragraph. Is that OK? Or is to occur on the same line if there is already text on the left margin? The line \usepackage[showframe,pass]{geometry} is just there to show the frame about the text area of the page. \documentclass{article} \usepackage[showframe,pass]{geometry} \newcommand\ulcenterline[1]{% \par\...


4

Redefining \uline to include a redefinition of \colorbox. \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage{xcolor} \usepackage[normalem]{ulem} \makeatletter \long\def\afterelsefi#1\else#2\fi{\fi#1} \long\def\afterfi#1\fi{\fi#1} \def\q@mark{\q@mark} \newcommand\uline@colorbox[3][\q@mark] {...


4

I just did three rows here but \documentclass{article} \usepackage{booktabs} \begin{document} \[ \begin{array}{r@{}*{10}{c}} S={}&1&0&1&0&0&1&0&0 \\ \cmidrule(r){2-4}\cmidrule(l){5-9} \morecmidrules \cmidrule(r){2-2}\cmidrule(lr){3-8}\cmidrule(l){9-9} \morecmidrules \cmidrule(r){3-5}\cmidrule(l){6-7} \end{array} \] \...


4

\documentclass{article} \usepackage{amsmath} \begin{document} $\underbar{\hbox{$\nabla$}}$ \end{document} or, alternately, \documentclass{article} \usepackage{amsmath} \begin{document} $\setbox0=\hbox{$\nabla$}\underbar{\box0}$ \end{document}


4

This solution uses \vbox to format the text and \vsplit to underline each line. \documentclass[12pt]{report} %\usepackage{ulem} \newcommand{\lined}[1]% #1 = paragraph text {\bgroup \setbox0=\vbox{\strut #1\strut}% \dimen0=0pt \loop\ifdim\ht0>0pt \dimen1=\dimexpr\ht0 - \baselineskip\relax \setbox1=\vsplit0 to \ht\strutbox \advance\...


4

with the nicematrix package (as you intended in your minimal working example -- mwe). lines for underline results are drawn with tikz added as code-after option of NiceArray: \documentclass{scrartcl} \usepackage{nicematrix} \begin{document} \[\setlength\arraycolsep{1.2pt} % <--- added \begin{NiceArray}{RCLL}% [code-after={\tikz\draw[double, ...


4

\documentclass{scrartcl} \usepackage{mathtools} \usepackage{ulem} \setlength\ULdepth{20pt} \begin{document} \begin{equation*} \uline{A \cdot B = \begin{bmatrix*}[r] 6 & -12 \\ 14 & 4 \end{bmatrix*}\rule[-15pt]{0pt}{0pt}} \end{equation*} \end{document}


4

you can use a combination of textbackground and overstrike: \definetextbackground[underline] [location=text, voffset=-2pt,alternative=1,background=,frame=off] \starttext \startunderline Some underlined \overstrike{crossed out} text.\stopunderline \stoptext


3

You can always \addstackgap befor ethe \uline. Here, macrofied as \Uline[<extra depth>]{<math content>}. \documentclass{scrartcl} \usepackage{mathtools,stackengine} \usepackage{ulem} \setlength{\ULdepth}{20pt} \newcommand\Uline[2][3pt]{\uline{\ensurestackMath{\addstackgap[#1]{#2}}}} \begin{document} \begin{equation*} \Uline{A \cdot B =% \...


3

A solution using tikZ. The notation goes as follows: in \ourInfo array, each cell corresponds to: {level, starting character index (including), finish character index(including)} \documentclass[margin=1cm, tikz]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=0.5] \def\binaryString{{1, 0, 1, 0, 0, 1, 0, 0}} %Notation: {level,...


3

You can inject a \strut like this: \documentclass[a4paper, 12pt]{article} \usepackage{hyperref} \usepackage{xcolor} \hypersetup{% pdfborderstyle={/S/U/W 0.5}% } \makeatletter \usepackage{xpatch} \AtBeginDocument{ \apptocmd\Hy@colorlink{\strut}{}{\fail} } \begin{document} \url{http://www.example.com} \\ \url{www.hhhhh.com} \end{document}


3

The problem is caused by the 0.9 line spacing, you should never do that it will cause inconsistent spacing and ugly output, however to answer the question asked, \\ takes an optional argument so you could use \\[2cm] to have more space, but I wouldn't use underline in a typeset document, it's a typewriter approximation for bold.


3

Not sure what's the problem. Use the [l] option for \makebox. \documentclass{article} \usepackage{ulem} \newcommand{\wideunderline}[2][2em]{% \uline{\makebox[\ifdim\width>#1\width\else#1\fi][l]{#2}}% } \begin{document} (line 1) \wideunderline[10cm]{text here} (line 2) \wideunderline[10cm]{text here with a p} \end{document}


3

The definition of \underline is % latex.ltx, line 5128: \def\underline#1{% \relax \ifmmode\@@underline{#1}% \else $\@@underline{\hbox{#1}}\m@th$\relax\fi} and the placement of \m@th is the explanation for your output. It is necessary to have \m@th there, because otherwise it could affect math in the text to be underlined. You might want to redefine ...


3

Although I'd recommend to not mix underlined and bold text, here is a suggestion. I have also added an automatic counter so there is no need to manually number the questions. The optional argument to change the default word "Question" nevertheless still works: \documentclass[a4paper,14pt]{extarticle} \usepackage[utf8]{inputenc} \usepackage[left=3.0cm, right=...


3

I suggest a more complicated input, but with better output: \documentclass{article} \usepackage{amsmath,array,booktabs} \begin{document} \begin{equation}\label{eq:OrdenaAlpha} \setlength{\arraycolsep}{0pt} \setlength{\aboverulesep}{-3pt} \renewcommand{\arraystretch}{1.5} \newcolumntype{f}{>{\kern0pt\quad\kern0pt}c} \begin{array}{ l % ...


2

One way is to underline in a box first: \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage{xcolor} \usepackage[normalem]{ulem} \begin{document} \sbox0{\uline{\hspace{\fboxsep}everything\hspace{\fboxsep}}} \uline{No underlining for \colorbox{lightgray}{\hspace{-\fboxsep}\usebox0\hspace{-\...


2

\ul from soul accepts arguments with a \par/empty line in it: \documentclass{book} \usepackage{soul} \begin{document} \ul{text text} \end{document} \par in \textsuperscript is imho senseless.


2

There are a large number of ways one can achieve this. Here's one using a tabular for the "underline": \documentclass{article} \newcommand{\titleline}[3]{% \par\noindent \begin{tabular}{ @{} p{\linewidth} @{} } \makebox[0pt][l]{#1}\hfill \makebox[0pt][c]{#2}\hfill \makebox[0pt][r]{#3} \\ \hline \end{tabular}} \begin{document} \...


2

Don't underline. Ever. If you don't want to adhere to the advice above, be aware that when you call \uline inside \uline the macro adds a further 1.2pt, because it thinks you want to double underline. \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage{xcolor} \usepackage[normalem]{ulem} \let\...


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