Specific Question:
I have never use LyX but would like to know if there is a possibility to work on LaTeX using my favorite editor (like emacs or any text editor) and then add my code to LyX (including bibliography etc) but without any special formatting commands, and have a working LyX document that will seem and be editable just like if I used LyX to create it.
More General:
What Should I do and what about I have to be careful while creating a LyX document by using the LaTeX approach (above). I mean that I can imagine these:
I could just copy my code with simple math and text and then press a key and import it as code in LyX environment and wait the appearance of the document to be as expected.
May me for equations would need to open a new box and add my equation's content separately from the other text
Do the same as above about the tables (with the simpler LaTeX commands I could imagine and then try to format it)
Import a
.bibfile into LyX and somehow in the step 1 (if I have in the text code\cite{key1}or\citep{key1}I am expecting normal LaTeX behavior of LyX.)
PS: I can imagine creating an empty document using LyX as a first step with just a sample of code to create some basic elements, and then export to LaTeX in order to see how I should do the above steps. (For example if I should use \(\) or \[\]... but as I have never use LyX I don't really know the cdorrect approach to get a typical LyX document.)
Edit: A somehow simple document that I would like to test if can imported in LyX without problems, is the next:
\documentclass{article}
\usepackage{multirow}
\usepackage{array}
\usepackage{natbib}
\begin{document}
This is a test file that we will try to import inside `LyX' document and we could or should expect the word ``LyX'' to be inside regular \LaTeX{} single and then double quotation marks. Also contains a variable $x_t$ with $t$ being the superscript.
\begin{table}
\begin{tabular}{|l|m{3cm}|c|p{4cm}|}
\hline
\textbf{No} & \textbf{Empty column}&\textbf{Centered}& \textbf{``Auto-Broken''}\\\hline
1 & &First row& This is a text that will span in two rows of $4\;cm$ maximum width\\\hline
2--3&\multicolumn{2}{c|}{\multirow{2}{*}{columns 3--3 centered}} & Text here not spaned\\\cline{4-4}
&\multicolumn{1}{c}{}&& Text here not spaned\\\hline
4& & Centered $F(x)$& Last spanned cell here with length of $4\;cm$\\\hline
\end{tabular}
\end{table}
According to citation~\cite{citation1} \citeauthor{citation2}, should have write that book~\citep{citation2}
\bibliographystyle{apalike}
\bibliography{MyBib}
\end{document}
With bibliography file MyBib.bib:
@article{citation1,
author={Konstantinos Leledakis},
title={Nothing to say about it!},
year={2019},
journal={Never publishing\ldots}
}
@book{citation2,
author={Albert Einstein},
title={Never told this sh$\|$t!},
year={1920},
publisher={Should be published!}
}
The output should be close to the picture:
And the LyX environment should behave as it was created by LyX itself.
For example, you should be able to edit an element of the tabular or change the subscript that I named "superscript" by mistake in the "variable" x_t.
PS: Added multirow just in case... but if it creates problems could be removed.






