Basically I wanted to modify the description list so that the first word(s) are underlined and bold
If you compile this file.
\documentclass{article}
\usepackage{soul}
\newenvironment{mydescription}{%
\renewcommand\descriptionlabel[1]{\hspace{\labelsep}\textbf{\ul{##1}}}
\begin{description}%
}{%
\end{description}%
}
\begin{document}
\begin{mydescription}
\item[First] Test
\item[Second] Test
\end{mydescription}
\end{document}
The output is okay. But if you compile the following, you see that the environment is not what it is supposed to be. What commands in the preamble are interfering with the compilation and how to solve this issue?
\documentclass[10pt]{article}
\usepackage{soul}
\usepackage[margin=0.75in]{geometry}
\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
\let\endchangemargin=\endlist
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{Lecture 1}
\rhead{Handout 2}
\usepackage{tikz}
\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}
\usetikzlibrary{decorations.pathreplacing,calc,graphs,decorations.markings}
\def\annotateEquality#1{ %for the arrow from equality sign
\tikz[overlay]
\draw[blue,<-] (-1.5ex,1.5ex) -- +(.7,.5) node[right] {#1};
}
\usepackage{comment}
\usepackage{mathtools}
\newcommand{\verteq}{\rotatebox{90}{$\,\neq$}}
\newcommand{\equalto}[2]{\underset{\scriptstyle\overset{\mkern4mu\verteq}{#2}}{#1}}
\usepackage{enumitem,array}
\usepackage{relsize}
\usepackage{amsmath}
\usepackage{amsthm} %for proof
\newtheorem*{mythm}{Theorem}
\newtheorem*{mydef}{Definition}
\usepackage{centernot} %for `not implies' symbol
\usepackage{amssymb} %for 'therefore' symbol
\usepackage{tikz-cd}% Commutative diagram
\title{\ul{Expectations in Bivariate Probability Distribution}}
\date{}
\everymath=\expandafter{\the\everymath\displaystyle}
\tikzset{degil/.style={
decoration={markings,
mark= at position 0.5 with {
\node[transform shape] (tempnode) {$\backslash$};
%\draw[thick] (tempnode.north east) -- (tempnode.south west);
}
},
postaction={decorate}
}
}
\newenvironment{mydescription}{%
\renewcommand\descriptionlabel[1]{\hspace{\labelsep}\textbf{\ul{##1}}}
\begin{description}%
}{%
\end{description}%
}
\begin{document}
\thispagestyle{fancy}
%These define a new itemize environment with 'invisible' bullets
\newenvironment{Myitemize}{%
\renewcommand{\labelitemi}{{}}%
\begin{itemize}[nosep]}{\end{itemize}}
\maketitle
\thispagestyle{fancy}
\begin{mydescription}
\begin{mydescription}
\item[First] Test
\item[Second] Test
\end{mydescription}
\end{document}

\begin{description} ... \end{description}inside your\newenvironmentby\description ... \enddescription, which removes one extra layer of grouping. – yo' Aug 19 '14 at 07:59%from ends of lines (which may not be related)\ul{##1}}}%,#1{%for the arrow– David Carlisle Aug 19 '14 at 08:20mydescriptionis missing a%at the end of the second line and your definition of\annotateEqualityhas a misplaced comment there should be no space before%for the arrowsee http://tex.stackexchange.com/questions/7453/what-is-the-use-of-percent-signs-at-the-end-of-lines – David Carlisle Aug 19 '14 at 09:52%is concerned didn't work. In fact there are errors when I try to provide an option in [...] to the \item in the list... Would you like me to enter chat? – Abhimanyu Arora Aug 19 '14 at 10:08enumitemandsoul. Why do you want to underline the label in the first place? Underlining is considered a bad typographical device. – egreg Aug 19 '14 at 11:15