xymatrix e displaystyle

  • Questo topic ha 4 risposte, 3 partecipanti ed è stato aggiornato l'ultima volta 19 anni, 1 mese fa da DMW.
  • Creatore
    Topic
  • #16472
    Up
    0
    Down
    ::


    Salve e complimenti ancora per il sito.
    Vorrei cercare di dare una forma migliore al “testo” che ho scritto! Innanzitutto riuscire a scrivere gli indici delle sommatoria nella classica forma matematica solo che displaystyle non funziona molto bene con il pacchetto xy.
    Forse per scrivere questa pagine con le relative frecce dovrei usare qualcos’altro?
    Secondo problema, se possibile vorrei riuscire ad allineare le colonne in una maniera più compatta, infatti un grafico di questo tipo entra solamente in due pagine orizzontali.
    Ad esempio evitare tutto quello spazio prima e dopo \oplus.
    Vi ringrazio già da ora per i vari problemi che sono riuscito a risolvere documentandomi su questo sito.

    `
    \documentclass[a4paper,11pt]{article}
    \usepackage[T1]{fontenc}
    \usepackage[latin1]{inputenc}
    \usepackage[english]{babel}
    \usepackage{amsmath}
    \usepackage{amssymb}
    \usepackage[all]{xy}

    \begin{document}

    \small{\xymatrix{
    0 \ar[d] & L – l \ar[d] & \\
    X_{t_2 + L – l}(R + h) = \ar[d]_{d_{R+h}^l} & \bigg\{ X_{(L-l,l),0}^{(t_2 + 1,1,\ldots,1)}(R+t_1+l) \bigg\} \ar[d] & \\
    X_{t_2 + L – l}(R + h – 1) = \ar[d] & \bigg\{\displaystyle \sum_{i + s = R + h – 1} \sum^{L-l}_{\substack{|h| = i \\ |h| \geq l}} X_{(|h|,l), L-|h|-l}^{(t_2 + h_1,h_2, \ldots, h_i)}(1) \bigg\} \ar[d] & \\
    \vdots \ar[d] & \vdots \ar[d] & \\
    X_{t_2 + L – l}(R + t_1 + l + 1) = \ar[d] & \bigg\{ \sum_{i + s = R + t_1 + l – 1} \sum^{L-l}_{\substack{|h| = i \\ |h| \geq l}} X_{(|h|,l), L-|h|-l}^{(t_2 + h_1,h_2, \ldots, h_i)}(1) \ar[d] & + & \sum^{L – l}_{h = l} X_{(h,l)}^{t_2 + h}(R + t_1 + l) \bigg\} \\
    \vdots \ar[d] & \vdots \ar[d] & \\
    X_{t_2 + L – l}(3) = \ar[d]_{d_3^l} & \bigg\{ \sum^{L – l}_{|h| = l} X_{(|h|, l), L – l – |h|}^{(t_2 + h_1, h_2, h_3)}(0) \ar[dr] & \oplus & \sum^{L – l}_{|h| = l} X_{(|h|, l), L – l – |h|}^{(t_2 + h_1, h_2)}(1) \ar[dll] \ar[d] & \oplus \sum_{|h| = l} X_{(|h|, l), L – l – |h|}^{(t_2 + h)}(2) \bigg\} \ar@{.>}[dlll] \\
    X_{t_2 + L – l}(2) = \ar[d]_{d_2^l} & \bigg\{\sum^{L – l}_{h = l} X_{(h, l), L – h – l}^{(t_2 + h)}(1) \ar[d] & \oplus & \sum^{L – l}_{|h| = l} X_{(|h|, l), L – l – |h|}^{(t_2 + h_1, h_2)}(0) \bigg\} \ar[dll] \\
    X_{t_2 + L – l}(1) = & \bigg\{ \sum_{h = l}^{L – l}X_{(h,l), L – l – h}^{t_2 + h} \bigg\} & }}

    \end{document}

    `[/list]

Visualizzazione 3 filoni di risposte
  • Autore
    Risposte
    • #16473
      Up
      0
      Down
      ::


      Per diminuire la distanza tra le colonne devi scrivere
      `
      \xymatrix@C-2pc
      `
      al posto di
      `
      \xymatrix
      `
      Dove il -2 da la modifica della distanza, facendo una prova mi sembra vada bene e provando il -3 alcune cose si sovrappongono.

    • #16474
      Up
      0
      Down
      ::


      Il seguente codice dovrebbe risolvere i tuoi problemi:
      `
      \hspace{-3.5cm}
      \begin{minipage}{20cm}
      \small{\xymatrix@C-2pc{
      0 \ar[d] & L – l \ar[d] & \\
      X_{t_2 + L – l}(R + h) = \ar[d]_{d_{R+h}^l} & \bigg\{ X_{(L-l,l),0}^{(t_2 + 1,1,\ldots,1)}(R+t_1+l) \bigg\} \ar[d] & \\
      X_{t_2 + L – l}(R + h – 1) = \ar[d] & \bigg\{\displaystyle \sum_{i + s = R + h – 1} \sum^{L-l}_{\substack{|h| = i \\ |h| \geq l}} X_{(|h|,l), L-|h|-l}^{(t_2 + h_1,h_2, \ldots, h_i)}(1) \bigg\} \ar[d] & \\
      \vdots \ar[d] & \vdots \ar[d] & \\
      X_{t_2 + L – l}(R + t_1 + l + 1) = \ar[d] & \bigg\{ \displaystyle \sum_{i + s = R + t_1 + l – 1} \sum^{L-l}_{\substack{|h| = i \\ |h| \geq l}} X_{(|h|,l), L-|h|-l}^{(t_2 + h_1,h_2, \ldots, h_i)}(1) \ar[d] & + & \displaystyle \sum^{L – l}_{h = l} X_{(h,l)}^{t_2 + h}(R + t_1 + l) \bigg\} \\
      \vdots \ar[d] & \vdots \ar[d] & \\
      X_{t_2 + L – l}(3) = \ar[d]_{d_3^l} & \bigg\{ \displaystyle \sum^{L – l}_{|h| = l} X_{(|h|, l), L – l – |h|}^{(t_2 + h_1, h_2, h_3)}(0) \ar[dr] & \oplus & \displaystyle \sum^{L – l}_{|h| = l} X_{(|h|, l), L – l – |h|}^{(t_2 + h_1, h_2)}(1) \ar[dll] \ar[d] & \oplus \displaystyle \sum_{|h| = l} X_{(|h|, l), L – l – |h|}^{(t_2 + h)}(2) \bigg\} \ar@{.>}[dlll] \\
      X_{t_2 + L – l}(2) = \ar[d]_{d_2^l} & \bigg\{ \displaystyle \sum^{L – l}_{h = l} X_{(h, l), L – h – l}^{(t_2 + h)}(1) \ar[d] & \oplus & \displaystyle \sum^{L – l}_{|h| = l} X_{(|h|, l), L – l – |h|}^{(t_2 + h_1, h_2)}(0) \bigg\} \ar[dll] \\
      X_{t_2 + L – l}(1) = & \bigg\{ \displaystyle \sum_{h = l}^{L – l}X_{(h,l), L – l – h}^{t_2 + h} \bigg\} & }}
      \end{minipage}
      `

      I problemi con le sommatorie a me non si presentano utilizzando il pacchetto xy e tutto il diagramma (credo si chiami cosi non ne ho mai visti) mi sta all’interno della pagina normale.

      Ciao Alberto

    • #16475
      DMW
        Up
        0
        Down
        ::

        Il seguente codice dovrebbe risolvere i tuoi problemi:
        `
        \hspace{-3.5cm}
        \begin{minipage}{20cm}
        \small{\xymatrix@C-2pc{
        0 \ar[d] & L – l \ar[d] & \\
        X_{t_2 + L – l}(R + h) = \ar[d]_{d_{R+h}^l} & \bigg\{ X_{(L-l,l),0}^{(t_2 + 1,1,\ldots,1)}(R+t_1+l) \bigg\} \ar[d] & \\
        X_{t_2 + L – l}(R + h – 1) = \ar[d] & \bigg\{\displaystyle \sum_{i + s = R + h – 1} \sum^{L-l}_{\substack{|h| = i \\ |h| \geq l}} X_{(|h|,l), L-|h|-l}^{(t_2 + h_1,h_2, \ldots, h_i)}(1) \bigg\} \ar[d] & \\
        \vdots \ar[d] & \vdots \ar[d] & \\
        X_{t_2 + L – l}(R + t_1 + l + 1) = \ar[d] & \bigg\{ \displaystyle \sum_{i + s = R + t_1 + l – 1} \sum^{L-l}_{\substack{|h| = i \\ |h| \geq l}} X_{(|h|,l), L-|h|-l}^{(t_2 + h_1,h_2, \ldots, h_i)}(1) \ar[d] & + & \displaystyle \sum^{L – l}_{h = l} X_{(h,l)}^{t_2 + h}(R + t_1 + l) \bigg\} \\
        \vdots \ar[d] & \vdots \ar[d] & \\
        X_{t_2 + L – l}(3) = \ar[d]_{d_3^l} & \bigg\{ \displaystyle \sum^{L – l}_{|h| = l} X_{(|h|, l), L – l – |h|}^{(t_2 + h_1, h_2, h_3)}(0) \ar[dr] & \oplus & \displaystyle \sum^{L – l}_{|h| = l} X_{(|h|, l), L – l – |h|}^{(t_2 + h_1, h_2)}(1) \ar[dll] \ar[d] & \oplus \displaystyle \sum_{|h| = l} X_{(|h|, l), L – l – |h|}^{(t_2 + h)}(2) \bigg\} \ar@{.>}[dlll] \\
        X_{t_2 + L – l}(2) = \ar[d]_{d_2^l} & \bigg\{ \displaystyle \sum^{L – l}_{h = l} X_{(h, l), L – h – l}^{(t_2 + h)}(1) \ar[d] & \oplus & \displaystyle \sum^{L – l}_{|h| = l} X_{(|h|, l), L – l – |h|}^{(t_2 + h_1, h_2)}(0) \bigg\} \ar[dll] \\
        X_{t_2 + L – l}(1) = & \bigg\{ \displaystyle \sum_{h = l}^{L – l}X_{(h,l), L – l – h}^{t_2 + h} \bigg\} & }}
        \end{minipage}
        `

        I problemi con le sommatorie a me non si presentano utilizzando il pacchetto xy e tutto il diagramma (credo si chiami cosi non ne ho mai visti) mi sta all’interno della pagina normale.
        Ciao Alberto

        Il codice di Alberto può andare bene.

        Per mettere l’apice ed il pedice sopra e sotto, aggiungi \limits dopo \sum:
        `
        \sum\limits^a_b`

        Poi c’è un errore perché il comando \small non ha parametri. Se vuoi scrivere una cosa con grandezza \small, si scrive
        `
        {\small bla bla…}
        `
        e non
        `\small{bla bla …}`
        Altrimenti anche quello che c’è dopo risulta tutto in grandezza \small.

        In generale io proverei ad usare il pacchetto pict2e e a fare quel grafico con l’ambiente picture. Secondo me, quel tipo di diagramma è un po’ troppo complicato per il pacchetto xy,

        Ciao

        Andrea

      • #16476
        DMW
          Up
          0
          Down
          ::


          Anzi, pensandoci bene il codice di Alberto è un po’ troppo sporco perché devi andare a mano con \hspace e poi la minipage è un po’ sprecata e poi non ha senso mettere \small se poi si usa \displaystyle

          Prova così
          `\par\noindent
          \hbox to \linewidth{\hss\xymatrix@C-2pc{
          0 \ar[d] & L – l \ar[d] & \\
          X_{t_2 + L – l}(R + h) = \ar[d]_{d_{R+h}^l} & \bigg\{ X_{(L-l,l),0}^{(t_2 + 1,1,\ldots,1)}(R+t_1+l) \bigg\} \ar[d] & \\
          X_{t_2 + L – l}(R + h – 1) = \ar[d] & \bigg\{\displaystyle \sum_{i + s = R + h – 1} \sum^{L-l}_{\substack{|h| = i \\ |h| \geq l}} X_{(|h|,l), L-|h|-l}^{(t_2 + h_1,h_2, \ldots, h_i)}(1) \bigg\} \ar[d] & \\
          \vdots \ar[d] & \vdots \ar[d] & \\
          X_{t_2 + L – l}(R + t_1 + l + 1) = \ar[d] & \bigg\{ \displaystyle \sum_{i + s = R + t_1 + l – 1} \sum^{L-l}_{\substack{|h| = i \\ |h| \geq l}} X_{(|h|,l), L-|h|-l}^{(t_2 + h_1,h_2, \ldots, h_i)}(1) \ar[d] & + & \displaystyle \sum^{L – l}_{h = l} X_{(h,l)}^{t_2 + h}(R + t_1 + l) \bigg\} \\
          \vdots \ar[d] & \vdots \ar[d] & \\
          X_{t_2 + L – l}(3) = \ar[d]_{d_3^l} & \bigg\{ \displaystyle \sum^{L – l}_{|h| = l} X_{(|h|, l), L – l – |h|}^{(t_2 + h_1, h_2, h_3)}(0) \ar[dr] & \oplus & \displaystyle \sum^{L – l}_{|h| = l} X_{(|h|, l), L – l – |h|}^{(t_2 + h_1, h_2)}(1) \ar[dll] \ar[d] & \oplus \displaystyle \sum_{|h| = l} X_{(|h|, l), L – l – |h|}^{(t_2 + h)}(2) \bigg\} \ar@{.>}[dlll] \\
          X_{t_2 + L – l}(2) = \ar[d]_{d_2^l} & \bigg\{ \displaystyle \sum^{L – l}_{h = l} X_{(h, l), L – h – l}^{(t_2 + h)}(1) \ar[d] & \oplus & \displaystyle \sum^{L – l}_{|h| = l} X_{(|h|, l), L – l – |h|}^{(t_2 + h_1, h_2)}(0) \bigg\} \ar[dll] \\
          X_{t_2 + L – l}(1) = & \bigg\{ \displaystyle \sum_{h = l}^{L – l}X_{(h,l), L – l – h}^{t_2 + h} \bigg\} & }\hss}`

          dove ho tolto small e lasciato displaystyle, oppure così:

          `\par\noindent
          \hbox to \linewidth{\hss\small\xymatrix@C-2pc{
          0 \ar[d] & L – l \ar[d] & \\
          X_{t_2 + L – l}(R + h) = \ar[d]_{d_{R+h}^l} & \bigg\{ X_{(L-l,l),0}^{(t_2 + 1,1,\ldots,1)}(R+t_1+l) \bigg\} \ar[d] & \\
          X_{t_2 + L – l}(R + h – 1) = \ar[d] & \bigg\{ \sum\limits_{i + s = R + h – 1} \sum\limits^{L-l}_{\substack{|h| = i \\ |h| \geq l}} X_{(|h|,l), L-|h|-l}^{(t_2 + h_1,h_2, \ldots, h_i)}(1) \bigg\} \ar[d] & \\
          \vdots \ar[d] & \vdots \ar[d] & \\
          X_{t_2 + L – l}(R + t_1 + l + 1) = \ar[d] & \bigg\{ \sum\limits_{i + s = R + t_1 + l – 1} \sum\limits^{L-l}_{\substack{|h| = i \\ |h| \geq l}} X_{(|h|,l), L-|h|-l}^{(t_2 + h_1,h_2, \ldots, h_i)}(1) \ar[d] & + & \sum\limits^{L – l}_{h = l} X_{(h,l)}^{t_2 + h}(R + t_1 + l) \bigg\} \\
          \vdots \ar[d] & \vdots \ar[d] & \\
          X_{t_2 + L – l}(3) = \ar[d]_{d_3^l} & \bigg\{ \sum\limits^{L – l}_{|h| = l} X_{(|h|, l), L – l – |h|}^{(t_2 + h_1, h_2, h_3)}(0) \ar[dr] & \oplus & \sum\limits^{L – l}_{|h| = l} X_{(|h|, l), L – l – |h|}^{(t_2 + h_1, h_2)}(1) \ar[dll] \ar[d] & \oplus \sum\limits_{|h| = l} X_{(|h|, l), L – l – |h|}^{(t_2 + h)}(2) \bigg\} \ar@{.>}[dlll] \\
          X_{t_2 + L – l}(2) = \ar[d]_{d_2^l} & \bigg\{ \sum\limits^{L – l}_{h = l} X_{(h, l), L – h – l}^{(t_2 + h)}(1) \ar[d] & \oplus & \sum\limits^{L – l}_{|h| = l} X_{(|h|, l), L – l – |h|}^{(t_2 + h_1, h_2)}(0) \bigg\} \ar[dll] \\
          X_{t_2 + L – l}(1) = & \bigg\{\sum\limits_{h = l}^{L – l}X_{(h,l), L – l – h}^{t_2 + h} \bigg\} & }\hss}`

          dove ho lasciato \small, tolto \displaystyle e usato \sum\limits.

          Tra l’altro, con \hbox e \hss non hai nemmeno i messaggi di overfull \hbox, anche se il grafico sfora i margini. Se lo vuoi un po’ più piccolo sostituisci \small con \footnotesize o con \scriptsize. Anzi dico che con \scriptsize è quasi perfetto.

          Ciao

          Andrea

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

      Go to top