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

Word-Error messages on first opening docx-file produced via officedown #31

Closed
Pindar777 opened this issue Jul 1, 2020 · 12 comments
Closed
Labels
invalid This doesn't seem right

Comments

@Pindar777
Copy link

Pindar777 commented Jul 1, 2020

Hi,

first of all thanks for this very nice and helpful combination of officer and rmarkdwon/bookdown!
I just came across the package when searching a proper way to get a column-output in word.

I managed to make use of the functionality.
However, even with simplest doxc-output I encounter one or more error messages on first opening the doxc-file in word.

A reproducible example is


---
title: test
output: 
    bookdown::markdown_document2:
        base_format: officedown::rdocx_document
---

[link to officedown](https://davidgohel.github.io/officedown/articles/yaml.html)

\@ref(ref-01)

# h1 {#ref-01}

How to avoid the corrupted docx-files?

Further:
And one setting (always on W10) when inserting the @ref() SLOC the link above of it gets destroyed.
I have to check this again, in order to make a reproducible example of the phenomenon.

Cheers

@davidgohel
Copy link
Owner

Can you write the exact message you have from word? I tried on my mac and on a Windows machine and everything was ok.
Maybe a screenshot?

And one setting (always on W10) when inserting the @ref() SLOC the link above of it gets destroyed.

I am sorry, I don't understand that. What does "W10" mean, what does "SLOC" mean?

@Pindar777
Copy link
Author

Pindar777 commented Jul 2, 2020

Hi @davidgohel,

W10 should read Windows 10. 😅
And SLOC source line of code.

Ok, I'm gonna upload the screenshots and check back soon.

Could I do something more to help debugging the word document?

@davidgohel
Copy link
Owner

Yes, is it Word that told you the document is corrupted? I need the exact messages

@davidgohel
Copy link
Owner

You can also post the resulting docx file.

@Pindar777
Copy link
Author

Yes, Word says it's corrupted and then it repaires the word and makes a new document

@davidgohel
Copy link
Owner

davidgohel commented Jul 2, 2020

thanks

Could you make sure you have the latest versions of officer and officedown from CRAN? If not, update them and retry.

I you could post the resulting docx file, I could analyze the content and maybe identify the origin of the problem you have

@Pindar777
Copy link
Author

I will do so.
Thanks in advance

Btw. I have one idea in terms of usability: the inline r commands stop with '
Then one has to directly write content.
IMHO a line break or a space after the ' should not be rendered in the output and hence improve the writing and reading experience of the rmd file.
What do you think?

@davidgohel
Copy link
Owner

What do you think?

It's knitr that do that, not me - sorry there is nothing I can do, officedown is only an extension to rmarkdown

@Pindar777
Copy link
Author

I see. I dwell upon this again.
Later today I give you the needed infos. Could be the officer is not up-to-date

@Pindar777
Copy link
Author

Dear @davidgohel,
Updating office got me rid of one error message. The "corrupted" file output now only results from using a user definined reference-docx (whichs opens without errors). As soon as a find the deeper reason for that, I check back.
Cheers

@Pindar777
Copy link
Author

Pindar777 commented Jul 2, 2020

What do you think?

It's knitr that do that, not me - sorry there is nothing I can do, officedown is only an extension to rmarkdown

I found this solution: insert after ` and the text a "comment" via standard rmarkdown-syntax

@davidgohel
Copy link
Owner

OK, thanks,

I am closing the issue then

only results from using a user definined reference-docx

Open a new issue if you still need to and provide the template so that I can reproduce

@davidgohel davidgohel added the invalid This doesn't seem right label Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants