LaTeX forum ⇒ LyX ⇒ Import of a RAW text file... I need some help! :)

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
asbesto
Posts: 1
Joined: Sun Jun 03, 2018 8:51 am

Import of a RAW text file... I need some help! :)

Hi there,

I used LyX some years ago, creating a book of "haikus", it was a wonderful experience because of the final result - so amazing!

Now I'm running into a new idea and I'm struggling with a problem. I need to have a bunch of ASCII logfiles as the content of my "book" - I need to maintain the same formatting because it's ASCII graphics in there, and tables etc.

So any "chapter" in this book is a logfile - a plain text file.

I can't find a nice good way to import those text files into lyx

I tried joining all those text files into one single file to try a single big chapter with full text in it) but when I tried "import", everything gone to hell - CPU at 100% and LyX basically locked. (this on my GNU/Linux system, btw)

So I'm trying to find a solution - the best will be to have any of those files (some of them are about 250 - 300K in size) as simple chapters of this kind of book - mantaining the ASCII formatting as it is (and maybe changing the font in it, but that's another question)

Can someone help?

PS I'm using LyX version 2.2.2 under Devuan GNU/Linux (basically it's a Debian Stable)

asbesto

Tags:

Stefan Kottwitz
Posts: 8906
Joined: Mon Mar 10, 2008 9:44 pm
Welcome to the forum!

You could put the raw text into a .tex file, let's say `ascii.tex`. Then insert TeX code in LyX ("ERT", "evil red text") that is `\input{ascii}`.

Stefan

rais
Posts: 158
Joined: Sun Nov 16, 2014 8:51 pm
Hi,
asbesto wrote:
I need to maintain the same formatting because it's ASCII graphics in there, and tables etc.

perhaps you're looking for `\verbatiminput{}` as provided by verbatim package?

KR
Rainer

scottkosty
Site Moderator
Posts: 521
Joined: Sat Sep 01, 2012 6:38 am
Note that LyX has a "Verbatim" environment. You can select it in the upper-left drop-down box in LyX.