enter image description hereI am looking in discussions, but I have not found, a solution to obtain a text box that has the characteristic of having solid corners, that is, a text box with fine lines but the corners of the four sides (not rounded) well marked and in evidence. Is there a discussion to refer to here in the forum? I found extraordinary text box solutions but none with the features I described. Thanks if you can give me a solution and understand how to edit a text box.

  • Hi and welcome. Can you add a freehand drawing of the desired result?
    – AndréC
    Feb 10 '20 at 19:18
  • 2
    Hi, have you taken a look at the tcolorbox package and its sharp corners option? You can find its documentation on page 48 in section "4.8 Corners". The manual is available on CTAN for instance (ctan.org/pkg/tcolorbox).
    – Skillmon
    Feb 10 '20 at 19:18
  • 1
    You can use the overlay option to draw the corners with a thicker line.
    – user194703
    Feb 10 '20 at 19:25
  • 1
    I uploaded a photo of the solution I would like to get. I hope it helps Feb 10 '20 at 19:44
  • Can you rename your question like for example How do I get a text box with thicker, non-rounded solid corners?
    – AndréC
    Feb 10 '20 at 20:37

Since you do not provide a code for the boxes without reinforced corners, I had to use some code as a starting point. I use this one. However, the new ingredient is

overlay={\draw[ultra thick] 
        ([yshift=-1em]frame.north west) |- ([xshift=1em]frame.north west)
        ([yshift=-1em]frame.north east) |- ([xshift=-1em]frame.north east)
        ([yshift=1em]frame.south west) |- ([xshift=1em]frame.south west)
        ([yshift=1em]frame.south east) |- ([xshift=-1em]frame.south east)

which should work with any box code as long as you load the relevant libraries.




\newtcolorbox[auto counter]{mytheorem}[1][]{%
    enhanced jigsaw,
    sharp corners,
    detach title,
    enlarge left by=18mm,
    underlay unbroken and first={%
       \node[above,text=myblue,font=\bfseries,align=center] at ([xshift=-.5\textwidth,yshift=-7mm]interior.north) {\thetcbcounter};
    pad at break=1mm,
    code={\ifdefempty{\tcbtitletext}{}{\tcbset{before upper={\tcbtitle\par\medskip}}}},
    overlay={\draw[ultra thick] 
        ([yshift=-1em]frame.north west) |- ([xshift=1em]frame.north west)
        ([yshift=-1em]frame.north east) |- ([xshift=-1em]frame.north east)
        ([yshift=1em]frame.south west) |- ([xshift=1em]frame.south west)
        ([yshift=1em]frame.south east) |- ([xshift=-1em]frame.south east)


  \begin{mytheorem}[title=Important Note]
    Important content. A body remains in a state of rest or continuous uniform motion unless acted on by an unbalanced external force.
        45x^2-4x  & =75x


enter image description here

  • I had looked at the tcolorbox guide, but I don't know how to solidify the corners and leave the contour lines of the square or rectangle in which to insert the text thin. Sorry . Thanks Schrödinger's cat! that was exactly what I intended. Feb 10 '20 at 19:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.