[RISOLTO]Pacchetto framed

  • Creatore
    Topic
  • #81997
    Up
    0
    Down
    ::


    Buongiorno a tutti,

    utilizzando il pacchetto framed senza opzioni, il testo nell’ambiente framed viene incorniciato, la cornice assume la larghezza dell’area in cui si scrive, e il testo, contando i margini, leggermente più stretto al suo interno.
    È possibile usare il pacchetto framed in modo che il testo mantenga la larghezza ordinaria e la cornice si situi invece all’esterno?

    Grazie

Visualizzazione 6 filoni di risposte
  • Autore
    Risposte
    • #81998
      Up
      0
      Down
      ::

      poxx” post=81298Buongiorno a tutti,

      utilizzando il pacchetto framed senza opzioni, il testo nell’ambiente framed viene incorniciato, la cornice assume la larghezza dell’area in cui si scrive, e il testo, contando i margini, leggermente più stretto al suo interno.
      È possibile usare il pacchetto framed in modo che il testo mantenga la larghezza ordinaria e la cornice si situi invece all’esterno?

      Grazie

      Con mdframed si può fare semplicemente impostando leftmargin e rightmargin a valori negativi.
      Si può fare anche con framed, ma bisogna ridefinire qualche codice. Nella doc non è previsto.

      Ciao
      Ivan

    • #81999
      Up
      0
      Down
      ::


      In effetti ho già tentato mdframed, ma ha alcuni spiacevoli effetti collaterali. Tralasciando la dimensione del bordo (che è più spesso) e il fatto che quando il testo inscatolato va su un’altra pagina mdframed non mette il bordo in basso nella prima pagina né in alto nella seconda, per qualche strana ragione mi lascia una pagina vuota tra la prima e la seconda pagina, per poi continuare invece senza pagine bianche tra la seconda e la terza, anche se il testo inscatolato si estende fino alla terza pagina.ù

      Inoltre, con mdframed ho impostato il leftmargin e il rightmargin a -20pt per fare combaciare il testo con la larghezza ordinaria, ma ho il sospetto che così siano misure a occhio, non ho la certezza che siano quelle corrette.

    • #82000
      OldClaudio
      Partecipante
        Up
        0
        Down
        ::


        Be’, 20pt sono quasi 7 mm, mi sembra tanto.

      • #82001
        Up
        0
        Down
        ::

        poxx” post=81302
        In effetti ho già tentato mdframed, ma ha alcuni spiacevoli effetti collaterali. Tralasciando la dimensione del bordo (che è più spesso)

        Lo spessore del bordo si può modificare.

        poxx” post=81302
        e il fatto che quando il testo inscatolato va su un’altra pagina mdframed non mette il bordo in basso nella prima pagina né in alto nella seconda,

        Questo è il comportamento corretto.

        poxx” post=81302
        per qualche strana ragione mi lascia una pagina vuota tra la prima e la seconda pagina, per poi continuare invece senza pagine bianche tra la seconda e la terza, anche se il testo inscatolato si estende fino alla terza pagina.

        Questo è strano. S può sapere cosa stai facendo di preciso?

        poxx” post=81302
        Inoltre, con mdframed ho impostato il leftmargin e il rightmargin a -20pt per fare combaciare il testo con la larghezza ordinaria, ma ho il sospetto che così siano misure a occhio, non ho la certezza che siano quelle corrette.

        Certo che sono a occhio. Per trovare la misura giusta devi calcolare lo spessore del bordo più il margine interno della scatola.

        Ciao
        Ivan

      • #82002
        Up
        0
        Down
        ::

        ivan” post=81315

        e il fatto che quando il testo inscatolato va su un’altra pagina mdframed non mette il bordo in basso nella prima pagina né in alto nella seconda,

        Questo è il comportamento corretto.

        Sicuramente hai ragione che tipograficamente è più corretto così, ma in realtà sto riportando un testo inscatolato preso da un altro articolo dove, quando il testo va su più pagine, l’effetto è di avere una scatola separata per ogni pagina, ossia con tutti e quattro i bordi su ogni pagina. Preferirei poter riprodurre lo stesso effetto.

        ivan” post=81315

        per qualche strana ragione mi lascia una pagina vuota tra la prima e la seconda pagina, per poi continuare invece senza pagine bianche tra la seconda e la terza, anche se il testo inscatolato si estende fino alla terza pagina.

        Questo è strano. S può sapere cosa stai facendo di preciso?

        Quello che sto facendo è inserire nell’appendice di un articolo una lista di descrizioni prese da un altro articolo, che però vorrei mantenere inscatolata per conservare l’effetto “box di approfondimento”. Ecco il codice:
        `\documentclass[11pt,a4paper,oneside]{article}
        \usepackage{framed}
        \usepackage{enumitem}
        \newcounter{descriptcount}
        \renewcommand*\thedescriptcount{\arabic{descriptcount}.}
        \newcounter{descriptcountbis}
        \renewcommand*\thedescriptcountbis{\Alph{descriptcountbis}.}

        \begin{document}

        \appendix
        \renewcommand\thesection{Appendix:}
        \begin{framed}
        \section{\mbox{Nussbaum's Central Human Capabilities}}
        \begin{description}[before={\setcounter{descriptcount}{0}},font=\bfseries\stepcounter{descriptcount}\thedescriptcount~]
        \item[Life.] Being able to live to the end of a human life of normal length; not dying prematurely, or before one's life is so reduced as to be not worth living.
        \item[Bodily Health.] Being able to have good health, including reproductive health; to be adequately nourished; to have adequate shelter.
        \item[Bodily Integrity.] Being able to move freely from place to place; to be secure against violent assault, including sexual assault and domestic violence; having opportunities for sexual satisfaction and for choice in matters of reproduction.
        \item[Senses, Imagination, and Thought.] Being able to use the senses, to imagine, think, and reason—and to do these things in a ‘‘truly human'' way, a way informed and cultivated by an adequate education, including, but by no means limited to, literacy and basic mathematical and scientific training. Being able to use imagination and thought in connection with experiencing and producing works and events of one's own choice, religious, literary, musical, and so forth. Being able to use one's mind in ways protected by guarantees of freedom of expression with respect to both political and artistic speech, and freedom of religious exercise. Being able to have pleasurable experiences and to avoid non-beneficial pain.
        \item[Emotions.] Being able to have attachments to things and people outside ourselves; to love those who love and care for us, to grieve at their absence; in general, to love, to grieve, to experience longing, gratitude, and justified anger. Not having one's emotional development blighted by fear and anxiety. (Supporting this capability means supporting forms of human association that
        can be shown to be crucial in their development.)
        \item[Practical Reason.] Being able to form a conception of the good and to engage in critical reflection about the planning of one's life. (This entails protection for the liberty of conscience and religious observance.)
        \item[Affiliation.]\mbox{}
        \begin{description}[before={\setcounter{descriptcount}{0}},font=\bfseries\stepcounter{descriptcountbis}\thedescriptcountbis~]
        \item Being able to live with and toward others, to recognize and show concern for other human beings, to engage in various forms of social interaction; to be able to imagine the situation of another. (Protecting this capability means protecting institutions that constitute and nourish such forms of affiliation, and also protecting the freedom of assembly and political speech.)
        \item Having the social bases of self-respect and non-humiliation; being able to be treated as a dignified being whose worth is equal to that of others. This entails provisions of non-discrimination on the basis of race, sex, sexual orientation, ethnicity, caste, religion, and national origin.
        \end{description}
        \item[Other Species.] Being able to live with concern for and in relation to animals, plants, and the world of nature.
        \item[Play.] Being able to laugh, to play, to enjoy recreational activities.
        \item[Control Over One's Environment.]\mbox{}
        \begin{description}[before={\setcounter{descriptcount}{0}},font=\bfseries\stepcounter{descriptcountbis}\thedescriptcountbis~]
        \item[Political.] Being able to participate effectively in political choices that govern one's life; having the right of political participation, protection of free speech and association.
        \item[Material.] Being able to hold property (both land and movable goods), and having property rights on an equal basis with others; having the right to seek employment on an equal basis with others; having the freedom from unwarranted search and seizure. In work, being able to work as a human being, exercising practical reason and entering into meaningful relationships of mutual
        recognition with other workers. (Nussbaum 2001, 87–88)
        \end{description}
        \end{description}
        \end{framed}

        \end{document}
        `

      • #82003
        Up
        0
        Down
        ::

        ivan” post=81315

        e il fatto che quando il testo inscatolato va su un’altra pagina mdframed non mette il bordo in basso nella prima pagina né in alto nella seconda,

        Questo è il comportamento corretto.

        Sicuramente hai ragione che tipograficamente è più corretto così, ma in realtà sto riportando un testo inscatolato preso da un altro articolo dove, quando il testo va su più pagine, l’effetto è di avere una scatola separata per ogni pagina, ossia con tutti e quattro i bordi su ogni pagina. Preferirei poter riprodurre lo stesso effetto. In teoria dovrebbe essere possibile specificando tra le opzioni everyline=true, ma mi dà un errore:
        `! Package keyval Error: everyline undefined.`

        ivan” post=81315

        per qualche strana ragione mi lascia una pagina vuota tra la prima e la seconda pagina, per poi continuare invece senza pagine bianche tra la seconda e la terza, anche se il testo inscatolato si estende fino alla terza pagina.

        Questo è strano. S può sapere cosa stai facendo di preciso?

        Quello che sto facendo è inserire nell’appendice di un articolo una lista di descrizioni prese da un altro articolo, che però vorrei mantenere inscatolata per conservare l’effetto “box di approfondimento”. Peraltro, prima di lasciare la pagina vuota di cui parlavo, interrompe la pagina precedente con relativa scatola a metà, e quando riprende due pagine dopo la scatola ha il bordo superiore, che in teoria, stando a quanto dicevi sopra, non dovrebbe avere.
        Ecco il codice:
        `\documentclass[11pt,a4paper,oneside]{article}
        \usepackage{mdframed}
        \usepackage{enumitem}
        \newcounter{descriptcount}
        \renewcommand*\thedescriptcount{\arabic{descriptcount}.}
        \newcounter{descriptcountbis}
        \renewcommand*\thedescriptcountbis{\Alph{descriptcountbis}.}

        \begin{document}

        \appendix
        \renewcommand\thesection{Appendix:}
        \begin{mdframed}[leftmargin=-20pt,rightmargin=-20pt]
        \section{\mbox{Nussbaum's Central Human Capabilities}}
        \begin{description}[before={\setcounter{descriptcount}{0}},font=\bfseries\stepcounter{descriptcount}\thedescriptcount~]
        \item[Life.] Being able to live to the end of a human life of normal length; not dying prematurely, or before one's life is so reduced as to be not worth living.
        \item[Bodily Health.] Being able to have good health, including reproductive health; to be adequately nourished; to have adequate shelter.
        \item[Bodily Integrity.] Being able to move freely from place to place; to be secure against violent assault, including sexual assault and domestic violence; having opportunities for sexual satisfaction and for choice in matters of reproduction.
        \item[Senses, Imagination, and Thought.] Being able to use the senses, to imagine, think, and reason—and to do these things in a ‘‘truly human'' way, a way informed and cultivated by an adequate education, including, but by no means limited to, literacy and basic mathematical and scientific training. Being able to use imagination and thought in connection with experiencing and producing works and events of one's own choice, religious, literary, musical, and so forth. Being able to use one's mind in ways protected by guarantees of freedom of expression with respect to both political and artistic speech, and freedom of religious exercise. Being able to have pleasurable experiences and to avoid non-beneficial pain.
        \item[Emotions.] Being able to have attachments to things and people outside ourselves; to love those who love and care for us, to grieve at their absence; in general, to love, to grieve, to experience longing, gratitude, and justified anger. Not having one's emotional development blighted by fear and anxiety. (Supporting this capability means supporting forms of human association that
        can be shown to be crucial in their development.)
        \item[Practical Reason.] Being able to form a conception of the good and to engage in critical reflection about the planning of one's life. (This entails protection for the liberty of conscience and religious observance.)
        \item[Affiliation.]\mbox{}
        \begin{description}[before={\setcounter{descriptcount}{0}},font=\bfseries\stepcounter{descriptcountbis}\thedescriptcountbis~]
        \item Being able to live with and toward others, to recognize and show concern for other human beings, to engage in various forms of social interaction; to be able to imagine the situation of another. (Protecting this capability means protecting institutions that constitute and nourish such forms of affiliation, and also protecting the freedom of assembly and political speech.)
        \item Having the social bases of self-respect and non-humiliation; being able to be treated as a dignified being whose worth is equal to that of others. This entails provisions of non-discrimination on the basis of race, sex, sexual orientation, ethnicity, caste, religion, and national origin.
        \end{description}
        \item[Other Species.] Being able to live with concern for and in relation to animals, plants, and the world of nature.
        \item[Play.] Being able to laugh, to play, to enjoy recreational activities.
        \item[Control Over One's Environment.]\mbox{}
        \begin{description}[before={\setcounter{descriptcount}{0}},font=\bfseries\stepcounter{descriptcountbis}\thedescriptcountbis~]
        \item[Political.] Being able to participate effectively in political choices that govern one's life; having the right of political participation, protection of free speech and association.
        \item[Material.] Being able to hold property (both land and movable goods), and having property rights on an equal basis with others; having the right to seek employment on an equal basis with others; having the freedom from unwarranted search and seizure. In work, being able to work as a human being, exercising practical reason and entering into meaningful relationships of mutual
        recognition with other workers. (Nussbaum 2001, 87–88)
        \end{description}
        \end{description}
        \end{mdframed}

        \end{document}
        `

      • #82004
        Up
        0
        Down
        ::


        Risolto entrambi i problemi aggiornando il pacchetto. Grazie dell’aiuto.

    Visualizzazione 6 filoni di risposte
    • Devi essere connesso per rispondere a questo topic.

    Go to top