benweet / stackedit

In-browser Markdown editor
https://stackedit.io/
Apache License 2.0
21.64k stars 2.72k forks source link

Adding a LaTeX or Word Template Option? #1581

Open frastlin opened 4 years ago

frastlin commented 4 years ago

Hello, I would like the ability to upload a LaTeX and or Word template. Most conferences, such as HCI International, ACL, ICAD, and every other conference or journal has a LaTeX and or word document they ask that you provide your paper in. When I introduce the idea of using StackEdit to my colleagues, they love the idea of Markdown, but will not use StackEdit until they can upload the template they need for the conference.

I know pandoc allows both doc and LaTeX templates, so an option would be to allow these templates just for Pandoc export. Ideally, we could view the paper in the viewer in real-time, but at the moment there is no support for these templates, and that makes StackEdit a no-go for my colleagues. If we could use either a Word or LaTeX template, that would go a long way in having StackEdit accepted in the academic community, along with bibtex citations.

gcoladon commented 4 years ago

I am new to this project and have no idea how much work would be involved in implementing what you suggest. But reading your issue brought to mind a question I thought I would ask you.

What's stopping the conference organizers from publishing a markdown template along with the LaTeX and Word ones? Have you ever tried making a markdown version of the LaTeX template and offering it to whoever publishes the RFP for that conference, to smooth the path to adoption of markdown?

frastlin commented 4 years ago

Conference and journal organizers have never heard of Markdown. Also, with pandoc it's just easier to have a word or LaTeX template, as it allows for these two template types by default.

yurigabrich commented 4 years ago

Hi! Stackedit comes handy to work in collaboration, offline and on mobile platforms, but do you really need a template similar to LaTex and Word files? I'm asking it because I recently integrate Overleaf with Stackedit through a GitHub project link. It has solved my problems to write down articles on the smartphone everywhere I go. I don't need Pandoc either, I just defined the Stackedit file to be a .tex and it automatically syncs with GitHub. At Overleaf I pull the updates and recompile the project to get the PDF output.

Unfortunately, you lose the Stackedit stylish view and any code highlight for .tex files. But it solves the problem if the intention is only to write and collaborate. Another thing that may sound boring is the stackedit_data presented at the end of each synced file. It is as an error for LaTeX but you can delete (or comment) it after the completion of the article to render the final version of the PDF without errors.

Just let me know If you'd like to try this solution, I'll be glad to help.

frastlin commented 4 years ago

Yes @yurigabrich, that sounds like a very workable option. It is just as much work to download the Stackedit document and compile it with Pandoc though. It is literally one extra command line argument to add a doc template, so this feature is an extremely easy one to add. Just a place to upload a template, and uploading that template in the compilation process. The point is that these workarounds are very technical and my collaborators are not technical.

yurigabrich commented 4 years ago

I understand your point, @frastlin. I can't use this workaround with everyone either. But if your colleagues are welcome to use Markdown instead of Word, it is already a victory! :sunglasses:

Sincerely, I don't know if the Pandoc conversion will work well on Stackedit. But you can try to create a CSS template for this case following the steps at https://community.stackedit.io/t/write-custom-css-in-templates/140.

frastlin commented 4 years ago

Does that CSS template work for Pandoc exports to Word? I just need to give collaborators a link to the editor, and let them know it's in Markdown, but the syntax for Markdown are so easy, and the editor makes it even easier, they probably won't even notice for most of their work. It's more difficult teaching people styles on word IMO.

yurigabrich commented 4 years ago

I prefer Markdown too! But I'm not sure if I've got right what you need.

I have understood that the CSS template is only for the HTML export (free) option. Someone has to create the CSS file manually or with Pandoc from a Word template.

However, if you'd like to convert the Markdown to a Word file with a pre-defined template, you do need to set up the Pandoc output, and not to change Stackedit configs. Maybe it's better to convert to LaTeX, not Word, as indicated here: https://pandoc.org/MANUAL.html#templates

yurigabrich commented 4 years ago

Hello, @frastlin!

I'm just curious... Have you found a solution?

frastlin commented 4 years ago

Not exactly. I would like to have a project and a template attached to the project in either word or LaTeX. Currently people are still asking me to compile the word document so they can read the paper in its compiled form. If there is a button they can press to download a compiled version, that would be ideal. I can manually make a CSS template from the directions that are given in the instructions, but sometimes they have pretty complex formatting, like numbering of headings, that I don't know how to do in CSS. Pandoc was built for this, so it's just an extra command line argument.

yurigabrich commented 4 years ago

Sorry for the late reply, are being tough days... Anyway, gets the magic by the pressing of a button sounds amazing and really challenging. I'd like to dive into it. :smiley: Next weekend, I'll try to convert a LaTeX template to an HTML format. Its the only alternative export option I can deal for now. I'll get back with the results.