|

Using LaTeX

I’ve been working on writing a book about using LaTeX, in order to learn how to use LaTeX. I’m just going to describe what I’ve been doing so far.

I started out by asking Grok AI to create an outline for the story. Then, I asked it questions about all the chapters and sections that Grok produced. Some of Grok’s output includes links to pages Grok searched to answer my questions. Don’t forget to copy them and give them credit for the information Grok is sharing.

So now, I have thirteen, very rough drafts of chapters of information about how to use Latex to write books. Grok produced twelve and I added a preface and one chapter about using LuaLatex.

In order to delete the weird formatting of the Grok document, I had to copy and paste the document into Kate and then, copy and paste from there into LibreOffice Writer. In Writer, I manually reformatted the information to look like the Grok output, without the weird boxes surrounding each line of text.

I had Grok open in one window and Writer open in another window. I used the Grok output as a pattern to reformat the documents. Grok, like most AI’s I’ve used, outputs lists of information. It’s like reading a dictionary. It’s good information, it’s just not a very interesting story. And remember, I’m not a professional computer programmer, so, I am probably not doing this in the most efficient way possible. This is just my clumsy way.

I installed the extension CodeHighlighter in Writer to enable me to make the code in the documents look different that the text of the document. I also installed the extension writer2latex to enable me to convert LibreOffice documents into Latex documents.

Once I got all the documents produced in Writer, I created a project directory in my writing directory. I put each chapter in it’s own directory. Then, when I selected the Tex button to convert the document into Latex, Latex created about ten different documents in the directory for that chapter.

Close the PDF and LibreOffice Writer and then, open the .tex file in your Latex editor. I used both Kile and TexStudio on different chapters, just so I could get familiar with each one of them. They are very similar, with minor differences.

And then, start editing. They both converted the apostrophes and dashes into long Latex commands. I deleted one of them and noticed it didn’t effect the output PDF. So at first, I converted each one individually, from a big long command, into a dash or apostrophe. Then, I thought that this would be a good time to finally learn how to use the old Linux command, find and replace.

I did a search on the Internet and Brave Leo came up with the solution for how to find the find and replace command in Kile. In both Kile and TexStudio, ctrl/r pops up a form at the bottom of the editor. Copy and paste the long command into the top space and a dash or apostrophe in the second space and find the replace all button and replace them all in about one second. In Kile, there is a button labeled replace all. In TexStudio, it is a double arrow point down.

ctrl/s works in Kile, but not TexStudio. Use F6 to save your work in TexStudio, at least on my desktop computer. And save often. It is a lot easier to find a parenthesis that should be a curly brace, in a small section of your document, rather than the whole 25 page chapter.

There are a lot of \textbackslash commands throughout the document that actually print a text backslash. I often want the text to print a backslash, so I leave the command. Other times, I want the editor to print the results of the command.

Because I am writing a story about using Latex, I often want the Latex code to show up in the text. Other times, I want the code to print a mathematical formula in the text. Sometimes both, to show the code and the result of the code.

So now, I have all the chapters in the form of very rough drafts. Mostly lists of information. I’ll go through them several times, editing and polishing each one of them into a story, rather than a dictionary of raw data. And then, put them all together into a book.

In the process of doing all this, probably way more complicated than it needs to be, process, I’ll be learning from both, reading the information that AI produced and from using Kile, TexStudio and Latex. I’ve already read The Latex Beginners Guide (Stefan Kottwitz, 2011) I’m almost finished, last one hundred pages, reading the 1600 page, The Latex Companion, (Frank Mittelbach and Ulrike Fischer, 2023). Read the Manual.

I plan on being a prolific writer. I’m getting my work station set up the way I like it. I like bells and whistles and eye candy. Learning how to use these tools is valuable work for me. I’m sure other people might want to do something similar. So, even though I am not a college educated expert, I can teach people like me, who want to learn how to self-publish their own stories.

Some of my stories will introduce you to the technology and more importantly, show you an example of how to do your own research. There is almost always more than one way to do thing right in Linux. There are a lot of options. I’m describing the options I like.

One of the most difficult problems is not knowing what you do not know. What questions do you need answers for? I’m doing research. I’m learning how to use this advanced technology to help make the world a better place.

Peace be with you.

Similar Posts

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.