-
Notifications
You must be signed in to change notification settings - Fork 60
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
feature request: link to files #307
Comments
Nice, I hadn't seen that feature and it sounds useful. I should be able to get to this soon. |
Opened a draft for this issue! #327 |
@DrunkenToast can you mention what use case you have that needs this in the prepend/append form you implemented? To me the way lookatme does it is quite clean and should be enough. I get it that maybe you want some imports or something at the beginning of the file but not sure if it's worth adding support for that given you could just copy the same 2 lines in however many snippets you have (which is hopefully not 50 or so). |
I simply hadn't seen the way lookatme does it to be quite frank. To me it made sense to simply prepend it, at which point, why also not append? Use case I had was indeed simply adding code and calling a function below it, depending on the slide. I understand if that is too specific, understand your concerns. Currently I simply append/prepend the content as if it was written inside the code block. |
I think the lookatme format can also be extended to have prefix + suffix. What I like about is we don't have to deal with parsing and trying to pack too much into the code block info line. This way it's some yank that you can more intuitively write/extend/validate. E.g. the append/prepend operation with a substring is much more cryptic than a properly named yank attribute IMO. |
The yaml could have either |
At that point it will be a weird mix of yaml and text with no highlighting in your editor, so probably not. In general you're completely right about the validation and extensibility. It's up to you what you decide. Personally, I find the syntax, e.g. , |
Oh no I don't mean to mix code with yaml. Just have a yaml with a list of file paths |
Oh I see, GitHub hadn't updated. |
I think there's two similar but related things here:
The latter could probably be done through the use of an <!-- include:./section_foo.md -->
<!-- include(./section_foo.md) --> |
This is a bit more annoying to implement that it would seem. It also has some subtleties that are unclear, like do includes pull in all slides in that other file and basically paste them? Can you Have you had presentations that are long enough that they require this? |
@mfontanini, it depends on how you want to implement it. The simplest thing to do would be to just copy/paste the contents of the file into the location of the LaTeX does something similar: it has a
I have written presentations in LaTeX where it was easier to break the content up in different files (like my thesis presentation), but granted, LaTeX is a little more verbose than markdown |
Going to give the code snippet one a try this weekend. I think the subsection thing should be moved to a separate ticket as it's unrelated to this one. |
Initial support for this is in #328. For now it only supports a @DrunkenToast the multi file should be a pretty straightforward extension to this, I'll probably have some time tomorrow. |
This allows adding snippets that pull in an external source file. Attributes still work like you'd expect. Examples: A rust file that allows execution: ~~~ ```file +exec +line_numbers path: snippet.rs language: rust ``` ~~~ A mermaid script that is rendered like you'd expect ~~~ ```file +render path: snippet.mmd language: mermaid ``` ~~~ Relates to #307
Closing this. IMO the multiple file thing is an extension that's too specific to be worth adding unless more people want this. The ticket originally was aimed at importing files, which is now supported. If people do want the many-files-concatenated-into-one version of this, please open a separate ticket. |
Hello!
First off, thanks for developing this! I just came across
presenterm
when I was looking at alternatives tolookatme
(unfortunately development appears to have stagnated on that project) and I love it!
One feature from
lookatme
that would be nice here is the ability to link to a file and have it displayed as highlighted code---this would help clean up the markdown file and keep the source of truth as the external file.Thanks!
The text was updated successfully, but these errors were encountered: