asciidocfx / AsciidocFX

Asciidoc Editor and Toolchain written with JavaFX 21 (Build PDF, Epub, Mobi and HTML books, documents and slides)
http://www.asciidocfx.com/
Apache License 2.0
1.88k stars 295 forks source link

note taking support by adding labels/tags #493

Open wibrt opened 3 years ago

wibrt commented 3 years ago

feature request

add a extra view on left side, containing tags/lables besides image

partly inspired by https://joearms.github.io/#2019-01-08%20My%20Eureka%20Moment%20with%20the%20TiddlyWiki

the mean goals are:

hence adding the most important feature of note taking to asciidoxfx

ps: asciidoc markup has also tag and label support, i'm talking from a different perspective here; i guess a //@tag: or something would be needed?

ghorwin commented 1 year ago

I'd also like this feature. Implementation is rather straight-forward, and can be annotated helpfully, if we define the following rules for label usage:

Example:

[[sec:requestMasterProtocol]]
#### Aushandel-Protokoll und Vorrangregeln

...

[[ex:myExample]]
.Example for stuff
====
...
====

...

[[fig:myDiagram]]
.Some Diagram
image:SchemaViewTabularView.png[alt="Toggle button tabular view", pdfwith=3cm, left]

The text can be parsed for rows starting with [[ and ending with ]] and then the next non-empty line starting either with . or with # chars. The label is extracted and stored together with filename and line number.

This then gives a list like:

List of labels:
  sec:calibrationView            Calibration.adoc:3             '# Calibration View'
  sec:configView                 Config.adoc:3                  '# System Configuration'
  sec:dataGraphView              DataView.adoc:22               '## Data view - Diagram'
  sec:dataTableView              DataView.adoc:61               '## Data view - Table'
  sec:dataView                   DataView.adoc:3                '# Data, Messages and Error Status View'
  sec:errorDiagnostics           ErrorDiagnostics.adoc:2        '# Error Diagnostics and Remote Assistance'
  sec:errorList                  DataView.adoc:96               '### Error List'
  sec:errorView                  DataView.adoc:74               '## System Messages and Error Status View'
  sec:experimentManualMode       Experiment.adoc:80             '## Manual Mode'
  sec:experimentParameterChange  Experiment.adoc:57             '## Modifying Parameters during Experiments'
  sec:experimentView             Experiment.adoc:3              '# Experiments'
  sec:mainMenu                   UserInterface.adoc:56          '## Main Menu'
  sec:parameterView              Parameters.adoc:3              '# Experiment Control Parameters'
  sec:saveData                   DataView.adoc:139              '## Data Export'
  sec:schematicsStatusView       UserInterface.adoc:9           '### Schematic Status View'
  sec:tabularStatusView          UserInterface.adoc:41          '### Tabular Status View'

(This output is generated by my AsciiDoc helper script, see https://github.com/ghorwin/asciidoctor-publishing#linkcross-referencing-help ).

Having this feature natively in AsciiDocFX would be great!

rahmanusta commented 1 year ago

It is okay but how can UI look and what features can be helpful?

wibrt commented 1 year ago

I think there are two different kinds of labelling here?

One: labels/tags that can be used in map of notes written in asciidoc, to aggregate those notes (similar basic functionality to joplin, onenote,..)

Two: labelling as described by ghorwin

Both are interesting

ghorwin commented 1 year ago

@Rahman:

I'd suggest adding a new tab below "Outline" labeled "Labels" or "References". This tab would show a tree view. Top level nodes shows the adoc-file, that references were collected, from. Child nodes show: "line xxx,

- intro.adoc
  |
  +-  15, sec:introduction, # Overview and Outline
  +-  22, img:screenshotMainView, Initial view of software
  +- 122, sec:ui_structure, ## User Interface

- fileformats.adoc
  |
  +- 10, sec:fileFormats, # File Formats
  +- 110, subsec:imgFile, ## IMG-files

Something like that.

Double-clicking on a reference inserts <<sec:introduction>> into text, i.e. a cross reference to the label.

St897 commented 1 year ago

@ghorwin: sounds like a nice suggestion

in addition it would be nice to be able to (from the Labels tab or..):

ghorwin commented 1 year ago

Yes, indeed, the inverse lookup would be nice, too. This could be a combined tab: "Labels/References", in which you can switch between label treeview as described above, and reference view. Or, simpler to implement, two tabs "Labels" (as described before) and "References".

The latter could show the occurrances of all <<xxxx>> in the text as list or tree view (top node adoc file again, similar to labels view), and highlight those in red, that do not have a matching [[xxxx]] anywhere.

Double-clicking on a reference-node will go to the respective line in the file (and open it if needed).

The "aggregate command" sound interesting, yet probably needs to be specified in more detail.

rahmanusta commented 1 year ago

In progress...

image
wibrt commented 1 year ago

nice

ghorwin commented 11 months ago

looking forward to test it!