Table of contents items longer than one line getting centered in custom class The 2019 Stack...

Why can Shazam fly?

Have you ever entered Singapore using a different passport or name?

How to notate time signature switching consistently every measure

Worn-tile Scrabble

Is bread bad for ducks?

What tool would a Roman-age civilization have for the breaking of silver and other metals into dust?

Pokemon Turn Based battle (Python)

FPGA - DIY Programming

Is a "Democratic" Oligarchy-Style System Possible?

Can a rogue use sneak attack with weapons that have the thrown property even if they are not thrown?

How to deal with fear of taking dependencies

Why is the maximum length of OpenWrt’s root password 8 characters?

Is there a symbol for a right arrow with a square in the middle?

Can a flute soloist sit?

What is the accessibility of a package's `Private` context variables?

Can you compress metal and what would be the consequences?

What does ひと匙 mean in this manga and has it been used colloquially?

How to answer pointed "are you quitting" questioning when I don't want them to suspect

Are there incongruent pythagorean triangles with the same perimeter and same area?

Apparent duplicates between Haynes service instructions and MOT

Is "plugging out" electronic devices an American expression?

Looking for Correct Greek Translation for Heraclitus

Protecting Dualbooting Windows from dangerous code (like rm -rf)

Time travel alters history but people keep saying nothing's changed



Table of contents items longer than one line getting centered in custom class



The 2019 Stack Overflow Developer Survey Results Are InTOC line indent and break problemRight-aligned line-break with long verses in verseTable of contents: section titles ragged rightApply ToC part indenting to chapterAdding a custom line to table of contents containing LaTeX codeGetting rid of empty lines in short table of contentsSit page numbers next to chapter titles in table of contents for amsartLeft alignment for table of contents using custom thesis document classHow to create horizontal line before and after chapter heading but not in table of contentsLong chapter titles not aligning correctly in ToC












0















I am using a class that was created for my university's dissertation requirements, which is freely available at https://github.com/lotten/uci-thesis-latex/blob/master/ucithesis.cls



My problem is with chapter titles that are too long to fit on a single line in the table of contents. The TOC entry for such titles ends up aligned ragged left, which looks strange, so I would like them to be ragged right instead. You can see this clearly in the minimum working example I included below, but it requires having the ucithesis.cls from the link above.



% Minimum working example
documentclass{ucithesis}
begin{document}
tableofcontents
chapter{This chapter title fits on one line and is aligned to the left, as I want it}
chapter{This chapter title is too long to fit on one line in the table of contents, and
requires multiple lines, so the text gets aligned to the right, and the ragged left looks
very strange. I would like for this text to be left aligned and ragged right instead. The
last line appears centered, which I don't necessarily mind, as long as all of the other
lines are aligned to the left.}
end{document}


Ideally, I am hoping to find a solution that does not involve any additional packages. I was able to get the results I wanted with



usepackage{tocstyle}
usetocstyle{standard}


but it came along with some very verbose warnings about the tocstyle package being an alpha version, including the admonition




Maybe it would be better, not to load this package.




Thanks in advance for any help or suggestions!









share







New contributor




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

























    0















    I am using a class that was created for my university's dissertation requirements, which is freely available at https://github.com/lotten/uci-thesis-latex/blob/master/ucithesis.cls



    My problem is with chapter titles that are too long to fit on a single line in the table of contents. The TOC entry for such titles ends up aligned ragged left, which looks strange, so I would like them to be ragged right instead. You can see this clearly in the minimum working example I included below, but it requires having the ucithesis.cls from the link above.



    % Minimum working example
    documentclass{ucithesis}
    begin{document}
    tableofcontents
    chapter{This chapter title fits on one line and is aligned to the left, as I want it}
    chapter{This chapter title is too long to fit on one line in the table of contents, and
    requires multiple lines, so the text gets aligned to the right, and the ragged left looks
    very strange. I would like for this text to be left aligned and ragged right instead. The
    last line appears centered, which I don't necessarily mind, as long as all of the other
    lines are aligned to the left.}
    end{document}


    Ideally, I am hoping to find a solution that does not involve any additional packages. I was able to get the results I wanted with



    usepackage{tocstyle}
    usetocstyle{standard}


    but it came along with some very verbose warnings about the tocstyle package being an alpha version, including the admonition




    Maybe it would be better, not to load this package.




    Thanks in advance for any help or suggestions!









    share







    New contributor




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























      0












      0








      0








      I am using a class that was created for my university's dissertation requirements, which is freely available at https://github.com/lotten/uci-thesis-latex/blob/master/ucithesis.cls



      My problem is with chapter titles that are too long to fit on a single line in the table of contents. The TOC entry for such titles ends up aligned ragged left, which looks strange, so I would like them to be ragged right instead. You can see this clearly in the minimum working example I included below, but it requires having the ucithesis.cls from the link above.



      % Minimum working example
      documentclass{ucithesis}
      begin{document}
      tableofcontents
      chapter{This chapter title fits on one line and is aligned to the left, as I want it}
      chapter{This chapter title is too long to fit on one line in the table of contents, and
      requires multiple lines, so the text gets aligned to the right, and the ragged left looks
      very strange. I would like for this text to be left aligned and ragged right instead. The
      last line appears centered, which I don't necessarily mind, as long as all of the other
      lines are aligned to the left.}
      end{document}


      Ideally, I am hoping to find a solution that does not involve any additional packages. I was able to get the results I wanted with



      usepackage{tocstyle}
      usetocstyle{standard}


      but it came along with some very verbose warnings about the tocstyle package being an alpha version, including the admonition




      Maybe it would be better, not to load this package.




      Thanks in advance for any help or suggestions!









      share







      New contributor




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












      I am using a class that was created for my university's dissertation requirements, which is freely available at https://github.com/lotten/uci-thesis-latex/blob/master/ucithesis.cls



      My problem is with chapter titles that are too long to fit on a single line in the table of contents. The TOC entry for such titles ends up aligned ragged left, which looks strange, so I would like them to be ragged right instead. You can see this clearly in the minimum working example I included below, but it requires having the ucithesis.cls from the link above.



      % Minimum working example
      documentclass{ucithesis}
      begin{document}
      tableofcontents
      chapter{This chapter title fits on one line and is aligned to the left, as I want it}
      chapter{This chapter title is too long to fit on one line in the table of contents, and
      requires multiple lines, so the text gets aligned to the right, and the ragged left looks
      very strange. I would like for this text to be left aligned and ragged right instead. The
      last line appears centered, which I don't necessarily mind, as long as all of the other
      lines are aligned to the left.}
      end{document}


      Ideally, I am hoping to find a solution that does not involve any additional packages. I was able to get the results I wanted with



      usepackage{tocstyle}
      usetocstyle{standard}


      but it came along with some very verbose warnings about the tocstyle package being an alpha version, including the admonition




      Maybe it would be better, not to load this package.




      Thanks in advance for any help or suggestions!







      table-of-contents horizontal-alignment





      share







      New contributor




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










      share







      New contributor




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








      share



      share






      New contributor




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









      asked 1 min ago









      alkaliflyalkalifly

      1




      1




      New contributor




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





      New contributor





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






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






















          0






          active

          oldest

          votes












          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
          });


          }
          });






          alkalifly 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%2f484247%2ftable-of-contents-items-longer-than-one-line-getting-centered-in-custom-class%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








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










          draft saved

          draft discarded


















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













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












          alkalifly 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%2f484247%2ftable-of-contents-items-longer-than-one-line-getting-centered-in-custom-class%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

          Paper upload error, “Upload failed: The top margin is 0.715 in on page 3, which is below the required...

          Emraan Hashmi Filmografia | Linki zewnętrzne | Menu nawigacyjneGulshan GroverGulshan...

          How can I write this formula?newline and italics added with leqWhy does widehat behave differently if I...