7

I'm trying to build a list in a file based on the Tufte-Latex book template: https://code.google.com/p/tufte-latex/

In keeping with the clean design, I don't need any font changes, blod or italics, and would prefer to avoid bullet points. Any idea how I can recreate the neat line-marking of this example?

Picture of layout

migrated from stackoverflow.com May 4 '14 at 13:43

This question came from our site for professional and enthusiast programmers.

  • Hm, the migration ate a comment. Here it is: “This question rather belongs on TeX - LaTeX. Similar questions have been asked there before, like tex.stackexchange.com/questions/10192/…. It seems like the package bbding, among others, can do what you're looking for. – creimers 3 hours ago” – Ry- May 4 '14 at 13:45
  • Welcome to TeX.sx! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. – Werner May 4 '14 at 13:47
  • Thanks for the migration! I didn't realize there was a dedicated spot – user3601030 May 5 '14 at 11:08
7

Quick hack with Tikz, I'm sure this can be improved/made more general with some work:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shadows}

\newcommand{\mylist}{\tikz[overlay]\draw(-.2,-.2)--(-.2,.5) [path fading=east](-.2,.15)--(.1,.15);}
\newcommand{\myitem}{\item[\mylist]}
\begin{document}
\begin{enumerate}
   \item Google
   \begin{itemize}
      \myitem Picasa
      \myitem Feedburner
      \myitem Youtube
   \end{itemize}
   \item Microsoft
   \begin{itemize}
      \myitem Corel Corporation
      \myitem Zignlas
      \myitem MyBlogLog
   \end{itemize}
\end{enumerate}
\end{document}

enter image description here

  • Brilliant, thankyou! (and now I can draw all kinds of shapes :) ) – user3601030 May 5 '14 at 12:15
  • @user3601030 you're welcome. I changed the question title to better reflect its content and to help those who'll search for something similar. Feel free to improve it. If one of the answers does solve your problem consider accepting it. – Nico Boni May 5 '14 at 16:35
4

My answer builds off of dcmst's answer. I've reused his tikz code.

If you want to redefine all second-level enumerate environments to use this symbol, you can add \renewcommand{\labelenumii}{\mylist} to the preamble of your document.

\documentclass{tufte-handout}

% From dcmst's answer at <http://tex.stackexchange.com/a/175204/80>.
\usepackage{tikz}
\usetikzlibrary{shadows}
\newcommand{\mylist}{\tikz[overlay]\draw(-.2,-.2)--(-.2,.5) [path fading=east](-.2,.15)--(.1,.15);}

% All second-level enumerated lists should use the \mylist bullet.
\renewcommand{\labelenumii}{\mylist}

% This generates fake lists for us.
\usepackage{blindtext}

\begin{document}

It works okay if you only use a second-level list.

\blindlistlist[2]{enumerate}[3]

If you use a third-level list, you'll have to do something a bit fancier.

\blindlistlist[3]{enumerate}[3]

\end{document}
1

And I think I developed godbyk's answer when I had trouble with linespacing causes breaks in the line. I also added a second 'my object' for closing the list off at the bottom.

\documentclass{article}
\usepackage{tikz}
%for fancy lists
\usetikzlibrary{shadows}
\newcommand{\mylist}{\tikz[overlay]\draw(-.2,-.2)--(-.2,.4) [path fading=east](-.2,.15)--(.1,.15);} %adds the |- shape to the start of each list item
\newcommand{\mylistend}{\tikz[overlay]\draw(-.2,.15)--(-.2,.4) [path fading=east](-.2,.15)--(.1,.15);} %adds the |- shape to the start of each list item
\newcommand{\myitem}{\item[\mylist]} %defines the scope of the mylist command to be 2nd level sublists
\newcommand{\myitemend}{\item[\mylistend]} %defines the scope of the mylist command to be 2nd level sublists

% with an example in use:

\begin{document}
\begin{enumerate}
    \item Google
        \begin{itemize}
        \myitem Youtube
        \myitem Google+
        \myitem Skybox
        \myitemend Googlemaps
        \end{itemize}
    \item Microsoft
        \begin{itemize}
        \myitem Corel Corporation
        \myitem Zignals
        \myitem ByteTaxi
        \myitemend Azure
        \end{itemize}
\end{enumerate}
\end{document}

enter image description here

  • And thanks to @Heiko Oberdiek for his edit. Knowing enumerate counts as itemize for the purpose of using items has wiped out the about 400 "! LaTeX Error: Something's wrong--perhaps a missing \item." that i've been carefully ignoring :) – user3601030 Apr 14 '17 at 19:00

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.