Dear LyX users, (Actually, I suspect this is a question for Jürgen S., but on the off chance that someone else knows the answer...)
I need to produce a diagram with the structure shown here. It was produced using the obsolete xyling package (see the attached xyling_test files): [image: tree_i_want.png] All the nodes will have a lot of linguist-specific bells and whistles, like IPA fonts and small caps and other stuff. XYling has not been updated in 15 years; I barely got the doc to compile. So, xyling is no good for what I need. In the process of trying to work out how to make that tree happen in forest, the package that LyX's linguistics module directly supports, I concluded that I will need to use the "draw" functionality. But I can't work out how to make the \draw commands work inside the tree insets. I tried to follow an example from the forest manual (number (21) on p. 9 of this, http://mirrors.ctan.org/graphics/pgf/contrib/forest/forest-doc.pdf, and realized that there is no obvious way to pass options in the \begin{forest} ... \end{forest} space beyond those that pertain to nodes (i.e., appear inside the [ ] brackets). The options just get ignored, or else prevent the PDF from being compiled. Things I've tried: 1) Declaring forest overtly in the preamble and passing the whole \begin{forest} ...\end{forest} block as ERT. That throws errors. 2) Using the native LyX forest support, and passing options as ERT inside the Tree inset. I noticed in the code preview pane that the \draw backslash is replaced with \textbackslash. I tried replacing the $s$ stuff with ERT, too. The code pane preview looks correct, but the file does not compile, throwing a bunch of errors along the lines of "Package pgfkeys Error:", etc. (I assume people can reproduce these...) Oh, also, I tried the example from the manual in TeXMaker to verify it wasn't some oddity of my TeX installation, and it compiled okay (except for the "background tree" option). It looked a lot more like what's in the manual than anything LyX produced (attached). So, yeah, I have a workaround in case it can't work--I could produce the doc in LyX, then export to TeX and finish the lattice thing there. I was just hoping there was an easier way. Linux Mint 19.1 texlive ~2017 LyX 2.3.6.1 Maria
xyling_test.lyx
Description: application/lyx
xyling_test.pdf
Description: Adobe PDF document
forest_eg.lyx
Description: application/lyx
forest_eg.pdf
Description: Adobe PDF document
forest_test.pdf
Description: Adobe PDF document
\documentclass[11pt,letterpaper]{article}
\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text}
\usepackage{xunicode}
\usepackage{xltxtra}
%\setmainfont{???}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{forest}
\begin{document}
\begin{forest}
[parent, grow=45
[child 1][child 2][child 3][child 4][child 5]
]
\draw[,->](forest cs:l=-1cm,s=0)--(forest cs:l=3cm,s=0) node[below]{$l$};
\draw[,->](forest cs:s=-1cm,l=0)--(forest cs:s=3cm,l=0) node[right]{$s$};
\end{forest}
\end{document}-- lyx-users mailing list [email protected] http://lists.lyx.org/mailman/listinfo/lyx-users
