I want to make rounded corners on one side only like this:
\tikz{
\fill[red]
(0,0) +(8pt,8pt) arc (0:-90:8pt) -- (0,1) arc (90:0:8pt)
}
The points (0,0) and (0,1) in the above are placeholders. I actually want to use the lower and upper right corners of a node. Thus:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\tikz{
\node[inner sep=8, fill=red](subh){
\parbox{2cm}{
some multiline text
}
\hspace{-8pt}
}
\fill[red]
(subh.below right) +(8pt,8pt) arc (0:-90:8pt) -- (subh.above right) arc (90:0:8pt);
}
\end{document}
This causes XeLaTeX to start an apparently neverending compilation. How to make it work? (I'm asking for a solution in this vein. What I'm actually going to try next, as I need the result quickly, is to make a 2x3 table with text spanning the first column, it and the middle cell of the second one having blue background and with TikZ-made quarter-circles in the rest.)
\documentclass[tikz,border=3.14mm]{standalone} \begin{document} \tikz{ \node[inner sep=8, fill=red,text width=2cm](subh){some multiline text}; \fill[red](subh.-45) +(8pt,8pt) arc (0:-90:8pt) -- (subh.45) arc (90:0:8pt); } \end{document}– Feb 02 '19 at 05:03\fill[red](subh.-45) +(8pt,8pt) arc (0:-90:8pt) -- (subh.45) arc (90:0:8pt);. – ByteEater Feb 02 '19 at 05:16\documentclassand ends with\end{document}. Can you turn you code into such an example? – Feb 02 '19 at 05:20\begin{document} \tikz{ \nodeinner sep=8, fill=red{ \parbox{2cm}{ some multiline text } \hspace{-8pt} } \fill[red] (subh.below right) +(8pt,8pt) arc (0:-90:8pt) -- (subh.above right) arc (90:0:8pt); } \end{document}`
– ByteEater Feb 02 '19 at 05:26;are still missing, so is\end{document},below rightis not a valid node anchor, nor isabove right, and this works:\documentclass{article} \usepackage{tikz} \begin{document} \tikz{ \node[inner sep=8, fill=red](subh){ \parbox{2cm}{ some multiline text } \hspace{-8pt} }; \fill[red]{ (subh.-45) +(8pt,8pt) arc (0:-90:8pt) -- (subh.45) arc (90:0:8pt) };} \end{document}And please add your example to the question (and not in a comment). – Feb 02 '19 at 05:29\node[inner sep=8, fill=red](subh){ \parbox{2cm}{ some multiline text } \hspace{-8pt} }– AndréC Feb 02 '19 at 06:05node– I didn't realize that's a path too. Reading a tutorial misled me toabove,belowandright; I've replaced withnorth,southandeast, respectively. What do the numbers in places of anchors mean? They seem to be in degrees, akin to Haskell's diagrams library. So, is -45 equivalent tosouth eastand 45 tonorth east? And are there additional possibilities, e.g. 20?But your example, @marmot, from #comment1192532_472993 still doesn't produce the desired effect.
– ByteEater Feb 02 '19 at 06:3345andnorth eastare not necessarily the same, so if you wantnorth east, then take it. Yes, nodes are also paths. And yes, you can add any angle like 20. And I really think you might benefit from having a look at https://tex.stackexchange.com/a/28118/121799, where nodes with rounded corners on one side only are discussed. They come with the shaperounded rectangle, which is defined in theshapes.misclibrary. – Feb 02 '19 at 06:38\nodeis not part of the path. It is the TikZ syntax that requires that each instruction be ended with a semicolon. – AndréC Feb 02 '19 at 07:30\nodeis an abbreviation for\path node(p.222, pgfmanual, v3.1) – Paul Gaborit Feb 02 '19 at 08:27Nodes are added to paths using the special path operation node. Nodes are not part of the path itself.– AndréC Feb 02 '19 at 08:43\nodeis a\pathoperation. This explains the addition of;at the end (as for all\path). – Paul Gaborit Feb 02 '19 at 08:51