I suggest the below changes to ph annotation.
@davidgohel Please feel free to assign me the issue if you agree with the suggstions :)
1) Fix annotate_base()
- currently outdated due to missing type index (e.g.
body [3])
index should be renamed id for coherent terminology across functions (see layout_properties, ph_location_id, etc.),
- positioning of layout and master name at top right could be more consistent
- ph visualization could be improved by adding a optional border line by default (+ more options)
- Some masters I work with have > 30 layouts. It would be good to have an arg to select a subset only
Currently
Missing type index (body[2]), index should be id, unclear which area phs span, misaligned master + layout.
New
2) More modular approach
Personally, I rarely use annotate_base() as it breaks my flow of working. Usually, I want to just quickly see a slide's phs directly. I found, however, that using an experimental phs_annotate() works well for me in conjunction with the recently added print(preview = TRUE) (PR #675)
read_pptx() |>
add_slide("Title Slide") |>
phs_annotate() |> # annotate current slide's placeholders
print(preview = TRUE)
I suggest these two new functions for a more modular approach ph annotatation:
phs_annotate():
add_annotated_layouts():
- adds one slide with annotated phs for each layout
- allows selecting of a subset of layouts only
- different from
annotate_base() it is not yet written but only added to the rpptx object
- replaces the internals of
annotate_base()
I suggest the below changes to ph annotation.
@davidgohel Please feel free to assign me the issue if you agree with the suggstions :)
1) Fix
annotate_base()body [3])indexshould be renamedidfor coherent terminology across functions (seelayout_properties,ph_location_id, etc.),Currently
Missing type index (
body[2]),indexshould beid, unclear which area phs span, misaligned master + layout.New
2) More modular approach
Personally, I rarely use
annotate_base()as it breaks my flow of working. Usually, I want to just quickly see a slide's phs directly. I found, however, that using an experimentalphs_annotate()works well for me in conjunction with the recently addedprint(preview = TRUE)(PR #675)I suggest these two new functions for a more modular approach ph annotatation:
phs_annotate():rpptxobjectph_with.*methods for modifying location / placeholder object #681)add_annotated_layouts():annotate_base()it is not yet written but only added to therpptxobjectannotate_base()