Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In the table of contents, I have a green box around Chapter. I would like to cha\smash{p}ter so the word is vertically more aesthetically pleasing in the box.

How do I smash the p in the definition of \chapter{}?

enter image description here

Edit 1:

I am using a style file made and altered by graduate students for thesis and dissertations. I was under the impression they were using the definition of chapter in the box.

% ==========================================                                      
% ToC Entry modification -- green boxes.                                          
% ==========================================                                      
\titlecontents{chapter}[0em]
  {\vspace*{20pt}}%                                                               
  {\hspace{80pt}%                                                                 
    \begin{tikzpicture}[remember picture, overlay]%                               
    \draw[fill = uvmgreen, draw = uvmgreen] (-4,-.1) rectangle (-0.7,.5);%        
    \pgftext[left, x = -3.7cm, y = 0.2cm]{
      \color{white}\Large\bfseries Chapter\ \thecontentslabel};%          
    \end{tikzpicture}
    \color{uvmgreen}\large\bfseries%                                              
    \vspace{20pt}}%                                                               
  {}{}

But I found that they weren't from @azetina's comment.

share|improve this question
5  
What kind of frame are you using? Is it TikZ? If so provide a MWE? –  azetina Dec 13 '13 at 19:44
    
@azetina from your comment, I found the problem. I figured \chapter need to be re-defined. –  dustin Dec 13 '13 at 19:47
1  
I still recommend that you post your minimal working example to make your question clearer. This may be helpful to others. And in your solution below, you provide an explicit answer stating the fix and illustrating the fix of the code in your answer. Just a suggestion. Glad the questions I posed helped you as a guide to finding the solution to your question. –  azetina Dec 13 '13 at 19:53
    
@azetina I planned on deleting the thread but someone made an answer so that is why I produced the correct answer. –  dustin Dec 13 '13 at 19:58
1  
Its azetina not azentina :-).... By the way, stating your answer is perfectly ok even when others have made attempts in answering your question. –  azetina Dec 13 '13 at 20:00

2 Answers 2

up vote 1 down vote accepted

From @azetina's comment, I was able to find the problem. I original thought that the definition of chapter would need to be redefined. However, the box was set in TikZ where the word chapter not the definition was being used. Therefore, I was able to smash the p easily doing cha\smash{p}ter.

% ==========================================                                      
% ToC Entry modification -- green boxes.                                          
% ==========================================                                      
\titlecontents{chapter}[0em]
  {\vspace*{20pt}}%                                                               
  {\hspace{80pt}%                                                                 
    \begin{tikzpicture}[remember picture, overlay]%                               
    \draw[fill = uvmgreen, draw = uvmgreen] (-4,-.1) rectangle (-0.7,.5);%        
    \pgftext[left, x = -3.7cm, y = 0.2cm]{
      \color{white}\Large\bfseries Cha\smash{p}ter\ \thecontentslabel};%          
    \end{tikzpicture}
    \color{uvmgreen}\large\bfseries%                                              
    \vspace{20pt}}%                                                               
  {}{}
share|improve this answer

Is something like this:

\documentclass{article}
\usepackage{graphics}
\begin{document}
Cha\raisebox{0.3ex}{\scalebox{1}[0.75]{p}}ter
\end{document}

comes closer to your idea?

enter image description here

share|improve this answer
    
No. I found the problem from @azetina's comment. –  dustin Dec 13 '13 at 19:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.