1

I have an errata document. For each errata item, I use a small table, with no borders, to list the Errata ID, Area of operation, Components affected, and Severity. Using a table this way, works, but I cannot get the table to align left with the other section heads.

Here is my main-demo.tex file:


\documentclass[oneside]{book}

\usepackage[toc,page]{appendix}
\usepackage[hyperindex,hidelinks]{hyperref}


\usepackage{graphicx}
\usepackage[layout=letterpaper, textheight=9.25in, left=0.5in, right=0.5in, showframe=false]{geometry}

\usepackage{helvet}
\usepackage[T1]{fontenc}
\usepackage{fontsize}
\renewcommand*\familydefault{\sfdefault}
\fontfamily{phv} \fontseries{m} \selectfont

\usepackage[export]{adjustbox}
\usepackage{fancyhdr}

\usepackage{colortbl}
\usepackage{float}
\usepackage{xcolor}

\usepackage{cellspace}
\setlength{\cellspacetoplimit}{8pt}
\setlength{\cellspacebottomlimit}{8pt}

\usepackage{tabularray}
\usepackage{multirow}
\usepackage[small,compact]{titlesec}
\usepackage{titletoc}
\titlespacing*{\chapter}{0pt}{0pt}{0pt}
\titleformat{\chapter}[hang]{\LARGE\bfseries}{\thechapter.\quad}{0pt}{}
\dottedcontents{chapter}[24pt]{}{24pt}{4pt}

%WATERMARK

\usepackage[fontsize=32pt]{draftwatermark}
\SetWatermarkText{ACME Confidential - Internal Use Only}

%FRONT HEADER

\renewcommand\headrule{
  \begingroup
  \color{red}
  \hrule height 2pt width\headwidth
  \endgroup
}

\fancypagestyle{fronthdr}{ 
  \setlength{\topmargin}{-64pt}
  \setlength{\headheight}{88pt}
  \setlength{\headsep}{6pt}
  \fancyhead[L]{
    \color{red} \changefontsize{28pt} \flushleft \textbf{Roadrunner} \vspace{-12pt} \\
    \color{black} \changefontsize{16pt} \flushleft Errata}
  \fancyhead[R]{
    \color{red} \changefontsize{28pt} \flushleft \textbf{Roadrunner} \vspace{-12pt} \\
    \color{black} \changefontsize{16pt} \flushleft Errata}
  \fancyfoot{}
} 

%INTERNAL HEADERS/FOOTERS SETUP

\fancypagestyle{plain} {
  \fancyhf{}
  \setlength{\headheight}{48pt}
  \fancyhead[L]{\large \flushleft Roadrunner Errata}
  \fancyhead[R]{\large Internal Errata Sheet}
  \fancyfoot[L]{Rev. 0.x}
  \fancyfoot[C]{\thepage}
}

\pagestyle{plain} % execute this command here so the subfiles package will use it
\usepackage{subfiles} % add subfile support

% DOCUMENT SECTION

\begin{document}
\pagestyle{fronthdr}
\flushleft {\changefontsize{13pt} Rev 0.x - dd mm 2023 \hspace*{\fill} Internal Errata Sheet}

% TOC

\renewcommand{\contentsname}{\begin{center}{\normalsize Table of Contents}\end{center}}
\renewcommand{\listtablename}{\begin{center}{\normalsize Tables}\end{center}}

\tableofcontents
\begingroup
\let\clearpage\relax
\listoftables
\endgroup

\newpage

\subfile{Demo-topic-internal.tex}

\newpage

\end{document}

The topic Demo-topic-internal.tex is:

% JIRA-3079
% test of subfiles package
\documentclass[main-demo.tex]{subfiles}

\setcounter{secnumdepth}{0}

\begin{document}

\subsection{Software blows up after starting} \label{SIL-3079}

\begin{tblr}{>{\bfseries}ll}
Errata ID & JIRA-3079 \\
Functional Area & System OS \\
Component & NOC \\
Severity & S5: No workaround \\
\end{tblr}

\subsection*{Description}
After startup, the system locks up.

\subsection*{Impact} 
Reduced performance. 

\subsection*{Symptoms} 
The SW generates a Fault, which is reported as a System Fault. 

\subsection*{Workaround} 
TBD 

\subsection*{Resolution} 
N/A 

\end{document}

Am I using the correct table package? I'd of thought that the table, without any explicit indents, would left align with the subsections.

Any help is greatly appreciated!

Thanks,

Russ

I was expecting for the initial table, in the errata file, to be left aligned.

10
  • 3
    If you cross-post the same question on multiple sites, you should include links to all other versions of the question in every question. X-posting without explicit links has the risk of wasting both the time of users who might put time and effort into answering a post, which already has an answer elsewhere, as well as the time of users who might have the same problem but can't find the solutions you might have gotten on one of the other sites you x-posted your question Commented Jul 3 at 16:55
  • 3
    It would have been helpful if you'd trimmed your example down a lot. 30 lines of code in total would have been sufficient to show your problem.
    – Teepeemm
    Commented Jul 3 at 17:23
  • I'm sorry for the lack of cross-post. I had not thought of that. Sorry, my bad. I included all of the specific lines of the main file, as I thought that would be needed to adequately debug the problem. Commented Jul 3 at 17:30
  • 1
    \flushleft should never be used as a command. just as \center and \flushright should not. Commented Jul 5 at 16:57

2 Answers 2

0
  • As was already mentioned in comments, instead of two block of code, you should provide an MWE (Minimal working Example), a small but complete document, which reproduce your problem. IN its preamble you should load packages and eventually define commands, which are relevant for your problem. For example as is done in my MWE below.
  • In cases, that you use tabularray package for writing your table, it is sensible to use syntax defined by it. Its syntax a bit different from syntax of other packages dedicated for writing of table.
  • It is not clear if you like to have whole table left align or just column contents or both. In MWE below is considered the latter case:
\documentclass[oneside]{book}
\usepackage{tabularray}

\begin{document}
\subsection{Software blows up after starting}
\label{JIRA-3079}

\noindent\begin{tblr}{colspec = {@{} Q[l, font=\bfseries] }}  % <---
Errata ID       & JIRA-3079         \\
Functional Area & System OS         \\
Component       & NOC               \\
Severity        & S5: No workaround \\
\end{tblr}

\end{document}

enter image description here

  • It is not clear, why you not insert your table in figure float environment. Doing this, the MWE is:
\documentclass[oneside]{book}
\usepackage{tabularray}

\begin{document}
\subsection{Software blows up after starting}
\label{JIRA-3079}
\begin{figure}[ht]
\begin{tblr}{colspec = {@{} Q[l, font=\bfseries] }}
Errata ID       & JIRA-3079         \\
Functional Area & System OS         \\
Component       & NOC               \\
Severity        & S5: No workaround \\
\end{tblr}
\end{figure}
\end{document}

Result of compilation is the same as before, but in the case that for table is not sufficient space on the page, where it is inserted, it will flow to the top of the next page.

2
  • I apologize again for not having a short MWE. I just wanted to make sure that I provided enough info for anyone helping. To your second point, I was going through the documentation for tabluarray and didn't readily find a solution, or one that I understood. I agree that it makes sense to use syntax defined within the package. I will look to find what you presented. Third point, that was what I was trying to achieve, thx! Fourth point, for this document, each \subsection is preceded by a \newpage so each table, having only 4 rows, it is highly unlikely to be a page break issue. Commented Jul 10 at 15:28
  • @RussellUrquhartC, well, can you tell me shortly, does my answer solve your problem?
    – Zarko
    Commented Jul 10 at 15:56
0

I found a solution. There is a parameter to the colspec for the table. The following table definition, does the trick:

\subsection{Software blows up after starting} % \label{JIRA-3079}

\begin{tblr}{colspec={>{\bfseries}ll}, column{1}={leftsep=0pt}}
  Errata ID       & JIRA-3079         \\
  Functional Area & System OS         \\
  Component       & NOC               \\
  Severity        & S5: No workaround
\end{tblr}

Thanks for all the help everyone!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .