Open jtojnar opened 4 years ago
for my use, I would prefer NOT having output decided by initial language. The simpler option (I assume) of letting the user decide at time of inserting image link would be better for me. I could see, though, how some may want automated-by-language option.
I use multiple language export blocks in markdown, as I cannot get captions, ALT text for sight-impaired, formatting, etc. to work by just exporting simplified markdown. BTW, thanks for this great extension!
I was thinking more like allowing users to override the option per-language as described in https://blog.atom.io/2014/10/31/language-scoped-config.html#using-in-your-own-packages since I think it provides good enough flexibility for most use cases while keeping the user interface simple.
It would be even better if atom allowed passing parameters to commands so that users could define their custom shortcuts like
'atom-text-editor':
'ctrl-shift-i l':
'command': 'markdown-image-insertion:insert-images'
'params':
'imageCode':
|\begin{{figure}} \centering \includegraphicswidth=0.95\textwidth]{url}
|\caption{{CAPTION
|\\ \footnotesize
|Credits:
|\normalsize }}
|\end{{figure}}
prologue: |~~~{=latex}
epilogue: |~~~
or add new menu items but it appears there is no elegant way to do that (https://discuss.atom.io/t/parameters-in-atom-commands/67355),
Despite the name, the extension supports more then just inserting markdown. You can configure the used template completely through the following settings:
markdown-image-insertion.general.imageCode
markdown-image-insertion.wrapping.prologue
markdown-image-insertion.wrapping.epilogue
For example, some people use it for LaTeX: https://github.com/jtojnar/markdown-image-insertion/issues/2#issuecomment-642991501
It might be nice to allow having multiple profiles and allow users to choose one of them. Or at least supporting per-project/per-language settings might be nice. Found this https://blog.atom.io/2014/10/31/language-scoped-config.html#using-in-your-own-packages