The Tree of Widsdom

智慧の樹

ScriptHere

^do( ScriptHere, text, [author], [title], [url] )^

Type: Macro

Purpose: Adds a script block with citation info and url

The ScriptHere macro inserts a block of monospace text with reduced line-height inside a regular well. Perfect for bits of script or screenplay.

Because Tinderbox cannot test logical OR in a conditional when using the export code ^if^, I improvised a solution: testing each conditional separately and assigning all positives to a dedicated variable, $tmpNum1(bstVAR).

Hover below to reveal BoxPress code

^action($tmpNum1(bstVAR)=;if($2){$tmpNum1(bstVAR)=1};if($3){$tmpNum1(bstVAR)=1})^<div class="well script">$1 ^if($tmpNum1(bstVAR))^<footer class="afterquote">^if($2)^^value("$2")^^if($3)^, ^endIf^^endIf^^if(^value($3)^)^<cite>^if(^value($4)^)^<a href="$4">$3</a>^else^$3^endIf^</cite>^endIf^</footer>^endIf^</blockquote></div>

ScriptHere sample

This is the markup that is rendered below

^do(ScriptHere, "Steve: “I’ve got a blow-out in damper three.”
NASA One: “Get your pitch to zero.” 
Steve: “Pitch is out! I can’t hold altitude!”
NASA One: “Correction. Alpha Hold is off. Prep selectors. Emergency!”
Steve: “Flight Com! I can’t hold it! She’s breaking up, she’s break …”
Narrator (Harve Bennett): “Steve Austin. Astronaut. A man barely alive.”
Narrator (Richard Anderson as Oscar Goldman): “Gentlemen, we can rebuild him. We have the technology. We have the capability to make the world’s first bionic man. Steve Austin will be that man. Better than he was before. Better, stronger, faster.”", "Harve Bennett", "The Six Million Dollar Man", "https://www.youtube.com/embed/HoLs0V8T5AA")^

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Steve: “I’ve got a blow-out in damper three.”

NASA One: “Get your pitch to zero.”

Steve: “Pitch is out! I can’t hold altitude!”

NASA One: “Correction. Alpha Hold is off. Prep selectors. Emergency!”

Steve: “Flight Com! I can’t hold it! She’s breaking up, she’s break …”

Narrator (Harve Bennett): “Steve Austin. Astronaut. A man barely alive.”

Narrator (Richard Anderson as Oscar Goldman): “Gentlemen, we can rebuild him. We have the technology. We have the capability to make the world’s first bionic man. Steve Austin will be that man. Better than he was before. Better, stronger, faster.”

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Both author and title are optional, so you can do this:

This is the markup that is rendered below

^do(ScriptHere, "Steve: “Pitch is out! I can’t hold altitude!”
NASA One: “Correction. Alpha Hold is off. Prep selectors. Emergency!”
Steve: “Flight Com! I can’t hold it! She’s breaking up, she’s break …”", "Just Author")^

^do(ScriptHere, "Steve: “Pitch is out! I can’t hold altitude!”
NASA One: “Correction. Alpha Hold is off. Prep selectors. Emergency!”
Steve: “Flight Com! I can’t hold it! She’s breaking up, she’s break …”",, "Just Title")^

^do(ScriptHere, "Steve: “Pitch is out! I can’t hold altitude!”
NASA One: “Correction. Alpha Hold is off. Prep selectors. Emergency!”
Steve: “Flight Com! I can’t hold it! She’s breaking up, she’s break …”")^

Steve: “Pitch is out! I can’t hold altitude!”

NASA One: “Correction. Alpha Hold is off. Prep selectors. Emergency!”

Steve: “Flight Com! I can’t hold it! She’s breaking up, she’s break …”

Just Author

Steve: “Pitch is out! I can’t hold altitude!”

NASA One: “Correction. Alpha Hold is off. Prep selectors. Emergency!”

Steve: “Flight Com! I can’t hold it! She’s breaking up, she’s break …”

Just Title

Steve: “Pitch is out! I can’t hold altitude!”

NASA One: “Correction. Alpha Hold is off. Prep selectors. Emergency!”

Steve: “Flight Com! I can’t hold it! She’s breaking up, she’s break …”