1

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.)

18
  • Welcome to TeX.SE! Aren't you just missing some semicolons at the end of the paths? Try \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}
    – user121799
    Commented Feb 2, 2019 at 5:03
  • I am indeed! Somehow it works in the first snippet without one, despite the Wikibook. But adding it in the second one doesn't solve the problem.
    – ByteEater
    Commented Feb 2, 2019 at 5:13
  • Does my above code run through?
    – user121799
    Commented Feb 2, 2019 at 5:16
  • 1
    @AndréC \node is an abbreviation for \path node (p.222, pgfmanual, v3.1) Commented Feb 2, 2019 at 8:27
  • 1
    @AndréC Do not confuse syntax and semantics. Syntactically, \node is a \path operation. This explains the addition of ; at the end (as for all \path). Commented Feb 2, 2019 at 8:51

0

You must log in to answer this question.

Browse other questions tagged .