diff --git a/docs/changelog.md b/docs/changelog.md index 973a2567..f5bfe70f 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -2,6 +2,18 @@ title: Changelog --- +# v2.5.0 + +## Additions + +- Cosma's syntax for citations is now 100% identical to [Pandoc's Markdown citation syntax](https://pandoc.org/MANUAL.html#citation-syntax). This adds support for features such as writing `[prefix @key, suffix]`, or rendering `Author (Year)` when writing `@key`. +- Link types can now be used on citations. This only works when citation keys are within brackets. Example: `[cites as authority:@engelbart1962]`. +- Link types can now be used in CSV data, by adding a `type` header to your links table. (Pull request #104 by @snowsign) + +## Improvements + +- Until now, there were some quirks with the way Cosma handled paths in the configuration. For instance, the value of `export_target` needed to end with a slash `/` lest you end up with a weird file name (e.g. `export_target: folder` would lead to `foldercosmoscope.html`). This is no longer the case. Paths can be written however you prefer: `folder`, `./folder`, `folder/`, `'folder`, `"folder"`, etc. + # v2.4.1 ## Improvements diff --git a/docs/user-manual.md b/docs/user-manual.md index aa20de3c..2061eacc 100644 --- a/docs/user-manual.md +++ b/docs/user-manual.md @@ -145,7 +145,7 @@ entity type | | string | `stroke` | Node type outline color (used when the node is filled with an image) | HTML color | `link_types` | List of link types | list | link type | | string | -`stroke` | Link type stroke style | `single` (solid line), `dash` (dashed line), `dash` (dotted line), `double` (two parallel lines) +`stroke` | Link type stroke style | `simple` (solid line), `dash` (dashed line), `dotted` (dotted line), `double` (two parallel lines) `color` | Link type color | HTML color | `references_as_nodes` | Treat references as graph nodes when using `cosma modelize --citeproc` |`true` or `false` | `false` | `references_type_label` | Name of the record type for bibliographic references when `references_as_nodes: true` | string | | @@ -755,6 +755,12 @@ record_types: fill: "#6C6C6C" ``` +When references are treated as nodes, you can use link types on citations. Link types can only be used when citations are within brackets. They must be the first string within the brackets, ending with a colon `:`. Example: + +``` +On writing as a technology of the intellect [cites as authority:@goody1977, 46-52]... +``` + # Using the cosmoscope ## Layout diff --git a/man/cosma.1 b/man/cosma.1 index b7029f55..690ea514 100644 --- a/man/cosma.1 +++ b/man/cosma.1 @@ -1,6 +1,6 @@ -.\" Automatically generated by Pandoc 3.1.11.1 +.\" Automatically generated by Pandoc 3.4 .\" -.TH "Cosma\[cq]s User manual" "" "2023\-12\-03" "" "" +.TH "Cosma\[cq]s User manual" "" "2023\-12\-03" "" .SH NAME cosma - document graph visualization .SH DESCRIPTION @@ -222,10 +222,10 @@ reinsert them the next time you use the file. link type string - stroke Link type stroke style single (solid + stroke Link type stroke style simple (solid line), dash (dashed line), - dash (dotted + dotted (dotted line), double (two parallel lines) @@ -459,15 +459,15 @@ In accordance with the YAML specification, the list of keywords can be written in \f[I]block\f[R] mode: .IP .EX -tags: -\- keyword 1 -\- keyword 2 +tags\f[B]:\f[R] +\f[B]\-\f[R] keyword 1 +\f[B]\-\f[R] keyword 2 .EE .PP Or in \f[I]flow\f[R] mode: .IP .EX -tags: [keyword 1, keyword 2] +tags\f[B]:\f[R] \f[B][\f[R]keyword 1\f[B],\f[R] keyword 2\f[B]]\f[R] .EE .PP \f[B]Why a YAML header?\f[R] @@ -872,6 +872,8 @@ For nodes, only the \f[CR]title\f[R] metadata is required. label Description of the link (optional). This description is displayed in the context tooltips of the links. + + type Type of the link (optional) \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- .EE .RE @@ -919,7 +921,7 @@ In the example below, the \f[CR]custom.css\f[R] file contains declarations that change the fonts used in the cosmoscope: .IP .EX -:root { +\f[BI]:root\f[R] { \-\-sans: \[dq]IBM Plex Sans\[dq], sans\-serif; \-\-serif: \[dq]IBM Plex Serif\[dq], serif; \-\-mono: \[dq]IBM Plex Mono\[dq], monospace; @@ -1092,7 +1094,7 @@ You can view and download this data in the cosmoscope by clicking on the You can also access it from within the cosmoscope source code, under the \f[CR]
\f[R] tag. .SS Treating references as graph nodes -When configuration setting \f[CR]citations_as_nodes\f[R] is set to +When configuration setting \f[CR]references_as_nodes\f[R] is set to \f[CR]true\f[R], it modifies the behavior of the \f[CR]\-\-citeproc\f[R] option of \f[CR]cosma modelize\f[R], making it so that bibliographic references become nodes in the graph: each cited reference is treated as @@ -1104,11 +1106,11 @@ records. .PP To use this feature, you must do three things: .IP "1." 3 -set \f[CR]citations_as_nodes\f[R] to \f[CR]true\f[R] in the +set \f[CR]references_as_nodes\f[R] to \f[CR]true\f[R] in the project\[cq]s configuration; .IP "2." 3 define a value for \f[CR]references_type_label\f[R] (this is a new -setting introduced alongside \f[CR]citations_as_nodes\f[R] in this +setting introduced alongside \f[CR]references_as_nodes\f[R] in this release); .IP "3." 3 create a record type with the same name as the value for @@ -1117,13 +1119,24 @@ create a record type with the same name as the value for For instance: .IP .EX -citations_as_nodes: true +references_as_nodes: true references_type_label: \[dq]référence\[dq] record_types: référence: stroke: \[dq]#6C6C6C\[dq] fill: \[dq]#6C6C6C\[dq] .EE +.PP +When references are treated as nodes, you can use link types on +citations. +Link types can only be used when citations are within brackets. +They must be the first string within the brackets, ending with a colon +\f[CR]:\f[R]. +Example: +.IP +.EX +On writing as a technology of the intellect [cites as authority:\[at]goody1977, 46\-52]... +.EE .SH USING THE COSMOSCOPE .SS Layout The cosmoscope is organised in three columns: diff --git a/package-lock.json b/package-lock.json index c1baf88d..4b1159e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@graphlab-fr/cosma", - "version": "2.4.1", + "version": "2.5.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@graphlab-fr/cosma", - "version": "2.4.1", + "version": "2.5.0", "license": "GPL-3.0-or-later", "dependencies": { "@zettlr/citr": "^1.2.2", diff --git a/package.json b/package.json index 10f30a3b..04f1d367 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@graphlab-fr/cosma", - "version": "2.4.1", + "version": "2.5.0", "description": "Cosma is a document graph visualization tool. It modelizes interlinked Markdown files and renders them as an interactive network in a web interface.", "homepage": "https://cosma.arthurperret.fr/", "repository": {