How can I center arbitrary content between two horizontal lines?












1















I want to implement a macro that takes exactly one parameter and will create a line above and below the content and ignores the text indentation.



This is meant to place some event information in protocols no matter what context I am in right now (e.g. within an enumerate or itemize).



It should interrupt the current block and always use the complete column width and then continue the block afterwards.



However, I am having problems with the vertical centering:



newcommand{bartext}[1]{
kern4pt % space above the rules
hrule height 0.5pt
vspace{0.1cm}
noindent #1
vspace{0.1cm}
hrule height 0.5pt
kern4pt % space below the rules
}

% Example Usage:

begin{itemize}
item First Point
item Second Point
bartext{Charlie enters the meeting}
item third point
fouth point
end{itemize}


The text "Charlie enters the meeting" should begin at the left, like the "Some text before".



also the lines are placed pretty odd an the text within the lines isnt vertically centered.



Any clues/ suggestions?



example










share|improve this question









New contributor




Tobi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1





    Why not use item Second Point end{itemize} bartext{Charlie enters the meeting} begin{itemize}[resume*] item third point and the ` enumitem` package?

    – leandriis
    yesterday


















1















I want to implement a macro that takes exactly one parameter and will create a line above and below the content and ignores the text indentation.



This is meant to place some event information in protocols no matter what context I am in right now (e.g. within an enumerate or itemize).



It should interrupt the current block and always use the complete column width and then continue the block afterwards.



However, I am having problems with the vertical centering:



newcommand{bartext}[1]{
kern4pt % space above the rules
hrule height 0.5pt
vspace{0.1cm}
noindent #1
vspace{0.1cm}
hrule height 0.5pt
kern4pt % space below the rules
}

% Example Usage:

begin{itemize}
item First Point
item Second Point
bartext{Charlie enters the meeting}
item third point
fouth point
end{itemize}


The text "Charlie enters the meeting" should begin at the left, like the "Some text before".



also the lines are placed pretty odd an the text within the lines isnt vertically centered.



Any clues/ suggestions?



example










share|improve this question









New contributor




Tobi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1





    Why not use item Second Point end{itemize} bartext{Charlie enters the meeting} begin{itemize}[resume*] item third point and the ` enumitem` package?

    – leandriis
    yesterday
















1












1








1








I want to implement a macro that takes exactly one parameter and will create a line above and below the content and ignores the text indentation.



This is meant to place some event information in protocols no matter what context I am in right now (e.g. within an enumerate or itemize).



It should interrupt the current block and always use the complete column width and then continue the block afterwards.



However, I am having problems with the vertical centering:



newcommand{bartext}[1]{
kern4pt % space above the rules
hrule height 0.5pt
vspace{0.1cm}
noindent #1
vspace{0.1cm}
hrule height 0.5pt
kern4pt % space below the rules
}

% Example Usage:

begin{itemize}
item First Point
item Second Point
bartext{Charlie enters the meeting}
item third point
fouth point
end{itemize}


The text "Charlie enters the meeting" should begin at the left, like the "Some text before".



also the lines are placed pretty odd an the text within the lines isnt vertically centered.



Any clues/ suggestions?



example










share|improve this question









New contributor




Tobi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I want to implement a macro that takes exactly one parameter and will create a line above and below the content and ignores the text indentation.



This is meant to place some event information in protocols no matter what context I am in right now (e.g. within an enumerate or itemize).



It should interrupt the current block and always use the complete column width and then continue the block afterwards.



However, I am having problems with the vertical centering:



newcommand{bartext}[1]{
kern4pt % space above the rules
hrule height 0.5pt
vspace{0.1cm}
noindent #1
vspace{0.1cm}
hrule height 0.5pt
kern4pt % space below the rules
}

% Example Usage:

begin{itemize}
item First Point
item Second Point
bartext{Charlie enters the meeting}
item third point
fouth point
end{itemize}


The text "Charlie enters the meeting" should begin at the left, like the "Some text before".



also the lines are placed pretty odd an the text within the lines isnt vertically centered.



Any clues/ suggestions?



example







formatting






share|improve this question









New contributor




Tobi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Tobi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited yesterday









Bernard

169k772197




169k772197






New contributor




Tobi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked yesterday









TobiTobi

1276




1276




New contributor




Tobi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Tobi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Tobi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 1





    Why not use item Second Point end{itemize} bartext{Charlie enters the meeting} begin{itemize}[resume*] item third point and the ` enumitem` package?

    – leandriis
    yesterday
















  • 1





    Why not use item Second Point end{itemize} bartext{Charlie enters the meeting} begin{itemize}[resume*] item third point and the ` enumitem` package?

    – leandriis
    yesterday










1




1





Why not use item Second Point end{itemize} bartext{Charlie enters the meeting} begin{itemize}[resume*] item third point and the ` enumitem` package?

– leandriis
yesterday







Why not use item Second Point end{itemize} bartext{Charlie enters the meeting} begin{itemize}[resume*] item third point and the ` enumitem` package?

– leandriis
yesterday












3 Answers
3






active

oldest

votes


















3














You can use a (non-floating) float:



documentclass{article}
usepackage{array,float}
newcommand{bartext}[1]{%
parmedskip
begingroup
intextsep=smallskipamount
extrarowheight =3pt %or perhaps a bit less ...
arrayrulewidth=.5pt
begin{figure}[H]%
begin{tabular}{@{}p{textwidth}@{}}
hline
#1
\hline
end{tabular}%
end{figure}%
parendgroup}

begin{document}
a
bartext{Charlie enters the meeting}
b
begin{itemize}
item First Point
item Second Point
bartext{Charlie enters the meeting}
item third point
item fouth point
end{itemize}
end{document}


enter image description here






share|improve this answer
























  • Thanks, Ulrike. Very elegant solution. My documents are starting to look pretty now and start to be usable. Thanks.

    – Tobi
    yesterday



















3














Assuming that you do not want to use something like



end{itemize}
bartext{...}
begin{itemize}[resume*]


you could use the following code that is inspired by How can I check if the current code is inside a certain environment?



documentclass{article}
usepackage{enumitem}
usepackage{lipsum}


makeatletter
defitemizename{itemize}
defenumeratename{enumerate}
newcommand{bartext}[1]{%
ifx@currenviritemizename
end{itemize}
kern4pt % space above the rules
hrule height 0.5pt
vspace{0.1cm}
noindent #1
vspace{0.1cm}
hrule height 0.5pt
kern4pt
begin{itemize}[resume*]
else
ifx@currenvirenumeratename
end{enumerate}
kern4pt % space above the rules
hrule height 0.5pt
vspace{0.1cm}
noindent #1
vspace{0.1cm}
hrule height 0.5pt
kern4pt
begin{enumerate}[resume*]
else
kern4pt % space above the rules
hrule height 0.5pt
vspace{0.1cm}
noindent #1
vspace{0.1cm}
hrule height 0.5pt
kern4pt
fi
fi}
newcommand@myenvname{myenv}
makeatother

begin{document}

lipsum[5]

begin{itemize}
item First Point
item Second Point
bartext{Charlie enters the meeting}
item third point
item fouth point
end{itemize}

lipsum[5]

begin{enumerate}
item First Point
item Second Point
bartext{Charlie enters the meeting}
item third point
item fouth point
end{enumerate}

lipsum[5]

bartext{Charlie enters the meeting}

end{document}


enter image description here






share|improve this answer
























  • Good but very complex solution. I went with the solution of Ulrike in the end

    – Tobi
    yesterday



















0














You can use the functionalities of enumitem:



documentclass{report}%{memoir}
usepackage{enumitem}
usepackage{lipsum}

newcommand{bartext}[1]{
kern4pt % space above the rules
hrule height 0.5pt
vspace{0.1cm}
noindent #1
vspace{0.1cm}
hrule height 0.5pt
kern4pt % space below the rules
}

begin{document}

Some text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text.

begin{itemize}[after=vspace*{-topsep}]
item First Point
item Second Point
end{itemize}
bartext{Charlie enters the meeting}
begin{itemize}[resume*, before=vspace*{-topsep}]
item third point
item fourth point
end{itemize}

end{document}


enter image description here






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });






    Tobi is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f473244%2fhow-can-i-center-arbitrary-content-between-two-horizontal-lines%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














    You can use a (non-floating) float:



    documentclass{article}
    usepackage{array,float}
    newcommand{bartext}[1]{%
    parmedskip
    begingroup
    intextsep=smallskipamount
    extrarowheight =3pt %or perhaps a bit less ...
    arrayrulewidth=.5pt
    begin{figure}[H]%
    begin{tabular}{@{}p{textwidth}@{}}
    hline
    #1
    \hline
    end{tabular}%
    end{figure}%
    parendgroup}

    begin{document}
    a
    bartext{Charlie enters the meeting}
    b
    begin{itemize}
    item First Point
    item Second Point
    bartext{Charlie enters the meeting}
    item third point
    item fouth point
    end{itemize}
    end{document}


    enter image description here






    share|improve this answer
























    • Thanks, Ulrike. Very elegant solution. My documents are starting to look pretty now and start to be usable. Thanks.

      – Tobi
      yesterday
















    3














    You can use a (non-floating) float:



    documentclass{article}
    usepackage{array,float}
    newcommand{bartext}[1]{%
    parmedskip
    begingroup
    intextsep=smallskipamount
    extrarowheight =3pt %or perhaps a bit less ...
    arrayrulewidth=.5pt
    begin{figure}[H]%
    begin{tabular}{@{}p{textwidth}@{}}
    hline
    #1
    \hline
    end{tabular}%
    end{figure}%
    parendgroup}

    begin{document}
    a
    bartext{Charlie enters the meeting}
    b
    begin{itemize}
    item First Point
    item Second Point
    bartext{Charlie enters the meeting}
    item third point
    item fouth point
    end{itemize}
    end{document}


    enter image description here






    share|improve this answer
























    • Thanks, Ulrike. Very elegant solution. My documents are starting to look pretty now and start to be usable. Thanks.

      – Tobi
      yesterday














    3












    3








    3







    You can use a (non-floating) float:



    documentclass{article}
    usepackage{array,float}
    newcommand{bartext}[1]{%
    parmedskip
    begingroup
    intextsep=smallskipamount
    extrarowheight =3pt %or perhaps a bit less ...
    arrayrulewidth=.5pt
    begin{figure}[H]%
    begin{tabular}{@{}p{textwidth}@{}}
    hline
    #1
    \hline
    end{tabular}%
    end{figure}%
    parendgroup}

    begin{document}
    a
    bartext{Charlie enters the meeting}
    b
    begin{itemize}
    item First Point
    item Second Point
    bartext{Charlie enters the meeting}
    item third point
    item fouth point
    end{itemize}
    end{document}


    enter image description here






    share|improve this answer













    You can use a (non-floating) float:



    documentclass{article}
    usepackage{array,float}
    newcommand{bartext}[1]{%
    parmedskip
    begingroup
    intextsep=smallskipamount
    extrarowheight =3pt %or perhaps a bit less ...
    arrayrulewidth=.5pt
    begin{figure}[H]%
    begin{tabular}{@{}p{textwidth}@{}}
    hline
    #1
    \hline
    end{tabular}%
    end{figure}%
    parendgroup}

    begin{document}
    a
    bartext{Charlie enters the meeting}
    b
    begin{itemize}
    item First Point
    item Second Point
    bartext{Charlie enters the meeting}
    item third point
    item fouth point
    end{itemize}
    end{document}


    enter image description here







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered yesterday









    Ulrike FischerUlrike Fischer

    191k8298679




    191k8298679













    • Thanks, Ulrike. Very elegant solution. My documents are starting to look pretty now and start to be usable. Thanks.

      – Tobi
      yesterday



















    • Thanks, Ulrike. Very elegant solution. My documents are starting to look pretty now and start to be usable. Thanks.

      – Tobi
      yesterday

















    Thanks, Ulrike. Very elegant solution. My documents are starting to look pretty now and start to be usable. Thanks.

    – Tobi
    yesterday





    Thanks, Ulrike. Very elegant solution. My documents are starting to look pretty now and start to be usable. Thanks.

    – Tobi
    yesterday











    3














    Assuming that you do not want to use something like



    end{itemize}
    bartext{...}
    begin{itemize}[resume*]


    you could use the following code that is inspired by How can I check if the current code is inside a certain environment?



    documentclass{article}
    usepackage{enumitem}
    usepackage{lipsum}


    makeatletter
    defitemizename{itemize}
    defenumeratename{enumerate}
    newcommand{bartext}[1]{%
    ifx@currenviritemizename
    end{itemize}
    kern4pt % space above the rules
    hrule height 0.5pt
    vspace{0.1cm}
    noindent #1
    vspace{0.1cm}
    hrule height 0.5pt
    kern4pt
    begin{itemize}[resume*]
    else
    ifx@currenvirenumeratename
    end{enumerate}
    kern4pt % space above the rules
    hrule height 0.5pt
    vspace{0.1cm}
    noindent #1
    vspace{0.1cm}
    hrule height 0.5pt
    kern4pt
    begin{enumerate}[resume*]
    else
    kern4pt % space above the rules
    hrule height 0.5pt
    vspace{0.1cm}
    noindent #1
    vspace{0.1cm}
    hrule height 0.5pt
    kern4pt
    fi
    fi}
    newcommand@myenvname{myenv}
    makeatother

    begin{document}

    lipsum[5]

    begin{itemize}
    item First Point
    item Second Point
    bartext{Charlie enters the meeting}
    item third point
    item fouth point
    end{itemize}

    lipsum[5]

    begin{enumerate}
    item First Point
    item Second Point
    bartext{Charlie enters the meeting}
    item third point
    item fouth point
    end{enumerate}

    lipsum[5]

    bartext{Charlie enters the meeting}

    end{document}


    enter image description here






    share|improve this answer
























    • Good but very complex solution. I went with the solution of Ulrike in the end

      – Tobi
      yesterday
















    3














    Assuming that you do not want to use something like



    end{itemize}
    bartext{...}
    begin{itemize}[resume*]


    you could use the following code that is inspired by How can I check if the current code is inside a certain environment?



    documentclass{article}
    usepackage{enumitem}
    usepackage{lipsum}


    makeatletter
    defitemizename{itemize}
    defenumeratename{enumerate}
    newcommand{bartext}[1]{%
    ifx@currenviritemizename
    end{itemize}
    kern4pt % space above the rules
    hrule height 0.5pt
    vspace{0.1cm}
    noindent #1
    vspace{0.1cm}
    hrule height 0.5pt
    kern4pt
    begin{itemize}[resume*]
    else
    ifx@currenvirenumeratename
    end{enumerate}
    kern4pt % space above the rules
    hrule height 0.5pt
    vspace{0.1cm}
    noindent #1
    vspace{0.1cm}
    hrule height 0.5pt
    kern4pt
    begin{enumerate}[resume*]
    else
    kern4pt % space above the rules
    hrule height 0.5pt
    vspace{0.1cm}
    noindent #1
    vspace{0.1cm}
    hrule height 0.5pt
    kern4pt
    fi
    fi}
    newcommand@myenvname{myenv}
    makeatother

    begin{document}

    lipsum[5]

    begin{itemize}
    item First Point
    item Second Point
    bartext{Charlie enters the meeting}
    item third point
    item fouth point
    end{itemize}

    lipsum[5]

    begin{enumerate}
    item First Point
    item Second Point
    bartext{Charlie enters the meeting}
    item third point
    item fouth point
    end{enumerate}

    lipsum[5]

    bartext{Charlie enters the meeting}

    end{document}


    enter image description here






    share|improve this answer
























    • Good but very complex solution. I went with the solution of Ulrike in the end

      – Tobi
      yesterday














    3












    3








    3







    Assuming that you do not want to use something like



    end{itemize}
    bartext{...}
    begin{itemize}[resume*]


    you could use the following code that is inspired by How can I check if the current code is inside a certain environment?



    documentclass{article}
    usepackage{enumitem}
    usepackage{lipsum}


    makeatletter
    defitemizename{itemize}
    defenumeratename{enumerate}
    newcommand{bartext}[1]{%
    ifx@currenviritemizename
    end{itemize}
    kern4pt % space above the rules
    hrule height 0.5pt
    vspace{0.1cm}
    noindent #1
    vspace{0.1cm}
    hrule height 0.5pt
    kern4pt
    begin{itemize}[resume*]
    else
    ifx@currenvirenumeratename
    end{enumerate}
    kern4pt % space above the rules
    hrule height 0.5pt
    vspace{0.1cm}
    noindent #1
    vspace{0.1cm}
    hrule height 0.5pt
    kern4pt
    begin{enumerate}[resume*]
    else
    kern4pt % space above the rules
    hrule height 0.5pt
    vspace{0.1cm}
    noindent #1
    vspace{0.1cm}
    hrule height 0.5pt
    kern4pt
    fi
    fi}
    newcommand@myenvname{myenv}
    makeatother

    begin{document}

    lipsum[5]

    begin{itemize}
    item First Point
    item Second Point
    bartext{Charlie enters the meeting}
    item third point
    item fouth point
    end{itemize}

    lipsum[5]

    begin{enumerate}
    item First Point
    item Second Point
    bartext{Charlie enters the meeting}
    item third point
    item fouth point
    end{enumerate}

    lipsum[5]

    bartext{Charlie enters the meeting}

    end{document}


    enter image description here






    share|improve this answer













    Assuming that you do not want to use something like



    end{itemize}
    bartext{...}
    begin{itemize}[resume*]


    you could use the following code that is inspired by How can I check if the current code is inside a certain environment?



    documentclass{article}
    usepackage{enumitem}
    usepackage{lipsum}


    makeatletter
    defitemizename{itemize}
    defenumeratename{enumerate}
    newcommand{bartext}[1]{%
    ifx@currenviritemizename
    end{itemize}
    kern4pt % space above the rules
    hrule height 0.5pt
    vspace{0.1cm}
    noindent #1
    vspace{0.1cm}
    hrule height 0.5pt
    kern4pt
    begin{itemize}[resume*]
    else
    ifx@currenvirenumeratename
    end{enumerate}
    kern4pt % space above the rules
    hrule height 0.5pt
    vspace{0.1cm}
    noindent #1
    vspace{0.1cm}
    hrule height 0.5pt
    kern4pt
    begin{enumerate}[resume*]
    else
    kern4pt % space above the rules
    hrule height 0.5pt
    vspace{0.1cm}
    noindent #1
    vspace{0.1cm}
    hrule height 0.5pt
    kern4pt
    fi
    fi}
    newcommand@myenvname{myenv}
    makeatother

    begin{document}

    lipsum[5]

    begin{itemize}
    item First Point
    item Second Point
    bartext{Charlie enters the meeting}
    item third point
    item fouth point
    end{itemize}

    lipsum[5]

    begin{enumerate}
    item First Point
    item Second Point
    bartext{Charlie enters the meeting}
    item third point
    item fouth point
    end{enumerate}

    lipsum[5]

    bartext{Charlie enters the meeting}

    end{document}


    enter image description here







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered yesterday









    leandriisleandriis

    8,7971530




    8,7971530













    • Good but very complex solution. I went with the solution of Ulrike in the end

      – Tobi
      yesterday



















    • Good but very complex solution. I went with the solution of Ulrike in the end

      – Tobi
      yesterday

















    Good but very complex solution. I went with the solution of Ulrike in the end

    – Tobi
    yesterday





    Good but very complex solution. I went with the solution of Ulrike in the end

    – Tobi
    yesterday











    0














    You can use the functionalities of enumitem:



    documentclass{report}%{memoir}
    usepackage{enumitem}
    usepackage{lipsum}

    newcommand{bartext}[1]{
    kern4pt % space above the rules
    hrule height 0.5pt
    vspace{0.1cm}
    noindent #1
    vspace{0.1cm}
    hrule height 0.5pt
    kern4pt % space below the rules
    }

    begin{document}

    Some text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text.

    begin{itemize}[after=vspace*{-topsep}]
    item First Point
    item Second Point
    end{itemize}
    bartext{Charlie enters the meeting}
    begin{itemize}[resume*, before=vspace*{-topsep}]
    item third point
    item fourth point
    end{itemize}

    end{document}


    enter image description here






    share|improve this answer




























      0














      You can use the functionalities of enumitem:



      documentclass{report}%{memoir}
      usepackage{enumitem}
      usepackage{lipsum}

      newcommand{bartext}[1]{
      kern4pt % space above the rules
      hrule height 0.5pt
      vspace{0.1cm}
      noindent #1
      vspace{0.1cm}
      hrule height 0.5pt
      kern4pt % space below the rules
      }

      begin{document}

      Some text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text.

      begin{itemize}[after=vspace*{-topsep}]
      item First Point
      item Second Point
      end{itemize}
      bartext{Charlie enters the meeting}
      begin{itemize}[resume*, before=vspace*{-topsep}]
      item third point
      item fourth point
      end{itemize}

      end{document}


      enter image description here






      share|improve this answer


























        0












        0








        0







        You can use the functionalities of enumitem:



        documentclass{report}%{memoir}
        usepackage{enumitem}
        usepackage{lipsum}

        newcommand{bartext}[1]{
        kern4pt % space above the rules
        hrule height 0.5pt
        vspace{0.1cm}
        noindent #1
        vspace{0.1cm}
        hrule height 0.5pt
        kern4pt % space below the rules
        }

        begin{document}

        Some text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text.

        begin{itemize}[after=vspace*{-topsep}]
        item First Point
        item Second Point
        end{itemize}
        bartext{Charlie enters the meeting}
        begin{itemize}[resume*, before=vspace*{-topsep}]
        item third point
        item fourth point
        end{itemize}

        end{document}


        enter image description here






        share|improve this answer













        You can use the functionalities of enumitem:



        documentclass{report}%{memoir}
        usepackage{enumitem}
        usepackage{lipsum}

        newcommand{bartext}[1]{
        kern4pt % space above the rules
        hrule height 0.5pt
        vspace{0.1cm}
        noindent #1
        vspace{0.1cm}
        hrule height 0.5pt
        kern4pt % space below the rules
        }

        begin{document}

        Some text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text.

        begin{itemize}[after=vspace*{-topsep}]
        item First Point
        item Second Point
        end{itemize}
        bartext{Charlie enters the meeting}
        begin{itemize}[resume*, before=vspace*{-topsep}]
        item third point
        item fourth point
        end{itemize}

        end{document}


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered yesterday









        BernardBernard

        169k772197




        169k772197






















            Tobi is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            Tobi is a new contributor. Be nice, and check out our Code of Conduct.













            Tobi is a new contributor. Be nice, and check out our Code of Conduct.












            Tobi is a new contributor. Be nice, and check out our Code of Conduct.
















            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f473244%2fhow-can-i-center-arbitrary-content-between-two-horizontal-lines%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

            Alcedinidae

            RAC Tourist Trophy