latexdiff don't work in table with scaleboxMake Latexdiff work on big, complex projectLatexdiff with...
I encountered my boss during an on-site interview at another company. Should I bring it up when seeing him next time?
Relationship between the symmetry number of a molecule as used in rotational spectroscopy and point group
Why would the IRS ask for birth certificates or even audit a small tax return?
What does each site of a vanilla 9.1 installation do?
How can I be pwned if I'm not registered on the compromised site?
A bug in Excel? Conditional formatting for marking duplicates also highlights unique value
Can we carry rice to Japan?
Why won't the strings command stop?
When do _WA_Sys_ statistics Get Updated?
Quitting employee has privileged access to critical information
Why doesn't "adolescent" take any articles in "listen to adolescent agonising"?
Where is the fallacy here?
1970s scifi/horror novel where protagonist is used by a crablike creature to feed its larvae, goes mad, and is defeated by retraumatising him
How to kill a localhost:8080
How can I handle a player who pre-plans arguments about my rulings on RAW?
How do I deal with being envious of my own players?
Plagiarism of code by other PhD student
Is every open circuit a capacitor?
Is there a full canon version of Tyrion's jackass/honeycomb joke?
Wardrobe above a wall with fuse boxes
Make me a metasequence
Can I solder 12/2 Romex to extend wire 5 ft?
How does signal strength relate to bandwidth?
What could be a means to defeat a childrens’ nightmare?
latexdiff don't work in table with scalebox
Make Latexdiff work on big, complex projectLatexdiff with subfilesProblem in LaTeXDifflatexdiff: exclude caption textNew figure in LatexdiffLatexdiff figureLatexdiff with two column layoutlatexdiff problems with SCfigurelatexdiff and letHow to use Latexdiff with TexLive
When revise my manuscript, I found latexdiff can't label changes in tables. For example, there are two tex files before and after revision:
Before revision
documentclass{article}
usepackage{graphicx}
begin{document}
begin{table}
centering
caption{Example}
scalebox{0.8}{begin{tabular}{lcc}
A & 1 & 1 \
B & 2 & 2 \
end{tabular}}
end{table}
end{document}
After revision
documentclass{article}
usepackage{graphicx}
begin{document}
begin{table}
centering
caption{New Example}
scalebox{0.8}{
begin{tabular}{lcc}
C & 3 & 3 \
D & 4 & 4 \
end{tabular}}
end{table}
end{document}
The diff.tex is followed:
documentclass{article}
%DIF LATEXDIFF DIFFERENCE FILE
%DIF DEL old.tex Thu Mar 7 08:20:20 2019
%DIF ADD new.tex Thu Mar 7 08:19:50 2019
usepackage{graphicx}
%DIF PREAMBLE EXTENSION ADDED BY LATEXDIFF
%DIF UNDERLINE PREAMBLE %DIF PREAMBLE
RequirePackage[normalem]{ulem} %DIF PREAMBLE
RequirePackage{color}definecolor{RED}{rgb}{1,0,0}definecolor{BLUE}{rgb}{0,0,1} %DIF PREAMBLE
providecommand{DIFadd}[1]{{protectcolor{blue}uwave{#1}}} %DIF PREAMBLE
providecommand{DIFdel}[1]{{protectcolor{red}sout{#1}}} %DIF PREAMBLE
%DIF SAFE PREAMBLE %DIF PREAMBLE
providecommand{DIFaddbegin}{} %DIF PREAMBLE
providecommand{DIFaddend}{} %DIF PREAMBLE
providecommand{DIFdelbegin}{} %DIF PREAMBLE
providecommand{DIFdelend}{} %DIF PREAMBLE
%DIF FLOATSAFE PREAMBLE %DIF PREAMBLE
providecommand{DIFaddFL}[1]{DIFadd{#1}} %DIF PREAMBLE
providecommand{DIFdelFL}[1]{DIFdel{#1}} %DIF PREAMBLE
providecommand{DIFaddbeginFL}{} %DIF PREAMBLE
providecommand{DIFaddendFL}{} %DIF PREAMBLE
providecommand{DIFdelbeginFL}{} %DIF PREAMBLE
providecommand{DIFdelendFL}{} %DIF PREAMBLE
newcommand{DIFscaledelfig}{0.5}
%DIF HIGHLIGHTGRAPHICS PREAMBLE %DIF PREAMBLE
RequirePackage{settobox} %DIF PREAMBLE
RequirePackage{letltxmacro} %DIF PREAMBLE
newsavebox{DIFdelgraphicsbox} %DIF PREAMBLE
newlength{DIFdelgraphicswidth} %DIF PREAMBLE
newlength{DIFdelgraphicsheight} %DIF PREAMBLE
% store original definition of includegraphics %DIF PREAMBLE
LetLtxMacro{DIFOincludegraphics}{includegraphics} %DIF PREAMBLE
newcommand{DIFaddincludegraphics}[2][]{{color{blue}fbox{DIFOincludegraphics[#1]{#2}}}} %DIF PREAMBLE
newcommand{DIFdelincludegraphics}[2][]{% %DIF PREAMBLE
sbox{DIFdelgraphicsbox}{DIFOincludegraphics[#1]{#2}}% %DIF PREAMBLE
settoboxwidth{DIFdelgraphicswidth}{DIFdelgraphicsbox} %DIF PREAMBLE
settoboxtotalheight{DIFdelgraphicsheight}{DIFdelgraphicsbox} %DIF PREAMBLE
scalebox{DIFscaledelfig}{% %DIF PREAMBLE
parbox[b]{DIFdelgraphicswidth}{usebox{DIFdelgraphicsbox}\[-baselineskip] rule{DIFdelgraphicswidth}{0em}}llap{resizebox{DIFdelgraphicswidth}{DIFdelgraphicsheight}{% %DIF PREAMBLE
setlength{unitlength}{DIFdelgraphicswidth}% %DIF PREAMBLE
begin{picture}(1,1)% %DIF PREAMBLE
thicklineslinethickness{2pt} %DIF PREAMBLE
{color[rgb]{1,0,0}put(0,0){framebox(1,1){}}}% %DIF PREAMBLE
{color[rgb]{1,0,0}put(0,0){line( 1,1){1}}}% %DIF PREAMBLE
{color[rgb]{1,0,0}put(0,1){line(1,-1){1}}}% %DIF PREAMBLE
end{picture}% %DIF PREAMBLE
}hspace*{3pt}}} %DIF PREAMBLE
} %DIF PREAMBLE
LetLtxMacro{DIFOaddbegin}{DIFaddbegin} %DIF PREAMBLE
LetLtxMacro{DIFOaddend}{DIFaddend} %DIF PREAMBLE
LetLtxMacro{DIFOdelbegin}{DIFdelbegin} %DIF PREAMBLE
LetLtxMacro{DIFOdelend}{DIFdelend} %DIF PREAMBLE
DeclareRobustCommand{DIFaddbegin}{DIFOaddbegin letincludegraphicsDIFaddincludegraphics} %DIF PREAMBLE
DeclareRobustCommand{DIFaddend}{DIFOaddend letincludegraphicsDIFOincludegraphics} %DIF PREAMBLE
DeclareRobustCommand{DIFdelbegin}{DIFOdelbegin letincludegraphicsDIFdelincludegraphics} %DIF PREAMBLE
DeclareRobustCommand{DIFdelend}{DIFOaddend letincludegraphicsDIFOincludegraphics} %DIF PREAMBLE
LetLtxMacro{DIFOaddbeginFL}{DIFaddbeginFL} %DIF PREAMBLE
LetLtxMacro{DIFOaddendFL}{DIFaddendFL} %DIF PREAMBLE
LetLtxMacro{DIFOdelbeginFL}{DIFdelbeginFL} %DIF PREAMBLE
LetLtxMacro{DIFOdelendFL}{DIFdelendFL} %DIF PREAMBLE
DeclareRobustCommand{DIFaddbeginFL}{DIFOaddbeginFL letincludegraphicsDIFaddincludegraphics} %DIF PREAMBLE
DeclareRobustCommand{DIFaddendFL}{DIFOaddendFL letincludegraphicsDIFOincludegraphics} %DIF PREAMBLE
DeclareRobustCommand{DIFdelbeginFL}{DIFOdelbeginFL letincludegraphicsDIFdelincludegraphics} %DIF PREAMBLE
DeclareRobustCommand{DIFdelendFL}{DIFOaddendFL letincludegraphicsDIFOincludegraphics} %DIF PREAMBLE
%DIF END PREAMBLE EXTENSION ADDED BY LATEXDIFF
begin{document}
begin{table}
centering
caption{DIFaddbeginFL DIFaddFL{New }DIFaddendFL Example}
DIFdelbeginFL %DIFDELCMD < scalebox{0.8}{begin{tabular}{lcc}
%DIFDELCMD < A & 1 & 1 \
%DIFDELCMD < B & 2 & 2 \
%DIFDELCMD < end{tabular}}
%DIFDELCMD < %%%
DIFdelendFL DIFaddbeginFL scalebox{0.8}{
begin{tabular}{lcc}
C & 3 & 3 \
D & 4 & 4 \
end{tabular}}
DIFaddendFL end{table}
end{document}
Actually, I have found the question lies on the scalebox{}{}
. If I don't use scalebox, the diff.tex is
This is what I want.
However, when use scalebox, it would be
But in practice my table is very wide so I have to use scalebox. My question is, is there any method to keep table fit to text width, meanwhile make latexdiff work?
latexdiff
New contributor
add a comment |
When revise my manuscript, I found latexdiff can't label changes in tables. For example, there are two tex files before and after revision:
Before revision
documentclass{article}
usepackage{graphicx}
begin{document}
begin{table}
centering
caption{Example}
scalebox{0.8}{begin{tabular}{lcc}
A & 1 & 1 \
B & 2 & 2 \
end{tabular}}
end{table}
end{document}
After revision
documentclass{article}
usepackage{graphicx}
begin{document}
begin{table}
centering
caption{New Example}
scalebox{0.8}{
begin{tabular}{lcc}
C & 3 & 3 \
D & 4 & 4 \
end{tabular}}
end{table}
end{document}
The diff.tex is followed:
documentclass{article}
%DIF LATEXDIFF DIFFERENCE FILE
%DIF DEL old.tex Thu Mar 7 08:20:20 2019
%DIF ADD new.tex Thu Mar 7 08:19:50 2019
usepackage{graphicx}
%DIF PREAMBLE EXTENSION ADDED BY LATEXDIFF
%DIF UNDERLINE PREAMBLE %DIF PREAMBLE
RequirePackage[normalem]{ulem} %DIF PREAMBLE
RequirePackage{color}definecolor{RED}{rgb}{1,0,0}definecolor{BLUE}{rgb}{0,0,1} %DIF PREAMBLE
providecommand{DIFadd}[1]{{protectcolor{blue}uwave{#1}}} %DIF PREAMBLE
providecommand{DIFdel}[1]{{protectcolor{red}sout{#1}}} %DIF PREAMBLE
%DIF SAFE PREAMBLE %DIF PREAMBLE
providecommand{DIFaddbegin}{} %DIF PREAMBLE
providecommand{DIFaddend}{} %DIF PREAMBLE
providecommand{DIFdelbegin}{} %DIF PREAMBLE
providecommand{DIFdelend}{} %DIF PREAMBLE
%DIF FLOATSAFE PREAMBLE %DIF PREAMBLE
providecommand{DIFaddFL}[1]{DIFadd{#1}} %DIF PREAMBLE
providecommand{DIFdelFL}[1]{DIFdel{#1}} %DIF PREAMBLE
providecommand{DIFaddbeginFL}{} %DIF PREAMBLE
providecommand{DIFaddendFL}{} %DIF PREAMBLE
providecommand{DIFdelbeginFL}{} %DIF PREAMBLE
providecommand{DIFdelendFL}{} %DIF PREAMBLE
newcommand{DIFscaledelfig}{0.5}
%DIF HIGHLIGHTGRAPHICS PREAMBLE %DIF PREAMBLE
RequirePackage{settobox} %DIF PREAMBLE
RequirePackage{letltxmacro} %DIF PREAMBLE
newsavebox{DIFdelgraphicsbox} %DIF PREAMBLE
newlength{DIFdelgraphicswidth} %DIF PREAMBLE
newlength{DIFdelgraphicsheight} %DIF PREAMBLE
% store original definition of includegraphics %DIF PREAMBLE
LetLtxMacro{DIFOincludegraphics}{includegraphics} %DIF PREAMBLE
newcommand{DIFaddincludegraphics}[2][]{{color{blue}fbox{DIFOincludegraphics[#1]{#2}}}} %DIF PREAMBLE
newcommand{DIFdelincludegraphics}[2][]{% %DIF PREAMBLE
sbox{DIFdelgraphicsbox}{DIFOincludegraphics[#1]{#2}}% %DIF PREAMBLE
settoboxwidth{DIFdelgraphicswidth}{DIFdelgraphicsbox} %DIF PREAMBLE
settoboxtotalheight{DIFdelgraphicsheight}{DIFdelgraphicsbox} %DIF PREAMBLE
scalebox{DIFscaledelfig}{% %DIF PREAMBLE
parbox[b]{DIFdelgraphicswidth}{usebox{DIFdelgraphicsbox}\[-baselineskip] rule{DIFdelgraphicswidth}{0em}}llap{resizebox{DIFdelgraphicswidth}{DIFdelgraphicsheight}{% %DIF PREAMBLE
setlength{unitlength}{DIFdelgraphicswidth}% %DIF PREAMBLE
begin{picture}(1,1)% %DIF PREAMBLE
thicklineslinethickness{2pt} %DIF PREAMBLE
{color[rgb]{1,0,0}put(0,0){framebox(1,1){}}}% %DIF PREAMBLE
{color[rgb]{1,0,0}put(0,0){line( 1,1){1}}}% %DIF PREAMBLE
{color[rgb]{1,0,0}put(0,1){line(1,-1){1}}}% %DIF PREAMBLE
end{picture}% %DIF PREAMBLE
}hspace*{3pt}}} %DIF PREAMBLE
} %DIF PREAMBLE
LetLtxMacro{DIFOaddbegin}{DIFaddbegin} %DIF PREAMBLE
LetLtxMacro{DIFOaddend}{DIFaddend} %DIF PREAMBLE
LetLtxMacro{DIFOdelbegin}{DIFdelbegin} %DIF PREAMBLE
LetLtxMacro{DIFOdelend}{DIFdelend} %DIF PREAMBLE
DeclareRobustCommand{DIFaddbegin}{DIFOaddbegin letincludegraphicsDIFaddincludegraphics} %DIF PREAMBLE
DeclareRobustCommand{DIFaddend}{DIFOaddend letincludegraphicsDIFOincludegraphics} %DIF PREAMBLE
DeclareRobustCommand{DIFdelbegin}{DIFOdelbegin letincludegraphicsDIFdelincludegraphics} %DIF PREAMBLE
DeclareRobustCommand{DIFdelend}{DIFOaddend letincludegraphicsDIFOincludegraphics} %DIF PREAMBLE
LetLtxMacro{DIFOaddbeginFL}{DIFaddbeginFL} %DIF PREAMBLE
LetLtxMacro{DIFOaddendFL}{DIFaddendFL} %DIF PREAMBLE
LetLtxMacro{DIFOdelbeginFL}{DIFdelbeginFL} %DIF PREAMBLE
LetLtxMacro{DIFOdelendFL}{DIFdelendFL} %DIF PREAMBLE
DeclareRobustCommand{DIFaddbeginFL}{DIFOaddbeginFL letincludegraphicsDIFaddincludegraphics} %DIF PREAMBLE
DeclareRobustCommand{DIFaddendFL}{DIFOaddendFL letincludegraphicsDIFOincludegraphics} %DIF PREAMBLE
DeclareRobustCommand{DIFdelbeginFL}{DIFOdelbeginFL letincludegraphicsDIFdelincludegraphics} %DIF PREAMBLE
DeclareRobustCommand{DIFdelendFL}{DIFOaddendFL letincludegraphicsDIFOincludegraphics} %DIF PREAMBLE
%DIF END PREAMBLE EXTENSION ADDED BY LATEXDIFF
begin{document}
begin{table}
centering
caption{DIFaddbeginFL DIFaddFL{New }DIFaddendFL Example}
DIFdelbeginFL %DIFDELCMD < scalebox{0.8}{begin{tabular}{lcc}
%DIFDELCMD < A & 1 & 1 \
%DIFDELCMD < B & 2 & 2 \
%DIFDELCMD < end{tabular}}
%DIFDELCMD < %%%
DIFdelendFL DIFaddbeginFL scalebox{0.8}{
begin{tabular}{lcc}
C & 3 & 3 \
D & 4 & 4 \
end{tabular}}
DIFaddendFL end{table}
end{document}
Actually, I have found the question lies on the scalebox{}{}
. If I don't use scalebox, the diff.tex is
This is what I want.
However, when use scalebox, it would be
But in practice my table is very wide so I have to use scalebox. My question is, is there any method to keep table fit to text width, meanwhile make latexdiff work?
latexdiff
New contributor
add a comment |
When revise my manuscript, I found latexdiff can't label changes in tables. For example, there are two tex files before and after revision:
Before revision
documentclass{article}
usepackage{graphicx}
begin{document}
begin{table}
centering
caption{Example}
scalebox{0.8}{begin{tabular}{lcc}
A & 1 & 1 \
B & 2 & 2 \
end{tabular}}
end{table}
end{document}
After revision
documentclass{article}
usepackage{graphicx}
begin{document}
begin{table}
centering
caption{New Example}
scalebox{0.8}{
begin{tabular}{lcc}
C & 3 & 3 \
D & 4 & 4 \
end{tabular}}
end{table}
end{document}
The diff.tex is followed:
documentclass{article}
%DIF LATEXDIFF DIFFERENCE FILE
%DIF DEL old.tex Thu Mar 7 08:20:20 2019
%DIF ADD new.tex Thu Mar 7 08:19:50 2019
usepackage{graphicx}
%DIF PREAMBLE EXTENSION ADDED BY LATEXDIFF
%DIF UNDERLINE PREAMBLE %DIF PREAMBLE
RequirePackage[normalem]{ulem} %DIF PREAMBLE
RequirePackage{color}definecolor{RED}{rgb}{1,0,0}definecolor{BLUE}{rgb}{0,0,1} %DIF PREAMBLE
providecommand{DIFadd}[1]{{protectcolor{blue}uwave{#1}}} %DIF PREAMBLE
providecommand{DIFdel}[1]{{protectcolor{red}sout{#1}}} %DIF PREAMBLE
%DIF SAFE PREAMBLE %DIF PREAMBLE
providecommand{DIFaddbegin}{} %DIF PREAMBLE
providecommand{DIFaddend}{} %DIF PREAMBLE
providecommand{DIFdelbegin}{} %DIF PREAMBLE
providecommand{DIFdelend}{} %DIF PREAMBLE
%DIF FLOATSAFE PREAMBLE %DIF PREAMBLE
providecommand{DIFaddFL}[1]{DIFadd{#1}} %DIF PREAMBLE
providecommand{DIFdelFL}[1]{DIFdel{#1}} %DIF PREAMBLE
providecommand{DIFaddbeginFL}{} %DIF PREAMBLE
providecommand{DIFaddendFL}{} %DIF PREAMBLE
providecommand{DIFdelbeginFL}{} %DIF PREAMBLE
providecommand{DIFdelendFL}{} %DIF PREAMBLE
newcommand{DIFscaledelfig}{0.5}
%DIF HIGHLIGHTGRAPHICS PREAMBLE %DIF PREAMBLE
RequirePackage{settobox} %DIF PREAMBLE
RequirePackage{letltxmacro} %DIF PREAMBLE
newsavebox{DIFdelgraphicsbox} %DIF PREAMBLE
newlength{DIFdelgraphicswidth} %DIF PREAMBLE
newlength{DIFdelgraphicsheight} %DIF PREAMBLE
% store original definition of includegraphics %DIF PREAMBLE
LetLtxMacro{DIFOincludegraphics}{includegraphics} %DIF PREAMBLE
newcommand{DIFaddincludegraphics}[2][]{{color{blue}fbox{DIFOincludegraphics[#1]{#2}}}} %DIF PREAMBLE
newcommand{DIFdelincludegraphics}[2][]{% %DIF PREAMBLE
sbox{DIFdelgraphicsbox}{DIFOincludegraphics[#1]{#2}}% %DIF PREAMBLE
settoboxwidth{DIFdelgraphicswidth}{DIFdelgraphicsbox} %DIF PREAMBLE
settoboxtotalheight{DIFdelgraphicsheight}{DIFdelgraphicsbox} %DIF PREAMBLE
scalebox{DIFscaledelfig}{% %DIF PREAMBLE
parbox[b]{DIFdelgraphicswidth}{usebox{DIFdelgraphicsbox}\[-baselineskip] rule{DIFdelgraphicswidth}{0em}}llap{resizebox{DIFdelgraphicswidth}{DIFdelgraphicsheight}{% %DIF PREAMBLE
setlength{unitlength}{DIFdelgraphicswidth}% %DIF PREAMBLE
begin{picture}(1,1)% %DIF PREAMBLE
thicklineslinethickness{2pt} %DIF PREAMBLE
{color[rgb]{1,0,0}put(0,0){framebox(1,1){}}}% %DIF PREAMBLE
{color[rgb]{1,0,0}put(0,0){line( 1,1){1}}}% %DIF PREAMBLE
{color[rgb]{1,0,0}put(0,1){line(1,-1){1}}}% %DIF PREAMBLE
end{picture}% %DIF PREAMBLE
}hspace*{3pt}}} %DIF PREAMBLE
} %DIF PREAMBLE
LetLtxMacro{DIFOaddbegin}{DIFaddbegin} %DIF PREAMBLE
LetLtxMacro{DIFOaddend}{DIFaddend} %DIF PREAMBLE
LetLtxMacro{DIFOdelbegin}{DIFdelbegin} %DIF PREAMBLE
LetLtxMacro{DIFOdelend}{DIFdelend} %DIF PREAMBLE
DeclareRobustCommand{DIFaddbegin}{DIFOaddbegin letincludegraphicsDIFaddincludegraphics} %DIF PREAMBLE
DeclareRobustCommand{DIFaddend}{DIFOaddend letincludegraphicsDIFOincludegraphics} %DIF PREAMBLE
DeclareRobustCommand{DIFdelbegin}{DIFOdelbegin letincludegraphicsDIFdelincludegraphics} %DIF PREAMBLE
DeclareRobustCommand{DIFdelend}{DIFOaddend letincludegraphicsDIFOincludegraphics} %DIF PREAMBLE
LetLtxMacro{DIFOaddbeginFL}{DIFaddbeginFL} %DIF PREAMBLE
LetLtxMacro{DIFOaddendFL}{DIFaddendFL} %DIF PREAMBLE
LetLtxMacro{DIFOdelbeginFL}{DIFdelbeginFL} %DIF PREAMBLE
LetLtxMacro{DIFOdelendFL}{DIFdelendFL} %DIF PREAMBLE
DeclareRobustCommand{DIFaddbeginFL}{DIFOaddbeginFL letincludegraphicsDIFaddincludegraphics} %DIF PREAMBLE
DeclareRobustCommand{DIFaddendFL}{DIFOaddendFL letincludegraphicsDIFOincludegraphics} %DIF PREAMBLE
DeclareRobustCommand{DIFdelbeginFL}{DIFOdelbeginFL letincludegraphicsDIFdelincludegraphics} %DIF PREAMBLE
DeclareRobustCommand{DIFdelendFL}{DIFOaddendFL letincludegraphicsDIFOincludegraphics} %DIF PREAMBLE
%DIF END PREAMBLE EXTENSION ADDED BY LATEXDIFF
begin{document}
begin{table}
centering
caption{DIFaddbeginFL DIFaddFL{New }DIFaddendFL Example}
DIFdelbeginFL %DIFDELCMD < scalebox{0.8}{begin{tabular}{lcc}
%DIFDELCMD < A & 1 & 1 \
%DIFDELCMD < B & 2 & 2 \
%DIFDELCMD < end{tabular}}
%DIFDELCMD < %%%
DIFdelendFL DIFaddbeginFL scalebox{0.8}{
begin{tabular}{lcc}
C & 3 & 3 \
D & 4 & 4 \
end{tabular}}
DIFaddendFL end{table}
end{document}
Actually, I have found the question lies on the scalebox{}{}
. If I don't use scalebox, the diff.tex is
This is what I want.
However, when use scalebox, it would be
But in practice my table is very wide so I have to use scalebox. My question is, is there any method to keep table fit to text width, meanwhile make latexdiff work?
latexdiff
New contributor
When revise my manuscript, I found latexdiff can't label changes in tables. For example, there are two tex files before and after revision:
Before revision
documentclass{article}
usepackage{graphicx}
begin{document}
begin{table}
centering
caption{Example}
scalebox{0.8}{begin{tabular}{lcc}
A & 1 & 1 \
B & 2 & 2 \
end{tabular}}
end{table}
end{document}
After revision
documentclass{article}
usepackage{graphicx}
begin{document}
begin{table}
centering
caption{New Example}
scalebox{0.8}{
begin{tabular}{lcc}
C & 3 & 3 \
D & 4 & 4 \
end{tabular}}
end{table}
end{document}
The diff.tex is followed:
documentclass{article}
%DIF LATEXDIFF DIFFERENCE FILE
%DIF DEL old.tex Thu Mar 7 08:20:20 2019
%DIF ADD new.tex Thu Mar 7 08:19:50 2019
usepackage{graphicx}
%DIF PREAMBLE EXTENSION ADDED BY LATEXDIFF
%DIF UNDERLINE PREAMBLE %DIF PREAMBLE
RequirePackage[normalem]{ulem} %DIF PREAMBLE
RequirePackage{color}definecolor{RED}{rgb}{1,0,0}definecolor{BLUE}{rgb}{0,0,1} %DIF PREAMBLE
providecommand{DIFadd}[1]{{protectcolor{blue}uwave{#1}}} %DIF PREAMBLE
providecommand{DIFdel}[1]{{protectcolor{red}sout{#1}}} %DIF PREAMBLE
%DIF SAFE PREAMBLE %DIF PREAMBLE
providecommand{DIFaddbegin}{} %DIF PREAMBLE
providecommand{DIFaddend}{} %DIF PREAMBLE
providecommand{DIFdelbegin}{} %DIF PREAMBLE
providecommand{DIFdelend}{} %DIF PREAMBLE
%DIF FLOATSAFE PREAMBLE %DIF PREAMBLE
providecommand{DIFaddFL}[1]{DIFadd{#1}} %DIF PREAMBLE
providecommand{DIFdelFL}[1]{DIFdel{#1}} %DIF PREAMBLE
providecommand{DIFaddbeginFL}{} %DIF PREAMBLE
providecommand{DIFaddendFL}{} %DIF PREAMBLE
providecommand{DIFdelbeginFL}{} %DIF PREAMBLE
providecommand{DIFdelendFL}{} %DIF PREAMBLE
newcommand{DIFscaledelfig}{0.5}
%DIF HIGHLIGHTGRAPHICS PREAMBLE %DIF PREAMBLE
RequirePackage{settobox} %DIF PREAMBLE
RequirePackage{letltxmacro} %DIF PREAMBLE
newsavebox{DIFdelgraphicsbox} %DIF PREAMBLE
newlength{DIFdelgraphicswidth} %DIF PREAMBLE
newlength{DIFdelgraphicsheight} %DIF PREAMBLE
% store original definition of includegraphics %DIF PREAMBLE
LetLtxMacro{DIFOincludegraphics}{includegraphics} %DIF PREAMBLE
newcommand{DIFaddincludegraphics}[2][]{{color{blue}fbox{DIFOincludegraphics[#1]{#2}}}} %DIF PREAMBLE
newcommand{DIFdelincludegraphics}[2][]{% %DIF PREAMBLE
sbox{DIFdelgraphicsbox}{DIFOincludegraphics[#1]{#2}}% %DIF PREAMBLE
settoboxwidth{DIFdelgraphicswidth}{DIFdelgraphicsbox} %DIF PREAMBLE
settoboxtotalheight{DIFdelgraphicsheight}{DIFdelgraphicsbox} %DIF PREAMBLE
scalebox{DIFscaledelfig}{% %DIF PREAMBLE
parbox[b]{DIFdelgraphicswidth}{usebox{DIFdelgraphicsbox}\[-baselineskip] rule{DIFdelgraphicswidth}{0em}}llap{resizebox{DIFdelgraphicswidth}{DIFdelgraphicsheight}{% %DIF PREAMBLE
setlength{unitlength}{DIFdelgraphicswidth}% %DIF PREAMBLE
begin{picture}(1,1)% %DIF PREAMBLE
thicklineslinethickness{2pt} %DIF PREAMBLE
{color[rgb]{1,0,0}put(0,0){framebox(1,1){}}}% %DIF PREAMBLE
{color[rgb]{1,0,0}put(0,0){line( 1,1){1}}}% %DIF PREAMBLE
{color[rgb]{1,0,0}put(0,1){line(1,-1){1}}}% %DIF PREAMBLE
end{picture}% %DIF PREAMBLE
}hspace*{3pt}}} %DIF PREAMBLE
} %DIF PREAMBLE
LetLtxMacro{DIFOaddbegin}{DIFaddbegin} %DIF PREAMBLE
LetLtxMacro{DIFOaddend}{DIFaddend} %DIF PREAMBLE
LetLtxMacro{DIFOdelbegin}{DIFdelbegin} %DIF PREAMBLE
LetLtxMacro{DIFOdelend}{DIFdelend} %DIF PREAMBLE
DeclareRobustCommand{DIFaddbegin}{DIFOaddbegin letincludegraphicsDIFaddincludegraphics} %DIF PREAMBLE
DeclareRobustCommand{DIFaddend}{DIFOaddend letincludegraphicsDIFOincludegraphics} %DIF PREAMBLE
DeclareRobustCommand{DIFdelbegin}{DIFOdelbegin letincludegraphicsDIFdelincludegraphics} %DIF PREAMBLE
DeclareRobustCommand{DIFdelend}{DIFOaddend letincludegraphicsDIFOincludegraphics} %DIF PREAMBLE
LetLtxMacro{DIFOaddbeginFL}{DIFaddbeginFL} %DIF PREAMBLE
LetLtxMacro{DIFOaddendFL}{DIFaddendFL} %DIF PREAMBLE
LetLtxMacro{DIFOdelbeginFL}{DIFdelbeginFL} %DIF PREAMBLE
LetLtxMacro{DIFOdelendFL}{DIFdelendFL} %DIF PREAMBLE
DeclareRobustCommand{DIFaddbeginFL}{DIFOaddbeginFL letincludegraphicsDIFaddincludegraphics} %DIF PREAMBLE
DeclareRobustCommand{DIFaddendFL}{DIFOaddendFL letincludegraphicsDIFOincludegraphics} %DIF PREAMBLE
DeclareRobustCommand{DIFdelbeginFL}{DIFOdelbeginFL letincludegraphicsDIFdelincludegraphics} %DIF PREAMBLE
DeclareRobustCommand{DIFdelendFL}{DIFOaddendFL letincludegraphicsDIFOincludegraphics} %DIF PREAMBLE
%DIF END PREAMBLE EXTENSION ADDED BY LATEXDIFF
begin{document}
begin{table}
centering
caption{DIFaddbeginFL DIFaddFL{New }DIFaddendFL Example}
DIFdelbeginFL %DIFDELCMD < scalebox{0.8}{begin{tabular}{lcc}
%DIFDELCMD < A & 1 & 1 \
%DIFDELCMD < B & 2 & 2 \
%DIFDELCMD < end{tabular}}
%DIFDELCMD < %%%
DIFdelendFL DIFaddbeginFL scalebox{0.8}{
begin{tabular}{lcc}
C & 3 & 3 \
D & 4 & 4 \
end{tabular}}
DIFaddendFL end{table}
end{document}
Actually, I have found the question lies on the scalebox{}{}
. If I don't use scalebox, the diff.tex is
This is what I want.
However, when use scalebox, it would be
But in practice my table is very wide so I have to use scalebox. My question is, is there any method to keep table fit to text width, meanwhile make latexdiff work?
latexdiff
latexdiff
New contributor
New contributor
New contributor
asked 5 mins ago
Shenghua LuShenghua Lu
1
1
New contributor
New contributor
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Shenghua Lu is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f478124%2flatexdiff-dont-work-in-table-with-scalebox%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Shenghua Lu is a new contributor. Be nice, and check out our Code of Conduct.
Shenghua Lu is a new contributor. Be nice, and check out our Code of Conduct.
Shenghua Lu is a new contributor. Be nice, and check out our Code of Conduct.
Shenghua Lu is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f478124%2flatexdiff-dont-work-in-table-with-scalebox%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown