Making fancy boxes in latex

Поділитися
Вставка
  • Опубліковано 22 гру 2024

КОМЕНТАРІ • 23

  • @conrado10000
    @conrado10000 5 місяців тому +2

    Great video, it was slow enough that I could understand what each piece of code does. It's really impressive how powerful and complicated Latex is. Sometimes the simplest things have some impressive codes.

  • @ismailtairi2639
    @ismailtairi2639  2 роки тому +32

    \documentclass{article}
    \usepackage[margin=2cm]{geometry}
    \usepackage{xcolor}
    \usepackage{tikz}
    \usepackage{lipsum}
    \definecolor{gre}{RGB}{101, 191, 127}
    \definecolor{gree}{RGB}{7, 135, 44}
    \usepackage[most]{tcolorbox}

    ewtcolorbox{defin}{colback=green!10,enhanced,title=Definition,
    attach boxed title to top left={xshift=-4mm},boxrule=0pt,after skip=1cm,before skip=1cm,right skip=0cm,breakable,fonttitle=\bfseries,toprule=0pt,bottomrule=0pt,rightrule=0pt,leftrule=4pt,arc=0mm,skin=enhancedlast jigsaw,sharp corners,colframe=gree,colbacktitle=gre,boxed title style={
    frame code={
    \fill[gre](frame.south west)--(frame.north west)--(frame.north east)--([xshift=3mm]frame.east)--(frame.south east)--cycle;
    \draw[line width=1mm,gre]([xshift=2mm]frame.north east)--([xshift=5mm]frame.east)--([xshift=2mm]frame.south east);

    \draw[line width=1mm,gre]([xshift=5mm]frame.north east)--([xshift=8mm]frame.east)--([xshift=5mm]frame.south east);
    \fill[green!40](frame.south west)--+(4mm,-2mm)--+(4mm,2mm)--cycle;
    }
    }
    }
    \begin{document}
    \section*{How to make this box in \LaTeX}
    \begin{defin}
    \lipsum[1]
    \end{defin}
    \end{document}

    • @Pippogot
      @Pippogot Рік тому

      would it be possible to make the colors be passed as arguments so that i can use the same code for different shades ?

    • @Wisdom-prop
      @Wisdom-prop Рік тому

      السلام عليكم من فضلك ملف منبع tex

    • @Wisdom-prop
      @Wisdom-prop Рік тому

      Hi; please i want example with left postion arabic

    • @ismailtairi2639
      @ismailtairi2639  Рік тому

      @@Wisdom-prop contact me on Facebook, and I'll make one for you

  • @robwin0072
    @robwin0072 2 роки тому +1

    Ismail, thank you for this quick and excellent show-me video.
    I need this to isolate my proofs and theorems in my dissertation.

  • @nassurth482
    @nassurth482 6 місяців тому

    Thanks so much !😊
    How do I add a counter to the box? To avoid repeating the command.

  • @余淼-e8b
    @余淼-e8b 2 роки тому

    Fabulous! Thanks so much for your sharing.

  • @themxcowboy
    @themxcowboy 29 днів тому

    How I can link the chapter number plus counter? for example: the first definition for a chapter one look like Definition 1.1

  • @23.nguyenangkhai2
    @23.nguyenangkhai2 2 роки тому

    Beautiful! thank you so much

  • @mrpie-uk7ew
    @mrpie-uk7ew 2 роки тому

    That is so helpful, thank you sir!

  • @fgrv
    @fgrv 2 роки тому

    Excelente. Muchas gracias.

  • @mrwhitelight92
    @mrwhitelight92 Рік тому

    How do you get the other side of the screen to display your output? That has always been the hardest thing for me to get started.

  • @TheAnvil66
    @TheAnvil66 2 роки тому

    How can i put this box in the bottom of the page?

  • @ianthehunter3532
    @ianthehunter3532 2 роки тому +2

    What is different from tcolorbox and tcbtheorem?

    • @ismailtairi2639
      @ismailtairi2639  2 роки тому +3

      The main difference between tcolorbox and tcbtheorem is that tcolorbox is a general-purpose package for creating colored boxes with various shapes and styles, while tcbtheorem is a specialized package for creating theorem-like environments. tcolorbox can be used to create a wide variety of boxes, including theorem-like environments, while tcbtheorem is specifically designed for creating theorem-like environments. tcolorbox also offers more customization options than tcbtheoreme, such as the ability to add a background image, change the font size, and more.

    • @ianthehunter3532
      @ianthehunter3532 2 роки тому +1

      ​@@ismailtairi2639 Thanks for the quick response. I don't need to have that much customisation, mainly I want to use it for simple coloured chapters, sections, etc. For that, would you recommend using tcolorbox over tcbtheorem? And does one need more writing over the other (like a lot options or parameters, because I'd prefer to stick to the most basic variant)?

  • @amadoulaminendiaye1257
    @amadoulaminendiaye1257 Рік тому

    Merci bcp! Très intéressant

  • @m7d841
    @m7d841 Рік тому

    Svp si je veux personnalisée les titres , comment faire et merciii

  • @IN-pr3lw
    @IN-pr3lw 2 роки тому +2

    I made my first document using LaTeX and it was my Chemistry notes. it was hell.. I think It would be more efficient for me to use word 😭

    • @pmctech1415
      @pmctech1415 2 роки тому +9

      When you learn Latex you will not want to go back to word😊

    • @Michallote
      @Michallote Рік тому +4

      Do not take notes with LaTeX if what you need is to keep up with classes. LaTeX is for making gorgeous documents that enhance everything you desire. You can work the style to whatever is your liking and will have the benefits of being able to reuse everything you have done previously. I can now make notes in LaTeX no problem but it took me a while to make my ideal template. Bit by bit I learned how I liked to work. Bibliography, Tables of Content, how to make my tables as organized and aesthetic as possible, and also how to make functions and loops.