加载包 changebar 时,双列(带星号)图形和表格会消失

加载包 changebar 时,双列(带星号)图形和表格会消失

以下代码片段应该显示test ``figure''文本,但由于整个图形丢失,因此没有显示。可以通过不加载changebar或删除这两个来解决这个问题*

\documentclass[twocolumn]{article}
\usepackage{changebar}

\begin{document}
\begin{figure*}
test ``figure''
\end{figure*}

Where is the figure? :(

\end{document}

我想将此组合与非古代 TexLive 版本(>=2018)一起使用。几乎同样的问题过去曾有过类似的问题,但没有任何合适的答案(强制 2014 TexLive 兼容性不是一个选项……其他解决方法似乎对我不起作用)。changebar自 2018 年起,该软件包已更新,但显然这个问题尚未解决。

答案1

可以用changebarby 来代替mdframed来标记更改。这样更灵活,并且不会与twocolumns其他包或浮动冲突。

b

\documentclass[twocolumn]{article}

\usepackage{kantlipsum}
\usepackage{graphicx}
\usepackage{xcolor} 
\usepackage{float}

\usepackage{mdframed}
\newmdenv[
leftmargin = -2pt,
innerleftmargin =1ex,
innertopmargin = 0pt,
innerbottommargin = 0pt,
innerrightmargin = 0pt,
rightmargin = 0pt,
linecolor=blue,
linewidth = 1pt,  
topline = false,
rightline = false,
bottomline = false
]{added}

\newmdenv[
leftmargin = -2pt,
innerleftmargin =1ex,
innertopmargin = 0pt,
innerbottommargin = 0pt,
innerrightmargin = 0pt,
rightmargin = 0pt,
linecolor=red,
linewidth = 1pt,  
topline = false,
rightline = false,
bottomline = false
]{deleted}  

\begin{document}

1.  \kant[1]

\begin{figure}[H]
    \centering
    \includegraphics[width=0.4\textwidth, keepaspectratio]{example-image-a} 
    \caption{I am a float!}
\end{figure}

\textbf{Where is the figure? :(}

\begin{added}
    2.  \kant[2-4]
\end{added}

3.  \kant[3]

\begin{deleted}
    5.  \kant[5-6]
\end{deleted}

9.  \kant[9]
\end{document}

更新

lualatex根据您的评论,这是使用和包的替代方法lua-ul,以突出显示添加、更改或删除的内容。段落没有问题。

xxx

% !TeX TS-program = lualatex

\documentclass[twocolumn]{article}
\usepackage{kantlipsum}
\usepackage{graphicx}
\usepackage{float}
\usepackage{xcolor,luacolor,lua-ul}

\newcommand{\added}[1]{%
\LuaULSetHighLightColor{green!20}   
\highLight{#1}
}
\newcommand{\changed}[1]{%
\LuaULSetHighLightColor{yellow!40}
\highLight{#1}  
}

\newcommand{\deleted}[1]{%
\LuaULSetHighLightColor{blue!10}    
\highLight{\strikeThrough{#1}}  
}

\begin{document}

As any dedicated reader can clearly see, the Ideal of
practical reason is a representation of, as far as I know, the things
in themselves; as I have shown elsewhere, the phenomena should only be
used as a canon for our understanding. The paralogisms of practical
reason are what first give rise to the architectonic of practical
reason.\added{ As will easily be shown in the next section, reason would
thereby be made to contradict, in view of these considerations, the
Ideal of practical reason, yet} the manifold depends on the phenomena.
Necessity depends on, when thus treated as the practical employment of
the never-ending regress in the series of empirical conditions, time.
Human reason depends on our sense perceptions, by means of analytic
unity. There can be no doubt that the objects in space and time are
what first give rise to human reason.

\begin{figure}[H]
\centering
\includegraphics[width=0.4\textwidth, keepaspectratio]{example-image-a}
\caption{I am a float!}
\end{figure}
\textbf{Where is the figure? :(}

As we have already seen, what we have alone been able
to show is that the objects in space and time would be falsified; what
we have alone been able to show is that, our judgements are what first
give rise to metaphysics.\deleted{ As I have shown elsewhere, Aristotle tells
us that the objects in space and time,} in the full sense of these
terms, would be falsified. Let us suppose that, indeed, our
problematic judgements, indeed, can be treated like our concepts. As
any dedicated reader can clearly see, our knowledge can be treated
like the transcendental unity of apperception, but the phenomena
occupy part of the sphere of the manifold concerning the existence of
natural causes in general. Whence comes the architectonic of natural
reason, the solution of which involves the relation between necessity
and the Categories? Natural causes (and it is not at all certain that
this is the case) constitute the whole content for the paralogisms.
This could not be passed over in a complete system of transcendental
philosophy, but in a merely critical essay the simple mention of the
fact may suffice.

5. Therefore, we can deduce that the objects in space and
time \changed{(and I assert, however, that this is the case) have lying before
them the objects in space and time. Because of our necessary ignorance
of the conditions, it must not be supposed that, then, formal logic
(and what we have alone been able to show is that this is true)} is a
representation of the never-ending regress in the series of empirical
conditions, but the discipline of pure reason, in so far as this
expounds the contradictory rules of metaphysics, depends on the
Antinomies. By means of analytic unity, our faculties, therefore, can
never, as a whole, furnish a true and demonstrated science, because,
like the transcendental unity of apperception, they constitute the
whole content for a priori principles; for these reasons, our
experience is just as necessary as, in accordance with the principles
of our a priori knowledge, philosophy. The objects in space and time
abstract from all content of knowledge. Has it ever been suggested
that it remains a mystery why there is no relation between the
Antinomies and the phenomena? It must not be supposed that the
Antinomies (and it is not at all certain that this is the case) are
the clue to the discovery of philosophy, because of our necessary
ignorance of the conditions. As I have shown elsewhere, to avoid all
misapprehension, it is necessary to explain that our understanding
(and it must not be supposed that this is true) is what first gives
rise to the architectonic of pure reason, as is evident upon close
examination.

\end{document}

答案2

要解决这个问题,你可以简单地注释掉一行

% \let\end@dblfloat\cb@end@dblfloat

我推测它会破坏浮点数内的变更栏或类似的东西,但至少我的用例似乎可以很好地处理它:

\documentclass[twocolumn]{article}
\usepackage{graphicx}
\usepackage{kantlipsum}
\usepackage{stfloats} % to force the figure onto page 1 for demo purposes

\usepackage{mychangebar2018}
% This is simply a copy of changebar v3.6c with line 1104 commented out:
% \let\end@dblfloat\cb@end@dblfloat

\begin{document}

\section{intro}

\cbstart
\kant[1]
\cbend

\begin{figure*}[htb]
    \centering
    \includegraphics[width=0.8\linewidth,height=4cm]{example-image-a} 
    \caption{I am a float!}
\end{figure*}

\section{outro}

\cbstart
\kant[2]
\cbend

\end{document}

结果

相关内容