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

Worn-tile Scrabble

How technical should a Scrum Master be to effectively remove impediments?

Deal with toxic manager when you can't quit

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

How to type this arrow in math mode?

Falsification in Math vs Science

Shouldn't "much" here be used instead of "more"?

What could be the right powersource for 15 seconds lifespan disposable giant chainsaw?

Pokemon Turn Based battle (Python)

Return to UK after having been refused entry years ago

Resizing object distorts it (Illustrator CC 2018)

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

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

What did it mean to "align" a radio?

Is this app Icon Browser Safe/Legit?

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

Did Scotland spend $250,000 for the slogan "Welcome to Scotland"?

Is bread bad for ducks?

Landlord wants to switch my lease to a "Land contract" to "get back at the city"

Feature engineering suggestion required

FPGA - DIY Programming

Can we generate random numbers using irrational numbers like π and e?

If I score a critical hit on an 18 or higher, what are my chances of getting a critical hit if I roll 3d20?

For what reasons would an animal species NOT cross a *horizontal* land bridge?



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 4 mins 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

          Why does my Macbook overheat and use so much CPU and energy when on YouTube?Why do so many insist on using...

          How to prevent page numbers from appearing on glossaries?How to remove a dot and a page number in the...

          Puerta de Hutt Referencias Enlaces externos Menú de navegación15°58′00″S 5°42′00″O /...