alis0nc / kuthesis

LaTeX class for Kettering University thesis format
MIT License
3 stars 1 forks source link

Figure caption vs table caption format #11

Open pokemane opened 9 years ago

pokemane commented 9 years ago

Figures should have the "Figure #:" underlined, with the caption itself not underlined and in the same line of text (LaTeX does this properly on its own already), whereas the tables are:

Table # Table Name (underlined)

I found some code and an example to change the caption formatting (works on just the tables by replacing the [figure] arg with [table]), but it throws a colon in the figure caption along with the standard fullstop.

I haven't even looked at trying to split up the caption and contents onto different lines yet.

pokemane commented 9 years ago

Alright, so I'm not sure how much can be added to the macro and template/doc class, but:

\captionsetup{labelsep=none}

\DeclareCaptionFormat{underlcap}{#1 #2 \\ #3} \DeclareCaptionLabelFormat{underlcap}{#1 #2} \DeclareCaptionTextFormat{underlcap}{\expandafter\uline\expandafter{\expandafter#1}}

\captionsetup[table]{format=underlcap,labelformat=underlcap,textformat=underlcap,justification=raggedright,singlelinecheck=false}

This works. The only side effect is that the Figure captions now have no whitespace between the caption label and the caption itself. Easily rectified with a single backslash in the caption. I think this is a consequence of the labelsep=none, which is required to get rid of the extra colon that caption seems to like adding as the label separator, so you end up with Figure 1.: type things.

(I'm pretty new to LaTeX, so I apologize if this is something that isn't expected to be part of the template or doc class)

alis0nc commented 9 years ago

I'd rather it be in the class than in the thesis tex file, but I tried integrating those lines (and doing \RequirePackage{caption}) which gave build errors that i don't immediately know how to fix. There's probably a way to fix it though. I'll give this more time tonight.