LyXHow to add a few logic symbols?

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
lyxrocks
Posts: 91
Joined: Sat Oct 23, 2010 5:59 pm

How to add a few logic symbols?

Post by lyxrocks »

I think LyX is a great program. However, as a beginner, I am having trouble with adding new symbols.

I am taking a Mathematical Logic course as a graduate student, as the assignments get harder and harder, the default mathematics symbols simply don't cut it anymore, so my professor gave me 2 sty files(see attached).

I am running a windows vista 64bit

my LyX installation path is

C:\Program Files (x86)\LyX16

my latex installation path is(i think)

C:\CTEX\MiKTeX

will someone please kindly explain what exactly i need to do? I am not a lazy person that expects everything to be fed to me, I have tried to figure out this myself, but after roughly 5.5 hours of trying(google for and follow instructions), I simply realized, it's beyond my capability.

I have three classmates who I introduced LyX to, so they know even less about LyX. We are trying to submit our term project by next Friday, we have everything figured out we just need to type everything up. I promised them that I will figure out a solution this weekend because I didn't think it would be this hard.

I give my sincere thanks to anyone that tries to help.
Attachments
136macros.sty
(5.15 KiB) Downloaded 368 times
136ass.sty
(2.06 KiB) Downloaded 367 times
Last edited by lyxrocks on Wed Oct 27, 2010 12:22 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

How to add a few logic symbols?

Post by meho_r »

Well, with that stuff you'll have to get your hands dirty ;)

1. Put those two .sty files in your userdir so LyX can find them (or, alternatively, put them into the same directory as your .lyx files).

2. Reconfigure LyX (Tools > Reconfigure) and then restart it.

3. Those files contain new environments and commands which you can use instead of manually formatting entries. However, to use them in LyX, you'll have to use "plain" LaTeX code, i.e., use Ctrl+L shortcut and enter the code into the box (known as ERT box: "Evil Red Text" :D).

4. Every \newenvironment command defines a new environment. Example usage:

Code: Select all

\begin{notation}
Some text...
\end{notation}
Same goes for new theorems.

5. Every \newcommand defines a new command. Example usage:

Code: Select all

\pair{1}{2}
Pay attention to the number of arguments (in square brackets). E.g., the command \pair has two arguments, so you write: \pair{first_arg}{second_arg}. If we suppose there is a third argument, you write: \pair{first_arg}{second_arg}{third_arg} syntax.

In the attachment is a .lyx file which may serve as a small example of all this I said above.
Attachments
example.lyx.zip
(991 Bytes) Downloaded 226 times
lyxrocks
Posts: 91
Joined: Sat Oct 23, 2010 5:59 pm

How to add a few logic symbols?

Post by lyxrocks »

you are a life-saver! i managed to follow your instructions and i now see how this works. THANK YOU THANK YOU THANK YOU!

i have one more question, the reason LyX appeals to me is because it's "WYSWYG", so is there a way to turn those "Evil Red Text" into symbols like those that LyX comes with?

so basically, instead of
111.jpg
111.jpg (3.42 KiB) Viewed 6657 times
i want
222.jpg
222.jpg (1.07 KiB) Viewed 6657 times
(i do understand that the generated PDF's look exactly the same)
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Re: How to add a few logic symbols?

Post by meho_r »

I'm afraid not. Any custom setting/command may be used only through ERT boxes.
lyxrocks
Posts: 91
Joined: Sat Oct 23, 2010 5:59 pm

Re: How to add a few logic symbols?

Post by lyxrocks »

one more question, sorry...

how do i know what the commands are? my professor mailed those sty files to me, but I don't see a list of the commands.

so far i only know that \propmodels is the "triple bar gate"...
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

How to add a few logic symbols?

Post by frabjous »

lyxrocks wrote:one more question, sorry...

how do i know what the commands are? my professor mailed those sty files to me, but I don't see a list of the commands.

so far i only know that \propmodels is the "triple bar gate"...
For all intents and purposes, those .sty files are lists of commands. Open then up in your favorite text editor and look at them. If you have questions about them, ask your professor.
lyxrocks
Posts: 91
Joined: Sat Oct 23, 2010 5:59 pm

How to add a few logic symbols?

Post by lyxrocks »

frabjous wrote:
lyxrocks wrote:one more question, sorry...

how do i know what the commands are? my professor mailed those sty files to me, but I don't see a list of the commands.

so far i only know that \propmodels is the "triple bar gate"...
For all intents and purposes, those .sty files are lists of commands. Open then up in your favorite text editor and look at them. If you have questions about them, ask your professor.
Thanks.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

How to add a few logic symbols?

Post by localghost »

Now that the problem is solved, please be so kind and mark the topic accordingly as clearly written in Section 3 of the Board Rules (to be read before posting). Please keep that in mind for the future so that further reminders will not be necessary.


Best regards and welcome to the board
Thorsten
Post Reply