LaTeX forum ⇒ Graphics, Figures & TablesBox with Title Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
User avatar
Stefan Kottwitz
Site Admin
Posts: 8207
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Box with Title

Postby Stefan Kottwitz » Wed Jan 11, 2017 9:53 am

Hi Kostao!

You have an older version of the tcolorbox package on your computer. Perhaps your whole TeX installation is not up to date. Update at least tcolorbox. Do you have MiKTeX or TeX Live? I would update that too.

Stefan
Site admin

Tags:

kostao
Posts: 16
Joined: Tue Jan 10, 2017 8:48 pm

Postby kostao » Wed Jan 11, 2017 10:06 am

I try to update TexLive sudo apt-get install texlive-full, but texlive-full is already the newest version.
How can I update tcolorbox package (Linux Mint 17.2)?

User avatar
Stefan Kottwitz
Site Admin
Posts: 8207
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Wed Jan 11, 2017 10:40 am

It seems that Mint doesn't provide the newest TeX version.

You could download tcolorbox from CTAN and put it into the TeX tree or just in your document folder.

Or uninstall the Mint TeX and install the original TeX Live via the Internet.

Stefan
Site admin

kostao
Posts: 16
Joined: Tue Jan 10, 2017 8:48 pm

Postby kostao » Wed Jan 11, 2017 11:11 am

Ok, all works, thanks.

kostao
Posts: 16
Joined: Tue Jan 10, 2017 8:48 pm

Postby kostao » Thu Jan 12, 2017 6:27 am

How I can reduce this size?
box.jpg
box.jpg (62.22 KiB) Viewed 482 times

User avatar
Stefan Kottwitz
Site Admin
Posts: 8207
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Thu Jan 12, 2017 12:43 pm

You could insert size=small here in your \newtcolorbox definition. Is this ok you do you need to adjust it in more detail?

boxed title style={size=small, frame code={...

Stefan

PS: you can post attachments here, such as images. So I took the image from hostingkartinok.com and made it an attachment to your post. External image hosters are not reliable.
Site admin

kostao
Posts: 16
Joined: Tue Jan 10, 2017 8:48 pm

Postby kostao » Thu Jan 12, 2017 4:09 pm

I need big letter size and small intervals as shown in previous post.

kostao
Posts: 16
Joined: Tue Jan 10, 2017 8:48 pm

Postby kostao » Thu Jan 12, 2017 4:55 pm

And other question, how do boxes in box (see image)?
Attachments
delete.jpg
delete.jpg (52.71 KiB) Viewed 468 times

User avatar
Stefan Kottwitz
Site Admin
Posts: 8207
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Fri Jan 13, 2017 7:06 pm

You could use classic \parbox commands or minipage environments, possibly together with \fbox or other line commands.

Or use tabular or tabularx. Or take TikZ, such as with a TikZ matrix of nodes and drawing lines there, or with nodes and the fitting library.

Stefan
Site admin

kostao
Posts: 16
Joined: Tue Jan 10, 2017 8:48 pm

Postby kostao » Fri Jan 13, 2017 8:18 pm

How make rounded corners and dotted lines?
  1. \documentclass{article}
  2. \usepackage[most]{tcolorbox}
  3. \usepackage{varwidth}
  4. \usepackage{lipsum}
  5.  
  6. \newtcolorbox
  7. {mybox}[2][]{enhanced,
  8. before skip=2mm,after skip=2mm,
  9. colback=black!5,colframe=black!50,boxrule=0.2mm,
  10. attach boxed title to top left={xshift=1cm,yshift*=1mm-
  11. \tcboxedtitleheight
  12. },
  13. varwidth boxed title*=-3cm,
  14. boxed title style={frame code={
  15. \path[fill=tcbcol@back!30!black]
  16. ([yshift=-1mm,xshift=-1mm]frame.north west)
  17. arc[start angle=0,end angle=180,radius=1mm]
  18. ([yshift=-1mm,xshift=1mm]frame.north east)
  19. arc[start angle=180,end angle=0,radius=1mm];
  20. \path[left color=tcbcol@back!60!black,right color=tcbcol@back!60!black,
  21. middle color=tcbcol@back!80!black]
  22. ([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east)
  23. [rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east)
  24. -- (frame.south east) -- (frame.south west)
  25. -- ([xshift=-1mm,yshift=-1mm]frame.north west)
  26. [sharp corners]-- cycle;
  27. },interior engine=empty,
  28. },
  29. fonttitle=\bfseries,
  30. title={#2},#1}
  31.  
  32. \begin{document}
  33. \begin{mybox}[colbacktitle=green]{My title}
  34. % t b c - parbox [] param
  35. \parbox[]{7cm}{
  36. \fbox{
  37. \parbox[]{6.5cm}{Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 }
  38. }
  39. \fbox{
  40. \parbox[]{6.5cm}{Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 }
  41. }
  42. }
  43. \parbox[]{4cm}{
  44. \fbox{
  45. \parbox[]{3.5cm}{Some text 3 Some text 3 Some text 3 Some text 3 }
  46. }
  47. \fbox{
  48. \parbox[]{3.5cm}{Some text 4 Some text 4 Some text 4 Some text 4 Some text 4 Some text 4 Some text 4 Some text 4}
  49. }
  50. }
  51. \end{mybox}
  52. \begin{mybox}[colbacktitle=red]{My title}
  53. \fbox{
  54. % t b c - parbox [] param
  55. \parbox[]{4cm}{Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1 Some text 1}
  56. }
  57. \fbox{
  58. \parbox[]{6cm}{Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2 Some text 2}
  59. }
  60. \fbox{
  61. \parbox[]{7cm}{Some text 3 }
  62. }
  63. \fbox{
  64. \parbox[]{3cm}{Some text 4 }
  65. }
  66. \end{mybox}
  67. \end{document}


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: Google [Bot] and 10 guests