1

Hello fellows and folks!

Do you know why this is happening? All of the sudden, when I compiled the whole document, the matrix showed up like in the picture. I have this in every figure that appears in my document:

\begin{figure}[!htb]
content
\end{figure}

And also this:

\setlength{\parindent}{2em}
\setlength{\parskip}{0.5em}
\renewcommand{\baselinestretch}{1.1}

enter image description here

\documentclass{article}
\begin{document}
\begin{figure}[!htb]
    \centering

    $ \underbrace{
    \begin{bmatrix}
    \checkmark & \color{blue}\textbf{?} & \checkmark & \color{blue}\textbf{?}  & \color{blue}\textbf{?}\\ 
    \color{blue}\textbf{?}&\color{blue}\textbf{?}  & \color{blue}\textbf{?} & \color{blue}\textbf{?} & \checkmark\\ 
    \checkmark& \color{blue}\textbf{?} & \checkmark & \checkmark & \color{blue}\textbf{?}\\ 
    \color{blue}\textbf{?}& \color{blue}\textbf{?} & \checkmark & \color{blue}\textbf{?}& \color{blue}\textbf{?}\\ 
    \color{blue}\textbf{?} &  \checkmark&  \color{blue}\textbf{?}& \checkmark & \color{blue}\textbf{?}\\ 
    \checkmark & \color{blue}\textbf{?} & \color{blue}\textbf{?} &\color{blue}\textbf{?} & \checkmark
    \end{bmatrix}
}_{\textbf{}}
    \neq
    \underbrace{ 
    \begin{bmatrix}
    \checkmark & \checkmark & \checkmark & \checkmark & \checkmark\\ 
    \checkmark& \checkmark & \checkmark & \checkmark & \checkmark\\ 
    \checkmark& \checkmark &  \checkmark& \checkmark & \checkmark\\ 
    \checkmark&\checkmark  & \checkmark & \checkmark & \checkmark\\ 
    \checkmark&\checkmark  & \checkmark & \checkmark & \color{blue}\textbf{?}\\ 
    \checkmark&  \checkmark& \checkmark & \checkmark & \color{blue}\textbf{?}
    \end{bmatrix}
}_{\textbf{}} 
    $

\end{figure}
\end{document}
NaveganTeX
  • 2,630
  • That is not the code you used to provide this image, \checkmark and bmatrix are not defined with this preamble. Please provide what is actually used to provide that image. – daleif May 21 '19 at 13:08
  • The preamble is a file full of packages... – NaveganTeX May 21 '19 at 13:12
  • What's the problem? The code is supposed to produce the image in the picture. If you are talking about the big interline space, then you probably have increased it with setspace or some other method. – egreg May 21 '19 at 13:13
  • The code you provide does not recreate the problem you mention, it cannot even be compiled, so how exactly are we suppose to help? – daleif May 21 '19 at 13:16
  • The problem is that everything seems larger in the document. I will add a picture before this happened. Instead of b matrix I used p matrix. – NaveganTeX May 21 '19 at 13:16
  • @daleif that's my teX document. [https://tex.stackexchange.com/questions/491253/commas-in-formatting-y-values] – NaveganTeX May 21 '19 at 13:16
  • I cannot copy and paste my 500 thesis TeX pages. I got that chunk of code and pasted it here. Maybe you knew what what was going on. I just pasted my preamble which is in the link I passed in the last comment. – NaveganTeX May 21 '19 at 13:20
  • 1
    And we can't debug code we can't compile. And I at least don't have the time and the will to wade through your various questions to find out how your document perhaps looks like and what could be the problem. You will have to learn to extract a minimal example from your code if you want sensible help. See also https://tex.stackexchange.com/a/391022/2388 – Ulrike Fischer May 21 '19 at 13:25
  • 3
    no one is asking you to paste a 500 page document, but you should make a small but complete one page document that shows the problem. start from your thesis preamble and the above example, check it shows the problem, then delete everything you can while still showing the problem then post the resulting document. – David Carlisle May 21 '19 at 13:25
  • I will do that. Thank you very much! – NaveganTeX May 21 '19 at 13:27
  • unrelated to the image that you show but \begin{figure}[!htb] is a really bad option to use on every figure. Firstly it prevents float pages so makes it more than likely that every figure goes to the end of the document, secondly it uses ! That is for occasional use to over-ride document defaults, it clearly makes no sense to set document defaults then always over-ride them, better to set the defaults that you want – David Carlisle May 21 '19 at 13:28
  • Thank you, David! What would be the best choice, then? h alone? – NaveganTeX May 21 '19 at 13:29
  • no never use h alone. It is an optional parameter so the best choice should be not to use it (and make the default float placement be what you want), but if you want to allow h without changing the default setting use [htbp] – David Carlisle May 21 '19 at 13:31
  • Great. I’ll get rid of those immediately. Thank you! – NaveganTeX May 21 '19 at 13:32
  • For one thing, \checkmark from amsfonts is different from \checkmark from hyperref. – John Kormylo May 21 '19 at 15:15

2 Answers2

1

I was able to fix it. And I change the style of the check-mark.

\DeclareRobustCommand{\blackcheck}{%
    \tikz\fill[scale=0.4, color=black]
    (0,.35) -- (.25,0) -- (1,.7) -- (.25,.15) -- cycle;%
}

What fixed the "problem" was this:

\begin{spacing}{0.5}
\end{spacing}

The code:

   \begin{figure}[htbp]
    \centering
  \begin{spacing}{0.5}


    $ \underbrace{
    \begin{bmatrix}
    \blackcheck & \color{blue}\textbf{?} & \blackcheck & \color{blue}\textbf{?}  & \color{blue}\textbf{?}\\ 
    \color{blue}\textbf{?}&\color{blue}\textbf{?}  & \color{blue}\textbf{?} & \color{blue}\textbf{?} & \blackcheck\\ 
    \blackcheck& \color{blue}\textbf{?} & \blackcheck & \blackcheck & \color{blue}\textbf{?}\\ 
    \color{blue}\textbf{?}& \color{blue}\textbf{?} & \blackcheck & \color{blue}\textbf{?}& \color{blue}\textbf{?}\\ 
    \color{blue}\textbf{?} &  \blackcheck&  \color{blue}\textbf{?}& \blackcheck & \color{blue}\textbf{?}\\ 
    \checkmark & \color{blue}\textbf{?} & \color{blue}\textbf{?} &\color{blue}\textbf{?} & \blackcheck
    \end{bmatrix}
}_{\text{Predicción de calificaciones}}
    \neq
    \underbrace{ 
    \begin{bmatrix}
    \blackcheck & \blackcheck & \blackcheck & \blackcheck & \blackcheck\\ 
    \blackcheck& \blackcheck & \blackcheck & \blackcheck & \blackcheck\\ 
    \blackcheck& \blackcheck &  \blackcheck& \blackcheck & \blackcheck\\ 
    \blackcheck&\blackcheck  & \blackcheck & \blackcheck & \blackcheck\\ 
    \blackcheck&\blackcheck  & \blackcheck & \blackcheck & \color{blue}\textbf{?}\\ 
    \blackcheck&  \blackcheck& \blackcheck & \blackcheck & \color{blue}\textbf{?}
    \end{bmatrix}
}_{\text{Regresión o clasificación}} 
    $
\end{spacing}

enter image description here

Thank you all!

NaveganTeX
  • 2,630
0
\documentclass[border=10pt]{standalone} 
%%%<
\usepackage{verbatim}
%%%>
\begin{comment}
:Title: A Venn diagram with PDF blending
:Tags: Diagrams;Cookbook
:Author: Stefan Kottwitz
:Slug: venn

PDF blend mode requires TikZ version 3.0 or above.
\end{comment}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
  \begin{scope}[blend group = soft light]
    \fill[red!30!white]   ( 90:1.2) circle (2);
    \fill[green!30!white] (210:1.2) circle (2);
    \fill[blue!30!white]  (330:1.2) circle (2);
  \end{scope}
  \node at ( 90:2)    {Typography};
  \node at ( 210:2)   {Design};
  \node at ( 330:2)   {Coding};
  \node [font=\Large] {\LaTeX};
\end{tikzpicture}
\end{document}
Stefan Pinnow
  • 29,535