0

How can I replace figure 1: to just 1 and the 1 is set half a line down?

I started with code from this site trying to adjust it, collecting the command, but don`t get it to run.

\documentclass[twoside]{scrartcl}
  %  \usepackage{showframe}
    \usepackage{graphicx}
    \usepackage{placeins}
    \usepackage{sidenotes}
    \usepackage{kantlipsum}
    \usepackage{fontspec}
    \usepackage[a4paper,left=24.8mm,top=27.4mm,headsep=2\baselineskip,textwidth=107mm,marginparsep=8.2mm,marginparwidth=49.4mm,textheight=49\baselineskip,headheight=\baselineskip]{geometry} % tufte-handout definitions


\usepackage{caption}
\usepackage[labelsep=space]{caption}
\DeclareCaptionFormat{empty} {#1}
\renewcommand*\ textsubscript \{figurename{}



\begin{document}
    \begin{marginfigure}%
        \caption{My caption}
        \includegraphics[width=\marginparwidth]{example-image-a}
    \end{marginfigure}

    \kant[1]
    \begin{figure}[h]
        \sidecaption{St. Michel}
        \includegraphics[width=\textwidth]{5}
    \end{figure}

    \begin{figure*}
        \sidecaption{My caption}
        \includegraphics[width=\linewidth]{2.png}
    \end{figure*}
 \kant[1]
  \kant[1]
  \kant[1]
   \kant[1]
    \kant[1]
\end{document}
naphaneal
  • 2,614

1 Answers1

1

Sidenotes predefines different caption styles for each figure type (including margintable and widetable).

\documentclass[twoside]{article}
  %  \usepackage{showframe}
    \usepackage{graphicx}
    \usepackage{sidenotes}
    \usepackage{placeins}
    \usepackage{kantlipsum}
    %\usepackage{fontspec}
    \usepackage[a4paper,left=24.8mm,top=27.4mm,headsep=2\baselineskip,textwidth=107mm,marginparsep=8.2mm,marginparwidth=49.4mm,textheight=49\baselineskip,headheight=\baselineskip]{geometry} % tufte-handout definitions

\captionsetup{labelsep=space}
\DeclareCaptionStyle{marginfigure}{labelsep=space}
\DeclareCaptionStyle{sidecaption}{labelsep=space}
\DeclareCaptionStyle{widefigure}{labelsep=space}

\makeatletter
\def\fnum@figure{\raisebox{-1ex}{\thefigure}}
\makeatother

\begin{document}
    \begin{marginfigure}%
        \caption{My caption}
        \includegraphics[width=\marginparwidth]{example-image-a}
    \end{marginfigure}

    \kant[1]
    \begin{figure}[htbp]
        \sidecaption{St. Michel}
        \includegraphics[width=\textwidth]{example-image-b}
    \end{figure}

    \begin{figure*}
        \sidecaption{My caption}
        \includegraphics[width=\linewidth]{example-image-c}
    \end{figure*}
 \kant[1]
  \kant[1]
  \kant[1]
   \kant[1]
    \kant[1]
\end{document}
John Kormylo
  • 79,712
  • 3
  • 50
  • 120
  • the aim is a simplification to single number set a bit lower. how can "0.1:" be reduced to "1"? –  Mar 05 '17 at 22:23
  • What 0.1? If \thefigure is giving something other than \arabic{figure}, you may need to redefine. – John Kormylo Mar 05 '17 at 22:33