0

I found a file in raw lyx output, how do I create a readable pdf or txt file from this mess?

https://raw.githubusercontent.com/jarcane/bedroom-wall-press/master/hulks-and-horrors/HnHCompanionI.lyx

I have installed LyX and tried pasting, I have tried pasting in OpenOffice and then exporting as plain text, then importing plain text into LyX, it always includes the format coding when I try to export the file as pdf or text.

I just want the human readable portion of the document.

Any help would be appreciated, thank you.

Chris Morgan
  • 3
  • 1
  • 2
  • http://wiki.lyx.org/uploads/LyX/tutorials/essentials/LyX_Essentials.pdf – chtz Jan 15 '17 at 17:18
  • The problem is I can't get it to compile when I select export. All the formatting codes, like \begin_document, and \use_default_options true and such, just get included as text in the document – Chris Morgan Jan 15 '17 at 17:37

1 Answers1

1

The LyX file you link to is indeed a valid .lyx file. To use it, do the following:

  1. Download the file. The easiest way to do this is to just run

wget "https://raw.githubusercontent.com/jarcane/bedroom-wall-press/master/hulks-and-horrors/HnHCompanionI.lyx"

  1. Open the file in LyX.

  2. Compile to PDF by clicking on the "eyes" icon, or by going to File > Export > PDF (pdflatex) in which case a .pdf file will be created in the same directory as the .lyx file.

Note that you the .lyx file depends on other files. For example, there is an image included in the .lyx file with a path "C:/Users/BearBear/Google Drive/Hulks and Horrors B&W Logo for Print.png".

It is possible that you won't be able to compile the document because of the missing .png or because you do not have a complete TeX installation. In this case, you can simply read the document in LyX. It is not as pretty as in the PDF but it is certainly readable in my opinion.

scottkosty
  • 2,410
  • 1
  • 16
  • 22
  • I'm using windows LyX 2.2.2 and when I try to open the file it just tells me that it is not a readable file, and if I copy and paste the contents of the file, then it treat the \ as textual not as a start to a format code. I finally got it to recognize the \ properly by using ctr-l to paste, but then almost none of the formating was recognized as valid by LyX. Its become a challenge for me now, even above the contents. – Chris Morgan Jan 15 '17 at 19:42
  • Copy/pasting into LyX is not the right approach. Since you are on Windows and cannot use wget, open the page in your webbrowser and then go to "save as". Then when you open it does it work? I have LyX 2.2 and it works for me. – scottkosty Jan 15 '17 at 19:45
  • Aha, got it! scottkosty helped me enough to figure out what was going on. I was saving the file from the previous page using save link as. for some reason it was downloading the html from the next page, but not including the actual LyX file. What was throwing me off was that it was saving this file as HnHCompanionI.lyx, even though that was not what was in the file at all. – Chris Morgan Jan 15 '17 at 19:47
  • I had to right click on RAW in the view pane to get the actual file. – Chris Morgan Jan 15 '17 at 19:52
  • Glad it worked! That is actually a common problem for Windows users. That's why I recommend using something like "wget". Or at least inspect the file after downloading/saving in a text editor (e.g. Wordpad). Best of luck. – scottkosty Jan 15 '17 at 20:08