Skip to content
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

Issues in elsarticle template #295

Closed
3 tasks done
zhengchencai opened this issue Jun 28, 2020 · 16 comments
Closed
3 tasks done

Issues in elsarticle template #295

zhengchencai opened this issue Jun 28, 2020 · 16 comments
Assignees

Comments

@zhengchencai
Copy link

zhengchencai commented Jun 28, 2020


Hi there,

I converted my manuscript from latex version template into markdown because I really like the idea of rticles and want to insert figures and tables by r code instead of .png, however, the output is not exactly following elsarticle template. The main issues are

  1. after adding the keywords section, the date will be superimposed on the corresponding author email (please refer to the snapshot where I just add keywords in the raw template).
  2. I don't know how to add highlight section as it's part of elsarticle latex template, tyied "highlighting-macros" but nothing happened.
  3. there were two horizontal lines before and after abstract where the markdown version doesn't have.
  4. the line space seems much smaller than the official latex template compiled PDF. I got 46 lines per page whereas the official template compiled PDF gives 25 lines per page. Could you please take a look and help?

Left is markdown knit pdf, right is the pdf template provided by elsarticle latex package
image

By filing an issue to this repo, I promise that

  • I have fully read the issue guide at https://yihui.name/issue/.

  • I have provided the necessary information about my issue.

    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('rticles'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('rstudio/rticles').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • I have learned the Github Markdown syntax, and formatted my issue correctly.

I understand that my issue may be closed if I don't fulfill my promises.

@zhengchencai zhengchencai changed the title Issues in Issues in elsarticle template Jun 28, 2020
@gtalckmin
Copy link

I think you are adding more than one corresponding author.
If only one email is provided in the YAML it should work fine (?)
Cheers

@gtalckmin
Copy link

Regarding the Highlights, I reckon that for ELsevier you should upload that as a separate file.

There is also a YAML section where you can choose for either "review" or a few other options.

Maybe the one with the lines are another option. You would have to check the *.cls file avialble.

Cheers,

@zhengchencai
Copy link
Author

Regarding the Highlights, I reckon that for ELsevier you should upload that as a separate file.

There is also a YAML section where you can choose for either "review" or a few other options.

Maybe the one with the lines are another option. You would have to check the *.cls file avialble.

Cheers,

Thanks a lot for your help. In general, for formating adjustment, should I just look for .cls file to find the corresponding argument and add/edit in the YAML section at the beginning of the markdown file? If that's the trick, I think I could recover the format I did by latex template.

Cheers,

@gtalckmin
Copy link

Hi Zheng,

Honestly speaking, it also seems a bit complicated for me. In the YAML, basically you can provide instruction that will be then processed within the .cls file.

How to be aware of all possible options, it is (I believe) a difficult thing for beginners and people that (as you and I) are keen to use R-Markdown for scientific writing.

There are some instructions here: https://bookdown.org/yihui/bookdown/customization.html (which I am sure you already looked into).
and here : https://bookdown.org/yihui/rmarkdown/pdf-document.html ;
It is worth studying it all.

However, I reckon there is no way to run away from LaTeX (at a minimum at least).
CHeers

@zhengchencai
Copy link
Author

Thanks for the recommendations. I did read the bookdown chapters for YAML. I also tried to read the .cls code and found out to change the line space classoption should be 'review'. However, no matter how did I declare this in the header such as classoption: 'preprint', classoption: preprint , classoption: review and so on it just did not work.

For the overlapped corresponding author and date, I don't know what's wrong, but it is not because I set two corresponding authors.

In the .cls code, keyword should be declared as keyword but in practice, only keywords worked.

I think I am going back to latex, really appreciate the work.

@zhengchencai
Copy link
Author

zhengchencai commented Jul 8, 2020 via email

@yihui
Copy link
Member

yihui commented Aug 3, 2020

@zhengchencai Sorry for all the trouble!

@gtalckmin Thanks for the help!

@cderv Could you reach out to the original contributor of this template and see if he/she could help? If not, I can probably take a look, although I can't promise to fix it. Thanks!

@zhengchencai
Copy link
Author

Hi Yihui,

Thanks for your reply. No trouble at all. I chose to use it since I like Rmd. It's just this template is not easy to follow. I understand this is a time-consuming task since there are many journals to include. Thanks again for the work. Btw, in the end, I even quit Latex, since most of my coauthors also switched to WORD which is now accepted by most of the journals and very easy to comment and revise. I guess I will come back to Rmd for thesis writing.

Cheers

@yihui
Copy link
Member

yihui commented Aug 3, 2020

@zhengchencai Thanks for your understanding! This issue looks pretty bad to me, and I do hope to get it fixed if possible, no matter if you still need it.

@cderv
Copy link
Collaborator

cderv commented Aug 11, 2020

Hi @cboettig, maybe you can also help on these issues ? Do the template needs some updating or just better documentation maybe ?

@mingsu
Copy link

mingsu commented Sep 24, 2020

It is definitely a great package, while some minor issues have to be fixed before it put into production environment.

I have the same problem as @zhengchencai post.

Besides, I would like to use the unified author, institute, and other meta info for the YAML syntax. Related to #283, #324

As docx format becomes popular and close to the ground, rendering Rmarkdown to docx turns to be very important. In this case, if we can use the same Rmarkdown file instructed by rticles package, and render it to docx by changing the output argument to bookdown::word_document2, the life will be much easier.

output:
    bookdown::word_document2:
        toc: no
        keep_md: yes

Currently, mostly works but the docx file loses the author and institute information.

Screen Shot 2020-09-24 at 12 31 11 PM

@cderv
Copy link
Collaborator

cderv commented Jun 9, 2021

@mingsu The docx template in Pandoc are not as flexible as the .tex template. If you can come with a reference_docx that would work for your need, we could try include it. DOCX output has also been asked in #347

This is not in the initial scope of this package but it could be in the future. I just think it would be a lot of work and we'll need to confirm that Pandoc offers all what is needed for this (as the conversion from md to docx is done by Pandoc)

@zhengchencai Are the issue still here ? Did you try reuse the format and stumble upon the same problem ?
Or are you using Word template at the end ?

Sorry for the delay. We did not get much help on this one so I may need to take the time to look into it.

@zhengchencai
Copy link
Author

Hi Christophe, Thanks for replying. No sorry at all. I really appreciate this work and love bookdown. I would have spent more time figuring out the problem and feedback to you, however, in practice, I prefer to not spending too much time just learning how to write a paper with a cool tool that I like. Especially more and more of my co-authors are switching from Latex to WORD, which turns out easier to comment and revise than I thought.

@cderv
Copy link
Collaborator

cderv commented Jun 9, 2021

Especially more and more of my co-authors are switching from Latex to WORD, which turns out easier to comment and revise than I thought.

Thanks for the feedback. That is interesting !
Do journal offer nice template for docx ? Or are the guideline less strict and they edit after you send a manuscript.

We'll be happy to have feedback on word usage in #347 or another issue so that we can have all the relevant information to consider how to better support Docx workflow for articles using Rmd as source.

Thanks !

@zhengchencai
Copy link
Author

zhengchencai commented Jun 9, 2021

Thanks for the feedback. That is interesting !
Do journal offer nice template for docx ? Or are the guideline less strict and they edit after you send a manuscript.

Hi Christophe,

Since you asked, I try to feedback on my limited experience if it could help. I just choose whichever tool is easier to use for me and respect all of them.

Well, the journals (at least the ones I submitted to) in my field (neuroimaging) are now mostly supporting free format for the first submission. They only have general suggestions about which sections should be included and so on. A tiny convenience point from my experience on using WORD for submission is that the online system could automatically fill the abstract, authors and so on, whereas when I submitted the Latex version, it could not. I also only need to submit one file with figures in text for the convenience of reviewers, whereas submitting the latex version will need to upload the main text and figures one by one, and the final built PDF will have all figures in the end which the reviewers need to jump back and forth. I also once had the online PDF building system of the journal always provided low-resolution figures no matter which format (png, jpg, tiff...) I uploaded, but then I uploaded figures in WORD files (allowed by the journal), they all looked nice in the final built PDF.

For the revision stage, each journal has a different format requirement, but then I can just easily change the WORD document to the format by a good afternoon, which I may need to spend the same amount of time using a Latex template because I will need to figure out how to use the template first (and the reality is we don't write to a journal every week, so we will need to repeat this process next time since we will forget how), and some general Latex code might conflict with the template which will always give me warnings and take more time to solve them.

I think the main benefit of WORD is for reviewing with co-authors. Most people know how to use it, but commenting in Latex plain text is painful with all inline codes, and not everyone accepts to do it. If I send PDF to co-authors, I will have to find the corresponding line in Latex text one comment by one comment which is more frustrating than I thought.

@github-actions
Copy link

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants