Whoops, I didn't read your suggestion closely enough. It turns out it does seem to get what I'm looking for. Thanks so much for following up.
For later readers, here's the full template I'm using: <$notes.@arraySortedByPageIndexAndBounds> <$textString?> <$textString/> (p. <$page.label?><$page.label/><?$page.label?><$pageIndex.numberByAddingOne/></$page.label?>) </$textString?> <$string=?> <?$string=$textString?> <?$string?> <$string/> (p. <$page.label?><$page.label/><?$page.label?><$pageIndex.numberByAddingOne/></$page.label?>) </$string?> </$notes.@arraySortedByPageIndexAndBounds> On Wed, Nov 29, 2023 at 5:35 PM Christiaan Hofman <cmhof...@gmail.com> wrote: > My sample was just a fragment, as a replacement of the <$string> part. You > should also add the <$textString> section as in your original. > > Chrostiaan > > On 29 Nov 2023, at 19:51, Derek Van Ittersum <derek.vanitter...@gmail.com> > wrote: > > Thanks for the suggestion. Unfortunately, when I use that template I don't > get the highlights, only the text note. (in the example above, only the > "test note" and not the "Hence" nor any other highlights). > > I think I have resolved the problem. As long as I only add notes as > separate notes (rather than as notes attached to highlights), then I can > use the following template to get all of that information--separate text > notes and highlighted text. > > <$notes.@arraySortedByPageIndexAndBounds> > <$contents?> > <$contents/> (p. > <$page.label?><$page.label/><?$page.label?><$pageIndex.numberByAddingOne/></$page.label?>) > > </$contents?> > </$notes.@arraySortedByPageIndexAndBounds> > > On Wed, Nov 29, 2023 at 12:18 PM Christiaan Hofman <cmhof...@gmail.com> > wrote: > >> I just realized that perhaps you still could do what you want. It is >> possible to use an evaluated value in a condition. So you could write a >> condition tag like this (replacement of the second part of the template): >> >> <$string=?> >> <?$string=$textString?> >> <?$string?> >> <$string/> >> >> </$string?> >> >> Christiaan >> >> On 29 Nov 2023, at 17:54, Derek Van Ittersum <derek.vanitter...@gmail.com> >> wrote: >> >> Ok, I understand. Thanks for explaining. >> >> On Wed, Nov 29, 2023 at 11:49 AM Christiaan Hofman <cmhof...@gmail.com> >> wrote: >> >>> I think, in terms of the data that exists, what you want is really a >>> contradiction. On the one hand you want to both the content (string) of the >>> notes and highlights, and the highlighted text. in your template. That is >>> also what you achieve with your sample template. On the other hand, you say >>> you *don’t* want both the content and the highlighted text of a highlight >>> (because they just happen to be the same). You cannot have both, because >>> they are contradictory requirements. >>> >>> As I understand you, case 1 and case 3 are really the same: they are >>> highlights that have a content set. The only difference is really what the >>> content is set to, and how you have done that. And as a result that in one >>> case the two texts happen to be the same, and in the other case they are >>> different. So as there is no essential difference in the data, there is >>> simply no way a template can make a difference. >>> >>> You should realize that when you create a highlight in Skim, we just >>> *set* the content to the highlighted text. You can always change out to >>> some other value, just like you did in the other app before conversion >>> (it’s just that the other app sets the content to nothing by default). So >>> you could have created the situation for the highlighted “Hence” exactly >>> the same way in Skim: highlight “Hence” and set the content to “Test note”. >>> >>> Christiaan >>> >>> On 29 Nov 2023, at 16:40, Derek Van Ittersum < >>> derek.vanitter...@gmail.com> wrote: >>> >>> Yes, I have done the "convert notes" function prior to exporting with >>> the template. Here's a screenshot of the three types of notes I have: >>> >>> >>> https://www.dropbox.com/scl/fi/h79t3tzikwzl7eb4wo6tz/Screenshot-2023-11-29-at-7.43.36-AM.png?rlkey=eyodn8094jr8yfd9qg4k9i37r&dl=0 >>> >>> I am having a hard time understanding the templating process. I would >>> love to use conditional tags to achieve the result I'm looking for, but I >>> would need a bit of guidance. I've tried to use the suggestions made in >>> this previous conversation, but I never got all the data I was looking >>> for--it either skipped the highlighted text in the first note, or the note >>> itself (e.g., the note text "test note" and the highlighted text "Hence"): >>> https://sourceforge.net/p/skim-app/mailman/skim-app-users/thread/CAHwchkffF%2BZyPjg0ayYyNaWv-vf64-A-Yipo7UBqW8U9GbwR_A%40mail.gmail.com/#msg36703931 >>> >>> On Wed, Nov 29, 2023 at 5:39 AM Christiaan Hofman <cmhof...@gmail.com> >>> wrote: >>> >>>> I am not sure I completely understand your question. >>>> >>>> You get the doubling because you include both the string and the >>>> textString. The former is the contents value of the note or highight, while >>>> the latter is the text behind the highlight. In Skim we set the string to >>>> the textString. That’s why you se the doubling. >>>> >>>> As for 3, highlights added by other apps will not be part of the >>>> template, as Skim doesn’t see them. So I don’t understand why you would >>>> ever get them. Or did you convert them? >>>> >>>> As I don’t understand what you mean by 3, I am not sure what to do. But >>>> perhaps you can add some condition tags for the type of the note around a >>>> part of your template. >>>> >>>> Christiaan >>>> >>>> > On 29 Nov 2023, at 01:32, Derek Van Ittersum < >>>> derek.vanitter...@gmail.com> wrote: >>>> > >>>> > Hello, >>>> > >>>> > I am trying to create a template that will output: >>>> > >>>> > 1. highlighted text >>>> > 2. text notes >>>> > 3. notes made on highlights (e.g., in other PDF apps, like the one on >>>> my Boox device, I select the highlight then click "add note" to it) >>>> > >>>> > I am getting all three of these bits of information with the >>>> following template: >>>> > >>>> > <$notes.@arraySortedByPageIndexAndBounds> >>>> > <$textString?> >>>> > <$textString/> (p. >>>> <$page.label?><$page.label/><?$page.label?><$pageIndex.numberByAddingOne/></$page.label?>) >>>> > >>>> > </$textString?> >>>> > <$string?> >>>> > <$string/> >>>> > >>>> > </$string?> >>>> > </$notes.@arraySortedByPageIndexAndBounds> >>>> > >>>> > However--I am getting any highlight without a note on it twice. Is >>>> there any way to amend my template so that I get the 3 bits of information >>>> without repetition? I have tried many different template value keys (e.g., >>>> text, string, contents, textString) but any alteration I have tried to the >>>> above ends up leaving out one of the 3 bits of information. >>>> > >>>> > Thanks for any help or explanation, >>>> > >>>> > Derek >>>> >>>> > _______________________________________________ > Skim-app-users mailing list > Skim-app-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/skim-app-users >
_______________________________________________ Skim-app-users mailing list Skim-app-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-users