New answers tagged

2

I'm posting a new answer (prompted by the OP's request in the comment, but there's many other changes as well) because adding to the previous one makes the answer too long, and I don't feel right radically changing the accepted answer. In, fact the code is so long I had to compress it, so I will say no more here. \documentclass{standalone} \usepackage[edges]{...


5

This has been quite challenging. The implementation details are given in the commens to the code, here I will only outline the problem and the solution. If we knew that the citation nodes in the boxes on the right will never surpass the height of the corresponding category nodes of the tree on the left, the situation would have been much simpler. In such a ...


0

Your main problem is already solved by @Ulrike Fischer comment, however some remarks, which (to my opinion at least) can make your forest code shorter and more clear: your image is wider than standard article text width do you really need named all nodes in tree? positioning of edge labels can be automatically positioned (see MWE below) use of styles you ...


1

As starting point ... \documentclass[margin=3.14159]{standalone} \usepackage[T1]{fontenc} \usepackage[edges]{forest} \usetikzlibrary{arrows.meta, shadows} \begin{document} \begin{forest} for tree={ % node draw, rounded corners,% here you can insert your definition % tree grow=0, forked edge, % for forked edge s sep = ...


2

As David Carlisle says in the comment, there's no need for \ensuremath here, and in fact you probably don't want it. You simply need to protect the = sign from the forest parsing mechanism. And the normal way to do that is to simply enclose the =ta (or even just the =) in {..}. Also, you shouldn't use \\ to get a new line in an example like this (as opposed ...


4

A phantom child of 13 between 4 and 19, with fit=band and vertically aligned to the parent 13 (calign with current), should do the trick. \documentclass{standalone} \usepackage{forest} \makeatletter\tikzset{use path/.code={\tikz@addmode{\pgfsyssoftpath@setcurrentpath#1} \appto\tikz@preactions{\let\tikz@actions@path#1}}}\makeatother \forestset{show boundary/....


0

To fix this, you have to use the \ensuremath{} command. The following MWE actually works: \documentclass[12pt, letterpaper]{article} \usepackage{forest} \usepackage{gb4e} \begin{document} \begin{exe} \ex Enclisis \\ \label{EnclisisorLocativeCase1} \begin{center} \begin{forest} [PP [DP [NP [N[pahá,tier=word]]] [D[-ø,tier=word]]] [P[\ensuremath{=}ta,tier=...


0

the solution may not be your liking --i have removed the phantom intermediate nodes and added them at the end \documentclass{standalone} \usepackage{forest} \begin{document} \begin{forest} for tree={ fill=red!50,fit=band, circle, font=\sffamily }, [13 [4 [2] [5 [7 [9 ...


2

To have a node typeset in math mode, use key math content, like this: \documentclass{article} \usepackage{forest} \begin{document} \begin{forest} [2^{42}, math content [A] [A, math content] ] \end{forest} \end{document} Actually, math content is just a wrapper for content format. It puts \ensuremath around the content when typesetting it. But ...


3

You can implement the terminal nodes as simple tables. Depending on how you want the nodes to look you can align the tables using the [b] parameter (as shown on the L2/L3 nodes) or not (as in the L4/L5 nodes). If you do use the [b] parameter, you must wrap the entire tabular environment in {...} to protect the [ and ] from forest's tree parsing algorithm. ...


3

This time I decided to go for a more "minimalist" way and keep the tikz code to a minimum. Output Code \documentclass[margin=10pt, tikz]{standalone} \usepackage{forest} \tikzset{ fornode/.style={% node definition draw, text width=1.2cm, line width=.5pt, inner xsep=0, align=center, execute at begin node=\setlength{\baselineskip}{10pt}},...


3

Possible solution with forest: \documentclass[margin=3mm]{standalone} \usepackage{forest} \usetikzlibrary{arrows.meta, shapes.multipart} \newcommand\mpn[2]{\nodepart{one} #1 \nodepart{two} #2} \newcommand\rsp{rectangle split parts} \begin{document} \tikzset{every label/.style = {font=\footnotesize\sffamily\bfseries}} ...


2

It seems that use the pure TikZ is the simplest way: \documentclass[tikz, margin=3mm]{standalone} \usetikzlibrary{positioning} \tikzset{ node distance= 4mm and 2mm, arr/.style = {thick, draw=#1}, arr/.default = red, dot/.style = {circle, draw, very thin, fill, inner sep=0pt, outer sep=0pt, minimum size=3pt, ...


0

with forest \documentclass[margin=3mm]{standalone} \usepackage{forest} \usetikzlibrary{positioning} \begin{document} \begin{forest} for tree = {font=\scriptsize, anchor=west, math content, grow'=0, s sep=2mm, l sep=7mm } [start [0 [0 [0\quad {2^{0} 3^{0} 7^{0}=1}] ...


Top 50 recent answers are included