Quantcast

How do I reference a macro in a custom footer?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How do I reference a macro in a custom footer?

Tom Swan
Can I reference a macro from a docinfo-html file? For example I have:

  <div id="footer">
  <div id="footer-text"> 
  Program Name 6.2.3
  </div>
  </div>

Is it possible to define and use a macro for the version number?
www.tomswan.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How do I reference a macro in a custom footer?

mojavelinux
Administrator
Tom,

If you want to refer to the version number using an attribute reference, you can just do it. It's supported by default:

  <div id="footer">
  <div id="footer-text">  
  Program Name {program-version}
  </div>
  </div>

If you want to use other types of substitutions in the docinfo file, then you need to set the docinfosubs attribute in the document header. For example:

:docinfosubs: attributes,macros


On Mon, Apr 10, 2017 at 7:11 PM, Tom Swan [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Can I reference a macro from a docinfo-html file? For example I have:

  <div id="footer">
  <div id="footer-text"> 
  Program Name 6.2.3
  </div>
  </div>

Is it possible to define and use a macro for the version number?



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/How-do-I-reference-a-macro-in-a-custom-footer-tp5498.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How do I reference a macro in a custom footer?

Tom Swan
Okay perfect thanks.

On April 10, 2017 at 10:04 PM "mojavelinux [via Asciidoctor :: Discussion]" <[hidden email]> wrote:

Tom,

If you want to refer to the version number using an attribute reference, you can just do it. It's supported by default:

  <div id="footer">
  <div id="footer-text">  
  Program Name {program-version}
  </div>
  </div>

If you want to use other types of substitutions in the docinfo file, then you need to set the docinfosubs attribute in the document header. For example:

:docinfosubs: attributes,macros


On Mon, Apr 10, 2017 at 7:11 PM, Tom Swan [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Can I reference a macro from a docinfo-html file? For example I have:

  <div id="footer">
  <div id="footer-text"> 
  Program Name 6.2.3
  </div>
  </div>

Is it possible to define and use a macro for the version number?



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/How-do-I-reference-a-macro-in-a-custom-footer-tp5498.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/How-do-I-reference-a-macro-in-a-custom-footer-tp5498p5499.html
To unsubscribe from How do I reference a macro in a custom footer?, click here.
NAML

 
www.tomswan.com
Loading...