4

when I take notes by hand I typically write them in a "bullet list" fashion, something like

main phrase
-> hence A
  -> since A follows B
  -> since A follows also C
-> also from the main phrase
.
.
.

The standard way to do this would be through enumerate, but its kinda unpractical for notes, since I would get something like

main phrase
\begin{itemize}
    \item[$\rightarrow$] hence A
    \begin{itemize}
        \item[$\rightarrow$] since A follows B
        \item[$\rightarrow$] since A follows also C
    \end{itemize}
    \item[$\rightarrow$] also from the main phrase
\end{itemize}

I've already a new command instead of writing $\rightarrow$, but it's still not easy to write notes like this. Anyone have better ideas?

4
  • Using enumitem you can just say \begin{itemize}[label=$\rightarrow$] \item ...
    – daleif
    May 11 at 8:11
  • Yes my problem is not about the \rightarrow, but about the "eavy" structure of the whole \begin{itemize} ...
    – john
    May 11 at 8:27
  • 5
    You can take notes in markdown and then use pandoc to convert them to LaTeX.
    – Rmano
    May 11 at 8:38
  • @Rmano just tried and works like a charm
    – john
    May 11 at 9:00

3 Answers 3

7

The easylist package is suitable for this kind of use cases. You choose a symbol as package option (at, sharp, ampersand, pilcrow, for @, #, &, ¶ respectively, or not choose a symbol for the default §), and then the number of symbols determines the indentation level. The package is designed for numbered lists but it also works for itemize-style lists. For this question I borrowed the definition of the predefined checklist style which prints boxes as item symbol, and replaced the box by an arrow.

\documentclass{article}
\usepackage[at]{easylist}
\NewList(%
    Hide=1000,Progressive*=1em,Hang=true,%
    Style*=$\Rightarrow$\hskip.6em)
\begin{document}
\noindent main phrase
\begin{easylist}
@ hence A
@@ since A follows B
@@ since A follows also C
@ also from the main phrase
\end{easylist}
\end{document}

Result:

enter image description here

3
  • Very interesting solution, I'm gonna try it first thing in the morning tomorrow. Also seems more easy and quick to use. I ask you just one question, the 'at' in '\usepackage[at]...' stands for the character you then use for indentation?
    – john
    May 11 at 21:22
  • 1
    @john indeed the at is the indentation character, alternatives are sharp (#), ampersand (&) and pilcrow (¶). If you don't provide this argument then the default paragraph symbol (§) is used. Out of these I think @ is the most convenient because it is easy to type and it is not really used as an actual character in the contents of list items. See the package manual for more information.
    – Marijn
    May 12 at 5:49
  • Just tried and this is what most easily reproduce what I have in mind, also easy to customize so I think this is the winner.
    – john
    May 12 at 7:22
5

You can include Markdown in LaTeX using the markdown package:

enter image description here

\documentclass{article}
\usepackage{markdown}
\begin{document}
\begin{markdown}
main phrase

* hence A
    1. since A follows B
    1. since A follows also C
* also from the main phrase
\end{markdown}
\end{document}
5
  • Wow! Very interesting! I've tried this way, but I get the error 'Package markdown Error: I can not access the shell'. I've also tried comping with --shell-escape but I get the same error.
    – john
    May 11 at 14:05
  • For me, pdflatex --shell-escape main.tex works.
    – user187803
    May 11 at 14:11
  • Yeah I'm a dumbass, I put --shell-escape after the file name... Thank you again!
    – john
    May 11 at 14:14
  • 1
    @john You're not that. Lots of programs let you put flags anywhere in the command line. Unfortunately, pdflatex isn't one of them. You'll almost always be good on the command line if you put all the flags up front, then the positional arguments at the end, just as POSIX intended.
    – Andrew Ray
    May 11 at 20:39
  • @AndrewRay thanks for the explanation. I usually use overleaf or atom+extension to compile LaTeX code, but I'm experimenting with a new workflow which requires compilation from terminal, so I'm kinda new to terminal and positioning.
    – john
    May 11 at 21:18
3

Just for fun. Of course, you have to remember your level.

\documentclass{article}
\usepackage{outlines}
\usepackage{enumitem}
\usepackage{showframe}% alignment tool

\begin{document}
\begin{outline}
\setlist[itemize]{label=$\rightarrow$}%
\setlist{nosep}%
\setlength{\parindent}{0pt}% do not indent paragraphs (level 0)
\0 main phrase
  \1 hence A
    \2 since A follows B
    \2 since A follows also C
  \1 also from the main phrase
\end{outline}

\begin{itemize}
\item Things should be back to normal for itemize.
\item Including separation.
\end{itemize}

\end{document}
1
  • Definitely what I was looking for! Keeping track of the level is not a problem, and this is a easy and customizable way to do it.
    – john
    May 11 at 16:24

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.