samiel

Risposte nei forum create

Stai visualizzando 15 risposte – dal 496 al 510 (di 1,864 totali)
  • Autore
    Risposte
  • in risposta a: Personalizzare l’indice di un book. #114156
    samiel
    Partecipante
      Up
      0
      Down
      ::


      mettendo i numeri romani ai capitoli, essi vengono ereditati anche dalle sezioni.
      infatti ho modificato il codice perché II.3 è orribile.
      ma di certo ci sarà un modo per personalizzare anche la numerazione
      delle equazioni, che però non ho mai cercato essendo un umanista 🙂

      m

      in risposta a: Personalizzare l’indice di un book. #114154
      samiel
      Partecipante
        Up
        0
        Down
        ::


        nel pdf che alleghi vedo una cosa che non va: il margine dell’indice è più ristretto della pagina:
        infatti noterai che il margine destro di Contents è “più a destra” del margine destro dei paragrafi dell’indice.
        Devi sistemarlo con
        `\contentsmargin[-1.55em]{1.55em}`

        i problemi di titletoc con part si sistemano con questa patch:
        Part Number separated of Part Name in Table of Contents

        cmq il codice complessivo dove anche part è sistemata:

        `%%% GENERAL SETTINGS
        \documentclass[a4paper]{book}
        \usepackage[T1]{fontenc}
        \usepackage[english]{babel}
        \usepackage{newpxtext,newpxmath}
        \useosf
        \usepackage{microtype}
        %\usepackage[margin=3cm,heightrounded]{geometry}

        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

        %%% TABLE OF CONTENTS SETTINGS
        \usepackage{titletoc}
        %\usepackage{showframe}

        % book — titletoc patch for \part: https://tex.stackexchange.com/a/454553/134574
        \usepackage{etoolbox}
        \makeatletter
        \patchcmd\@part
        {\thepart}
        {\protect\numberline{\thepart}}
        {}{\FAIL}
        \makeatother

        \makeatletter
        \contentsmargin[-1.55em]{1.55em} % the default value of \@pnumwith for book class

        \titlecontents{part}
        [0em]
        {\addvspace{1.5pc}\filcenter}
        {\large\partname~\thecontentslabel\endgraf\bfseries}
        {\large}
        {} % without page number
        [\addvspace{.5pc}]

        \titlecontents{chapter}
        [0em]
        {\vspace*{\baselineskip}}
        {\mdseries
        \llap{\hb@xt@\@pnumwidth{\hfil\thecontentspage}\quad}\chaptername~\thecontentslabel\\
        \vspace*{0.3\baselineskip}%
        \itshape
        }
        {\mdseries
        \llap{\hb@xt@\@pnumwidth{\hfil\thecontentspage}\quad}%
        \itshape
        }
        {}
        []

        \titlecontents*{section}
        [0em]
        {}
        {\footnotesize \thecontentslabel~}
        {}
        {\footnotesize,~\thecontentspage}
        [~–~]
        []

        \makeatletter\@addtoreset{chapter}{part}\makeatother % make chapter begin from 1 every part

        \renewcommand{\thechapter}{\Roman{chapter}} % chapter number in Roman
        \renewcommand{\thesection}{\arabic{chapter}.\arabic{section}} % section number all in arabic

        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

        \begin{document}

        \renewcommand*\contentsname{\hfill\mdseries\huge Contents} % put ToC title in the right side of the page
        \tableofcontents

        \part{Setting up of a Business}
        \chapter{Businness idea and management}

        \chapter{Business startup}
        \section{The choice of the most appropriate legal structure}
        \section{Self–employed [Sole trader (\textsc{uk}) — Sole proprietorship (\textsc{usa})]}
        \section{Limited company}
        \section{Limited partnership \textsc{it}: Società in accomandita}
        \section{\textsc{llp} — Limited Liability Partnership (\textsc{uk}) [\textsc{llc} — Limited Liability Company
        (\textsc{usa})] \textsc{it} «Società a Responsabilità Limitata con opzione per il regime di trasparenza fiscale»}
        \section{Corporation (C Corporation)}
        \section{S Corporation \textsc{it}: Società per Azioni trasparente}
        \section{Business partnership}
        \section{Cooperative}
        \section{Unincorporated association (sports club or a voluntary group with no plan to to make a profit)}
        \section{Social enterprise (to help people or communities)}

        \chapter{Financial Accounting \& Management Accounting}

        \part{The double–entry bookkeeping system}
        \chapter{Recording accounts}
        \section{T–Account method}
        \section{Double–entry bookkeeping system}
        \section{Ledger accounting book}
        \section{Journal accounting book}

        \addcontentsline{toc}{chapter}{Conclusion}
        \chapter*{Conclusion}

        \end{document}`

        l’unica cosa su cui sono un po’ dubbioso è se esista un codice più elegante di
        `\renewcommand{\thechapter}{\Roman{chapter}} % chapter number in Roman
        \renewcommand{\thesection}{\arabic{chapter}.\arabic{section}} % section number all in arabic`

        in ogni caso il risultato è questo

        [attachment=2126]section_on_the_same_line_index.png[/attachment]

        m

        Attachments:
        You must be logged in to view attached files.
        in risposta a: PROBLEMA NEL CENTRARE TABELLA #114189
        samiel
        Partecipante
          Up
          0
          Down
          ::


          E ridurre il font?
          Oppure usare tabularx con l’opzione {\textwidth}?

          in risposta a: PROBLEMA NEL CENTRARE TABELLA #114187
          samiel
          Partecipante
            Up
            0
            Down
            ::


            vedi qui
            l’intervento (ennesimo) di OldClaudio su cos’è un EMC

            prova a compilare il codice che ho inserito io,
            anche se p riferito alla classe article.
            fa lo stesso guaio?

            in risposta a: PROBLEMA NEL CENTRARE TABELLA #114184
            samiel
            Partecipante
              Up
              0
              Down
              ::


              continua a non capire, butto là una cavolata.
              non sarà per i margini non simmetrici della classe book?
              nell’immagine che ho messo compilando il tuo codice
              la tabella è necessariamente centrata dal momento
              che occupa l’intera pagina… d’altro canto non avendo tu postato
              un EMC è impossibile capire se ci sono altre impostazioni
              che producono esiti particolari

              m

              in risposta a: documenti latex per DSA #114139
              samiel
              Partecipante
                Up
                0
                Down
                ::


                la cosa buffa è che c’è chi pone domande,
                ottiene risposte e suscita un dibattito…
                …e nel frattempo sparisce 🙂

                in risposta a: PROBLEMA NEL CENTRARE TABELLA #114182
                samiel
                Partecipante
                  Up
                  0
                  Down
                  ::


                  a me col tuo codice viene una tabella ampia quanto la pagina,
                  non capisco cosa intendi in questo caso per “decentrata”.
                  Ecco l’ EMC che non hai allegato
                  `\documentclass{article}
                  \usepackage{booktabs}
                  \usepackage{showframe}
                  \begin{document}
                  \begin{table}[htbp]
                  \caption{Fattori di forma {\bf\emph{HPC}} tempo zero }
                  \medskip
                  \label{tab:virgola}
                  \centering
                  \begin{tabular}{cccc}
                  \toprule
                  Campione & C [Ns$^2$/(kg m$^2$)] & D [Ns$^2$/(kg m$^2$)] & B [Ns$^2$/(kg m$^2$)] \\
                  \midrule
                  C1\_HPC\_0F\_NF\_01 & 681,92 & 113,64 & 134,44\\
                  C2\_HPC\_0F\_NF\_02 & 601,34 & 109,24 & 129,23\\
                  C3\_HPC\_0F\_NF\_03 & 576,66 & 107,80 & 127,53\\
                  C4\_HPC\_0F\_F\_04 & 579,73 & 107,77 & 127,49\\
                  C5\_HPC\_0F\_F\_05 & 613,13 & 109,83 & 129,93\\
                  C6\_HPC\_0F\_F\_06 & 618,86 & 110,22 & 130,39\\
                  C7\_HPC\_0F\_F\_07 & 572,68 & 107,50 & 127,17\\
                  C8\_HPC\_0F\_F\_08 & 579,28 & 107,54 & 127,22\\
                  \bottomrule
                  \end{tabular}
                  \end{table}
                  \end{document}`
                  ed ecco cosa vedo

                  Attachments:
                  You must be logged in to view attached files.
                  in risposta a: Personalizzare l’indice di un book. #114152
                  samiel
                  Partecipante
                    Up
                    0
                    Down
                    ::


                    per sfizio ed esercizio ho riprodotto l’indice che hai postato all’inizio.
                    mi sono reso conto che titletoc non gestisce \part (non mi ero mai posto i problema).
                    C’è una patch su stackexchange.
                    poi ci sono altre imperfezioni come qualche spazio di troppo nel vecchio codice:
                    se ti serve, vedo di postare il codice finale completo

                    m

                    in risposta a: Personalizzare l’indice di un book. #114150
                    samiel
                    Partecipante
                      Up
                      0
                      Down
                      ::


                      Vedi qui: How do I get multiple ToC entries in the same line?
                      Ho riadattato quel codice in questo modo:
                      `\documentclass[a4paper]{book}
                      \usepackage[T1]{fontenc}
                      \usepackage[utf8]{inputenc}
                      \usepackage[italian]{babel}
                      \usepackage{titletoc}

                      \titlecontents*{section}%

                      [1.5em]%
                      {\small}%
                      {\thecontentslabel. }%
                      {}%
                      {, \thecontentspage}%
                      [~–\ ]%
                      []%

                      \begin{document}

                      \tableofcontents

                      \chapter{Midi}
                      \section{Alba}
                      \section{Mattina}
                      \section{Mezzogiorno}
                      \chapter{Après midi}
                      \section{Primo pomeriggio}
                      \section{Prélude à l'après-midi d'un faune}
                      \section{Ora del té}
                      \section{Tramonto}
                      \section{Sera}
                      \section{Beim Schlafengehen}
                      \section{Notte}

                      \end{document}`

                      m

                      PS come vedi, se copi il mio codice in un file dell’editor
                      e lo compili, ti esce il pdf senza dover aggiungere nulla.
                      si tratta di un Esempio (quasi) Minimo Compilabile

                      in risposta a: Personalizzare l’indice di un book. #114148
                      samiel
                      Partecipante
                        Up
                        0
                        Down
                        ::


                        è il pezzo di codice che ti interessa, ma non è un MWE
                        che, come è stato detto moltissime volte, è un codice compilabile
                        senza che chi intende darti una mano debba iniziare a mettere
                        `\documentclass[a4paper,12pt]{article}

                        \begin{document}

                        \end{document}`
                        Se tu racchiudi il tuo codice fra le stringhe
                        all’inizio `[code] … `
                        e alla fine ` … ` [/code]
                        la formattazione aiuta il lettore

                        m

                        in risposta a: philosophy-modern – una domanda su Article e location #114169
                        samiel
                        Partecipante
                          Up
                          0
                          Down
                          ::


                          lo so che non è una risposta al tuo problema,
                          ma io ho mai visto in migliaia di citazioni da riviste
                          l’indicazione del luogo di pubblicazione….

                          m

                          in risposta a: Personalizzare l’indice di un book. #114146
                          samiel
                          Partecipante
                            Up
                            0
                            Down
                            ::


                            Succede perché anche dopo l’ultima indicazione il codice si aspetta
                            un’ulteriore indicazione. Se riesci a postare in MWE (e a usare
                            la formattazione corretta per il codice usando l’icona oppure
                            mettendo “, qualcuno può verificare e correggere
                            o integrare il codice per ovviare al trattino che non ci va…

                            m

                            in risposta a: Personalizzare l’indice di un book. #114143
                            samiel
                            Partecipante
                              Up
                              0
                              Down
                              ::


                              se puoi indicare la soluzione,
                              fai un favore a chi potrebbe avere in futuro
                              il tuo stesso problema…

                              m

                              in risposta a: documenti latex per DSA #114131
                              samiel
                              Partecipante
                                Up
                                0
                                Down
                                ::


                                prova un codice del genere
                                `\documentclass[a4paper, 14pt]{extarticle}
                                \usepackage[T1]{fontenc}
                                \usepackage[utf8]{inputenc}
                                \usepackage[italian]{babel}
                                \usepackage{helvet}
                                \renewcommand{\familydefault}{\sfdefault}
                                \usepackage{microtype}
                                \usepackage[margin=3cm,heightrounded]{geometry}
                                \usepackage[document]{ragged2e}
                                \linespread{1.2}
                                \usepackage{lipsum}

                                \begin{document}

                                \lipsum[1]

                                \lipsum[2]

                                \end{document}`

                                m

                                in risposta a: riquadrare indice #114100
                                samiel
                                Partecipante
                                  Up
                                  0
                                  Down
                                  ::


                                  allo stesso modo:
                                  `\begin{framed}
                                  \tableofcontents
                                  \end{framed}`
                                  certo, il risultato mi sembra un avviso funebre….

                                  m

                                Stai visualizzando 15 risposte – dal 496 al 510 (di 1,864 totali)

                                Go to top