this is my first time posting on StackExchange so apologies for any formatting mistakes.
I have a raw .tex file from my professor of a set of lecture notes, I'm attempting to combine this with another set of notes that I have from throughout the course written through LyX. I would like to use LyX instead of combining in another TeX editor as I find it much more readable and easier to edit.

When importing from 'File -> Import -> LaTeX (Plain)' only a small portion (3/32 pages) show up in the LyX editor. I have modified the LyX Preamble to match the Preamble of my raw .tex and it is as follows:

\topmargin -1mm % -10mm
\oddsidemargin 0mm % 7mm
\evensidemargin 0mm % 7mm
\textwidth 15.5cm
\textheight 22.5cm %
\parindent 0pt


\usetikzlibrary{positioning, calc}



\def\beginpf{\noindent {\bf Proof. }}

\newcommand{\boite}{\mbox{} \hfill $\square$}


\def\NN{{\mathbb N}}
\def\N{{\mathbb N}}
\def\QQ{{\mathbb Q}}
\def\Q{{\mathbb Q}}
\def\RR{{\mathbb R}}
\def\R{{\mathbb R}}
\def\CC{{\mathbb C}}
\def\C{{\mathbb C}}
\def\ZZ{{\mathbb Z}}
\def\Z{{\mathbb Z}}


\def\a{{\bf a}}
\def\e{{\bf e}}
\def\u{{\bf u}}
\def\v{{\bf v}}
\def\w{{\bf w}}
\def\x{{\bf x}}
\def\y{{\bf y}}
\def\z{{\bf z}}
\def\0{{\bf 0}}
\def\gcd{\mathop{\rm gcd}\nolimits}
\def\hcf{\mathop{\rm hcf}\nolimits}
\def\lcm{\mathop{\rm lcm}\nolimits}
\def\mod{\mathop{\rm mod}\nolimits}
\def\LHS{{\rm LHS}}
\def\RHS{{\rm RHS}}


\def\FF{{\mathbb F}}

\def\b{{\bf b}}

\def\Span{\mathop{\rm span}\nolimits}

\def\im{\mathop{\rm im}\nolimits}
\def\tr{\mathop{\rm tr}\nolimits}
\def\rank{\mathop{\rm rank}\nolimits}


And then for the body of the .tex file the following imports fine, but the following 3000+ lines do not appear to import correctly:


\centerline{\Large{\textbf{MATH 2022 Groups and Vector Spaces}}}


This outline is based on the previous lecturer's lectures notes, and is a useful resource, but not exactly the same as the course as now given (though I have tried to be consistent about notation). You 
should take your own notes in lectures, and may use these notes as back-up.

\section{Definition and examples of groups; subgroups and order}

${\mathbb N} = \{0, 1, 2, 3, \ldots\}$, the set of natural numbers (note that some authors omit 0, but I do not).
$\mathbb Z$, $\Q$, $\R$, and $\C$ are the sets of integers, rational numbers, real numbers, and complex numbers respectively. All come with binary operations $+$ and $\times$.

\begin{definition} Fix an integer $n \ge 1$. We let $\Z_n = \{ 0, 1, 2, \ldots, n-1\}$, and we add and multiply members of ${\mathbb Z}_n$ `modulo' $n$. That is, we add or multiply two given members of 
${\mathbb Z}_n$ as usual, and then find the remainder of the answer on division by $n$. This is called the \emph{ring of integers modulo $n$}. 

$\Z_4 = \{0, 1, 2, 3\}$ and $+$ and $\times$ are given by the tables
\begin{tabular}{ c | c c c c}
$+$ & $0$ & $1$ & $2$ & $3$ \\
$0$ & $0$ & $1$ & $2$ & $3$ \\
$1$ & $1$ & $2$ & $3$ & $0$ \\ 
$2$ & $2$ & $3$ & $0$ & $1$ \\ 
$3$ & $3$ & $0$ & $1$ & $2$ 
\begin{tabular}{ c | c c c c}
$\times$ & $0$ & $1$ & $2$ & $3$ \\
$0$ & $0$ & $0$ & $0$ & $0$ \\
$1$ & $0$ & $1$ & $2$ & $3$ \\ 
$2$ & $0$ & $2$ & $0$ & $2$ \\ 
$3$ & $0$ & $3$ & $2$ & $1$ 

\begin{definition} A \emph{group} is a non-empty set $G$ on which is defined an associative binary operation $\circ$ such that there is an identity $e$ ($e \circ x = x$ and $x \circ e = x$ for all 
$x \in G$), and each $x \in G$ has an inverse in $G$ (an element $y$ such that $x \circ y = e$ and $y \circ x = e$). 

The full notation is $(G, \circ)$, but if $\circ$ is understood, then we write $G$ for short. Thus to check that $G$ is a group, you have to check four things:


$G$ is closed under the operation, 

the operation is associative

there is an identity

every element has an inverse


(note that `$G$ is closed under the operation' means that if $x, y \in G$ then $x \circ y \in G$; this is not listed as an axiom, since it is part of what is meant by `$\circ$ is a binary operation on $G$'; 
also notice that you should avoid saying that $G$ is `closed', as that means something else - use the {\em whole phrase} `$G$ is closed under $\circ$').

\begin{examples} (1) $(\Z_4, +)$ is a group. It is closed under the operation, since any remainder modulo 4 lies in the set $\{0, 1, 2, 3\}$. 
Associative. For example $(3 + 2) + 1 = 1 + 1 = 2$, while $3 + (2 + 1) = 3 + 3 = 2$. In fact it inherits associativity from $+$ for $\Z$.
Identity element $0$.
The inverses of $0,1,2,3$ are $0,3,2,1$ respectively.

(2) More generally $(\Z_n, +)$ is a group for any $n$. 

(3) $(\Z_4, \times)$ is not a group. It is closed under the operation as before, and the operation is associative (it inherits it from $\Z$). The identity element is $1$. But $0$ has no inverse, since there 
is no $y$ with $0 \cdot y = 1$.

(4) The subset $\{1,2,3\}$ of $\Z_4$ is not a group under $\times$, since it is not closed under the operation.

(5) The subset $\{1, 3\}$ of $\Z_4$ {\em is} a group  under $\times$. It is closed under the operation since $1 \times a = a$ and $3 \times 3 = 1$.
It inherits associativity from $\times$ on $\Z_4$.
The identity element is $1$.
The inverses of $1, 3$ are $1, 3$ respectively.

(6) $(\R,+)$ is a group. The identity element is 0, and the inverse of $x$ is $-x$.

(7) $(\R,\times)$ is not a group. It is closed under $\times$, $\times$ is associative, the identity is 1, but 0 has no inverse.

(8) We define $\R^* = \{ x\in \R : x\neq 0\} = \R \setminus \{0\}$. Then $(\R^*,\times)$ is a group. The identity is 1, and the inverse of $x$ is $1/x$.

(9) $(\R,-)$ is not a group. The operation is not associative, e.g.\ $(1-2)-3 = -4$ but $1-(2-3) = 2$. 

\begin{definition} We say that a group $(G,\circ)$ is \emph{abelian} if the operation $\circ$ is commutative, that is, $x \circ y = y \circ x$ for all $x, y \in G$. \end{definition}

$(\Z_4,+)$, $(\R,+)$, $(\R^*,\times)$ are abelian groups. This next example is not.

\begin{example} (The dihedral group $D_3$)
Consider an equilateral triangle $XYZ$ with centroid $O$.
    \coordinate[label=above left:$Y$]  (Y) at (0,0);
    \coordinate[label=above right:$Z$] (Z) at (4,0);
    \coordinate[label=above:$X$] (X) at (2,3.464);

    \coordinate[label=$O$] (O) at (2,1.1547);

    \coordinate[label=below:A] (A) at (2, -0.6);
    \coordinate[label=right:B] (B) at (3.8,2.1939);
    \coordinate[label=left:C] (C) at (0.2,2.1939);

    \draw [dashed] (-0.3, -0.1732) -- (B);
    \draw [dashed] (4.3, -0.1732) -- (C);
    \draw [dashed] (A) -- (2,3.5);

    \draw [line width=1.5pt] (X) -- (Y) -- (Z) -- cycle;
The isometries of the plane preserving the triangle are
I & \text{do nothing}\\
R & \text{rotate about $O$ by angle $2\pi/3$ (clockwise)}\\
S & \text{rotate about $O$ by angle $2\pi/3$ (anticlockwise)}\\
A & \text{reflect in line $XO$}\\
B & \text{reflect in line $YO$}\\
C & \text{reflect in line $ZO$.}
The \emph{dihedral group} $D_3$ is given by the set $D_3 = \{ I, R, S, A, B, C\}$ with the operation $\circ$ given by composition. Specifically, $P \circ Q$ means `do $Q$ first, then $P$'.
For example $A \circ R = C$, $R \circ A = B$, $A \circ B = S$. Then $\circ$ gives the following group table (where we write $P \circ Q$ in row $P$, column $Q$).
\begin{tabular}{ c | c c c c c c }
$\circ$ & $I$ & $R$ & $S$ & $A$ & $B$ & $C$ \\
$I$ & $I$ & $R$ & $S$ & $A$ & $B$ & $C$ \\
$R$ & $R$ & $S$ & $I$ & $B$ & $C$ & $A$ \\
$S$ & $S$ & $I$ & $R$ & $C$ & $A$ & $B$ \\
$A$ & $A$ & $C$ & $B$ & $I$ & $S$ & $R$ \\
$B$ & $B$ & $A$ & $C$ & $R$ & $I$ & $S$ \\
$C$ & $C$ & $B$ & $A$ & $S$ & $R$ & $I$ 
The identity element is $I$. The inverses of $I, R, S, A, B, C$ are $I, S, R, A, B, C$ respectively.

When attempting to remove the


the whole body does import, but then a large amount of errors prevents the document from being rendered, what would you suggest as the simplest fix for this. Additionally (although this is a minor problem in the long run) when imported there is still a large amount of LaTeX code environments present, what is the simplest way of cleaning these up. Thanks in advance and again, apologies for any formatting errors/unnecessary parts.

  • 1
    Unfortunately it is quite complicated to parse arbitrary LaTeX. LyX has its own format, so it has to parse LaTeX and convert it to LyX's format, and it's common for there to be errors. – scottkosty Jan 14 at 18:51
  • LyX can make x things that know how export to LaTeX and sometimes how import. But LaTeX can make xplus things that LyX has no idea how to handle. Hopefully a LaTeX > Open document or conversion with pandoc and then import with LyX will simplify enough the document to be mostly digestible for LyX without lost all document structures and text format. – Fran Jan 15 at 1:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.