title: In officer R, how to format text and bullet point levels for PowerPoint
body: <p>So I am working on creating an automated powerpoint report in R using the officer package. I want to create a bulleted list with numerous levels but I need to be able to have specific text formatting for each line (i.e. I want the first two words to be green while the rest of the line is black). I tried using unordered_list() but this command doesn't allow the specific text formatting I need. I've tried the code below which colors/bolds the text that I want, but ph_add_par(level = ) does not indent the bullet points. </p>
  
  <p>Is there a way that I can format the text how I want while also being able to manipulate the bullet point levels? I want it to look something like this:</p>
  
  <p><a href="https://i.stack.imgur.com/8VYeL.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <pre><code>library(officer)
      report &lt;- read_pptx()
      sprint_1 &lt;- sprintf("%s total crimes in %s %s", 
                          tc20, params$month, params$year)
  
      report%&gt;%
          add_slide(layout = 'Title and Content', master = 'Office Theme')%&gt;%
        ph_with(value = "Academy: Summary Notes", location = ph_location_type(type = "title"))%&gt;%
          ph_empty(location = ph_location_type("body")) %&gt;%
          ph_add_par(level = 1L)%&gt;%
          ph_add_text(str = sprint_1, style = fp_text(color = "black", font.size = 28, bold = TRUE, underlined = TRUE))%&gt;%
          ph_add_par(level = 2L)%&gt;%
          ph_add_text(str = paste("compared to this time in ", params$pastyear, " (", tc_ytd19, " total crimes)", sep = ""), 
                      style = fp_text(color = 'black', font.size = 24)) %&gt;% 
          ph_add_text(str = paste(pct_chg_mth, "change", sep = " "),
                      style = fp_text(color = "green", font.size = 24)) -&gt; report
  </code></pre>