Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v.2.5 #142

Merged
merged 4 commits into from
Oct 5, 2024
Merged

v.2.5 #142

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion docs/user-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | |
Expand Down Expand Up @@ -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
Expand Down
39 changes: 26 additions & 13 deletions man/cosma.1
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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]<article id=\[dq]citation\-references\[dq]>\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
Expand All @@ -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
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
Loading