From 82dc56276d56bec7c5057527efb6682938dfef07 Mon Sep 17 00:00:00 2001 From: Julius Guthunz <57110140+Julius-Gu@users.noreply.github.com> Date: Sun, 8 Dec 2024 01:31:42 +0100 Subject: [PATCH] Fix some grammar, typos and make the code section clearer for "Creating a Bibliography Style for TeXmacs" (#61) * update the tm source file * update the generated html file --- docs/create-bibliography-style.html | 36 ++++++++++++++++------------ src/create-bibliography-style.tm | 37 +++++++++++++++++------------ 2 files changed, 43 insertions(+), 30 deletions(-) diff --git a/docs/create-bibliography-style.html b/docs/create-bibliography-style.html index 12c880d..17e7c3f 100644 --- a/docs/create-bibliography-style.html +++ b/docs/create-bibliography-style.html @@ -26,7 +26,7 @@
@@ -115,7 +115,9 @@Creating a Bibliography Style for TeXmacs,(bib-format-url x) + in the last line as in the code below; the comma preceding the open + parenthesis in ,(bib-format-url x) is important! ↓
@@ -136,21 +138,23 @@Creating a Bibliography Style for TeXmacsstyle:
@@ -158,12 +162,14 @@
Creating a Bibliography Style for TeXmacs
or do `crtl`+`shift`+`R`). The sources - should now show up. + Click the current style (tm-plain in the above image) + And click on Other …. It will show a Pop-Up, + where you can enter the name of your style, prefixed with + "tm-". For example, tm-julius-link-elsart-num. + Then click on "ok". Now rebuild the current buffer (either + click on the button
or + do crtl+shift+R). The + url should now show up in the sources.
diff --git a/src/create-bibliography-style.tm b/src/create-bibliography-style.tm index d099f07..40d5b60 100644 --- a/src/create-bibliography-style.tm +++ b/src/create-bibliography-style.tm @@ -13,9 +13,9 @@ \; It is a good idea to first choose a style that is close to what you have in - mind, and make a derivative of that one. In my case, \0tm-elsart-num\0 was - a good starting point, since it orders the sources in the order that they - appear in the text and cites numerically. + mind, and make a derivative of that one. In my case, +
was a good starting point, since it orders the + sources in the order that they appear in the text and cites numerically. Once you have as style that you like, we need to find the Scheme files, where the code for the bibliographies are located. These are in the TeXmacs @@ -77,8 +77,8 @@ \ \ \ \ (if (bib-null? u) "" \0(concat "url: " ,u)))) - Then add the url field to the article entry definition just below: So look - for this part in the file... \ + Then add the url field to the article entry definition just below: look for + this part in the file... \ <\scm-code> (tm-define (bib-format-article n x) @@ -113,7 +113,9 @@ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ,(bib-format-note x)))))) - ... and add the last line below \ + ... and add the last line below in the last + line as in the code below; the comma preceding the open parenthesis in + is important! \ <\scm-code> (tm-define (bib-format-article n x) @@ -150,29 +152,34 @@ \ \ \ \ \ \ \ \ ,(bib-format-url x)))))) - Do this for the other entry types on which you want the urls to show up on. + Do this for the other entry types for which you want the urls to show up + on. \; - If you have TeXmacs opened, then restart it now so that it can reload the - bibliographies. + If you have TeXmacs opened on your computer, then restart it now so that it + can reload the bibliographies. - Then open the document and head down to the bibliography. + Open a document with a bibliography in it and head down to the bibliography + section. - Click on the bibliography, click on the current \0style\0: + Click on the bibliography. In the Toolbar there should be an entry for + : <\padded-center> |Screenshot from 2024-11-14 17-46-19.png>|0.3par|||> - And click on \0Other ...\0. It will show a Pop-Up, where you can enter the + Click the current style ( in the above image) And click + on . It will show a Pop-Up, where you can enter the name of your style, prefixed with "tm-". For example, - \ \0tm-julius-link-elsart-num\0. Then click on "ok". Now rebuild the + \ . Then click on "ok". Now rebuild the current buffer (either click on the button |Screenshot - from 2024-11-14 18-09-11.png>|1.4em|||>or do \0crtl\0+\0shift\0+\0R\0). The - sources should now show up. + from 2024-11-14 18-09-11.png>|1.4em|||>or do + + + ). The url should now show up + in the sources. |Screenshot from 2024-11-14 17-44-32.png>|1par|||>