Latexdiff con files annidati

  • Creatore
    Topic
  • #119386
    Andrea
    Partecipante
      Up
      0
      Down
      ::


      Salve, ho un problema nell’uso di [font=courier]latexdiff[/font] (ver. 1.3.1.1).

      Praticamente ho un Old.tex

      `\documentclass[a4paper,%
      11pt% oneside%
      %twoside,% % fronte-retro
      ]{article}
      \usepackage[T1]{fontenc}

      \usepackage[utf8]{inputenc}

      \usepackage[italian,english]{babel}

      \usepackage{amsmath,amssymb,amsthm} % matematica

      \usepackage[dvipsnames]{xcolor} % colori

      \usepackage{hyperref} % collegamenti ipertestuali
      %\usepackage[colorlinks]{hyperref} % Per colorare parti di testo

      % Page layout
      \renewcommand{\baselinestretch}{1.2}\normalsize

      %%%%%%%%%%%%%%%%%%%%%%%%

      %number equations after the sections
      \renewcommand{\theequation}{\thesection.\arabic{equation}}
      \numberwithin{equation}{section}

      %% counter footnote
      \renewcommand{\thefootnote}{\alph{footnote}}

      \input{InitialFinalMaterial/settings}

      \begin{document}

      \begin{titlepage}
      \thispagestyle{plain} %% Aggiunge numarazione della pagina

      \begin{center}
      { \textbf{%\vspace{-3cm}\\
      \fontsize{13.2}{15}\selectfont\mbox{\hspace{-0cm}PROVA DIFF}}}

      \vspace{.8cm}

      {\scshape{Mario Rossi}}

      \vspace{.15cm}

      \textit{Dipartimento di Filosofia}\\

      \vspace{.9cm}

      \textbf{Abstract}
      \end{center}

      {\fontsize{10}{12.25}\selectfont\noindent Lorem ipsum}

      \end{titlepage}

      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

      %******************************************************************
      % Principal material
      %******************************************************************

      \input{Paragraph/Old1}

      \end{document}`

      e un New.tex

      `\documentclass[a4paper,%
      11pt% oneside%
      %twoside,% % fronte-retro
      ]{article}

      \usepackage[T1]{fontenc}

      \usepackage[utf8]{inputenc}

      \usepackage[italian,english]{babel}

      \usepackage{amsmath,amssymb,amsthm} % matematica

      \usepackage[dvipsnames]{xcolor} % colori

      \usepackage{hyperref} % collegamenti ipertestuali
      %\usepackage[colorlinks]{hyperref} % Per colorare parti di testo

      % Page layout
      \renewcommand{\baselinestretch}{1.2}\normalsize

      %%%%%%%%%%%%%%%%%%%%%%%%

      %number equations after the sections
      \renewcommand{\theequation}{\thesection.\arabic{equation}}
      \numberwithin{equation}{section}

      %% counter footnote
      \renewcommand{\thefootnote}{\alph{footnote}}

      \input{InitialFinalMaterial/settings}

      \begin{document}

      \begin{titlepage}
      \thispagestyle{plain} %% Aggiunge numarazione della pagina

      \begin{center}
      { \textbf{%\vspace{-3cm}\\
      \fontsize{13.2}{15}\selectfont\mbox{\hspace{-0cm}PROVA DIFF Latex}}}

      \vspace{.8cm}

      {\scshape{Mario Bianchi}}
      \vspace{.15cm}

      \textit{Dipartimento di Filosofia e Storia}\\

      \vspace{.9cm}

      \textbf{Abstract}
      \end{center}

      {\fontsize{10}{12.25}\selectfont\noindent Lorem dolor}

      \end{titlepage}

      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

      %******************************************************************
      % Principal material
      %******************************************************************
      \input{Paragraph/Old1} %% MODIFICATO rispetto al corrispettivo Old.tex

      \end{document}`

      Ora, se dapprima mi pongo nella cartella della nuova versione con il comando
      [font=courier]cd /Users/Andrea/Desktop/Latexdiff/EsempioR/New[/font], poi eseguo [font=courier]latexdiff[/font]

      `latexdiff /Users/Andrea/Desktop/Latexdiff/EsempioR/Old/Old.tex
      New.tex > diffs.tex`

      ed infine compilo diffs.tex :

      `\documentclass[a4paper,%
      %DIF LATEXDIFF DIFFERENCE FILE
      %DIF DEL /Users/Andrea/Desktop/Latexdiff/EsempioR/Old/Old.tex Tue Jan 12 15:16:54 2021
      %DIF ADD New.tex Tue Jan 12 15:22:59 2021
      11pt% oneside%
      %twoside,% % fronte-retro
      ]{article}

      \usepackage[T1]{fontenc}

      \usepackage[utf8]{inputenc}

      \usepackage[italian,english]{babel}

      \usepackage{amsmath,amssymb,amsthm} % matematica

      \usepackage[dvipsnames]{xcolor} % colori

      \usepackage{hyperref} % collegamenti ipertestuali
      %\usepackage[colorlinks]{hyperref} % Per colorare parti di testo

      % Page layout
      \renewcommand{\baselinestretch}{1.2}\normalsize

      %%%%%%%%%%%%%%%%%%%%%%%%

      %number equations after the sections
      \renewcommand{\theequation}{\thesection.\arabic{equation}}
      \numberwithin{equation}{section}

      %% counter footnote
      \renewcommand{\thefootnote}{\alph{footnote}}

      \input{InitialFinalMaterial/settings}

      %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{\DIFaddtex}[1]{{\protect\color{blue}\uwave{#1}}} %DIF PREAMBLE
      \providecommand{\DIFdeltex}[1]{{\protect\color{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
      \providecommand{\DIFmodbegin}{} %DIF PREAMBLE
      \providecommand{\DIFmodend}{} %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
      %DIF HYPERREF PREAMBLE %DIF PREAMBLE
      \providecommand{\DIFadd}[1]{\texorpdfstring{\DIFaddtex{#1}}{#1}} %DIF PREAMBLE
      \providecommand{\DIFdel}[1]{\texorpdfstring{\DIFdeltex{#1}}{}} %DIF PREAMBLE
      %DIF LISTINGS PREAMBLE %DIF PREAMBLE
      \RequirePackage{listings} %DIF PREAMBLE
      \RequirePackage{color} %DIF PREAMBLE
      \lstdefinelanguage{DIFcode}{ %DIF PREAMBLE
      %DIF DIFCODE_UNDERLINE %DIF PREAMBLE
      moredelim=[il][\color{red}\sout]{\%DIF\ <\ }, %DIF PREAMBLE moredelim=[il][\color{blue}\uwave]{\%DIF\ >\ } %DIF PREAMBLE
      } %DIF PREAMBLE
      \lstdefinestyle{DIFverbatimstyle}{ %DIF PREAMBLE
      language=DIFcode, %DIF PREAMBLE
      basicstyle=\ttfamily, %DIF PREAMBLE
      columns=fullflexible, %DIF PREAMBLE
      keepspaces=true %DIF PREAMBLE
      } %DIF PREAMBLE
      \lstnewenvironment{DIFverbatim}{\lstset{style=DIFverbatimstyle}}{} %DIF PREAMBLE
      \lstnewenvironment{DIFverbatim*}{\lstset{style=DIFverbatimstyle,showspaces=true}}{} %DIF PREAMBLE
      %DIF END PREAMBLE EXTENSION ADDED BY LATEXDIFF

      \begin{document}

      \begin{titlepage}
      \thispagestyle{plain} %% Aggiunge numarazione della pagina

      \begin{center}
      { \textbf{%\vspace{-3cm}\\
      \fontsize{13.2}{15}\selectfont\DIFdelbegin \DIFdel{\mbox{\hspace{-0cm}PROVA DIFF}}\DIFdelend \DIFaddbegin \DIFadd{\mbox{\hspace{-0cm}PROVA DIFF Latex}}\DIFaddend }}

      \vspace{.8cm}

      {\DIFdelbegin %DIFDELCMD < \scshape{Mario Rossi}%%% \DIFdelend \DIFaddbegin \scshape{Mario Bianchi}\DIFaddend } \vspace{.15cm} \textit{Dipartimento di Filosofia \DIFaddbegin \DIFadd{e Storia}\DIFaddend }\\ \vspace{.9cm} \textbf{Abstract} \end{center} {\fontsize{10}{12.25}\selectfont\noindent Lorem \DIFdelbegin \DIFdel{ipsum}\DIFdelend \DIFaddbegin \DIFadd{dolor}\DIFaddend } \end{titlepage} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %DIF < %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %DIF < %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %****************************************************************** %DIF < Initial Material %DIF < ****************************************************************** \DIFdelbegin %DIFDELCMD < %DIFDELCMD < %%% %DIF < ****************************************************************** \DIFdelend % Principal material %****************************************************************** \input{Paragraph/Old1} %DIF > % MODIFICATO rispetto al corrispettivo Old.tex

      \end{document}`

      sono bene evidenziate le differenze tra Old.tex e New.tex ma non quelle contenute nel file annidato Old1.tex.
      Ho provato anche con l’opzione [font=courier]flatten[/font], i.e.

      `latexdiff ‐‐flatten /Users/Andrea/Desktop/Latexdiff/EsempioR/Old/Old.tex
      New.tex > diffs.tex`

      ma mi da il seguente errore:

      `2 and only 2 non-option arguments required. Write latexdiff -h to get help`

      Avete qualche soluzione per includere nell’evidenziazione delle differenze tra Old.tex e New.tex anche il file annidato Old1.tex?

      Grazie anticipatamente

    Visualizzazione 1 filone di risposte
    • Autore
      Risposte
      • #119387
        robitex
        Amministratore del forum
          Up
          0
          Down
          ::


          Fare il diff dei singoli file che includi?
          R.

        • #119388
          Andrea
          Partecipante
            Up
            0
            Down
            ::

            robitex” post=119858Fare il diff dei singoli file che includi?
            R.

            Sì, in effetti non ci avevo pensato… Vorrei comunque una soluzione con l’opzione [font=courier]flatten[/font] (o qualcosa di analogo) perché in realtà ho da gestire e da modificare più files annidati contemporaneamente ed è un pò laborioso volta per volta fare il diff dei singoli file. 😐

        Visualizzazione 1 filone di risposte
        • Devi essere connesso per rispondere a questo topic.

        Go to top