I need to insert two captions (in polish and exactly the same translated into english) under each of the figures and above each of the tables in my document.
Once captions were defined I would like to have control whether only one or both captions will be displayed in the whole document through boolean variable.
What is the most elegant / smart way to do that?
EDIT
According to suggestions in comments, I used bicaption to define two captions.
\usepackage{polski}
\usepackage[english, polish]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[lang=english]{bicaption}
\begin{figure}[H]
\includegraphics[width=0.5\textwidth]{Einrad}
\bicaption{Polish caption here with special letters: ĄĆŹŚÓŁ}{English caption just below}
\label{Fig:FIgBicycle}
\end{figure}
However, I don't like:
- that I needed to use
babelto have properly labelled captions ("Rysunek" for polish and "Figure" for english), because in my document I'm already using many packages and I wish to avoid potential conflicts, - the big space between two captions,
- that I can't see an option to control whether only the first, second or both captions were displayed
EDIT 2
Minimal Working Example:
%\documentclass[review,authoryear]{elsarticle}
\documentclass[oneside,12pt]{mwbk}
\usepackage{polski}
\usepackage[english, polish]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[lang=english]{bicaption}
\usepackage{graphicx,float,multirow}
\graphicspath{ {figures/} }
\usepackage[caption = false]{subfig}
\usepackage{lineno,hyperref,amsmath}
\usepackage[normalem]{ulem}
\linespread{2}
\begin{document}
\linenumbers
\section{Some text}
\subsection{Some subsection}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin vulputate nisi dolor, vitae eleifend sem vehicula a. Nulla libero mi, scelerisque et dapibus at.
\begin{figure}[H]
\includegraphics[width=0.5\textwidth]{Einrad}
\bicaption{Polish caption here with special letters: ĄĆŹŚÓŁ}{English caption just below}
\label{Fig:FIgBicycle}
\end{figure}
\begin{table}[H]
\centering
\bicaption{Polish caption here with special letters: ĄĆŹŚÓŁ}{English caption just below}
\label{my-label}
\begin{tabular}{|l|l|}
\hline
1st col & 2nd col \\ \hline
some text & --- \\ \hline
\end{tabular}
\end{table}
\end{document}
bicaptionpackage. – Arzigoglu May 17 '17 at 06:35memoirhave this capability. – Zarko May 17 '17 at 08:26elsarticleclass, but in document within I need to use multiple captions, I usemwbkdocument class. – matandked May 17 '17 at 11:21\linespread{2}you introduce a large space between any two lines - that is just what you see between the two captions. Can you elaborate on what you want to achieve with\linespread{2}such that we can think of a solution for both wishes? – Tiuri May 18 '17 at 07:14\documentclass[oneside,12pt]{mwbk}– matandked May 18 '17 at 07:19\captionsetup{bi-lang=first}will only typeset the 1st language, and\captionsetup{bi-lang=second}will only typeset the 2nd language of the caption headings. – Sep 20 '18 at 20:49