
아래 이미지와 같이 일부 텍스트 옆에 테이블을 가져오기 위해 미니페이지를 사용하려고 합니다. 나는 그 주제에 대해 읽었지만 그것을 하나로 묶을 수 없는 것 같습니다. 도움을 주시면 감사하겠습니다. 나는 이것에 대해 매우 새로운 것이므로 누군가 내가 뭘 잘못하고 있는지 말해 줄 수 있다면 좋을 것입니다.
다음과 같은 오류가 발생합니다.
line 22: Not in outer par mode. \begin{table}[h]
line 22: Undefined control sequence \begin{table}[h]
line 22: Missing number, treated as zero \begin{table}[h]
line 3: Overfull \hbox (2.60513pt too wide) in paragraph
line 23: Overfull \hbox (117.52068pt too wide) in paragraph
line 21: Overfull \hbox (20.2359pt too wide) in paragraph
일부 줄의 끝에 %를 추가하면 \hbox를 수정할 수 있다는 것을 알고 있지만(어쩌면?) 어떤 줄이 적절한지 잘 모르겠습니다.
다음은 제가 만들고 있는 두 파일의 코드입니다.
test_title.tex
\documentclass[pdftex,12pt,letterpaper]{report}
\usepackage[pdftex]{graphicx}
\newcommand{\labno}{3}
\newcommand{\labtitle}{Fuerzas Hidrostaticas}
\newcommand{\authorname}{Author 1 \\ Author 2 \\ Author 3 \\ Author 4}
\newcommand{\instructor}{Instructor}
\newcommand{\classno}{Laboratorio INGE4010}
\begin{document}
\input{./title.tex}
\end{document}
제목.tex
\begin{titlepage}
\noindent
\includegraphics[width=0.15\textwidth]{UPRMlogo}%
\begin{minipage}[b]{0.7\textwidth}
\centering
Universidad de Puerto Rico \\
Recinto de Mayaguez\\
Departamento de Ingenieria Mecanica
\end{minipage} %
\includegraphics[width=0.15\textwidth]{UPRMlogo}
\vspace*{\stretch{7}}
\begin{center}
\textsc{Laboratorio \#\labno \ \labtitle}
\end{center}
\vspace{\stretch{6}}
\vfill
\begin{minipage}{.2\textwidth} %
\begin{table}[h]
\begin{tabular}{|l|r|}
\hline
\textbf{Partes del Informe} & \multicolumn{1}{c|}{\textbf{Calificación}} \\ \hline
Introducción & /10 \\ \hline
Datos y Cálculos & /20 \\ \hline
Análisis de Resultados & /45 \\ \hline
Conclusiones & /20 \\ \hline
Referencia y Apéndice & /5 \\ \hline
Total & /100 \\ \hline
\end{tabular}
\end{table}
\end{minipage} %
\begin{minipage}{\textwidth} %
\begin{flushright}
\textsc{\authorname \\ \classno \\ \instructor \\ \today}
\end{flushright}
\end{minipage} %
\end{titlepage}
답변1
환경 tabular
이 table
.
다음은 제목 페이지의 단순화된 버전입니다.
\documentclass[12pt,letterpaper]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usepackage[demo]{graphicx}
\newcommand{\labno}{3}
\newcommand{\labtitle}{Fuerzas Hidrostaticas}
\newcommand{\authorname}{Author 1 \\ Author 2 \\ Author 3 \\ Author 4}
\newcommand{\instructor}{Instructor}
\newcommand{\classno}{Laboratorio INGE4010}
\begin{document}
\begin{titlepage}
\centering
\includegraphics[width=0.15\textwidth]{UPRMlogo}%
\begin{minipage}[b]{0.7\textwidth}
\centering
Universidad de Puerto Rico \\
Recinto de Mayaguez\\
Departamento de Ingenieria Mecanica
\end{minipage}%
\includegraphics[width=0.15\textwidth]{UPRMlogo}
\vspace*{\stretch{7}}
\textsc{Laboratorio \#\labno \ \labtitle}
\vspace{\stretch{6}}
\vfill
\begin{tabular}{@{}|l|r|@{}}
\hline
\textbf{Partes del Informe} & \multicolumn{1}{c|}{\textbf{Calificación}} \\ \hline
Introducción & /10 \\ \hline
Datos y Cálculos & /20 \\ \hline
Análisis de Resultados & /45 \\ \hline
Conclusiones & /20 \\ \hline
Referencia y Apéndice & /5 \\ \hline
Total & /100 \\ \hline
\end{tabular}%
\hfill
{\scshape
\begin{tabular}{@{}c@{}}
\authorname \\ \classno \\ \instructor \\ \today
\end{tabular}}
\end{titlepage}
\end{document}
pdftex
옵션을 클래스나 패키지에 전달하면 안 됩니다 graphicx
. demo
로고가 없어서 사용했어요 , 없애주세요.
답변2
나는 당신의 표 형식의 모양과 간격을 사용 booktabs
하고 개선할 것을 제안합니다. cellspace
뜨지 않으므로 테이블 환경에 놓지 마십시오.
\documentclass[pdftex,12pt,letterpaper]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[pdftex]{graphicx}
\usepackage{booktabs}
\usepackage{cellspace}
\setlength\cellspacetoplimit{3pt}
\setlength\cellspacebottomlimit{3pt}
\newcommand{\labno}{3}
\newcommand{\labtitle}{Fuerzas Hidrostaticas}
\newcommand{\authorname}{Author 1 \\ Author 2 \\ Author 3 \\ Author 4}
\newcommand{\instructor}{Instructor}
\newcommand{\classno}{Laboratorio INGE4010}
\begin{document}
\begin{titlepage}
\noindent
\includegraphics[width=0.15\textwidth]{uprm_logo.jpg}%
\begin{minipage}[b]{0.7\textwidth}
\centering
Universidad de Puerto Rico \\
Recinto de Mayaguez\\
Departamento de Ingenieria Mecanica
\end{minipage} %
\includegraphics[width=0.15\textwidth]{logo_upr.png}
\vspace*{\stretch{7}}
\begin{center}
\textsc{Laboratorio \#\labno \ \labtitle}
\end{center}
\vspace{\stretch{6}}
\vfill
\noindent
\begin{minipage}{.2\textwidth}%
\begin{tabular}{@{}Slr@{}}
\toprule
\textbf{Partes del Informe} & \textbf{Calificación} \\
\midrule
Introducción & /10 \\
Datos y Cálculos & /20 \\
Análisis de Resultados & /45 \\
Conclusiones & /20 \\
Referencia y Apéndice & /5 \\
Total & /100 \\
\bottomrule
\end{tabular}
\end{minipage} %
\hfill
\begin{minipage}{0.7\textwidth} %
\begin{flushright}
\textsc{\authorname \\[1ex] \classno \\[1ex] \instructor \\[1ex] \today}
\end{flushright}
\end{minipage}
%
\end{titlepage}
\end{document}