LaTeX forum ⇒ LyXImport 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! :)

Postby asbesto » Sun Jun 03, 2018 9:01 am

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?
TY in advance

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

asbesto

Tags:

User avatar
Stefan Kottwitz
Site Admin
Posts: 8905
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sun Jun 03, 2018 9:06 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
Site admin

rais
Posts: 158
Joined: Sun Nov 16, 2014 8:51 pm

Postby rais » Mon Jun 04, 2018 7:24 am

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

Postby scottkosty » Mon Jun 04, 2018 8:35 am

Note that LyX has a "Verbatim" environment. You can select it in the upper-left drop-down box in LyX.


Return to “LyX”

Who is online

Users browsing this forum: No registered users and 1 guest