In this version, the base path is defined in a tiddler, mypathtiddler. It
could be defined in a field of a tiddler, but this way is a little more
transparent:
\define pdflink2(name path file page) [ext[$name$|$path$/$file$.pdf
#page=$page$]]
\define pdflink(name file page) <$macrocall $name=pdflink2 name="""$name$"""
path={{mypathtiddler}} file="""$file$""" page="""$page$"""/>
<<pdflink "grammar" "Spanish_Grammar" "2">>
Good luck!
-- Mark
On Monday, January 7, 2019 at 3:55:36 AM UTC-8, Jack Stephan wrote:
>
> Hi Mark,
>
> Thank you. This what I am looking for. One final question, is there a way
> to have my input to $path$ be the field of a tiddler i.e. title or else a
> user-defined field, but the actual path itself (another user-defined field)
> populates?
>
> Again, I really appreciate the help. I'm still getting the hang of this,
> Jack
>
> On Sunday, 6 January 2019 21:14:24 UTC+1, Mark S. wrote:
>>
>> Untested, but this should work (you may need to tweak the path, etc)
>>
>> \define pdflink(name path page)
>> [ext[$name$|files/$path$.pdf#page=$page$]]
>>
>> Good luck
>> -- Mark
>>
>> On Friday, January 4, 2019 at 4:51:00 AM UTC-8, Jack Stephan wrote:
>>>
>>> Hello, thanks in advance for any help. I'm still quite a new user so I
>>> don't know if I'm phrasing the question in a way that meaningful, but I'll
>>> try my best. I am trying to incorporate all the PDFs from my lectures into
>>> TiddlWiki and link to them and specific pages. Is there a way to use this
>>> form of linking to PDFs:
>>>
>>> [ext[linkName|files/POD_5_MLST.pdf#page=8]]
>>>
>>> and to make the link name (linkName) page number (8) and the PDF title
>>> (POD_5_MLST.pdf) variables in some sort of macro? Ideally the macro would
>>> have three inputs, the desired title (linkName), the primary key of the PDF
>>> tiddler (labelled as field FID) which would call the PDF file name (another
>>> field called filename), and the page number to link to? For example:
>>>
>>> <<pdflink 'Existential Quaintifier' 'POD5' '8'>>
>>>
>>> To illustrate the structure of my PDF tiddlers, here is an example:
>>> fid POD5
>>> filename POD_5_MLST.pdf
>>> lecturetitle Mathematical Logic & Set Theory
>>> pdf pdf
>>> scode POD
>>> tags [[Principles of Databases]]
>>> tcode
>>> title POD_5_MLST.pdf
>>> type lecture
>>>
>>> Again, thanks for the help. I hope I have explained my question well
>>> enough, but again, I think I am still in the learning phase where it is
>>> difficult to ask the 'right' questions.
>>>
>>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/6f0d50fc-17a0-459b-ad3b-5d98c7a10282%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.