TransWikia.com

Custom Command for Subitem with Itemize

TeX - LaTeX Asked by Ramona K. on June 27, 2021

I found following code from the comments on Possible to create bullets for subitems using itemize without a nested list?

newcommand{cvSubItem}[1]{%
    {setlengthitemindent{15pt} item[{includegraphics[width=0.3cm]{bullet.png}}] #1}
}

Two problems:

  1. The first letter of the SubItems has space to the others. It looks like:
    "s pace" instead of "space".

  2. If the line breaks, it should start at the same point as the text, not as the bullet:

* this happens
if the line breaks
* this should happen
  if the line breaks

!!!UPDATE!!!

I also tried this code for the nested variant:

newlist{SubItemList}{itemize}{1}
setlist[SubItemList]{label={$-$}}

letOldItemitem
newcommand{SubItemStart}[1]{%
    letitemSubItemEnd
    begin{SubItemList}[resume]%
        OldItem #1%
}
newcommand{SubItemMiddle}[1]{%
    OldItem #1%
}
newcommand{SubItemEnd}[1]{%
    end{SubItemList}%
    letitemOldItem
    item #1%
}
newcommand*{cvSubItem}[1]{%
    letcvSubItemSubItemMiddle%
    SubItemStart{#1}%
}%

This works well for the first Subitems. But if I have following list:

item
cvSubItem
cvSubitem
item
cvSubItem
cvSubItem

It only works for the first part.

Thanks for help!

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP