Macro only loading when viewing.

58 views
Skip to first unread message

Jeff W

unread,
Jul 19, 2020, 3:18:00 PM7/19/20
to TiddlyWiki
Hey folks,

I've incorporated, into my Noteself usage, the ximg macro located here->  [External Image Path Macro](http://www.richshumaker.com/tw5/tw-photo.html#External%20Image%20Path)

It works great and works when I view a tiddler using the markup.

I have since modified the approach (created new tiddlers) to create essentially an External Link Path Macro (xpdf). My modified macro xpdf is intended to allow external links to open pdfs. The macro seems to work, but only when I perform the following:
  1. advance search for the macro
  2. select the xpdf macro
  3. when the tiddler appears (I don't have to open the edit window) the tiddlers that are using the macro work.
Here's what I've got in the tiddler:

A tiddler named "$:/macros/xpdf" and tagged "$:/tags/Macro" with the following content

   
\define pdfAtPath(t, y, d, p)
[ext[$t$|$p$$y$ JBW/$d$]]
\end

\define xpdf(title, year, doc, path:"$:/macros/xpdf/path")
<$macrocall $name="pdfAtPath" p={{$path$}} t="$title$" y="$year$" d="$doc$"/>
\end

Another tiddler named "$:/macros/xpdf/path" and tagged "$:/tags/Macro" with the following content

./JBW Notes Chrono/

In the tiddler calling the macro, the following notation is used:

<<xpdf History 2003 "2003-01-01_01_J_Green Book 099.pdf">>


Some other data (if needed).
  • Mac OS 10.15.5
  • Latest Noteself install 5.1.21
  • I have a local CouchDB (3.1.0) instance running
  • I have a remote CouchDB (2.3.1) instance running
  • This DB is replicating to and from each CouchDB instance
The Questions...
  • Does anyone see any reason why the xpdf macro would need the extra step?
  • Would the ximg and xpdf conflict with each other? (They both appear to work once the xpdf macro is viewed)
  • Are there certain variables that I need to change because they are unique (I wouldn't think this to be true)
  • Anyone have any ideas on how to fix it?
Thanks in advance,

Jeff W

unread,
Jul 23, 2020, 8:48:17 AM7/23/20
to tiddl...@googlegroups.com
Just an update. Solution(s) are here if needed in the future.


Reply all
Reply to author
Forward
0 new messages