Skip to Content.
Sympa Menu

texmacs-users - Re: Custom title page

Subject: mailing-list for TeXmacs Users

List archive

Re: Custom title page


Chronological Thread 
  • From: Massimiliano Gubinelli <address@hidden>
  • To: Giovanni Piredda <address@hidden>
  • Cc: address@hidden
  • Subject: Re: Custom title page
  • Date: Sun, 18 Apr 2021 16:36:24 +0200

It seems to me that the answer of Giovanni is correct. I've looked at the
code and it seems relevant to me also to point out that the procedure
doc-data-main is called from doc-data-sub, which place in the document a tag
named doc-make-rich-title which refers to a further tag called
doc-make-title. I think these two tags (defined in title-base.ts) could also
be relevant. The order of the elements is determined by the scheme macro
doc-data-main, however their appeareance can be modified by changig one (or
more) of the macros:

doc-make-title, doc-title, doc-subtitle, doc-authors...

for example if one would like to add an image to the title page I think one
would need to modify doc-make-title, a more flexible approach would be to
replace the "document" tag appearing in doc-data-main with a macro so that
one can further customize both the order of the elements and insert more
material by modifying a macro and not the scheme code.

Best
Max

ps: maybe is better to move further discussion to the forum.

> On 18. Apr 2021, at 15:19, Giovanni Piredda <address@hidden> wrote:
>
> In the help files (Help -> Reference Guide -> Standard TeXmacs styles, at
> par 4.1.2.) you will find a general description of the mechanism for
> rendering titles.
>
> As far as I understand the key macro that lays out the title,
> doc-data-main, is not implemented as a TeXmacs macro but as a Scheme
> function (here the help document might be inaccurate in suggesting that it
> is a TeXmacs macro); you can find it in
> $TEXMACS_PATH/progs/database/title-markup.scm, and I copy it here
>
> (tm-define (doc-data-main t)
> `(document
> ,@(select t '(doc-title))
> ,@(select t '(doc-subtitle))
> ,@(with authors (select t '(doc-author))
> (if (<= (length authors) 1) authors
> (list `(doc-authors ,@authors))))
> ,@(select t '(doc-date))
> ,@(select t '(doc-misc))
> ,@(select t '(doc-inactive))))
>
> You can place your new definition in a Scheme module that you load from
> your document (please ask if you do not know how to do that).
>
> Rearranging the order of the elements is intuitive I think. Here is an
> example, where I place the author first and set a line between author and
> title (I tested it and it works):
>
> (tm-define (doc-data-main t)
> `(document
> ,@(with authors (select t '(doc-author))
> (if (<= (length authors) 1) authors
> (list `(doc-authors ,@authors))))
> (line (point "0par" "0") (point "1par" "0"))
> ,@(select t '(doc-title))
> ,@(select t '(doc-subtitle))
> ,@(select t '(doc-date))
> ,@(select t '(doc-misc))
> ,@(select t '(doc-inactive))))
>
> Said this, what I wrote is not authoritative at all :-) The mechanism for
> the layout is complex and there are many parts which I haven't grasped.
>
> I hope that someone else can extend/complete/correct what I wrote, and that
> it helps to get you started.
>
> I would say that for further info either ask here again, or if the
> discussion becomes quite complex maybe the forum at
> http://forum.texmacs.cn/ might be a good place.
>
>
> G.
>
>
>
>
> On 18.04.21 14:11, Pycpp wrote:
>> Hello,
>> I'd like to know how to create a custom style for the title page. The
>> manual explains how to modify the appearance of individual elements, but
>> I'd like to define new elements (like an illustration image) and define
>> the global layout of the title page, i.e. the order in which the elements
>> appear, their positions and additional decorations (for instance I'd like
>> to draw a horizontal line between the title and the subtitle).
>> How can this be done?
>> Thank you for your answers!
>>
>>




Archive powered by MHonArc 2.6.19.

Top of Page