Does not seems so. The relevant code to convert TeXmacs documents to HTML is in $TEXMACS_PATH/progs/convert/html/tmhtml.scm
, in particular the procedure tmhtml-file
is responsible to produce the top level HTML document structure, there you can see that it gathers various META definitions to put into HEAD, things which happens here:
`(h:html
(h:head
(h:title ,@(tmhtml title))
(h:meta (@ (name "generator")
(content ,(string-append "TeXmacs " (texmacs-version)))))
,css
,@xhead)
(h:body ,@body))
where all the other meta were collected in the list xhead
. Unfortunately I do not see a way to programmatically add more. But you can modify this function to recognize other tags in the TeXmacs document and produce the relevant meta definitions. Look for example how the html-head-javascript
tag is handled there:
(if (with-extract doc "html-head-javascript")
(let* ((code (with-extract doc "html-head-javascript"))
(script `(h:script (@ (language "javascript")) ,code)))
(set! xhead (append xhead (list script)))))
This looks for html-head-javascript
in the TeXmacs document doc
and if found it extract its value in the variable code
and create a new HTML node <script....>
using the form (h:script ...)
, save it in the variable script
and then it appends it to the end of the xhead
list, which then it is placed in the right place in the output HTML document by the first snipped above. You just need to add a similar statement to handle whatever tag you would like to put there.
This will handle the low level part. If you want also to have a UI dialog to specify these details, it could be done but would require still some more code. If you want to look how to implement dialogs look for open-document-metadata
and document-metadata-editor
in $TEXMACS_PATH/progs/generic/document-widgets.scm
. The document metadata dialog is defined by the following code
(tm-widget ((document-metadata-editor u) quit)
(padded
(refreshable "document-metadata"
(aligned
(item (text "Title:")
(input (initial-set u "global-title" answer) "string"
(list (buffer-get-metadata u "title")) "30em"))
(item (text "Author:")
(input (initial-set u "global-author" answer) "string"
(list (buffer-get-metadata u "author")) "30em"))
(item (text "Subject:")
(input (initial-set u "global-subject" answer) "string"
(list (buffer-get-metadata u "subject")) "30em"))))
======
(explicit-buttons
(hlist
>>>
("Reset"
(initial-default u "global-title" "global-author" "global-subject")
(refresh-now "document-metadata"))
// //
("Ok" (quit))))))
it uses variables contained in the environment tree of the document (which I do not know much about) to store the values. This is another mechanism you could use to propagate used defined values, but is not what I was mentioning above.