I'm wondering how I can create a note section like in the picture with two lines. I would love if I can use it as a command in LaTeX like \note{some text}.

enter image description here

Thanks in advance.

  • 2
    Could post what you've tried? – Bernard Feb 10 at 12:01
  • What does your question have to do with biblatex or marginnote? – Bernard Feb 10 at 12:12
  • So far I have tried using ` \begin{lstlisting} Note: Some text end{lstlisting} ` – user3874252 Feb 10 at 12:16
  • 1
    Using what, exactly? – Bernard Feb 10 at 12:20
  • The lstlisting package. But that package is more for larger amount of code and have it formatted to display a gray background. – user3874252 Feb 10 at 12:27

An inevitable tcolorbox solution, providing a lot of configuration possibilities. The default shift of the Note: is set to 1.5cm, but this can be changed by the option nodeshift=...

enter image description here




    noteshift/.store in=\mynote@shift,
    sharp corners,
    left skip=\mynote@shift,
    right skip=\mynote@shift,
    overlay={\node[right] (mynotenode) at ([xshift=-\mynote@shift]frame.west) {\textbf{Note:}} ;},



\mynote{Brontosaurs are thin at one end, thick in the middle and thin again at the other end}

% Exaggerated example
\mynote[noteshift=4cm,colback=green!40]{Brontosaurs are thin at one end, thick in the middle and thin again at the other end}

  • 1
    The king of tcolorbox :-). Very nice and I have appreciated also your answer. – Sebastiano Feb 10 at 20:06
  • 1
    Thank you. That was the best solution for me! – user3874252 Feb 14 at 14:49
  • @user3874252: You're welcome. Happy TeXing... but please don't use the green color example ;-) – user31729 Feb 14 at 18:39
  • @ChristianHupfer Haha, yeah it will be colorless but I liked how you fixed the margins real nice. Thank you, again! – user3874252 Feb 15 at 12:32

Is this something that you were looking for ?

enter image description here

Then you can use the new command \notte derived from the environment quote:




        \notte{To create a note section like in the picture, use the command \texttt{notte}.}


        \notte{Another note}
  • 1
    Very good and I have appreciated your work. – Sebastiano Feb 10 at 12:59
  • 1
    @Sebastiano Thanks. However, I was wondering how to set the left and right margins differently-- \leftmargini controls the left margin within a quote very much as its right margin too... and there apparently seems to be no \rightmargini ! – Partha D. Feb 10 at 13:05

A solution with tabularx, makecell and linegoal:

\usepackage[svgnames, table]{xcolor}
\usepackage{tabularx, makecell, linegoal}

\usepackage{lipsum}% only for example text

\newcommand{\mynote}[1]{\medskip\par\textbf{\small Note}\quad\setlength{\extrarowheight}{2pt}\begin{tabularx}{\linegoal}{X}
\rowcolor{WhiteSmoke!80!Lavender}#1 \\


\mynote{Internal pullup resistors are enabled on the MSP430F20xx to support l\textsuperscript{2}C communication}


enter image description here


I would suggest you try footnote. There should be an understanding in the text, as to the note points to which text (like references). Here is a sample code:

Hello World
This is text with a note.\footnote{This is the note text.
Here it is at the bottom of the page.}

enter image description here

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.