8000 feat: redesign itemize environment by jolars · Pull Request #50 · jolars/moloch · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: redesign itemize environment #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jolars
Copy link
Owner
@jolars jolars commented May 13, 2025

I'm not sure about the current style of the itemize environment. This is an attempt to improve upon it. It is perhaps slightly more rational, at least to me, using filled markers everywhere. I have not changed item but

  • subitem is changed to a filled square
  • subsubitem is changed to a filled triangle

Most of the suggestiosn are taken from the beamer definitions. Note that there is an obvious problem with the alignment of the subsubitem in the current (old) approach, which should be fixed in any case.

I'm very open for suggestions here, so please let me know what you would prefer!

Here's a side-by-side comparison:

image

Here's the code to generate it if you'd like to play with it.

\documentclass{beamer}

\usetheme{moloch}

\newcommand{\shoppinglist}{%
  \begin{itemize}
    \item Potatoes
          \begin{itemize}
            \item Something
                  \begin{itemize}
                    \item Something
                  \end{itemize}
          \end{itemize}
    \item Carrots
  \end{itemize}
}

\begin{document}

\begin{frame}
  \begin{columns}

    % This is the proposed new style (this PR)
    \setbeamertemplate{itemize item}[circle]
    \setbeamertemplate{itemize subitem}{\raise1.5pt\hbox{\vrule width 0.8ex height 0.8ex}}
    \setbeamerfont{itemize subsubitem}{size=\tiny}
    \setbeamertemplate{itemize subsubitem}{%
      \usebeamerfont*{itemize subsubitem}\raise1.75pt\hbox{\donotcoloroutermaths$\blacktriangleright$}%
    }

    \begin{column}{0.45\textwidth}
      \begin{block}{New}
        \shoppinglist
      \end{block}
    \end{column}

    % This is the old style (main branch)
    \setbeamertemplate{itemize item}[circle]
    \setbeamertemplate{itemize subitem}{%
      \usebeamerfont*{itemize subitem}\raise1pt\hbox{\donotcoloroutermaths$\circ$}%
    }
    \setbeamertemplate{itemize subsubitem}{\textbullet}

    \begin{column}{0.45\textwidth}
      \begin{block}{Old}
        \shoppinglist
      \end{block}
    \end{column}
  \end{columns}

\end{frame}

\end{document}

@samcarter
Copy link
samcarter commented May 13, 2025

I like the suggestion! It also avoids of the problem of square subsubitems in lualatex with the old code:

% !TeX TS-program = lualatex -interaction=nonstopmode % | txs:///view-pdf | txs:///view-log

\documentclass{beamer}

\usetheme{moloch}

\begin{document}

\begin{frame}

\begin{itemize}
\item Test
\begin{itemize}
\item Test
\begin{itemize}
\item Test
\end{itemize}

\end{itemize}

\end{itemize}

\end{frame}

\end{document}

document2-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0