Tag Info

New answers tagged

2

You could patch the caption command to do write out the type. But i think the journal might not be happy about hacks like this. \documentclass{article} \usepackage{etoolbox} \usepackage{tocbasic} \usepackage[tocindentauto]{tocstyle} \makeatletter \patchcmd{\@caption}{ \addcontentsline{\csname ext@#1\endcsname}{#1}% {\protect\numberline{\csname ...


2

The following uses the subcaption package: \documentclass{scrreprt} \usepackage{subcaption} \begin{document} \begin{table} \begin{subtable}[t]{.5\linewidth}% \centering% \begin{tabular}{cc} 0 & 1 \\ 2 & 3 \\ \end{tabular} \caption{table 1}\label{table1} \end{subtable}% \begin{subtable}[t]{.5\linewidth} ...


3

Using wrapfig in lists is explicitly unsupported, but if you want to do it anyway it works if you help it a bit: \documentclass[a4paper,12pt]{article} \usepackage[T1]{fontenc} \usepackage[demo]{graphicx} \usepackage{wrapfig} \usepackage{lipsum} \begin{document} This is an example: first paragraph is OK but the second have the problem! \begin{itemize} ...


1

If the OP refers to links instead to a reference, this could be a solution. \documentclass{article} \usepackage{etoolbox}% \usepackage{caption} \usepackage{hyperref} \usepackage{bookmark} \patchcmd{\listoffigures}{\listfigurename}{\phantomsection\hypertarget{link::lof}{\listfigurename}}{}{} \newcommand{\loflink}{\hyperlink{link::lof}{\listfigurename}} ...


1

I don't think \autoref is the easiest way to deal with this. This simplest approach is to use \hyperref combined with a \phantomsection and \label: \documentclass{article} \usepackage{caption} \usepackage{hyperref} \usepackage{bookmark} \begin{document} \begin{figure}[tbp] \centering \vrule height 1cm width 1cm \caption{Hello World} \end{figure} ...


3

Use these two lines in your preamble: \floatstyle{plaintop} \restylefloat{sitext} or put \floatstyle{plaintop} before declaring the float sitext. Code: \documentclass[10pt]{article} \usepackage[labelfont=bf,labelsep=period,justification=justified,singlelinecheck=false]{caption} \usepackage{float} \floatstyle{plaintop} \newfloat{sitext}{thp}{lop} ...


2

Place \clearpage before the listing, and all pending floats will be flushed before the listing starts.


1

This has so many restrictions and undocumented features I wouldn't know where to start listing them but it redefines b to position a float \middlefloatpos down the page, so long as the page has enough text that can be split at that point. \documentclass{article} \usepackage{lipsum} \usepackage[demo]{graphicx} \setcounter{bottomnumber}{1}% don't even ...


0

The only mention I could find of a non command \captionfonts is some code in a comp.text.tex thread https://groups.google.com/forum/#!msg/comp.text.tex/nqkKIHsRhLA/AzNKOaYNJc0J the caption package has a similar \captionfont (no s command). Either way it appears that you have previously loaded some code that defined such a command and not are not defining ...


0

Please always provide a complete test document however if you delete \end{figure*} \begin{figure*} from the middle of your example, leaving a blank line, the entire construction will always float as a unit. (But be captioned as two figures).


1

You have explicitly prevented latex from putting the float on a page on its own, as you have used the optional argument and not included p so over-riding the default [tbp]. So not using the option or including p would probably help. \pagebreak does not flush pending floats you need \clearpage for that, although that may not be needed if the floats are ...


1

Other way is following the @Bernard's indication. In addition i added the caption package for fine tuning the captions moreover of the command \captionof{...}{...} to put captions outside of tables or figures. I think you should put something like \usepackage{cuted} \usepackage{caption} \captionsetup[figure]{textfont={bf,large}} in the preamble, and ...


2

Perhaps something like this, I include teh figure both as a single column figure and as a double column figure spreading across the next page. I also removed all formatting commands from inside section heads, and removed the "manual" section numbering. \documentclass[10pt, conference]{IEEEtran} \usepackage[demo]{graphicx}% so it makes black blobs ...


2

The footnote package can save any footnotes entered inside a float and spit them out at the end (normally they are just thrown away, not sure why). You only need to add these two lines to your preamble: \usepackage{footnote} \makesavenoteenv{figure} You can \makesavenoteenv for any other environments you use, like tables.


3

You can define separate captions for the caption itself and the list of figures. Using \caption, the content of the [] brackets is displayed in the list of figures, the content of the {} brackets is displayed under the figure. So, \begin{figure} ... \caption[Feed-forward neural network]{Feed-forward neural network - The red line indicates the path a ...


3

You can redefine \footcitetext as follows: \DeclareCiteCommand{\footcitetext}[\footnotetext] {\bibsentence% \usebibmacro{cite:init}% \usebibmacro{prenote}} {\usebibmacro{citeindex}% \global\booltrue{cbx@mlafootnotes}% \renewcommand*{\newunitpunct}{\addcomma\space}% \usebibmacro{cite:mla:foot}} {} {\usebibmacro{mla:foot:postnote}} ...


0

\documentclass{article} \usepackage{graphics} \usepackage[skip=.5em]{caption} %use skip=<whatever you like> \begin{document} \begin{figure} \centering %\includegraphics[width=\columnwidth]{solpro.pdf} \rule{34mm}{55mm}% test image \caption{flowchart of solution procees} \label{fig:fig1} \end{figure} \end{document}


2

The line \include{preamble_mastergrad} is incorrect, \include should only be used after \begin{document} and is intended for document fragments (usually chapters) not for macro code files. If you have put your preamble commands into a separate .tex file you can input them with \input, although a preferable alternative is to put them in a .sty file and ...


3

Presumably the image you are including is wider than the column. Using \begin{figuure} \centering \includegraphics[width=\columnwidth]{solpro.pdf} \caption{my figure} \end[figure} will scale the image to be no wider than the column.


3

From your "MWE" i conclude, that you maybe like to draw something like this: \documentclass[12pt]{article} \usepackage{tikz} \usetikzlibrary{arrows,decorations,decorations.pathmorphing,patterns} \usepackage{braket} \begin{document} \begin{figure} \centering \begin{tikzpicture}[ font = \large, > = angle 90, L/.style = ...


2

The minipage in your example are not doing anything useful, and it seems you don't want floating figuures either so I'd not use figure. If you need captions caption package provides \captionof{figure}{...} but to put 24 images close together you can use {\centering \includegraphics[width=.25\textwidth]{fig01}\linebreak[0]% ...


1

This warns if the page of the first ref is no equal to the page with the thing being referenced It makes first ref {f2} on page 2 -> page 3 first ref {f5} on page 2 -> page 8 You could modify it in various ways eg change the equality test here \ifnum#2=#3\relax\else to something testing distance eg \ifnum#2>\numexpr#3+5\relax to only warn ...


1

I'd just put the caption in a [b] figure and the image in a [p] the caption figure will float until there is room for the caption at the bottom if the page, and at the following page break the pending p float will necessarily be output. (I'd never use afterpage: I know who wrote it:-) \documentclass{article} \usepackage{lipsum,graphicx} \begin{document} ...


5

The section heading prevents page break until after a line of the following paragraph, so TeX will take the heading on to the top of a page as there isn't room at the bottom of the first page you show. So the question is really why did latex insert a float page in the second page image shown. Without example code one can only guess, but one of these may be ...


1

This adds an extra brace group to make the box setting in \lst@DeInit "color safe" then removes \normalcolor as egreg mentioned in comments. Seems to work on this example.. \documentclass[a4paper]{book} \usepackage[T1]{fontenc} \usepackage{color} \usepackage[ hang, small, it, hypcap=true ]{caption} \usepackage{fancyvrb} \usepackage{listings} ...


9

Don't use \vbox (anywhere in a latex document) and don't use \\ outside the alignment like this les:\\ you will remove all the flexible glue around displays and have inconsistent spacing between the elements. Getting good spacing between two vboxes is quite tricky as they align the reference point on the baseline of the bottom row, hiding all other ...


1

You could include the image as part of an \afterpage consideration: \documentclass{article} \usepackage{lipsum,afterpage,graphicx} \begin{document} \lipsum[1-11] \begin{figure}[t] \afterpage{% \noindent \includegraphics[width=\textwidth,height=.999\textheight]{example-image}% Large image \clearpage } \caption[Some rather long ...


3

You can put put \clearpage before the longtabu environment. This will flush any pending floats and prevent them floating into the table.


2

You can use [hp] so that if it doesn't go here it doesn't go to the top of any text page, but latex may place it on a float page that doesn't contain paragraphs from the main text flow. LaTeX's output routine always places floats at the top or bottom of text pages, so can not add it after a partial paragraph at the top of a page.


2

the built in \listfiles does this: \documentclass{article} \usepackage{graphicx} \listfiles \begin{document} \includegraphics{ug} \includegraphics{eg2} \includegraphics{foo} \end{document} produces a log of: ug.png Graphic file (type png) eg2.png Graphic file (type png) foo.pdf Graphic file (type pdf) On my system which happens to ...


2

I'd just put the second figure after landscape rather than rotating it twice. \afterpage{% \clearpage \begin{landscape} \begin{figure} \centering \includegraphics[scale=1]{path/to/the/file.pdf} \caption{The Caption} \end{figure} \end{landscape} \begin{figure} \centering ...


2

Floats can not go backwards, once a page is output it has gone from TeX's memory, a float found on the next page can not affect it, in order to move a float to a previous page you need to make sure the environment is seen by TeX in the source file before the page is shipped out. TeX does not hold the whole document in memory, or even read the whole input ...


6

Something like \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{positioning,arrows.meta,calc} \begin{document} \begin{tikzpicture}[>=Latex] \begin{scope} \node[circle,draw] (A) at (0,0) {A}; \node[right=7mm of A,circle,draw] (C) {C}; \node[right=7mm of C,circle,draw] (E) {E}; \node[below=12mm of C,draw,inner sep=1ex] (Twin ...


4

You only need a single floating environment to manage the construction. Apart from that you can use almost anything to construct the inner parts. I've used tabularx to make a tabular that fits within the text block width: \documentclass{article} \usepackage{lipsum,tabularx,capt-of} \usepackage[export]{adjustbox} \usepackage[margin=2cm]{geometry} ...


8

Without any special package, you can use 1 figure float with 3 minipages. If you want simulate that are two different figures, simply add two captions inside the minipages of the images (see MWE). If you want the images numbered as subfigures, take a look to the subfig and subcaption packages. \documentclass[a4paper]{article} \usepackage{graphicx} ...


1

I'm not sure about the problem you get; however, you should realize that inside subfigure, \textwidth refers to the size reserved for the whole subfigure, so you want width=\textwidth or the image will be further halved down. Also don't use \small inside \caption, but better change the layout with \captionsetup. Don't say \vskip\baselineskip, but \bigskip ...


11

Try this \documentclass[draft]{article} \usepackage{graphicx,caption} \usepackage[latin]{babel} \def\lorem{\raggedright Fusce adipiscing justo. Nullam in enim. Pellentesque felis orci. } \begin{document} \begingroup \parindent0pt \fboxsep1pt\fboxrule0.4pt \hsize=3cm\footnotesize \hfil\fbox{\vbox to 5cm{\vfill \includegraphics[width=\hsize]{./images/amato} ...


0

I'm not familiar with subfigure in your MWE, so I propose another possibility to arrange subfigures. In such cases I rather use subfig package: documentclass{article} \usepackage{graphicx} \usepackage[labelsep=space, labelfont={sf,bf}, textfont=sf]{subfig} \usepackage[labelsep=colon, ...


0

You can place the image and an accompanying caption in two separate floats, since nothing prevents you from doing that. That is, a figure is just a float and can contain virtually anything (or nothing); a \caption without an image, or an image without a \caption: \documentclass[twocolumn]{article} \usepackage{lipsum,graphicx} \begin{document} ...


2

This is caused by a new feature added to the latest version of the fixltx2e package. (Check the optional arguments of floats, section 5.1 of the package documentation.) I don't know how much freedom you have in LyX, but a standard LaTeX hackaround would be the following. \documentclass{article} \usepackage{float} \makeatletter \let\@tmp\@xfloat ...


3

figures won't normally go to the end of the document unless you prevent them going anywhere else, but in anycase large spaces at page breaks are inevitable if you use H as the figure will not move relative to the surrounding text so if it needs to go over the page a gap is left, that's what [H] means. Your second example for example uses [hbt] the main ...


2

Use \clearpage not \newpage. The difference being that \clearpage forces a page break but also flushes all pending floats, stopping them float past the force page break.


1

Ok, I have no clue why it works, but simply adding [h] helped... Still I wonder how it works, but the problem is solved, so I guess both posts can be deleted. Answer is to use \begin{Scheme}[h] for all schemes that float on a clear page without any text below or above them


1

Be careful what you wish for, you might get it! You are asking for a non-floating figure ("Were I exactly want" = [H] option from float package.) That is OK, but if I understand correctly your question, when the image or table does not fit on the current page (and jump to the next page), actually do you want this object "exactly below where it is". In ...


1

Out of the box multicol doesn't support floats as David explained due to the fact that it needs to do balancing and that means it is not quite known where material is going to fall. However if you know that you want a column float on a particular page in a particular column (in other words you are doing something somewhat manual) then my answer in Placing ...


7

The correct way to do this is to use the caption package and set a specific label separator that you can adjust to suit your needs: \documentclass{article} \usepackage{caption,graphicx} \DeclareCaptionLabelSeparator{colorized}{ (colorized): } \begin{document} See Figure~\ref{fig:first} and~\ref{fig:second}. \begin{figure}[ht] ...


2

\renewcommand\thefigure{\arabic{figure} (colorized)} \caption{A two line caption} probably works (depending what you what to happen in the list of figures)


2

LaTeX doesn't automatically keep the floats together so you have to be careful where you place them in the source but: \documentclass[twocolumn]{article} \usepackage{fixltx2e} \def\a{One two three four five six. } \def\b{\a\a\par Red green blue. \a\a\a\par Yellow black \a\a\a\a} \def\c{Something \b \b More text here \b\b} \begin{document} \c\c\c ...


3

That space is caused by center environment. The center environment is defined as a trivlist (or simply as a list) \def\center{\trivlist \centering\item\relax} \def\endcenter{\endtrivlist} As you can see, it is a \trivlist around \centering. The effect of \trivlist is to add \topsep, \partopsep etc. For the definitions of these things, please refer to ...


5

This is easily achieved using \numberwithin from the amsmath package. \documentclass[11pt,a4paper]{article} \usepackage{graphicx} \usepackage{amsmath} \numberwithin{figure}{section} \begin{document} \section{first section} \begin{figure}[h] \centering \rule{4cm}{4cm} % replace with image \caption{figure 1.1} \end{figure} \section{second ...



Top 50 recent answers are included