Some time ago, I posted Subcategory titles in category blogs (joomla 2.5 template override).  It adds the title of each subcategory above the corresponding articles like so:

Subcat title A
Article 1
Article 2
Article 3

Subcat title B
Article 1
Article 2
Article 3

Subcat title C
Article 1
Article 2
Article 3


I use it here for my publication list (Books, Edited volumes, Articles etc. are all subcategories of Publications).

That code was for Joomla 2.5. Here’s an updated version for Joomla 3.x.

<?php
    $introcount = (count($this->intro_items));
    $counter = 0;
    // V. used later to compensate for premature linebreaks when subcat title shown
    $compensate = 0;
    ?>

    <?php if (!empty($this->intro_items)) : ?>
        <?php foreach ($this->intro_items as $key => &$item) : ?>
        <?php $rowcount = ((int) ($key - $compensate) % (int) $this->columns) + 1 ?>
       

        <?php 
         //V. Display subcategory titles in blog listings
        if ( $this->pageclass_sfx == 'subcats' ) {
            $this->item = &$item;
            /* print_r($this->item); */
            $subcat = $this->item->category_title;
            if (!isset($psubcat) || $subcat != $psubcat) {
            if ($rowcount !== 1) {
                //We must close previous line prematurely
                echo '</div> <!-- End row for subcat -->';
                $rowcount = 1;
                //And compensate for the break in future iterations
                $compensate = ((int) $key % (int) $this->columns) ;
            }
            echo '<div class="subcattitle clearfix">' . $subcat . '</div>';
            }
            $psubcat = $subcat;
         }
        //V. end Display subcategory titles in blog listings
        ?>

You can download here the whole override file. Rename it as blog.php and place it  in /templates/your-template/html/com_content/category/ My additions to the stock file are indicated by comments starting with "V.".

The (very simple) logic is pretty much the same as in my previous attempt. However this code is a bit more flexible. It only applies the override to pages with the "subcats" page class. Make sure to set the page class to "subcats" in the options of the corresponding menu items. There is a short snippet at the begining of the file to check whether the override is active or not (it’s commented out by default).

Also the new code should be smarter about multicolumn layouts and only start a subcategory on the first column.

The templates on which I tested this are very close to stock Joomla. Most of them are just html and css on top of the core files. I don’t use any additional framework (not even bootstrap 3 — I’m happy with bootstrap 2 which comes with Joomla). My override may not work if you use more sophisticated template systems, especially if they already have their own overrides for blog.php.