资料来源列表或带有小资料来源的图片列表

资料来源列表或带有小资料来源的图片列表

希望你一切都好。

我已经看过与我的问题相关的所有主题,并尝试了一些但仍然没有得到我想要的结果。

以下是我想要实现的目标: 在此处输入图片描述

现在我只有一个带有标题的图表列表,这真的很好,但我希望源代码更小一些,并位于标题下方,如上图所示,并且与标题行稍微分开一点(因为有时 url 很长,所以可能会造成混淆。)

目前我所拥有的是:

在此处输入图片描述

我正在使用模板,并且我仍然是 Latex 的新手。但这是我在主文档中插入的代码:

在此处输入图片描述

您在图片列表中看到的图像附近的代码,指示源的位置: 在此处输入图片描述

非常感谢您提供的任何帮助。保重。

答案1

documentclass...我不完全确定你想要什么。如果你能提供一个 MWE(从到\end{document})来展示你做了什么,这样我们就可以编译它来帮助你,而不是提供你的屏幕截图片段,那会很有帮助。

我尝试过提出各种场景,但不确定哪种场景适用于您的问题。

% figsourceprob.tex  SE 576631

\documentclass{article}
\usepackage{tocloft}

\makeatletter
\newcommand{\figsourcefont}{\footnotesize}
\newcommand{\figsource}[1]{%
  \addtocontents{lof}{%
  {\leftskip\cftfigindent
    \advance\leftskip\cftfignumwidth
    \rightskip\@tocrmarg
    \figsourcefont#1\protect\par}%
  }%
}

\begin{document}
\listoffigures
\section{A section}

\begin{figure}
\centering
AN ILLUSTRATION
\caption[An illustration \\ Illustration  source] {An illustration}
\end{figure}

\section{Second}

\begin{figure}
\centering
ANOTHER ILLUSTRATION
\caption{Another illustration \hfill\mbox{}  \protect\vspace{\baselineskip} \figsourcefont{Another illustraton  source}}
\end{figure}

\section{Third}

\begin{figure}
\centering
A PICTURE
\caption{A picture}
\figsource{Picture source}
\end{figure}

\end{document}

我无法制作多行\caption但其他人肯定可以。

在此处输入图片描述

答案2

所以我尝试了第三个选项,我喜欢它,但我得到了这个结果 在此处输入图片描述

我之前遇到过这个问题,2.55em 出现在“图片源”之前,但我不知道如何删除或它是什么。我想这可能是因为“@tocrmarg”,它看起来需要另一个用于我的回忆录课程的包?

另外,是否可以在图 xx 和 xy 之间添加一点空间(因为添加的源可能很多)。好的,这是代码,最终让它完整地显示在框中,它是主文档,但它是我得到的模板,所以我自己添加了一些,在寻找答案时,不太确定它们是否都兼容,你给我的代码也包括在内。

\RequirePackage[l2tabu, orthodox]{nag} % tells you of any bad LaTeX usage
                                       % must be first thing in class (with the exception of comments)
                                       

\newenvironment{a3_landscape}
{
    \newpage
    \pdfpagewidth=2\pdfpagewidth
    \setlength{\textwidth}{4cm+\textwidth*2} % need calc pkg
    \headwidth=\textwidth
    \hsize=\textwidth
}
{
    \newpage
    \pdfpagewidth=.5\pdfpagewidth
    \setlength{\textwidth}{\textwidth-4cm}
    \textwidth=.5\textwidth
    \headwidth=\textwidth
    \hsize=\textwidth
}

%% There is one option you should define; oneside or twoside
%% Use twoside for your viva docs (examiners hate long docs they need to carry around)
%% and oneside for the final thing you submit to the library.  Note that margins will
%% change accordingly

\documentclass[french]{um}  % custom University of Malta project/dissertation/thesis
\usepackage{babel}
\usepackage{babel}
\usepackage[autolanguage]{numprint}
\usepackage{float}
\usepackage[demo]{graphicx}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{incgraph}
\usepackage{calc}
\usepackage{pdfpages}

\usepackage{tikz,lipsum,lmodern}
\usepackage[most]{tcolorbox}

\raggedbottom


%% **************** (Your) Packages (Start) ******************

% \listfiles % uncomment this to know which packages you are using
              % the list of packages will be in the bottom of the .log file

%% Note that packges may already be loaded from the um (and memoir) classes.
%% Do not add your packages to the template, but rather add them here.

\usepackage{blindtext} %% for some dummy text, remove in your writeup


%% ***************** (Your) Packages (End) *******************


%% **************** (Your) Data (Start) ******************
\title{Machine Learning\\Approaches to the\\Blockchain}  % use \\ here otherwise you get a justified title
                                                    % note capitalization of the title (only common 
                                                    % words in lower case)
\tagline{some hyped-up tagline}                     % tag line
\author{Jean-Paul Ebejer}                           % your name
\authorID{123456M}                           % your University Identifier
\supervisor{Dr Zhivago}                             % your supervisor(s) name - no . in Dr
\cosupervisor{Dr Who}                               % your cosupervisor(s) name - no . in Dr ** OPTIONAL ** 
                                                    % simply comment out the above line if absent
\department{Department of Alchemy}                  % your department (e.g. Artifical Intelligence)
\faculty{Faculty of Something}                      % your faculty (e.g. ICT)
\degree{M.Sc.\ in Your Degree}                      % the degree you are reading
                                                    % note the \ after the dot, so not to consider it a fullstop
\doctype{dissertation}                              % the type of document (fyp, dissertation, thesis)
\degreedate{June, 2019}                        % when did you submit -- officially after your corrections !
%%\subjectcode{ICS5200}          
%% ***************** (Your) Data (End) *******************


%% ******** (Your) Document Settings (Start) *************

% You should have an images directory in every chapX subdir
% NOTE:  Trailing / for subdirs is required.
\graphicspath{{./images/}{./chap1/images/}}   % Paths where to look for images, if defined "images" must always be there as it holds the images in-use by the template.

\makeindex

%% ********* (Your) Document Settings (End) **************

% DOCTOR'S (JP) ORDERS: MAKE SURE TO READ MY TWO BLOG ENTRIES WITH
% CONTENT AND LaTeX TIPS FOR YOUR WRITE-UP.  THESE ARE BASED ON  
% EXAMINER'S FEEDBACK
%
% URLS:
% https://bitsilla.com/blog/2019/03/content-tips-for-your-dissertation-or-project-write-up/
% https://bitsilla.com/blog/2019/01/latex-tips-for-your-dissertation-or-project-write-up/

% end the preamble and start the document

\begin{document}
\frontmatter 
     \includepdf[pages=-]{garde.pdf}
    \renewcommand*\acknoname{Remerciements}
    \input{frontmatter/acknowledgements}   % include an acknowledgements.tex file
    \input{frontmatter/abstract}\if@openright\cleardoublepage\else\clearpage\fi
    \renewcommand*\contentsname{Sommaire}
    \tableofcontents*\if@openright\cleardoublepage\else\clearpage\fi
     \renewcommand{\figurename}{Fig}
      \renewcommand{\tablename}{Tableau}

\makeatletter
\newcommand{\figsourcefont}{\footnotesize}
\newcommand{\figsource}[1]{%
  \addtocontents{lof}{%
  {\leftskip\cftfigindent
    \advance\leftskip\cftfignumwidth
    \rightskip\@tocrmarg
    \figsourcefont#1\protect\par}%
  }%
}


\makeatother

%% Note: always use \input as you cannot nest \includes (amongst other things)
\pagestyle{umpage}
\mainmatter 
    \includepdf[pages=-]{intro page.pdf}
    \input{chap1/introduction_main} 
    \includepdf[pages=-]{th.pdf}
    \input{chap2/background_and_lit_overview_main}
    \input{chap3/materials_and_methods_main}
    \input{chap4/results_and_discussion_main}
      \includepdf[pages=-]{exp page.pdf}
    \input{chap5/evaluation_main}
    \input{chap6/conclusions_main}
    \appendix
        \input{appA/Annexe A}     % these are just test names as I didn't know what you'd want
         \input{appB/Annexe B}
        \listoffiguresource
      
    \listoffigures*\if@openright\cleardoublepage\else\clearpage\fi
    \listoftables*\if@openright\cleardoublepage\else\clearpage\fi

{\backmatter
    % Bibliography
    \if@openright\cleardoublepage\else\clearpage\fi
    \bibliographystyle{um-plainnat} %% specific plainnat does not show url for articles
    {\footnotesize\bibliography{chap1/introduction_biblio,chap2/background_and_lit_overview_biblio}}
    \printindex
}

\includepdf[pages=-]{biblio.pdf}

\end{document}

%%% The End %%%

相关内容