function report_appendix_ENG(yesTL,yesIPL,yesTLH,yesPCL,yesTLHR,yesTLHRH,yesPCLHR,...
    yesPL,yesBL,yesTuL,yesRaL,yesThL,yesKL,yesKLHR,yesRL,yesLL,yesPrL,yesPT100,...
    yesCrL,yes3DCrL,yesEL,yes3DEL,yesWEL,yesMPBEL,PL_A,PL_D,Font_section,...
    Font_caption,Font_tools,FIG,dim,appendice,colonna6,rpt,FileName)

import mlreportgen.dom.*
import mlreportgen.report.*

% Make sure DOM is compilable
makeDOMCompilable()

%% Appendice - Data elaboration
partecomune = 0;
ElabTitle = 0;
Titolo = Section();

testoTilt = Paragraph(['ADC points stored in the SD card are defined ''raw data'' and they need '...
    'to be properly elaborated in order to convert acceleration data into displacement values. '...
    'Moreover, in this stage it is also possible to identify and correct any issue related to '...
    'data drifting, spike and/or instrumental noises. These results are achieved thanks to a '...
    'dedicated MATLAB-based software, named ''Tilt''. It should be taken into account that traditional '...
    'monitoring devices usually feature a sampling frequency that is too low to allow the '...
    'application of statistical analyses aimed to reduce any tool-related data noise. On the '...
    'other hand, the definition of a database including a great number of monitoring data permits '...
    'to evaluate the phenomena evolution over time and to assess the results reliability.']);

testoATD = Paragraph(['ADC points stored in the SD card are defined ''raw data'' and they need '...
    'to be properly elaborated in order to convert acceleration data into displacement values. '...
    'Moreover, in this stage it is also possible to identify and correct any issue related to '...
    'data drifting, spike and/or instrumental noises. These results are achieved thanks to a '...
    'dedicated MATLAB-based software, named ''ATD''. It should be taken into account that traditional '...
    'monitoring devices usually feature a sampling frequency that is too low to allow the '...
    'application of statistical analyses aimed to reduce any tool-related data noise. On the '...
    'other hand, the definition of a database including a great number of monitoring data permits '...
    'to evaluate the phenomenon evolution over time and to assess the results reliability.']);

testoRIS = Paragraph(['After collecting the monitoring data on-site, the datalogger sends them '...
    'to the ASE database, from where the software imports raw data and calibration parameters. '...
    'This is a completely automatic procedure: after receiving new data, a dedicated procedure '...
    'converts them into physical units, thus obtaining the actual displacement measured on-site. '...
    'After the results uploading phase, which takes a very short amount of time, the user can access '...
    'and download all monitoring data through the web-based platform.']);

testoTilt.HAlign = 'justify';
testoATD.HAlign = 'justify';
testoRSN.HAlign = 'justify';
testoMUSA.HAlign = 'justify';
testoRIS.HAlign = 'justify';

% --- Vertical Array ---
if sum(yesTL) >= 1 || sum(yesTLHR) >= 1
    elabTL = Section();
    if ElabTitle == 0
        app = Heading2('Data elaboration');
        app.Style = {OuterMargin('0in','0in','0.2in','0.2in'),FontSize(Font_section),HAlign('justify')}; % Sx-Dx-Alto-Basso
        Titolo.Title = app;
        ElabTitle = 1;
    end
    sezVA = Heading3('Vertical Array');
    sezVA.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
    elabTL.Title = sezVA;
    testo = Paragraph(['When a displacement occurs, the node changes its position in order to '...
        'follow the slope movement. After been read, every tilt sensor records the new position '...
        'as an electrical signal (raw data) and sends the information to the control unit. '...
        'The datalogger saves the information on a volatile memory (SD card) and then transmits '...
        'them to the elaboration centre, where a software processes the electrical signals (ADC points) '...
        'to return information about the real displacement of the node (physical units). The accelerometer '...
        'gives information about the rotation of the node, referring to the constant gravity acceleration g. '...
        'The magnetometer allows to obtain the displacement direction of each node, referring to NED '...
        'reference system (North-East-Down). Finally, the on-board thermometer is necessary to correct the '...
        'thermal effects on the accelerometer, using the calibration values. This sensor also provides '...
        'the temperature along the vertical.']);
    img = Image(('vert.jpg'));
    img.Style = {Height('7cm'),HAlign('center')};
    ionhcaption = Paragraph(['Fig. ' num2str(FIG) ' - Effect of displacement on the tool and new configuration of the Array']);
    FIG = FIG+1;
    ionhcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
    testo.HAlign = 'justify';
    add(elabTL,testo);
    add(elabTL,testoTilt);
    add(elabTL,img);
    add(elabTL,ionhcaption);
    add(elabTL,testoRIS);
    partecomune = 1;
    add(appendice,elabTL);
    br = PageBreak();
    add(appendice,br);
end

% --- In Place Array ---
if sum(yesIPL) >= 1
    elabIPL = Section();
    if ElabTitle == 0
        app = Heading2('Data elaboration');
        app.Style = {OuterMargin('0in','0in','0.2in','0.2in'),FontSize(Font_section),HAlign('justify')}; % Sx-Dx-Alto-Basso
        Titolo.Title = app;
        ElabTitle = 1;
    end
    sezIPA = Heading3('In Place Array');
    sezIPA.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
    elabIPL.Title = sezIPA;
    testo = Paragraph(['When a displacement occurs, the node changes its position in order to '...
        'follow the slope movement. After been read, every tilt sensor records the new position '...
        'as an electrical signal (raw data) and sends the information to the control unit. '...
        'The datalogger saves the information on a volatile memory (SD card) and then transmits '...
        'them to the elaboration centre, where a software processes the electrical signals (ADC points) '...
        'to return information about the real displacement of the node (physical units). The accelerometer '...
        'gives information about the rotation of the node, referring to the constant gravity acceleration g. '...
        'The magnetometer allows to obtain the displacement direction of each node, referring to NED '...
        'reference system (North-East-Down). Finally, the on-board thermometer is necessary to correct the '...
        'thermal effects on the accelerometer, using the calibration values. This sensor also provides '...
        'the temperature along the vertical.']);
    img = Image(('vert.jpg'));
    img.Style = {Height('7cm'),HAlign('center')};
    imgcaption = Paragraph(['Fig. ' num2str(FIG) ' - Effect of displacement on the tool and new configuration of the Array']);
    FIG = FIG+1;
    imgcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
    testo.HAlign = 'justify';
    add(elabIPL,testo);
    add(elabIPL,img);
    add(elabIPL,imgcaption);
    if partecomune == 0
        add(elabIPL,testoTilt);
        add(elabIPL,testoRIS);
        partecomune = 1;
    end
    add(appendice,elabIPL);
    br = PageBreak();
    add(appendice,br);
end

nodoTunnel = 0;
% --- Cir Array ---
if sum(yesTuL) >= 1
    elabCIR = Section();
    if ElabTitle == 0
        app = Heading2('Data elaboration');
        app.Style = {OuterMargin('0in','0in','0.2in','0.2in'),FontSize(Font_section),HAlign('justify')}; % Sx-Dx-Alto-Basso
        Titolo.Title = app;
        ElabTitle = 1;
    end
    sezCA = Heading3('Cir Array');
    sezCA.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
    elabCIR.Title = sezCA;
    testo = Paragraph(['When a displacement occurs, the node changes its position in order to '...
        'follow the section movement. After been read, every tilt sensor records the new position '...
        'as an electrical signal (raw data) and sends the information to the control unit. '...
        'The datalogger saves the information on a volatile memory (SD card) and then transmits '...
        'them to the elaboration centre, where a software processes the electrical signals (ADC points) '...
        'to return information about the real displacement of the node (physical units). The accelerometer '...
        'gives information about the rotation of the node, referring to the constant gravity acceleration g. '...
        'The on-board thermometer is necessary to correct the '...
        'thermal effects on the accelerometer, using the calibration values. This sensor also provides '...
        'the temperature along the array.']);
    testo2 = Paragraph(['MEMS sensor is located at the centre of each Link and measures the three '...
        'components of the gravitational field in its own reference system, starting from an initial '...
        'configuration (zero reading). When a movement arises, the variation of the different gravity '...
        'components gives back the information about the displacement. In this way, it is possible to '...
        'calculate the tunnel rotation and the local displacement of each Link, and finally compute '...
        'a curve of cumulated displacements and the three-dimensional variation of the monitored section. '...
        'Moreover, the software determines the length variation of predefined convergence segments, created '...
        'by connecting specific calculation points with an approach similar to topography applications. '...
        'Each Tunnel Link has a Segment of Relevance, which is assumed as infinitely rigid, that starts from the middle '...
        'point between the considered and the previous Link and ends at the medium distance between the '...
        'considered and the following Link. It is possible to customize the distance between Links according to '...
        'specific monitoring necessities (smaller distances lead to more reliable and accurate results).']);
    img = Image(('cir_ENG.png'));
    img.Style = {Height('7cm'),HAlign('center')};
    imgcaption = Paragraph(['Fig. ' num2str(FIG) ' - Tunnel Link Segment of Relevance and '...
        'installation system']);
    FIG = FIG+1;
    imgcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
    testo.HAlign = 'justify';
    testo2.HAlign = 'justify';
    add(elabCIR,testo);
    nodoTunnel = 1;
    add(elabCIR,testo2);
    add(elabCIR,img);
    add(elabCIR,imgcaption);
    if partecomune == 0
        add(elabCIR,testoATD);
        add(elabCIR,testoRIS);
        partecomune = 1;
    end
    add(appendice,elabCIR);
end

% --- Rad Array ---
if sum(yesRaL) >= 1
    elabRAD = Section();
    if ElabTitle == 0
        app = Heading2('Data elaboration');
        app.Style = {OuterMargin('0in','0in','0.2in','0.2in'),FontSize(Font_section),HAlign('justify')}; % Sx-Dx-Alto-Basso
        Titolo.Title = app;
        ElabTitle = 1;
    end
    sezRA = Heading3('Rad Array');
    sezRA.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
    elabRAD.Title = sezRA;
    testo = Paragraph(['When a displacement occurs, the node changes its position in order to '...
        'follow the rock mass movement. After been read, every tilt sensor records the new position '...
        'as an electrical signal (raw data) and sends the information to the control unit. '...
        'The datalogger saves the information on a volatile memory (SD card) and then transmits '...
        'them to the elaboration centre, where a software processes the electrical signals (ADC points) '...
        'to return information about the real displacement of the node (physical units). The accelerometer '...
        'gives information about the rotation of the node, referring to the constant gravity acceleration g. '...
        'The on-board thermometer is necessary to correct the '...
        'thermal effects on the accelerometer, using the calibration values. This sensor also provides '...
        'the temperature along the array.']);
    testo2 = Paragraph(['MEMS sensor is located at the centre of each Link and measures the three '...
        'components of the gravitational field in its own reference system, starting from an initial '...
        'configuration (zero reading). When a movement arises, the variation of the different gravity '...
        'components gives back the information of the displacement. In this way, it is possible to '...
        'calculate the 3D displacement surrounding the monitored section. '...
        'Each single node provides a local information according to the 3D reference system X-Y-Z (respectively '...
        'width, depth and height). The resultant of these components allows to determine the cumulative displacement '...
        'and the three-dimensional position variation of the monitored element. Moreover, it is possible to couple a Rad '...
        'Array with a multi-point borehole extensometer in order to separate radial deformations from components acting '...
        'along other directions. '...
        'Each Radial Link has a Segment of Relevance, which is assumed as infinitely rigid, that starts from the middle '...
        'point between the considered and the previous Link and ends at the medium distance between the '...
        'considered and the following Link. It is possible to customize the distance between Links according to '...
        'specific monitoring necessities (smaller distances lead to more reliable and accurate results).']);
    img = Image(('rad.png'));
    img.Style = {Height('7.5cm'),HAlign('center')};
    imgcaption = Paragraph(['Fig. ' num2str(FIG) ' - Graphical illustration of two Rad Arrays located '...
        'on the upper part of the monitorign section and installed with a 45-degree tilt.']);
    FIG = FIG+1;
    imgcaption.Style = {HAlign('justify'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
    testo.HAlign = 'justify';
    testo2.HAlign = 'justify';
    if nodoTunnel==0
        add(elabRAD,testo);
        nodoTunnel = 1;
    end
    add(elabRAD,testo2);
    add(elabRAD,img);
    add(elabRAD,imgcaption);
    if partecomune == 0
        add(elabRAD,testoATD);
        add(elabRAD,testoRIS);
        partecomune = 1;
    end
    add(appendice,elabRAD);
end

% --- PreConv Array ---
if sum(yesPCL) >= 1
    elabPCL = Section();
    if ElabTitle == 0
        app = Heading2('Data elaboration');
        app.Style = {OuterMargin('0in','0in','0.2in','0.2in'),FontSize(Font_section),HAlign('justify')}; % Sx-Dx-Alto-Basso
        Titolo.Title = app;
        ElabTitle = 1;
    end
    sezPCA = Heading3('PreConv Array');
    sezPCA.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
    elabPCL.Title = sezPCA;
    testo = Paragraph(['When a displacement occurs, the node changes its position in order to '...
        'follow the rock mass movement. After been read, every tilt sensor records the new position '...
        'as an electrical signal (raw data) and sends the information to the control unit. '...
        'The datalogger saves the information on a volatile memory (SD card) and then transmits '...
        'them to the elaboration centre, where a software processes the electrical signals (ADC points) '...
        'to return information about the real displacement of the node (physical units). The accelerometer '...
        'gives information about the rotation of the node, referring to the constant gravity acceleration g. '...
        'The on-board thermometer is necessary to correct the '...
        'thermal effects on the accelerometer, using the calibration values. This sensor also provides '...
        'the temperature along the array.']);
    testo2 = Paragraph(['MEMS sensor is located at the centre of each Link and measures the three '...
        'components of the gravitational field in its own reference system, starting from an initial '...
        'configuration (zero reading). When a movement arises, the variation of the different gravity '...
        'components gives back the information of the displacement. In this way, it is possible to '...
        'calculate the pre-convergence component ahead of the tunnel face and the local displacement of each Link, '...
        'thus allowing to compute a curve of cumulated displacements. '...
        'Each PreConv Link has a Segment of Relevance, which is assumed as infinitely rigid, that starts from the middle '...
        'point between the considered and the previous Link and ends at the medium distance between the '...
        'considered and the following Link. It is possible to customize the distance between Links according to '...
        'specific monitoring necessities (smaller distances lead to more reliable and accurate results).']);
    img1 = Image(('PCA.png'));
    img2 = Image(('PCA2_ENG.jpg'));
    img1.Style = {Height('6cm'),HAlign('center')};
    imgcaption = Paragraph(['Fig. ' num2str(FIG) ' - Graphical representation '...
        'of the expected deformation behaviour induced by the underground excavation']);
    FIG = FIG+1;
    imgcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
    img2.Style = {Height('14cm'),HAlign('center')};
    img2caption = Paragraph(['Fig. ' num2str(FIG) ' - MUMS PreConv Array installation example']);
    FIG = FIG+1;
    img2caption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
    testo.HAlign = 'justify';
    testo2.HAlign = 'justify';
    if nodoTunnel == 0
        add(elabPCL,testo);
        nodoTunnel = 1;
    end
    add(elabPCL,img1);
    add(elabPCL,imgcaption);
    add(elabPCL,testo2);
    add(elabPCL,img2);
    add(elabPCL,img2caption);
    if partecomune == 0
        add(elabPCL,testoATD);
        add(elabPCL,testoRIS);
        partecomune = 1;
    end
    add(appendice,elabPCL);
end

% --- Analog Array ---
if sum(yesLL)>=1 || sum(yesPrL)>=1 || sum(yesPT100)>=1 || sum(yesCrL)>=1 || ...
        sum(yes3DCrL)>=1 || sum(yesEL)>=1 || sum(yes3DEL)>=1 || sum(yesWEL)>=1 || sum(yesMPBEL)>=1
    elabAA = Section();
    if ElabTitle == 0
        app = Heading2('Data elaboration');
        app.Style = {OuterMargin('0in','0in','0.2in','0.2in'),FontSize(Font_section),HAlign('justify')}; % Sx-Dx-Alto-Basso
        Titolo.Title = app;
        ElabTitle = 1;
    end
    sezAA = Heading3('Analog Array');
    sezAA.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
    elabAA.Title = sezAA;
    testo = Paragraph(['Analog Arrays are composed of traditional analog sensors, connected to the ASE801 '...
        'datalogger thanks to a dedicated GMUX module that converts an analog '...
        'signal into a digital one, or by installing an ASE201 control unit. This datalogger is able to read any traditional sensors featuring different '...
        'output signals (e.g. Hz, mV/V, 0-5 V, 0-10 V, VW, 4-20 mA, NTC, PT100, etc.).']);
    img = Image(('G201.png'));
    img.Style = {Height('3.5cm'),HAlign('center')};
    imgcaption = Paragraph(['Fig. ' num2str(FIG) ' - ASE201 control unit, designed to read any traditional analog '...
        'monitoring device by converting its signal into a digital output']);
    FIG = FIG+1;
    imgcaption.Style = {HAlign('justify'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
    testo.HAlign = 'justify';
    add(elabAA,testo);
    add(elabAA,img);
    add(elabAA,imgcaption);
    if partecomune == 0
        add(elabAA,testoATD);
        add(elabAA,testoRIS);
        partecomune = 1;
    end
    add(appendice,elabAA);
end

%% Appendice sensori
% ---Tilt Link HR 3D V---
elabSE = Section();
SE = Section();
app = Heading2('Sensors description');
app.Style = {OuterMargin('0in','0in','0.2in','0.2in'),FontSize(Font_section),HAlign('justify')}; % Sx-Dx-Alto-Basso
elabSE.Title = app;
add(appendice,elabSE);
TL3D = 0;
for a = 1:dim
    [dimC,~] = size(colonna6{a,1});
    if dimC == 1
        if strcmp(colonna6(a,1),'Tilt Link HR 3D V') == 1
            if TL3D == 0
                SE = Section();
            end
            sezTilt = Heading3('Tilt Link HR 3D V');
            sezTilt.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
            SE.Title = sezTilt;
            text = Paragraph(['Tilt Link HR 3D V follows the same working principle of Tilt Link V. '...
                'The main improvement refers to the 2D electrolytic cell, which permits to monitor small '...
                'displacements with a 10 times higher accuracy. Contrary to the MEMS sensor, which has a theoretically '...
                'infinite measure range, the electrolytic cell is limited to a ' char(177) '25' char(186) ' absolute tilt range. Since the '...
                'instrumental axes X and Y of this sensor coincide '...
                'with the two corresponding MEMS axes, the MEMS magnetometer can be used to define also the electrolytic cell '...
                'orientation. The simultaneous presence of two different '...
                'type of sensors in the same Link gives redundancy to results, which is fundamental to reduce '...
                'the uncertainties and have a robust interpretation of the occurring phenomenon.']);
            text.HAlign = 'justify';
            if TL3D == 0
                add(SE,text);
                imgTL = Image(('Tilt Link HR 3D V.tif'));
                add(SE,imgTL);
                imgTL.Style = {Height('6.5cm'),HAlign('center')};
                imgTLcaption = Paragraph(['Fig. ' num2str(FIG) ' - Tilt Link HR 3D V sensor']);
                add(SE,imgTLcaption);
                FIG = FIG+1;
                imgTLcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                TL3D = 1;
            end
            break
        end
    else
        for aC = 1:dimC
            if strcmp(colonna6{a, 1}{aC, 1},'Tilt Link HR 3D V') == 1
                if TL3D == 0
                    SE = Section();
                end
                sezTilt = Heading3('Tilt Link HR 3D V');
                sezTilt.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                SE.Title = sezTilt;
                text = Paragraph(['Tilt Link HR 3D V follows the same working principle of Tilt Link V. '...
                    'The main improvement refers to the 2D electrolytic cell, which permits to monitor small '...
                    'displacements with a 10 times higher accuracy. Contrary to the MEMS sensor, which has a theoretically '...
                    'infinite measure range, the electrolytic cell is limited to a ' char(177) '25' char(186) ' absolute tilt range. Since the '...
                    'instrumental axes X and Y of this sensor coincide '...
                    'with the two corresponding MEMS axes, the MEMS magnetometer can be used to define also the electrolytic cell '...
                    'orientation. The simultaneous presence of two different '...
                    'type of sensors in the same Link gives redundancy to results, which is fundamental to reduce '...
                    'the uncertainties and have a robust interpretation of the occurring phenomenon.']);
                text.HAlign = 'justify';
                if TL3D == 0
                    add(SE,text);
                    imgTL = Image(('Tilt Link HR 3D V.tif'));
                    add(SE,imgTL);
                    imgTL.Style = {Height('6.5cm'),HAlign('center')};
                    imgTLcaption = Paragraph(['Fig. ' num2str(FIG) ' - Tilt Link HR 3D V sensor']);
                    add(SE,imgTLcaption);
                    FIG = FIG+1;
                    imgTLcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                    TL3D = 1;
                end
                break
            end
        end
    end
end
add(appendice,SE);

% --- Tilt Link V ---
TL = 0;
ST = Section();
for a = 1:dim
    [dimC,~] = size(colonna6{a,1});
    if dimC == 1
        if strcmp(colonna6(a,1),'Tilt Link V') == 1
            if TL == 0
                ST = Section();
            end
            sezTilt = Heading3('Tilt Link V');
            sezTilt.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
            ST.Title = sezTilt;
            text = Paragraph(['Each Tilt Link V features a 3D MEMS sensor, which equips an accelerometer, a '...
                'magnetometer, and a thermometer. The first element is able to record the sensor tilt, '...
                'while the second one defines its direction. The thermometer provides the sensor temperature, and it '...
                'is used to correct the thermal effects on the accelerometer. From a theoretical point of view, '...
                'MEMS features an infinite range of tilt measure, while small variations '...
                'are influenced by electrical noises.']);
            if TL == 0
                text.HAlign = 'justify';
                add(ST,text);
                img = Image(('Tilt Link V.tif'));
                img.Style = {Height('5.5cm'),HAlign('center')};
                add(ST,img);
                ionhcaption = Paragraph(['Fig. ' num2str(FIG) ' - Tilt Link V sensor']);
                FIG = FIG+1;
                ionhcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                add(ST,ionhcaption);
                TL = 1;
            end
            break
        end
    else
        for aC = 1:dimC
            if strcmp(colonna6{a, 1}{aC, 1},'Tilt Link V') == 1
                if TL == 0
                    ST = Section();
                end
                sezTilt = Heading3('Tilt Link V');
                sezTilt.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                ST.Title = sezTilt;
                text = Paragraph(['Each Tilt Link V features a 3D MEMS sensor, which equips an accelerometer, a '...
                    'magnetometer, and a thermometer. The first element is able to record the sensor tilt, '...
                    'while the second one defines its direction. The thermometer provides the sensor temperature, and it '...
                    'is used to correct the thermal effects on the accelerometer. From a theoretical point of view, '...
                    'MEMS features an infinite range of tilt measure, while small variations '...
                    'are influenced by electrical noises.']);
                if TL == 0
                    text.HAlign = 'justify';
                    add(ST,text);
                    img = Image(('Tilt Link V.tif'));
                    img.Style = {Height('5.5cm'),HAlign('center')};
                    add(ST,img);
                    ionhcaption = Paragraph(['Fig. ' num2str(FIG) ' - Tilt Link V sensor']);
                    FIG = FIG+1;
                    ionhcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                    add(ST,ionhcaption);
                    TL = 1;
                end
                break
            end
        end
    end
end
add(appendice,ST);

% --- In Place Link HR 3D ---
SIPI3D = Section();
IPL3D = 0;
for a = 1:dim
    [dimC,~] = size(colonna6{a,1});
    if dimC == 1
        if strcmp(colonna6(a,1),'In Place Link HR 3D') == 1
            if IPL3D == 0
                SIPI3D = Section();
            end
            sezIPI = Heading3('In Place Link HR 3D');
            sezIPI.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
            SIPI3D.Title = sezIPI;
            text = Paragraph(['In Place HR 3D follows the same working principle of In Place Link. '...
                'The main improvement refers to the 2D electrolytic cell, which permits to monitor small '...
                'displacements with a 10 times higher accuracy. Contrary to the MEMS sensor, which has a theoretically '...
                'infinite measure range, the electrolytic cell is limited to a ' char(177) '25' char(186) ' absolute tilt range. Since the '...
                'instrumetal axes X and Y of this sensor coincide '...
                'with the two corresponding MEMS axes, the MEMS magnetometer can be used to define also the electrolytic cell '...
                'orientation. The simultaneous presence of two different '...
                'type of sensors in the same link gives redundancy to results, which is fundamental to reduce '...
                'the uncertainties and have a robust interpretation of the occurring phenomenon.']);
            text.HAlign = 'justify';
            if IPL3D == 0
                add(SIPI3D,text);
                imgIPL = Image(('Tilt Link HR 3D V.tif'));
                add(SIPI3D,imgIPL);
                imgIPL.Style = {Height('5.5cm'),HAlign('center')};
                imgIPLcaption = Paragraph(['Fig. ' num2str(FIG) ' - In Place Link HR 3D sensor']);
                add(SIPI3D,imgIPLcaption);
                FIG = FIG+1;
                imgIPLcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                IPL3D = 1;
            end
            break
        end
    else
        for aC = 1:dimC
            if strcmp(colonna6{a, 1}{aC, 1},'In Place Link HR 3D') == 1
                if IPL3D == 0
                    SIPI3D = Section();
                end
                sezIPI = Heading3('In Place Link HR 3D');
                sezIPI.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                SIPI3D.Title = sezIPI;
                text = Paragraph(['In Place HR 3D follows the same working principle of In Place Link. '...
                    'The main improvement refers to the 2D electrolytic cell, which permits to monitor small '...
                    'displacements with a 10 times higher accuracy. Contrary to the MEMS sensor, which has a theoretically '...
                    'infinite measure range, the electrolytic cell is limited to a ' char(177) '25' char(186) ' absolute tilt range. Since the '...
                    'instrumetal axes X and Y of this sensor coincide '...
                    'with the two corresponding MEMS axes, the MEMS magnetometer can be used to define also the electrolytic cell '...
                    'orientation. The simultaneous presence of two different '...
                    'type of sensors in the same link gives redundancy to results, which is fundamental to reduce '...
                    'the uncertainties and have a robust interpretation of the occurring phenomenon.']);
                text.HAlign = 'justify';
                if IPL3D == 0
                    add(SIPI3D,text);
                    imgIPL = Image(('Tilt Link HR 3D V.tif'));
                    add(SIPI3D,imgIPL);
                    imgIPL.Style = {Height('5.5cm'),HAlign('center')};
                    imgIPLcaption = Paragraph(['Fig. ' num2str(FIG) ' - In Place Link HR 3D sensor']);
                    add(SIPI3D,imgIPLcaption);
                    FIG = FIG+1;
                    imgIPLcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                    IPL3D = 1;
                end
                break
            end
        end
    end
end
add(appendice,SIPI3D);

% --- In Place Link ---
IPL = 0;
SIPI = Section();
for a = 1:dim
    [dimC,~] = size(colonna6{a,1});
    if dimC == 1
        if strcmp(colonna6(a,1),'In Place Link') == 1
            if IPL == 0
                SIPI = Section();
            end
            sezIPI = Heading3('In Place Link');
            sezIPI.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
            SIPI.Title = sezIPI;
            text = Paragraph(['Each In Place Link features a 3D MEMS sensor, which equips an accelerometer, a '...
                'magnetometer, and a thermometer. The first element is able to record the node tilt, '...
                'while the second one defines its direction. The thermometer provides the sensor temperature, and it '...
                'is used to correct the thermal effects on the accelerometer. From a theoretical point of view, '...
                'the MEMS features an infinite range of tilt measure, while small variations in its '...
                'position are influenced by electrical noises.']);
            if IPL == 0
                text.HAlign = 'justify';
                add(SIPI,text);
                img = Image(('Tilt Link V.tif'));
                img.Style = {Height('5.5cm'),HAlign('center')};
                add(SIPI,img);
                ionhcaption = Paragraph(['Fig. ' num2str(FIG) ' - In Place Link sensor']);
                FIG = FIG+1;
                ionhcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                add(SIPI,ionhcaption);
                IPL = 1;
            end
            break
        end
    else
        for aC = 1:dimC
            if strcmp(colonna6{a, 1}{aC, 1},'In Place Link') == 1
                if IPL == 0
                    SIPI = Section();
                end
                sezIPI = Heading3('In Place Link');
                sezIPI.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                SIPI.Title = sezIPI;
                text = Paragraph(['Each In Place Link features a 3D MEMS sensor, which equips an accelerometer, a '...
                    'magnetometer, and a thermometer. The first element is able to record the node tilt, '...
                    'while the second one defines its direction. The thermometer provides the sensor temperature, and it '...
                    'is used to correct the thermal effects on the accelerometer. From a theoretical point of view, '...
                    'the MEMS features an infinite range of tilt measure, while small variations in its '...
                    'position are influenced by electrical noises.']);
                if IPL == 0
                    text.HAlign = 'justify';
                    add(SIPI,text);
                    img = Image(('Tilt Link V.tif'));
                    img.Style = {Height('5.5cm'),HAlign('center')};
                    add(SIPI,img);
                    ionhcaption = Paragraph(['Fig. ' num2str(FIG) ' - In Place Link sensor']);
                    FIG = FIG+1;
                    ionhcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                    add(SIPI,ionhcaption);
                    IPL = 1;
                end
                break
            end
        end
    end
end
add(appendice,SIPI);

if sum(yesPL) >= 1
    % --- Piezo Link ---
    PL = 0;
    if sum(PL_A) > 0 && sum(PL_D) > 0
        tipoPL = 'absolute (digital) and relative (analog) ';
        figuraPL = 'Piezo Link DA.jpg';
        capPL = 'digital (left) and analog (right) models';
        baroPL = ' ';
    elseif sum(PL_A) > 0
        tipoPL = 'relative ';
        figuraPL = 'Piezo Link A.png';
        capPL = 'analog model';
        baroPL = ' ';
    elseif sum(PL_D) > 0
        tipoPL = 'absolute ';
        figuraPL = 'Piezo Link D.jpg';
        capPL = 'digital model';
        baroPL = ', when coupled with a barometer, it also allows ';
    end
    for a = 1:dim
        [dimC,~] = size(colonna6{a,1});
        if dimC == 1
            if strcmp(colonna6(a,1),'Piezo Link') == 1
                if PL == 0
                    PE = Section();
                end
                sezTilt = Heading3('Piezo Link');
                sezTilt.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                PE.Title = sezTilt;
                text = Paragraph(['Piezo Link is a sensor able to measure the ' tipoPL 'pressure and'  baroPL ...
                    'to calculate the water table level.']);
                if PL == 0
                    text.HAlign = 'justify';
                    add(PE,text);
                    imgPL = Image(figuraPL);
                    imgPL.Style = {Height('5.5cm'),HAlign('center')};
                    add(PE,imgPL);
                    FIG = FIG+1;
                    PLcaption = Paragraph(['Fig. ' num2str(FIG) ' - Piezo Link sensor, ' capPL]);
                    PLcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                    add(PE,PLcaption);
                    PL = 1;
                end
                break
            end
        else
            for aC = 1:dimC
                if strcmp(colonna6{a, 1}{aC, 1},'Piezo Link') == 1
                    if PL == 0
                        PE = Section();
                    end
                    sezTilt = Heading3('Piezo Link');
                    sezTilt.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                    PE.Title = sezTilt;
                    text = Paragraph(['Piezo Link is a sensor able to measure the ' tipoPL 'pressure and'  baroPL ...
                        'to compute the water table level.']);
                    if PL == 0
                        text.HAlign = 'justify';
                        add(PE,text);
                        imgPL = Image(figuraPL);
                        imgPL.Style = {Height('5.5cm'),HAlign('center')};
                        add(PE,imgPL);
                        PLcaption = Paragraph(['Fig. ' num2str(FIG) ' - Piezo Link sensor, ' capPL]);
                        FIG = FIG+1;
                        PLcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                        add(PE,PLcaption);
                        PL = 1;
                    end
                    break
                end
            end
        end
    end
    % ---Baro Link---
    if sum(yesBL) >= 1
        BL = 0;
        for a = 1:dim
            [dimC,~] = size(colonna6{a,1});
            if dimC == 1
                if strcmp(colonna6(a,1),'Baro Link') == 1
                    if BL == 0
                        BE = Section();
                    end
                    sezTilt = Heading3('Baro Link');
                    sezTilt.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                    BE.Title = sezTilt;
                    text = Paragraph(['Baro Link is a sensor designed to measure the atmospheric pressure, allowing to '...
                        'evaluate the meteorological conditions of the monitored site and to estimate the pore water pressure, '...
                        'when coupled with a piezometer.']);
                    if BL == 0
                        text.HAlign = 'justify';
                        add(BE,text);
                        imgBL = Image(('Barometro.png'));
                        imgBL.Style = {Height('4cm'),HAlign('center')};
                        add(BE,imgBL);
                        BLcaption = Paragraph(['Fig. ' num2str(FIG) ' - Baro Link sensor']);
                        FIG = FIG+1;
                        BLcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                        add(BE,BLcaption);
                        BL = 1;
                    end
                    break
                end
            else
                for aC = 1:dimC
                    if strcmp(colonna6{a, 1}{aC, 1},'Baro Link') == 1
                        if BL == 0
                            BE = Section();
                        end
                        sezTilt = Heading3('Baro Link');
                        sezTilt.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                        BE.Title = sezTilt;
                        text = Paragraph(['Baro Link is a sensor designed to measure the atmospheric pressure, allowing to '...
                            'evaluate the meteorological conditions of the monitored site and to estimate the pore water pressure, '...
                            'when coupled with a piezometer.']);
                        if BL == 0
                            text.HAlign = 'justify';
                            add(BE,text);
                            imgBL = Image(('Barometro.png'));
                            imgBL.Style = {Height('4cm'),HAlign('center')};
                            add(BE,imgBL);
                            BLcaption = Paragraph(['Fig. ' num2str(FIG) ' - Baro Link sensor']);
                            FIG = FIG+1;
                            BLcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                            add(BE,BLcaption)
                            BL = 1;
                        end
                        break
                    end
                end
            end
        end
        add(appendice,BE);
    end
    add(appendice,PE);
end

% ---Klino Link---
if sum(yesKL) >= 1
    KL = 0;
    for a = 1:dim
        [dimC,~] = size(colonna6{a,1});
        if dimC == 1
            if strcmp(colonna6(a,1),'Klino Link HR 3D') == 1
                if KL == 0
                    KE = Section();
                end
                sezKlino = Heading3('Klino Link HR 3D');
                sezKlino.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                KE.Title = sezKlino;
                text = Paragraph(['Klino Link HR 3D is a sensor that integrates a 3D MEMS sensor and an electrolytic '...
                    'tilt sensor, able to measure the tilt of the element on which is installed. It also '...
                    'includes a thermometer to collect temperature values.']);
                if KL == 0
                    text.HAlign = 'justify';
                    add(KE,text);
                    imgKL = Image(('Klino.png'));
                    imgKL.Style = {Height('5cm'),HAlign('center')};
                    add(KE,imgKL);
                    KEcaption = Paragraph(['Fig. ' num2str(FIG) ' - Klino Link HR 3D sensor']);
                    FIG = FIG+1;
                    KEcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                    add(KE,KEcaption);
                    KL = 1;
                end
                break
            end
        else
            for aC = 1:dimC
                if strcmp(colonna6{a, 1}{aC, 1},'Klino Link HR 3D') == 1
                    if KL == 0
                        KE = Section();
                    end
                    sezKlino = Heading3('Klino Link HR 3D');
                    sezKlino.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                    KE.Title = sezKlino;
                    text = Paragraph(['Klino Link HR 3D is a sensor that integrates a 3D MEMS sensor and an electrolytic '...
                        'tilt sensor, able to measure the tilt of the element on which is installed. It also '...
                        'includes a thermometer to collect temperature values.']);
                    if KL == 0
                        text.HAlign = 'justify';
                        add(KE,text);
                        imgKL = Image(('Klino.png'));
                        imgKL.Style = {Height('5cm'),HAlign('center')};
                        add(KE,imgKL);
                        KEcaption = Paragraph(['Fig. ' num2str(FIG) ' - Klino Link HR 3D sensor']);
                        FIG = FIG+1;
                        KEcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                        add(KE,KEcaption);
                        KL = 1;
                    end
                    break
                end
            end
        end
    end
    add(appendice,KE);
end

% ---Klino Link HR---
if sum(yesKL) == 0 && sum(yesKLHR) >= 1
    KLHR = 0;
    for a = 1:dim
        [dimC,~] = size(colonna6{a,1});
        if dimC == 1
            if strcmp(colonna6(a,1),'Klino Link HR') == 1
                if KLHR == 0
                    KLE = Section();
                end
                sezKlinoHR = Heading3('Klino Link HR');
                sezKlinoHR.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                KLE.Title = sezKlinoHR;
                text = Paragraph(['Klino Link HR is a sensor that integrates an electrolytic '...
                    'tilt sensor, able to measure the tilt of the element on which is installed. It also '...
                    'includes a thermometer to collect temperature values.']);
                if KLHR == 0
                    text.HAlign = 'justify';
                    add(KLE,text);
                    imgKL = Image(('KlinoHR.png'));
                    imgKL.Style = {Height('4cm'),HAlign('center')};
                    add(KLE,imgKL);
                    KEcaption = Paragraph(['Fig. ' num2str(FIG) ' - Klino Link HR sensor']);
                    FIG = FIG+1;
                    KEcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                    add(KLE,KEcaption);
                    KLHR = 1;
                end
                break
            end
        else
            for aC = 1:dimC
                if strcmp(colonna6{a, 1}{aC, 1},'Klino Link HR') == 1
                    if KLHR == 0
                        KLE = Section();
                    end
                    sezKlinoHR = Heading3('Klino Link HR');
                    sezKlinoHR.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                    KLE.Title = sezKlinoHR;
                    text = Paragraph(['Klino Link HR is a sensor that integrates an electrolytic '...
                        'tilt sensor, able to measure the tilt of the element on which is installed. It also '...
                        'includes a thermometer to collect temperature values.']);
                    if KLHR == 0
                        text.HAlign = 'justify';
                        add(KLE,text);
                        imgKL = Image(('KlinoHR.png'));
                        imgKL.Style = {Height('4cm'),HAlign('center')};
                        add(KLE,imgKL);
                        KEcaption = Paragraph(['Fig. ' num2str(FIG) ' - Klino Link HR sensor']);
                        FIG = FIG+1;
                        KEcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                        add(KLE,KEcaption);
                        KLHR = 1;
                    end
                    break
                end
            end
        end
    end
    add(appendice,KLE);
end

% --- Therm Link ---
if sum(yesThL) >= 1
    ThL = 0;
    for a = 1:dim
        [dimC,~] = size(colonna6{a,1});
        if dimC == 1
            if strcmp(colonna6(a,1),'Therm Link') == 1
                if ThL == 0
                    ThE = Section();
                end
                sezTherm = Heading3('Therm Link');
                sezTherm.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                ThE.Title = sezTherm;
                text = Paragraph(['Therm Link sensor is composed of a thermometer featuring high accuracy and repeatability, '...
                    'able to measure temperature values at different depths by exploiting a single quadrupole cable, which '...
                    'connects different Links in a single chain.']);
                if ThL == 0
                    text.HAlign = 'justify';
                    add(ThE,text);
                    imgThL = Image(('Tilt Link.jpg'));
                    imgThL.Style = {Height('5cm'),HAlign('center')};
                    add(ThE,imgThL);
                    ThEcaption = Paragraph(['Fig. ' num2str(FIG) ' - Therm Link sensor']);
                    FIG = FIG+1;
                    ThEcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                    add(ThE,ThEcaption);
                    ThL = 1;
                end
                break
            end
        else
            for aC = 1:dimC
                if strcmp(colonna6{a, 1}{aC, 1},'Therm Link') == 1
                    if ThL == 0
                        ThE = Section();
                    end
                    sezTherm = Heading3('Therm Link');
                    sezTherm.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                    ThE.Title = sezTherm;
                    text = Paragraph(['Therm Link sensor is composed of a thermometer featuring high accuracy and repeatability, '...
                        'able to measure temperature values at different depths by exploiting a single quadrupole cable, which '...
                        'connects different Links in a single chain.']);
                    if ThL == 0
                        text.HAlign = 'justify';
                        add(ThE,text);
                        imgThL = Image(('Tilt Link.jpg'));
                        imgThL.Style = {Height('5cm'),HAlign('center')};
                        add(ThE,imgThL);
                        ThEcaption = Paragraph(['Fig. ' num2str(FIG) ' - Therm Link sensor']);
                        FIG = FIG+1;
                        ThEcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                        add(ThE,ThEcaption);
                        ThL = 1;
                    end
                    break
                end
            end
        end
    end
    add(appendice,ThE);
end

% --- PT100 Link ---
if sum(yesPT100) >= 1
    PT100 = 0;
    for a = 1:dim
        [dimC,~] = size(colonna6{a,1});
        if dimC == 1
            if strcmp(colonna6(a,1),'PT100 Link') == 1
                if PT100 == 0
                    PT100E = Section();
                end
                sezPT100 = Heading3('PT100 Link');
                sezPT100.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                PT100E.Title = sezPT100;
                text = Paragraph(['PT100 is a platinum resistance thermometer that exploits the material resistivity '...
                    'variation to evaluate the temperature with a linear correlation. This type of sensor does not need '...
                    'any calibration.']);
                if PT100 == 0
                    text.HAlign = 'justify';
                    add(PT100E,text);
                    imgPT100 = Image(('PT100.jpg'));
                    imgPT100.Style = {Height('3cm'),HAlign('center')};
                    add(PT100E,imgPT100);
                    PT100caption = Paragraph(['Fig. ' num2str(FIG) ' - PT100 Link sensor']);
                    FIG = FIG+1;
                    PT100caption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                    add(PT100E,PT100caption);
                    PT100 = 1;
                end
                break
            end
        else
            for aC = 1:dimC
                if strcmp(colonna6{a, 1}{aC, 1},'PT100 Link') == 1
                    if PT100 == 0
                        PT100E = Section();
                    end
                    sezPT100 = Heading3('PT100 Link');
                    sezPT100.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                    PT100E.Title = sezPT100;
                    text = Paragraph(['PT100 is a platinum resistance thermometer that exploits the material resistivity '...
                        'variation to evaluate the temperature with a linear correlation. This type of sensor does not need '...
                        'any calibration.']);
                    if PT100 == 0
                        text.HAlign = 'justify';
                        add(PT100E,text);
                        imgPT100 = Image(('PT100.jpg'));
                        imgPT100.Style = {Height('3cm'),HAlign('center')};
                        add(PT100E,imgPT100);
                        PT100caption = Paragraph(['Fig. ' num2str(FIG) ' - PT100 Link sensor']);
                        FIG = FIG+1;
                        PT100caption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                        add(PT100E,PT100caption);
                        PT100 = 1;
                    end
                    break
                end
            end
        end
    end
    add(appendice,PT100E);
end

% --- Tunnel Link ---
TuL = 0;
if sum(yesTuL) >= 1
    for a = 1:dim
        [dimC,~] = size(colonna6{a,1});
        if dimC == 1
            if strcmp(colonna6(a,1),'Tunnel Link') == 1
                if TuL == 0
                    STu = Section();
                end
                sezTunnel = Heading3('Tunnel Link');
                sezTunnel.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                STu.Title = sezTunnel;
                text = Paragraph(['Each Tunnel Link features a 3D MEMS sensor, which equips an accelerometer '...
                    'and a thermometer. The first element is able to record the sensor tilt, '...
                    'while the second one provides the sensor temperature and it '...
                    'is used to correct the thermal effects on the accelerometer. From a theoretical point of view, '...
                    'MEMS features an infinite range of tilt measure, while small variations '...
                    'are influenced by electrical noises.']);
                if TuL == 0
                    text.HAlign = 'justify';
                    add(STu,text);
                    img = Image(('Tunnel Link.png'));
                    img.Style = {Height('4.5cm'),HAlign('center')};
                    add(STu,img);
                    ionhcaption = Paragraph(['Fig. ' num2str(FIG) ' - Tunnel Link sensor']);
                    FIG = FIG+1;
                    ionhcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                    add(STu,ionhcaption);
                    TuL = 1;
                end
                break
            end
        else
            for aC = 1:dimC
                if strcmp(colonna6{a, 1}{aC, 1},'Tunnel Link') == 1
                    if TuL == 0
                        STu = Section();
                    end
                    sezTunnel = Heading3('Tunnel Link');
                    sezTunnel.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                    STu.Title = sezTunnel;
                    text = Paragraph(['Each Tunnel Link features a 3D MEMS sensor, which equips an accelerometer '...
                        'and a thermometer. The first element is able to record the sensor tilt, '...
                        'while the second one provides the sensor temperature and it '...
                        'is used to correct the thermal effects on the accelerometer. From a theoretical point of view, '...
                        'MEMS features an infinite range of tilt measure, while small variations '...
                        'are influenced by electrical noises.']);
                    if TuL == 0
                        text.HAlign = 'justify';
                        add(STu,text);
                        img = Image(('Tunnel Link.png'));
                        img.Style = {Height('4.5cm'),HAlign('center')};
                        add(STu,img);
                        ionhcaption = Paragraph(['Fig. ' num2str(FIG) ' - Tunnel Link sensor']);
                        FIG = FIG+1;
                        ionhcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                        add(STu,ionhcaption);
                        TuL = 1;
                    end
                    break
                end
            end
        end
    end
    add(appendice,STu);
end

% --- Radial Link ---
RaL = 0;
if sum(yesRaL) >= 1
    for a = 1:dim
        [dimC,~] = size(colonna6{a,1});
        if dimC == 1
            if strcmp(colonna6(a,1),'Radial Link') == 1
                if RaL == 0
                    SRaL = Section();
                end
                sezRadial = Heading3('Radial Link');
                sezRadial.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                SRaL.Title = sezRadial;
                text = Paragraph(['Each Radial Link features a 3D MEMS sensor, which equips an accelerometer '...
                    'and a thermometer. The first element is able to record the sensor tilt, '...
                    'while the second one provides the sensor temperature and it '...
                    'is used to correct the thermal effects on the accelerometer. From a theoretical point of view, '...
                    'MEMS features an infinite range of tilt measure, while small variations '...
                    'are influenced by electrical noises.']);
                if RaL == 0
                    text.HAlign = 'justify';
                    add(SRaL,text);
                    img = Image(('Tunnel Link.png'));
                    img.Style = {Height('4.5cm'),HAlign('center')};
                    add(SRaL,img);
                    ionhcaption = Paragraph(['Fig. ' num2str(FIG) ' - Radial Link sensor']);
                    FIG = FIG+1;
                    ionhcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                    add(SRaL,ionhcaption);
                    RaL = 1;
                end
                break
            end
        else
            for aC = 1:dimC
                if strcmp(colonna6{a, 1}{aC, 1},'Radial Link') == 1
                    if RaL == 0
                        SRaL = Section();
                    end
                    sezRadial = Heading3('Radial Link');
                    sezRadial.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                    SRaL.Title = sezRadial;
                    text = Paragraph(['Each Radial Link features a 3D MEMS sensor, which equips an accelerometer '...
                        'and a thermometer. The first element is able to record the sensor tilt, '...
                        'while the second one provides the sensor temperature and it '...
                        'is used to correct the thermal effects on the accelerometer. From a theoretical point of view, '...
                        'MEMS features an infinite range of tilt measure, while small variations '...
                        'are influenced by electrical noises.']);
                    if RaL == 0
                        text.HAlign = 'justify';
                        add(SRaL,text);
                        img = Image(('Tunnel Link.png'));
                        img.Style = {Height('4.5cm'),HAlign('center')};
                        add(SRaL,img);
                        ionhcaption = Paragraph(['Fig. ' num2str(FIG) ' - Radial Link sensor']);
                        FIG = FIG+1;
                        ionhcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                        add(SRaL,ionhcaption);
                        RaL = 1;
                    end
                    break
                end
            end
        end
    end
    add(appendice,SRaL);
end

% --- PreConv Link ---
PCL = 0;
if sum(yesPCL) >= 1
    for a = 1:dim
        [dimC,~] = size(colonna6{a,1});
        if dimC == 1
            if strcmp(colonna6(a,1),'PreConv Link') == 1
                if PCL == 0
                    SPCL = Section();
                end
                sezPCL = Heading3('PreConv Link');
                sezPCL.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                SPCL.Title = sezPCL;
                text = Paragraph(['Each PreConv Link features a 3D MEMS sensor, which equips an accelerometer '...
                    'and a thermometer. The first element is able to record the sensor tilt, '...
                    'while the second one provides the sensor temperature and it '...
                    'is used to correct the thermal effects on the accelerometer. From a theoretical point of view, '...
                    'MEMS features an infinite range of tilt measure, while small variations '...
                    'are influenced by electrical noises.']);
                if PCL == 0
                    text.HAlign = 'justify';
                    add(SPCL,text);
                    img = Image(('Klino.png'));
                    img.Style = {Height('4cm'),HAlign('center')};
                    add(SPCL,img);
                    ionhcaption = Paragraph(['Fig. ' num2str(FIG) ' - PreConv Link sensor']);
                    FIG = FIG+1;
                    ionhcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                    add(SPCL,ionhcaption);
                    PCL = 1;
                end
                break
            end
        else
            for aC = 1:dimC
                if strcmp(colonna6{a, 1}{aC, 1},'PreConv Link') == 1
                    if PCL == 0
                        SPCL = Section();
                    end
                    sezPCL = Heading3('PreConv Link');
                    sezPCL.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                    SPCL.Title = sezPCL;
                    text = Paragraph(['Each PreConv Link features a 3D MEMS sensor, which equips an accelerometer '...
                        'and a thermometer. The first element is able to record the sensor tilt, '...
                        'while the second one provides the sensor temperature and it '...
                        'is used to correct the thermal effects on the accelerometer. From a theoretical point of view, '...
                        'MEMS features an infinite range of tilt measure, while small variations '...
                        'are influenced by electrical noises.']);
                    if PCL == 0
                        text.HAlign = 'justify';
                        add(SPCL,text);
                        img = Image(('Klino.png'));
                        img.Style = {Height('4cm'),HAlign('center')};
                        add(SPCL,img);
                        ionhcaption = Paragraph(['Fig. ' num2str(FIG) ' - PreConv Link sensor']);
                        FIG = FIG+1;
                        ionhcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                        add(SPCL,ionhcaption);
                        PCL = 1;
                    end
                    break
                end
            end
        end
    end
    add(appendice,SPCL);
end

% --- Rain Link ---
if sum(yesRL) >= 1
    RL = 0;
    for a = 1:dim
        [dimC,~] = size(colonna6{a,1});
        if dimC == 1
            if strcmp(colonna6(a,1),'Rain Link') == 1
                if RL == 0
                    RLE = Section();
                end
                sezRain = Heading3('Rain Link');
                sezRain.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                RLE.Title = sezRain;
                text = Paragraph(['Rain Link is a rain gauge sensor able to collect rainfall data '...
                    'with a predefined sampling period.']);
                if RL == 0
                    text.HAlign = 'justify';
                    add(RLE,text);
                    imgRL = Image(('Rain.png'));
                    imgRL.Style = {Height('3.5cm'),HAlign('center')};
                    add(RLE,imgRL);
                    REcaption = Paragraph(['Fig. ' num2str(FIG) ' - Rain Link sensor']);
                    FIG = FIG+1;
                    REcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                    add(RLE,REcaption);
                    RL = 1;
                end
                break
            end
        else
            for aC = 1:dimC
                if strcmp(colonna6{a, 1}{aC, 1},'Rain Link') == 1
                    if RL == 0
                        RLE = Section();
                    end
                    sezRain = Heading3('Rain Link');
                    sezRain.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                    RLE.Title = sezRain;
                    text = Paragraph(['Rain Link is a rain gauge sensor able to collect rainfall data '...
                        'with a predefined sampling period.']);
                    if RL == 0
                        text.HAlign = 'justify';
                        add(RLE,text);
                        imgRL = Image(('Rain.png'));
                        imgRL.Style = {Height('3.5cm'),HAlign('center')};
                        add(RLE,imgRL);
                        REcaption = Paragraph(['Fig. ' num2str(FIG) ' - Rain Link sensor']);
                        FIG = FIG+1;
                        REcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                        add(RLE,REcaption);
                        RL = 1;
                    end
                    break
                end
            end
        end
    end
    add(appendice,RLE);
end

% --- Crack Link ---
if sum(yesCrL) >= 1
    CrL = 0;
    for a = 1:dim
        [dimC,~] = size(colonna6{a,1});
        if dimC == 1
            if strcmp(colonna6(a,1),'Crack Link') == 1
                if CrL == 0
                    CrE = Section();
                end
                sezCrack = Heading3('Crack Link');
                sezCrack.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                CrE.Title = sezCrack;
                text = Paragraph(['Crack Link sensor is an analog crack meter, read by implementing '...
                    'a GMUX module able to convert its signal into a digital one, or by connecting it to a dedicated ASE201 '...
                    'control unit. Crack meters are located across surface cracks, or in specific areas '...
                    'where the generation of surface fissures is expected.']);
                if CrL == 0
                    text.HAlign = 'justify';
                    add(CrE,text);
                    imgKL = Image(('Crack.jpg'));
                    imgKL.Style = {Height('5cm'),HAlign('center')};
                    add(CrE,imgKL);
                    KEcaption = Paragraph(['Fig. ' num2str(FIG) ' - Crack Link sensor']);
                    FIG = FIG+1;
                    KEcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                    add(CrE,KEcaption);
                    CrL = 1;
                end
                break
            end
        else
            for aC = 1:dimC
                if strcmp(colonna6{a, 1}{aC, 1},'Crack Link') == 1
                    if CrL == 0
                        CrE = Section();
                    end
                    sezCrack = Heading3('Crack Link');
                    sezCrack.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                    CrE.Title = sezCrack;
                    text = Paragraph(['Crack Link sensor is an analog crack meter, read by implementing '...
                        'a GMUX module able to convert its signal into a digital one, or by connecting it to a dedicated ASE201 '...
                        'control unit. Crack meters are located across surface cracks, or in specific areas '...
                        'where the generation of surface fissures is expected.']);
                    if CrL == 0
                        text.HAlign = 'justify';
                        add(CrE,text);
                        imgKL = Image(('Crack.jpg'));
                        imgKL.Style = {Height('5cm'),HAlign('center')};
                        add(CrE,imgKL);
                        KEcaption = Paragraph(['Fig. ' num2str(FIG) ' - Crack Link sensor']);
                        FIG = FIG+1;
                        KEcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                        add(CrE,KEcaption);
                        CrL = 1;
                    end
                    break
                end
            end
        end
    end
    add(appendice,CrE);
end

% --- 3D Crack Link ---
if sum(yes3DCrL) >= 1
    CrL3D = 0;
    for a = 1:dim
        [dimC,~] = size(colonna6{a,1});
        if dimC == 1
            if strcmp(colonna6(a,1),'3D Crack Link') == 1
                if CrL3D == 0
                    Cr3DE = Section();
                end
                sezCrack3D = Heading3('3D Crack Link');
                sezCrack3D.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                Cr3DE.Title = sezCrack3D;
                text = Paragraph(['3D Crack Link sensor is a three-dimension analog crack meter, read by implementing '...
                    'a GMUX module able to convert its signal into a digital one, or by connecting it to a dedicated ASE201 '...
                    'control unit. 3D Crack meters are located across surface cracks, or in specific areas '...
                    'where the generation of surface fissures is expected.']);
                if CrL3D == 0
                    text.HAlign = 'justify';
                    add(Cr3DE,text);
                    imgKL = Image(('3DCrack.jpg'));
                    imgKL.Style = {Height('5cm'),HAlign('center')};
                    add(Cr3DE,imgKL);
                    KEcaption = Paragraph(['Fig. ' num2str(FIG) ' - 3D Crack Link sensor (source: Pizzi Instruments)']);
                    FIG = FIG+1;
                    KEcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                    add(Cr3DE,KEcaption);
                    CrL3D = 1;
                end
                break
            end
        else
            for aC = 1:dimC
                if strcmp(colonna6{a, 1}{aC, 1},'3D Crack Link') == 1
                    if CrL3D == 0
                        Cr3DE = Section();
                    end
                    sezCrack3D = Heading3('3D Crack Link');
                    sezCrack3D.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                    Cr3DE.Title = sezCrack3D;
                    text = Paragraph(['3D Crack Link sensor is a three-dimension analog crack meter, read by implementing '...
                        'a GMUX module able to convert its signal into a digital one, or by connecting it to a dedicated ASE201 '...
                        'control unit. 3D Crack meters are located across surface cracks, or in specific areas '...
                        'where the generation of surface fissures is expected.']);
                    if CrL3D == 0
                        text.HAlign = 'justify';
                        add(Cr3DE,text);
                        imgKL = Image(('3DCrack.jpg'));
                        imgKL.Style = {Height('5cm'),HAlign('center')};
                        add(Cr3DE,imgKL);
                        KEcaption = Paragraph(['Fig. ' num2str(FIG) ' - 3D Crack Link sensor (source: Pizzi Instruments)']);
                        FIG = FIG+1;
                        KEcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                        add(Cr3DE,KEcaption);
                        CrL3D = 1;
                    end
                    break
                end
            end
        end
    end
    add(appendice,Cr3DE);
end

% --- Extensometer Link ---
if sum(yesEL) >= 1
    EL = 0;
    for a = 1:dim
        [dimC,~] = size(colonna6{a,1});
        if dimC == 1
            if strcmp(colonna6(a,1),'Extensometer Link') == 1
                if EL == 0
                    EE = Section();
                end
                sezExtensometer = Heading3('Extensometer Link');
                sezExtensometer.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                EE.Title = sezExtensometer;
                text = Paragraph(['Extensometer Link is a sensor composed of an analog extensometer, read by implementing '...
                    'a GMUX module able to convert its signal into a digital one, or by connecting it to a dedicated ASE201 '...
                    'control unit. Extensometers are located in specific areas in order to '...
                    'detect the formation of micro-fractures, which are measured with a parameter that depends on the '...
                    'length of the monitoring tool.']);
                if EL == 0
                    text.HAlign = 'justify';
                    add(EE,text);
                    imgKL = Image(('Extensometer.png'));
                    imgKL.Style = {Height('3cm'),HAlign('center')};
                    add(EE,imgKL);
                    KEcaption = Paragraph(['Fig. ' num2str(FIG) ' - Extensometer Link sensor (fonte: Earth System)']);
                    FIG = FIG+1;
                    KEcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                    add(EE,KEcaption);
                    EL = 1;
                end
                break
            end
        else
            for aC = 1:dimC
                if strcmp(colonna6{a, 1}{aC, 1},'Extensometer Link') == 1
                    if EL == 0
                        EE = Section();
                    end
                    sezExtensometer = Heading3('Extensometer Link');
                    sezExtensometer.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                    EE.Title = sezExtensometer;
                    text = Paragraph(['Extensometer Link is a sensor composed of an analog extensometer, read by implementing '...
                        'a GMUX module able to convert its signal into a digital one, or by connecting it to a dedicated ASE201 '...
                        'control unit. Extensometers are located in specific areas in order to '...
                        'detect the formation of micro-fractures, which are measured with a parameter that depends on the '...
                        'length of the monitoring tool.']);
                    if EL == 0
                        text.HAlign = 'justify';
                        add(EE,text);
                        imgKL = Image(('Extensometer.png'));
                        imgKL.Style = {Height('3cm'),HAlign('center')};
                        add(EE,imgKL);
                        KEcaption = Paragraph(['Fig. ' num2str(FIG) ' - Extensometer Link sensor (fonte: Earth System)']);
                        FIG = FIG+1;
                        KEcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                        add(EE,KEcaption);
                        EL = 1;
                    end
                    break
                end
            end
        end
    end
    add(appendice,EE);
end

% --- 3D Extensometer Link ---
if sum(yes3DEL) >= 1
    EL3D = 0;
    for a = 1:dim
        [dimC,~] = size(colonna6{a,1});
        if dimC == 1
            if strcmp(colonna6(a,1),'3D Extensometer Link') == 1
                if EL3D == 0
                    EE = Section();
                end
                sez3DExtensometer = Heading3('3D Extensometer Link');
                sez3DExtensometer.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                EE.Title = sez3DExtensometer;
                text = Paragraph(['3D Extensometer Link is a sensor composed of three analog strain gauges, read by implementing '...
                    'a GMUX module able to convert its signal into a digital one, or by connecting it to a dedicated ASE201 '...
                    'control unit. Strain gauges are located in specific areas in order to '...
                    'detect the formation of micro-fractures, which are measured with a parameter that depends on the '...
                    'length of the monitoring tool.']);
                if EL3D == 0
                    text.HAlign = 'justify';
                    add(EE,text);
                    imgKL = Image(('3DExtensometer.png'));
                    imgKL.Style = {Height('4cm'),HAlign('center')};
                    add(EE,imgKL);
                    KEcaption = Paragraph(['Fig. ' num2str(FIG) ' - 3D Extensometer Link sensor (source: Earth System)']);
                    FIG = FIG+1;
                    KEcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                    add(EE,KEcaption);
                    EL3D = 1;
                end
                break
            end
        else
            for aC = 1:dimC
                if strcmp(colonna6{a, 1}{aC, 1},'3D Extensometer Link') == 1
                    if EL3D == 0
                        EE = Section();
                    end
                    sez3DExtensometer = Heading3('3D Extensometer Link');
                    sez3DExtensometer.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                    EE.Title = sez3DExtensometer;
                    text = Paragraph(['3D Extensometer Link is a sensor composed of three analog strain gauges, read by implementing '...
                        'a GMUX module able to convert its signal into a digital one, or by connecting it to a dedicated ASE201 '...
                        'control unit. Strain gauges are located in specific areas in order to '...
                        'detect the formation of micro-fractures, which are measured with a parameter that depends on the '...
                        'length of the monitoring tool.']);
                    if EL3D == 0
                        text.HAlign = 'justify';
                        add(EE,text);
                        imgKL = Image(('3DExtensometer.png'));
                        imgKL.Style = {Height('4cm'),HAlign('center')};
                        add(EE,imgKL);
                        KEcaption = Paragraph(['Fig. ' num2str(FIG) ' - 3D Extensometer Link sensor (source: Earth System)']);
                        FIG = FIG+1;
                        KEcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                        add(EE,KEcaption);
                        EL3D = 1;
                    end
                    break
                end
            end
        end
    end
    add(appendice,EE);
end

% --- Wire Extensometer Link ---
if sum(yesWEL) >= 1
    WEL = 0;
    for a = 1:dim
        [dimC,~] = size(colonna6{a,1});
        if dimC == 1
            if strcmp(colonna6(a,1),'Wire Extensometer Link') == 1
                if WEL == 0
                    EE = Section();
                end
                sezWireExtensometer = Heading3('Wire Extensometer Link');
                sezWireExtensometer.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                EE.Title = sezWireExtensometer;
                text = Paragraph(['Wire Extensometer Link is an analog wire extensometer sensor, read by implementing '...
                    'a GMUX module able to convert its signal into a digital one, or by connecting it to a dedicated ASE201 '...
                    'control unit. The device is placed in specific areas where fissures are observed, by installing the '...
                    'base on one side and fixing the wire on the other one. The aim is to determine the crack opening/closing '...
                    'according to the wire length variation.']);
                if WEL == 0
                    text.HAlign = 'justify';
                    add(EE,text);
                    imgKL = Image(('wire.png'));
                    imgKL.Style = {Height('4cm'),HAlign('center')};
                    add(EE,imgKL);
                    KEcaption = Paragraph(['Fig. ' num2str(FIG) ' - Wire Extensometer Link sensor (source: Earth System)']);
                    FIG = FIG+1;
                    KEcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                    add(EE,KEcaption);
                    WEL = 1;
                end
                break
            end
        else
            for aC = 1:dimC
                if strcmp(colonna6{a, 1}{aC, 1},'Wire Extensometer Link') == 1
                    if WEL == 0
                        EE = Section();
                    end
                    sezWireExtensometer = Heading3('Wire Extensometer Link');
                    sezWireExtensometer.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                    EE.Title = sezWireExtensometer;
                    text = Paragraph(['Wire Extensometer Link is an analog wire extensometer sensor, read by implementing '...
                        'a GMUX module able to convert its signal into a digital one, or by connecting it to a dedicated ASE201 '...
                        'control unit. The device is placed in specific areas where fissures are observed, by installing the '...
                        'base on one side and fixing the wire on the other one. The aim is to determine the crack opening/closing '...
                        'according to the wire length variation.']);
                    if WEL == 0
                        text.HAlign = 'justify';
                        add(EE,text);
                        imgKL = Image(('wire.png'));
                        imgKL.Style = {Height('4cm'),HAlign('center')};
                        add(EE,imgKL);
                        KEcaption = Paragraph(['Fig. ' num2str(FIG) ' - Wire Extensometer Link sensor (source: Earth System)']);
                        FIG = FIG+1;
                        KEcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                        add(EE,KEcaption);
                        WEL = 1;
                    end
                    break
                end
            end
        end
    end
    add(appendice,EE);
end

% --- MultiPoint Borehole Extensometer ---
if sum(yesMPBEL) >= 1
    MPBEL = 0;
    for a = 1:dim
        [dimC,~] = size(colonna6{a,1});
        if dimC == 1
            if strcmp(colonna6(a,1),'Multi Point Borehole Extensometer Link') == 1
                if MPBEL == 0
                    EE = Section();
                end
                sezMPBEL = Heading3('Multi Point Borehole Rod Extensometer');
                sezMPBEL.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                EE.Title = sezMPBEL;
                text = Paragraph(['Multi Point Borehole Extensometer Link is an analog multi point borehole rod extensometer (MPBX) '...
                    'sensor, read by implementing '...
                    'a GMUX module able to convert its signal into a digital one, or by connecting it to a dedicated ASE201 '...
                    'control unit. The device is placed inside radial drilling and it features one or more anchors in different positions. '...
                    'The tool allow to determine the ares experiencing higher deformations by comparing data coming from different anchors.']);
                if MPBEL == 0
                    text.HAlign = 'justify';
                    add(EE,text);
                    imgKL = Image(('MPBEL.png'));
                    imgKL.Style = {Height('4cm'),HAlign('center')};
                    add(EE,imgKL);
                    KEcaption = Paragraph(['Fig. ' num2str(FIG) ' - Multi Point Borehole Extensometer Link (source: Earth System)']);
                    FIG = FIG+1;
                    KEcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                    add(EE,KEcaption);
                    MPBEL = 1;
                end
                break
            end
        else
            for aC = 1:dimC
                if strcmp(colonna6{a, 1}{aC, 1},'Multi Point Borehole Extensometer Link') == 1
                    if MPBEL == 0
                        EE = Section();
                    end
                    sezMPBEL = Heading3('Multi Point Borehole Rod Extensometer');
                    sezMPBEL.Style = {OuterMargin('0in','0in','0.15in','0in'),FontSize(Font_tools),Bold(1),Italic(1)};
                    EE.Title = sezMPBEL;
                    text = Paragraph(['Multi Point Borehole Extensometer Link is an analog multi point borehole rod extensometer (MPBX) '...
                        'sensor, read by implementing '...
                        'a GMUX module able to convert its signal into a digital one, or by connecting it to a dedicated ASE201 '...
                        'control unit. The device is placed inside radial drilling and it features one or more anchors in different positions. '...
                        'The tool allow to determine the ares experiencing higher deformations by comparing data coming from different anchors.']);
                    if MPBEL == 0
                        text.HAlign = 'justify';
                        add(EE,text);
                        imgKL = Image(('MPBEL.png'));
                        imgKL.Style = {Height('4cm'),HAlign('center')};
                        add(EE,imgKL);
                        KEcaption = Paragraph(['Fig. ' num2str(FIG) ' - Multi Point Borehole Extensometer Link (source: Earth System)']);
                        FIG = FIG+1;
                        KEcaption.Style = {HAlign('center'),FontSize(Font_caption),Italic(1),Color('midnightblue')};
                        add(EE,KEcaption);
                        MPBEL = 1;
                    end
                    break
                end
            end
        end
    end
    add(appendice,EE);
end

add(rpt,appendice);
template(rpt);

fileID = fopen(FileName,'a');
fmt = '%s \r';
text = 'report_appendix_ENG function executed correctly';
fprintf(fileID,fmt,text);
fclose(fileID);

end