1

When writing my notes, I like to set them up like a sort of dictionary, with a bolded term, followed by a definition/description. I was delighted to happen across the description environment and have started playing around with it (see code chunk below).

Now, what I would really like to know is whether anyone has any tips or ideas for methods to speed up the process of writing out my notes, as they get quite long, so I don't want to be typing out \item [ ] every time I define a new term. I have come up with some ideas:

  • I have discovered easylist is very convenient; however I do not know how (if) I could format this to look like the description environment (in particular, I cannot find a way to change the item names individually, which is very important to me!)

  • Another method may be to configure some keyboard shortcuts, though I'm not sure of the best way to go about this (I use TeXmaker and Overleaf).

Here is an example of using description (this includes some problems I came across, though I don't expect to be affected by these, so I am not too concerned about solving them):

\documentclass[twocolumn]{article}
\usepackage{enumitem}
\begin{document}
\begin{description}[align=left,leftmargin=1cm]
\item [Item one] Followed by text description. This description has been made longer to demonstrate the hang feature when text flows over to the next line.
\item [2.] Notice that indent is not maintained for the first line of an item with a short name. I do not mind this too much though.
\item [This is a really long item name which extends beyond the column border] I understand that this could be dealt with using multiline, but I don't really like the way that looks:
 \begin{description}[align=left,style=multiline,leftmargin=1cm]
  \item [This list] is a demonstration of how one might try to use
  \item [multiline] for long item names. There are some
  \item [problems] with this, as you can see.
 \end{description}
\item [Item four] Returning to the main list. The sublist above works fine. Another example of a sublist follows:
 \begin{itemize}
  \item this is an itemize list
  \item embedded within a description list and this actually works well and I am really happy with how this looks!
 \end{itemize}
\item [Item five] Again returning to the main list.
\end{description}
\end{document}

The output for this follows:

Output

2
  • Update: I have now realised I can amend the problem in 2. by setting the labelwidth option.
    – igtsatey
    May 28 '16 at 5:13
  • This question is actually very open-ended or broad.
    – Werner
    May 28 '16 at 5:45
1

What you are trying to do is very similar to how I use easylist to take notes in meetings. Hacking my code a little I get something close to what you want.

I use:

  • # for each item title
  • ## for the text of each item, which is put on a new line
  • ### for each subsequent list item

So, roughly, I add another # for each level of indentation.

I have only treated the first level item headings as being "special". Of course, you could do the same thing with subsequent item headings. For my notes I have a similar issue that I address by making an exclamation mark into an active character and then using !{stuff} to highlight "stuff". I have done this below as well.

I prefer using color to boldface but if you like this approach then this is an easy detail to change. I also use \blacktriangleright and \bullet to mark sublists. Using my code your MWE produces:

enter image description here

...and here is the latex code:

\documentclass[twocolumn,a5paper,landscape]{article}

\usepackage[x11names]{xcolor}
\usepackage[sharp]{easylist}
\usepackage{amsmath,amssymb}

\catcode`\!=13
\newcommand![1]{\textcolor{red}{#1}}

\ListProperties(
    Hang=true,
    Hide2=2,
    Hide3=3,
    Hide4=4,
    Hide5=5,
    Indent2=0em,
    Indent3=1em,
    Indent4=0em,
    Indent5=0.5em,
    Numbers1=a,
    Space1=1em,
    Space3=0em,
    Style1=\color{blue}\bfseries,
    Style3*=$\color{DodgerBlue2}\blacktriangleright$\space,
    Style4*=$\color{DodgerBlue3}\bullet$\space,
    Style5*=$\color{DodgerBlue3}-$\space,
)

\begin{document}

\begin{easylist}
  # Item one
  ## Followed by text description. This description has been made longer to demonstrate the hang feature when text flows over to the next line.
  # 2.
  ## Notice that indent is not maintained for the first line of an item with a short name. I do not mind this too much though.
  # This is a really long item name which extends beyond the column border
  I understand that this could be dealt with using multiline, but I
  don't really like the way that looks:
  ### !{This list}is a demonstration of how one might try to use
  ### !{multiline} for long item names. There are some
  ### !{problems} with this, as you can see.
  # Item four
  ## Returning to the main list. The sublist above works fine. Another example of a sublist follows:
  ### this is an itemize list
  ### embedded within a description list and this actually works well and I am really happy with how this looks
  # Item five
  ##Again returning to the main list.
\end{easylist}

\end{document}

In practice, I hide most of this in a class file so that I only have the actual "list" to worry about when I'm typing.

1
  • Thank you very much for your response, Andrew. You have provided details on how to change many more options (esp. option to hide counters at each level, changing bullet style) than I had hoped!
    – igtsatey
    May 31 '16 at 0:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.