GeneralLatex unable to generate pdf

LaTeX specific issues not fitting into one of the other forums of this category.
ls440
Posts: 8
Joined: Thu Oct 27, 2022 2:55 pm

Latex unable to generate pdf

Post by ls440 »

Hi My goal is to generate pdf from csv file. I tried to convert csv file to pdf using pdflatex. I have posted my tex file in the issue. When i execute the below command for some reason it doesnot exit automatically (get stuck), I need to press enter 2-3 times and then i get the pdf generated. how to sort this out. Please suggest

Code: Select all

pdflatex --output-directory /tmp test.tex
.
Last edited by ls440 on Wed Nov 02, 2022 2:51 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10322
Joined: Mon Mar 10, 2008 9:44 pm

Latex unable to generate pdf

Post by Stefan Kottwitz »

Welcome to the forum!

Can you perhaps post the complete log file as an attachment here?

Stefan
LaTeX.org admin
ls440
Posts: 8
Joined: Thu Oct 27, 2022 2:55 pm

Latex unable to generate pdf

Post by ls440 »

Here is my Tex file

Code: Select all

\documentclass[9pt]{article}
\usepackage{booktabs}
\usepackage{csvsimple}
\usepackage{longtable}
\usepackage{multirow}
\usepackage{microtype}
\usepackage{pdflscape}
\usepackage{array}
\usepackage[labelfont=bf,labelsep=period,font={small,sf,bf}]{caption}

\begin{document}
\begin{titlepage}
        \centering
        \includegraphics[width=0.6\textwidth]{logo}\par\vspace{1cm}
        {\scshape\LARGE \textsf{TEST} \par}
        \vspace{1cm}
        {\scshape\LARGE \textsf{TESTING RESULT} \par}
        \vspace{1.5cm}
        {\scshape\LARGE \textsf{Version: \today}}

\end{titlepage}

\begin{longtable}{|p{3cm}|p{2.5cm}|c|c|} 
        \hline
        \textbf{\textsf{column1}} & \textbf{\textsf{column2}} & \textbf{\textsf{column3}} & \textbf{\textsf{column4}} \\\hline
    \endfirsthead
    \hline
   \textbf{\textsf{column1}} & \textbf{\textsf{column2}} & \textbf{\textsf{column3}} & \textbf{\textsf{column4}}  \\\hline
    \endfoot
    \endlastfoot
    \csvreader[
                before reading={\catcode`\_=11},
                after reading={\catcode`\_=8},
                late after line=\\\hline
    ]{output.csv}{}{\csvlinetotablerow}
\end{longtable}
\end{document}
Last edited by ls440 on Wed Nov 02, 2022 2:52 pm, edited 2 times in total.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10322
Joined: Mon Mar 10, 2008 9:44 pm

Latex unable to generate pdf

Post by Stefan Kottwitz »

You defined a table with 4 columns here:

Code: Select all

\begin{longtable}{|p{3cm}|p{2.5cm}|c|c|} 
However, in the table you use 6 columns:

Code: Select all

\textbf{\textsf{column1}} & \textbf{\textsf{column2}} & \textbf{\textsf{column3}} & \textbf{\textsf{column4}}
    & \textbf{\textsf{column5}} & \textbf{\textsf{column6}} \\\hline
This causes an error.

Stefan
LaTeX.org admin
ls440
Posts: 8
Joined: Thu Oct 27, 2022 2:55 pm

Latex unable to generate pdf

Post by ls440 »

Yes In total there were four columns. But I have the problem with first column
ls440
Posts: 8
Joined: Thu Oct 27, 2022 2:55 pm

Latex unable to generate pdf

Post by ls440 »

I am not sure where the problem is
User avatar
MjK
Posts: 89
Joined: Fri Jan 28, 2022 6:09 pm

Latex unable to generate pdf

Post by MjK »

There are several problems with your code. First of all only package graphics is loaded implicitly, but you are using the syntax of package graphicx, so you should load it explicitly. Then you are using an external logo image, which we do not have. So the example is not working. Easiest solution for this issue could be to remove the titlepage environment, because it should be irrelevant for your problem.

However the main problem: You are using an external file output.csv, which we do not have. So we cannot test your example, cannot see the problem and cannot help you. See also my signature for more information on how to make a minimal working example.

BTW: Class article does not know an option 9pt only 10pt (default), 11pt, and 12pt.

PS: If you post your question also to other forums, please always add links to all crossposts.
My main topics are KOMA-Script and other questions related to my packages. If I reply to any other topic or if you've not yet added a minimal working example, please do not expect any further response. And please don't forget to tag examples as code.
ls440
Posts: 8
Joined: Thu Oct 27, 2022 2:55 pm

Latex unable to generate pdf

Post by ls440 »

Hi how can we autofit the characters to a particular column. ? Because i have problems with only one of the first column. Is there a way ?
User avatar
MjK
Posts: 89
Joined: Fri Jan 28, 2022 6:09 pm

Latex unable to generate pdf

Post by MjK »

What do you mean with “autofit the characters to a particular column”? Sorry, currently your question and your problem is completely unclear. And because I'm not willing in discussing how to ask questions over several forums, I'm out here. See my replies and signatures in both forums, I've found your question. And also see Stefan's questions above. Without a better description of your problem, I cannot help you any more.
My main topics are KOMA-Script and other questions related to my packages. If I reply to any other topic or if you've not yet added a minimal working example, please do not expect any further response. And please don't forget to tag examples as code.
ls440
Posts: 8
Joined: Thu Oct 27, 2022 2:55 pm

Latex unable to generate pdf

Post by ls440 »

Stefan Kottwitz wrote:Welcome to the forum!

Can you perhaps post the complete log file as an attachment here?

Stefan
I have attached the log file.
Attachments
logfile.txt
(16.13 KiB) Downloaded 299 times
Post Reply