2

I am having trouble adding text (one or a few words) to the left margin of a page.

The result should be like the text in the margin in the answers here (without the brace). But with the difference that the text should not be vertically centered. The text should simply be placed in the margin at the first line of the paragraph chosen.

My goal is to have small keywords in the left margin next to the top line of every fact box I have. My fact boxes are made like this:

\documentclass[11pt,a4paper]{article}

\usepackage[utf8x]{inputenc}    %Character set
\usepackage{tikz}               %Circles
\usepackage{tcolorbox}          %Colored boxes
...
\begin{document}
Some text
Some text
\begin{tcolorbox}[width=\textwidth,colback=yellow!30!white,colframe=white,sharp corners]    
    This is a fact box
\end{tcolorbox}  
Some text
Some text
\end{document}
2
  • You want to have keywords next to your fact box, but placed at the top? So is it next or top?
    – Alenanno
    Jun 15, 2015 at 9:20
  • @Alenanno I have clarified that it should be in the left margin next to the top line of every *fact box* I have. Thank you.
    – Steeven
    Jun 15, 2015 at 9:25

1 Answer 1

2
\documentclass[11pt,a4paper]{article}  
\usepackage[utf8]{inputenc}    %Character set
\usepackage{tcolorbox}          %Colored boxes
\usepackage{marginnote}
\reversemarginpar%% The default is on the right side
\begin{document}
    Some text
    Some text

    \marginnote{foo}
    \begin{tcolorbox}[width=\textwidth,colback=yellow!30!white,colframe=white,sharp corners]    
        This is a fact box
    \end{tcolorbox}  
    Some text
    Some text
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .