-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Latex tables verbatim #226
Comments
Please do not ignore the Github issue guide when you file issues. |
@yihui I ave used issue guide, could you have a look? |
You didn't format your issue correctly. Please use fenced code blocks to write verbatim content: https://yihui.name/issue/#please-format-your-issue-correctly |
@yihui I want to avoid verbatim, I look for latex output. But it puts verbatim code. I don’t know why. Any idea? |
I said "You didn't format your issue correctly." I mean your Github issue. I'm not ready to help you until you format it correctly. With the current format, I cannot simply copy and run your example. Please do read the issue guide. If there is anything unclear in the issue guide, please let me know. |
@yihui Now It could be correct. Sorry. |
Sorry, but this is a question instead of a bug, so please follow the issue guide above:
The answer would be |
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
ASA_Journal.pdf
Hi,
I am using ASA template and putin insice a
compareGroups
generated table like this:In the latex outpus it puts verbatim{} araund latex code. I can no figure aout why.
`% !TeX program = pdfLaTeX
\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{graphicx,psfrag,epsf}
\usepackage{enumerate}
\usepackage{natbib}
\usepackage{textcomp}
\usepackage[hyphens]{url} % not crucial - just used below for the URL
\usepackage{hyperref}
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
%\pdfminorversion=4
% NOTE: To produce blinded version, replace "0" with "1" below.
\newcommand{\blind}{0}
% DON'T change margins - should be 1 inch all around.
\addtolength{\oddsidemargin}{-.5in}%
\addtolength{\evensidemargin}{-.5in}%
\addtolength{\textwidth}{1in}%
\addtolength{\textheight}{1.3in}%
\addtolength{\topmargin}{-.8in}%
%% load any required packages here
\begin{document}
\def\spacingset#1{\renewcommand{\baselinestretch}%
{#1}\small\normalsize} \spacingset{1}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\if0\blind
{
\title{\bf Title here}
\author{
Author 1 \thanks{The authors gratefully acknowledge \ldots{}} \
Department of YYY, University of XXX\
and \ Author 2 \
Department of ZZZ, University of WWW\
}
\maketitle
} \fi
\if1\blind
{
\bigskip
\bigskip
\bigskip
\begin{center}
{\LARGE\bf Title here}
\end{center}
\medskip
} \fi
\bigskip
\begin{abstract}
The text of your abstract. 200 or fewer words.
\end{abstract}
\noindent%
{\it Keywords:} 3 to 6 keywords, that do not appear in the title
\vfill
\newpage
\spacingset{1.45} % DON'T change the spacing!
\hypertarget{introduction}{%
\section{Introduction}\label{introduction}}
This template demonstrates some of the basic latex you'll need to know
to create a ASA article.
\section{Verifications}
\label{sec:verify}
This section will be just long enough to illustrate what a full page of
text looks like, for margins and spacing.
\citet{Campbell02} \citeauthor{Schubert13}
\citetext{\citeyear{Schubert13}; \citealp{Chi81}}
The quick brown fox jumped over the lazy dog. The quick brown fox jumped
over the lazy dog. The quick brown fox jumped over the lazy dog. The
quick brown fox jumped over the lazy dog. \textbf{With this spacing we
have 30 lines per page.}
\begin{verbatim}
\begin{longtable}{lcccc}\caption{Summary descriptives table by groups of `Intervention group'}\
\hline
& Control & MedDiet + Nuts & MedDiet + VOO & \multirow{2}{*}{p.overall}\
\end{verbatim}
& N=2042 & N=2100 & N=2182 & \textbackslash{}
\begin{verbatim}
\hline
\hline
\endfirsthead
\multicolumn{5}{l}{\tablename\ \thetable{} \textit{-- continued from previous page}}\
\hline
& Control & MedDiet + Nuts & MedDiet + VOO & \multirow{2}{*}{p.overall}\
\end{verbatim}
& N=2042 & N=2100 & N=2182 & \textbackslash{}
\begin{verbatim}
\hline
\hline
\endhead
\hline
\multicolumn{5}{l}{\textit{continued on next page}} \
\endfoot
\multicolumn{5}{l}{} \
\endlastfoot
Age & 67.3 (6.28) & 66.7 (6.02) & 67.0 (6.21) & 0.003 \
\end{verbatim}
Sex: & & & & $\textless{}$0.001 \textbackslash{} (\qquad)Male &
812 (39.8%) & 968 (46.1%) & 899 (41.2%) & \textbackslash{}
(\qquad)Female & 1230 (60.2%) & 1132 (53.9%) & 1283 (58.8%) &
\textbackslash{} Smoking: & & & & 0.444 \textbackslash{}
(\qquad)Never & 1282 (62.8%) & 1259 (60.0%) & 1351 (61.9%) &
\textbackslash{} (\qquad)Current & 270 (13.2%) & 296 (14.1%) &
292 (13.4%) & \textbackslash{} (\qquad)Former & 490 (24.0%) & 545
(26.0%) & 539 (24.7%) & \textbackslash{} Waist circumference & 101
(10.8) & 100 (10.6) & 100 (10.4) & 0.045 \textbackslash{}
Hormone-replacement therapy: & & & & 0.850 \textbackslash{}
(\qquad)No & 1811 (98.3%) & 1835 (98.4%) & 1918 (98.2%) &
\textbackslash{} (\qquad)Yes & 31 (1.68%) & 30 (1.61%) & 36
(1.84%) & \textbackslash{}
\begin{verbatim}
\hline
\end{longtable}
\end{verbatim}
\bibliographystyle{agsm}
\bibliography{bibliography.bib}
\end{document}
`
By filing an issue to this repo, I promise that
xfun::session_info('rticles')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('rstudio/rticles')
.I understand that my issue may be closed if I don't fulfill my promises
The text was updated successfully, but these errors were encountered: