problema allineamento con array

  • Creatore
    Topic
  • #87633
    Up
    0
    Down
    ::


    Salve, sto tentano di fare una descrizione con l’ambiente array, e questo, giustamente, centra il corpo del testo nella pagina, mentre io lo vorrei allineato con il paragrafo. Devo rinunciare ad array o è possibile qualche soluzione?

    grazie
    Mauro

    `\documentclass[a4paper,11pt,twoside,openright]{book}

    \usepackage{latexsym}
    \usepackage{fancyhdr}
    \usepackage[italian]{babel} %lingua predefinita
    \usepackage[T1]{fontenc} %migliora la sillabazione
    \usepackage[utf8]{inputenc}
    \usepackage{amsmath} %migliora la gestione di documenti con formule
    \usepackage{amssymb} %+ simboli matematici
    %\usepackage{amsthm} %migliora la gestione degli enunciati matematici
    \usepackage{eurosym}
    \usepackage{booktabs}
    \usepackage{array}
    \usepackage{dcolumn}
    \usepackage{multirow}
    \usepackage{hhline}
    \usepackage[babel]{csquotes}
    \usepackage[backend=biber,babel=hyphen,style=philosophy-modern]{biblatex}
    \usepackage{etoolbox}
    \usepackage{microtype}

    \begin{document}

    \paragraph{\textbf{Draga a cucchiaio}}
    \begin{displaymath}
    \begin{array}{ll}
    \textmd{Service life pontoon} & \textmd{20 years}\\
    \textmd{Service life cable crane} & \textmd{10 years}\\
    \textmd{Service hours}& \textmd{84 hours per week}\\
    \textmd{Residual value pontoon}& \textmd{5 \% of V}\\
    \textmd{Residual value crane}& \textmd{5 \% of V}\\
    \textmd{Utilisation period }& \textmd{26 weeks}\\
    \textmd{D+i\:pontoon}& \textmd{9.317 \% of V per year or 0.358 \% per week}\\
    \textmd{D+i\:crane}& \textmd{13.876 \% of V per year or 0.534 \% per week}\\
    \textmd{M+R\:pontoon}& \textmd{5.20 \% of V per year or 0.20 \% per week}\\
    \textmd{M+R\:crane}& \textmd{9.880 \% of V per year or 0.380 \% per week}\\
    \textmd{Standard value }& \textmd{V}=4000\cdot \textmd{W}_{pontoon}+1000\cdot \textmd{W}_{crane}+2370\cdot \textmd{I} \\
    \end{array}
    \end{displaymath}

    \paragraph{\textbf{Rimorchiatore}}
    \begin{displaymath}
    \begin{array}{ll}
    \textmd{Service life} & \textmd{18 years}\\
    \textmd{Service hours} & \textmd{84 hours per week}\\
    \textmd{Residual value }& \textmd{5 \% of V}\\
    \textmd{Utilisation period }& \textmd{26 weeks}\\
    \textmd{D+i}& \textmd{9.794 \% of V per year or 0.377 \% per week}\\
    \textmd{M+R}& \textmd{9.10 \% of V per year or 0.350 \% per week}\\
    \textmd{Standard value }& \textmd{V}=1450\cdot \textmd{S}\\
    \end{array}
    \end{displaymath}

    \end{document}`

Visualizzazione 2 filoni di risposte
  • Autore
    Risposte
    • #87634
      Up
      0
      Down
      ::


      ho risolto con
      \qquad {}

      anche se non è la maniera corretta e più elegante

    • #87635
      Up
      0
      Down
      ::

      M.D.” post=87094Salve, sto tentano di fare una descrizione con l’ambiente array, e questo, giustamente, centra il corpo del testo nella pagina, mentre io lo vorrei allineato con il paragrafo. Devo rinunciare ad array o è possibile qualche soluzione?

      grazie
      Mauro

      `\documentclass[a4paper,11pt,twoside,openright]{book}

      \usepackage{latexsym}
      \usepackage{fancyhdr}
      \usepackage[italian]{babel} %lingua predefinita
      \usepackage[T1]{fontenc} %migliora la sillabazione
      \usepackage[utf8]{inputenc}
      \usepackage{amsmath} %migliora la gestione di documenti con formule
      \usepackage{amssymb} %+ simboli matematici
      %\usepackage{amsthm} %migliora la gestione degli enunciati matematici
      \usepackage{eurosym}
      \usepackage{booktabs}
      \usepackage{array}
      \usepackage{dcolumn}
      \usepackage{multirow}
      \usepackage{hhline}
      \usepackage[babel]{csquotes}
      \usepackage[backend=biber,babel=hyphen,style=philosophy-modern]{biblatex}
      \usepackage{etoolbox}
      \usepackage{microtype}

      \begin{document}

      \paragraph{\textbf{Draga a cucchiaio}}
      \begin{displaymath}
      \begin{array}{ll}
      \textmd{Service life pontoon} & \textmd{20 years}\\
      \textmd{Service life cable crane} & \textmd{10 years}\\
      \textmd{Service hours}& \textmd{84 hours per week}\\
      \textmd{Residual value pontoon}& \textmd{5 \% of V}\\
      \textmd{Residual value crane}& \textmd{5 \% of V}\\
      \textmd{Utilisation period }& \textmd{26 weeks}\\
      \textmd{D+i\:pontoon}& \textmd{9.317 \% of V per year or 0.358 \% per week}\\
      \textmd{D+i\:crane}& \textmd{13.876 \% of V per year or 0.534 \% per week}\\
      \textmd{M+R\:pontoon}& \textmd{5.20 \% of V per year or 0.20 \% per week}\\
      \textmd{M+R\:crane}& \textmd{9.880 \% of V per year or 0.380 \% per week}\\
      \textmd{Standard value }& \textmd{V}=4000\cdot \textmd{W}_{pontoon}+1000\cdot \textmd{W}_{crane}+2370\cdot \textmd{I} \\
      \end{array}
      \end{displaymath}

      \paragraph{\textbf{Rimorchiatore}}
      \begin{displaymath}
      \begin{array}{ll}
      \textmd{Service life} & \textmd{18 years}\\
      \textmd{Service hours} & \textmd{84 hours per week}\\
      \textmd{Residual value }& \textmd{5 \% of V}\\
      \textmd{Utilisation period }& \textmd{26 weeks}\\
      \textmd{D+i}& \textmd{9.794 \% of V per year or 0.377 \% per week}\\
      \textmd{M+R}& \textmd{9.10 \% of V per year or 0.350 \% per week}\\
      \textmd{Standard value }& \textmd{V}=1450\cdot \textmd{S}\\
      \end{array}
      \end{displaymath}

      \end{document}`

      Perché mai [tt]array[/tt]?
      `\documentclass[a4paper,11pt,twoside,openright]{book}
      \usepackage{amsmath}

      \begin{document}

      \noindent\begin{tabular}{@{}ll@{}}
      \multicolumn{2}{@{}l@{}}{\textbf{Draga a cucchiaio}}\\
      Service life pontoon & 20 years\\
      Service life cable crane & 10 years\\
      Service hours& 84 hours per week\\
      Residual value pontoon& 5\% of $V$\\
      Residual value crane& 5\% of $V$\\
      Utilisation period & 26 weeks\\
      $D+i$ pontoon& 9.317\% of $V$ per year or 0.358\% per week\\
      $D+i$ crane& 13.876\% of $V$ per year or 0.534\% per week\\
      $M+R$ pontoon& 5.20\% of $V$ per year or 0.20\% per week\\
      $M+R$ crane& 9.880\% of $V$ per year or 0.380\% per week\\
      Standard value & $V=4000\cdot W_\textrm{pontoon}+1000\cdot W_\textrm{crane}+2370\cdot I$
      \end{tabular}

      \end{document}`
      Nota che % non va separato dal numero; nota anche come si rende il modo matematico. Non usare [tt]\paragraph[/tt] per scopi del genere.

      Ciao
      Enrico

    • #87636
      alegenn
      Partecipante
        Up
        0
        Down
        ::

        M.D.” post=87094Salve, sto tentano di fare una descrizione con l’ambiente array, e questo, giustamente, centra il corpo del testo nella pagina, mentre io lo vorrei allineato con il paragrafo. Devo rinunciare ad array o è possibile qualche soluzione?

        grazie
        Mauro

        `\documentclass[a4paper,11pt,twoside,openright]{book}

        \usepackage{latexsym}
        \usepackage{fancyhdr}
        \usepackage[italian]{babel} %lingua predefinita
        \usepackage[T1]{fontenc} %migliora la sillabazione
        \usepackage[utf8]{inputenc}
        \usepackage{amsmath} %migliora la gestione di documenti con formule
        \usepackage{amssymb} %+ simboli matematici
        %\usepackage{amsthm} %migliora la gestione degli enunciati matematici
        \usepackage{eurosym}
        \usepackage{booktabs}
        \usepackage{array}
        \usepackage{dcolumn}
        \usepackage{multirow}
        \usepackage{hhline}
        \usepackage[babel]{csquotes}
        \usepackage[backend=biber,babel=hyphen,style=philosophy-modern]{biblatex}
        \usepackage{etoolbox}
        \usepackage{microtype}

        \begin{document}

        \paragraph{\textbf{Draga a cucchiaio}}
        \begin{displaymath}
        \begin{array}{ll}
        \textmd{Service life pontoon} & \textmd{20 years}\\
        \textmd{Service life cable crane} & \textmd{10 years}\\
        \textmd{Service hours}& \textmd{84 hours per week}\\
        \textmd{Residual value pontoon}& \textmd{5 \% of V}\\
        \textmd{Residual value crane}& \textmd{5 \% of V}\\
        \textmd{Utilisation period }& \textmd{26 weeks}\\
        \textmd{D+i\:pontoon}& \textmd{9.317 \% of V per year or 0.358 \% per week}\\
        \textmd{D+i\:crane}& \textmd{13.876 \% of V per year or 0.534 \% per week}\\
        \textmd{M+R\:pontoon}& \textmd{5.20 \% of V per year or 0.20 \% per week}\\
        \textmd{M+R\:crane}& \textmd{9.880 \% of V per year or 0.380 \% per week}\\
        \textmd{Standard value }& \textmd{V}=4000\cdot \textmd{W}_{pontoon}+1000\cdot \textmd{W}_{crane}+2370\cdot \textmd{I} \\
        \end{array}
        \end{displaymath}

        \paragraph{\textbf{Rimorchiatore}}
        \begin{displaymath}
        \begin{array}{ll}
        \textmd{Service life} & \textmd{18 years}\\
        \textmd{Service hours} & \textmd{84 hours per week}\\
        \textmd{Residual value }& \textmd{5 \% of V}\\
        \textmd{Utilisation period }& \textmd{26 weeks}\\
        \textmd{D+i}& \textmd{9.794 \% of V per year or 0.377 \% per week}\\
        \textmd{M+R}& \textmd{9.10 \% of V per year or 0.350 \% per week}\\
        \textmd{Standard value }& \textmd{V}=1450\cdot \textmd{S}\\
        \end{array}
        \end{displaymath}

        \end{document}`

        Ciao,
        oltre ai consigli che ti ha dato Enrico e che ti invito caldamente a seguire, apri il terminale e digita: [tt]texdoc siunitx[/tt] scoprirai cose molto interessanti su come vanno scritte le unità di misura!
        Saluti

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

    Go to top