-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Use ![alt](path)
syntax not only to include images, but also text files
#307
Comments
Sorry, but there's a discrepancy between this description and what the code does. I see some code related to footnotes, etc. So what does it mean? What are the implications for other Djot implementations? |
Also, sorry, but this is bragging, and weird:
In my own workflows, I use a higher level master document file (above Djot etc.), and I have made printed books from front cover to back cover with them, assembling bits of Djot content (and also Markdown or other, when needed). I don't see anything being solved "positively" here. |
If you include files - there might be colliding identifiers, like e.g.
footnote names. In such a case the renderer warns the user and it is up to
the user to handle the issue. Again - no manipulation with the content.
…On Sun, Jun 30, 2024 at 12:26 AM Omikhleia ***@***.***> wrote:
Sorry, but there's a discrepancy between this description and what the
code does. I see some code related to footnotes, etc. So what does it mean?
What are the implications for other Djot implementations?
—
Reply to this email directly, view it on GitHub
<#307 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC6NCK7QZ5YBWZ76AUFVL63ZJ4Q7PAVCNFSM6AAAAABKDPCGQOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJYGM2DCNJRGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Using your own workflows can you handle this simple case of two included files: File_1: File_2: Master_File: If yes - how do you do it? |
I certainly would forbid breaking semantic structures between different files. What your example above is even aiming at solving ? You do really expect someone to start a bold structure in a file... and end it in another, seriously? |
Speaking of semantics, what becomes the "alt" content in your |
Just to stay consistent with the image case - |
|
How consistent? In pandoc-flavored markdown, what you call the "alt" text may be used as the figure legend if the image stands alone in a paragraph of its own (see the "implicit figure" option).
Sympathetic. But I recognize I wouldn't have a solution for a non-issue edge case with no clear semantics defined ;) You mention templating - I'm not even that sure it should be part of the document syntax... And real templating goes far beyond mere content injection. |
I think the association of this syntax An option could just use other symbol like
The only issue, would be that this symbol |
Your (4) goes far beyond the Djot input format markup and is perhaps possibly best left to renderers' interpretation... If instead of a CSV, your'd have (to stay on something similar) a speadsheet (ODT/OOXML), the "Sheet" name might be needed, etc. All of this is highly dependent on the source format, so a specification would have to be very explicit. (What's a slice of a CSV actually? Lines, columns, both? Etc.) |
@Omikhleia you are right on this and it was mostly related with other comment related to this #199 (comment), but this can also solve using URIs |
It would not be making it different, but would be generalizing it, with consistent transclusion semantics for any referenced media type:
|
@vassudanagunta I think that the problem with that is what would be the meaning of other option will allow using attributes to sort this out
|
Another way perhaps, which remains compatible with the default/current syntax: |
The issue of unknown file types is a general problem not exclusive to markup languages (e.g. opening a file via your OS GUI, or HTTP GET). It should be solved the same way rather than introduce something new: use a file extension as best practice. Else check mime type. Else check magic byte. Else report error. |
This But there are 2 types of files, transclusion
So based on that and to maintain consistency,
the problem is that this will change the current semantic of |
I am not so sure. Keeping on with your CSV example, it may be rendered as a table, or as a graph (I'm using this for pie charts for instance, in my own renderer, but other visualizations could be considered). This is very open and cannot be handled with a straight single Note that this is not "transclusion", per se, by the way. EDIT: class vs. key-value vs. "semantic" tag, if the latter (#240) eventually makes it. |
@Omikhleia you are right, the djot class system can be used for this, there are many ways to interpret a file |
I second using the class system. Even the distinction between I'd rather have |
@mklcp I agree about the class system, even better because attributes do accept key-vaue pairs, it can potentially mimic function invocation, which allow great versatility and extensibility but I think it will be better if there is an unambiguous way to declare the file type, so the render engine will have 3 variables to dispatch the proper method
|
Any decision/implementation on this topic? |
Use
![alt](path)
syntax not only to include images, but also text files.See: jgm/djot.js#85
"This commit enables the creation of structured documents of arbitrary complexity, contrary to the current state of affairs where only one-pagers are allowed. So now if one needs to write a book or a lengthy article all the content must be in one file. Working with big files is not convenient and may slow down/crash the editor besides being hard to read. File inclusion, implemented in jgm/djot.js#94, allows the author to subdivide the book/article into separate manageable chapters. This provides djot with the power similar to that of LaTeX and makes it positively distinct from all the Markdown-like tools."
And a ready to merge PR: jgm/djot.js#94
The text was updated successfully, but these errors were encountered: