第一次建立自己的 LaTeX 文档

第一次建立自己的 LaTeX 文档

我对 Latex 并不是很陌生,因为我上学期经常使用它来写报告,但我主要只是使用教授提供的预定义模板,所以我真的不需要学习如何做所有事情。现在我需要建立一个非常简单的文档,希望你们都能帮助我!

它是一张我们在校园里张贴的单张纸,用于宣传我们举办的当月研讨会。我在背景中附上了“水印”图像的副本。我需要做的是在标题下方的页面上划出一个定义区域,我们可以在其中输入某些信息。我还附上了这些“海报”完成后的样子。您会注意到一张是月度海报,另一张是单张海报。理想情况下如果有意义的话,我希望将所有必要的信息放在一个 Latex 文档中,并让其为每个演示者生成“单个”海报!每月海报单曲海报,(由于我的声誉分数,我无法发布水印,但水印是背景+文字“细胞和分子疾病基础研讨会系列”

更新:我已经实施了 Christians 的解决方案(谢谢!)。还有一些后续问题!我如何更改/修改表格环境以遵循相同的边距规则?其次,我尝试按照其他人的乳胶代码示例,在“bottompar”环境下实现您在文档最底部看到的文本。目标是让该文本固定在页面底部,并且只在页面的前半部分(因此它不会覆盖医学院徽标)。我认为这最难的部分是我放入此文档的任何内容都需要最多一页长。最后,我可以定义文本可以填充的纸张区域吗?例如,页面的顶部显然不能有文本,因为它用于标题。页面的底部不能有文本,因为它是一个设计 + 一个徽标。我是否可以定义中间区域只包含文本,以便 \vspace*{\fill} 之类的东西可以工作?

\documentclass[12pt]{article}
\usepackage{xcolor}
\usepackage{background}
\usepackage{geometry}
%\usepackage[T1]{fontenc}
%\usepackage{uarial}
\usepackage{csquotes}
\usepackage{array}
\usepackage{tabularx}

\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\newenvironment{bottompar}{\par\vspace*{\fill}}{\clearpage}

\renewcommand{\familydefault}{\sfdefault}
\backgroundsetup{
scale=1,
angle=0,
opacity=1,  %% adjust
contents={\includegraphics[width=\paperwidth,height=\paperheight]{cmbd_watermark}}
}

\definecolor{redA}{rgb}{0.6, 0.2, 0}
\definecolor{aqua}{rgb}{0.0, 0.48, 0.65}

%My Room Definitions
\newcommand{\lb}{\linebreak}
\newcommand{\dom}{Domenici Auditorium, Room 1220}
\newcommand{\hssb}{HSSB, Room 105}
\newcommand{\fitzthree}{Fitz Hall, Room 309}
\newcommand{\fitztwo}{Fitz Hall, Room 203}
\newcommand{\talkdate}[1]{\huge\textcolor{aqua}{\textbf{\underline{#1}}}}
\newcommand{\talkauthor}[1]{%
 \color{redA}#1%
}
\newcommand{\talktitle}[1]{%
  \Large{\textcolor{redA}{\enquote{\textit{\textbf{#1}}}}}%  
}
\newcommand{\hostedby}[1]{%
  \normalsize{\textcolor{black}Hosted by: #1}%
}

\newcommand{\timeandlocation}[2]{%
  \textcolor{aqua}{\normalsize Time/Location: #1,}
  \textcolor{aqua}{\normalsize #2}
}

\newcommand{\talkdata}[6]{%
  \begingroup
  \renewcommand{\arraystretch}{0.6}
  \huge
  \begin{tabularx}{0.7\linewidth}{@{}C{0.7\linewidth}@{}}
    \talkdate{#1} \tabularnewline
    \talkauthor{#2} \tabularnewline
    \talktitle{#3} \tabularnewline
    \hostedby{#4} \tabularnewline
    \timeandlocation{#5}{#6}
    \tabularnewline
  \end{tabularx}
  \endgroup
}

\begin{document}
\pagestyle{empty}
\setlength{\parindent}{0em}
\newgeometry{top=5.0cm,left=1cm,right=1cm,bottom=1cm}

\begin{center}

  \talkdata{January 27, 2017}{%
    \textbf{Farrah Kheradmand M.D.} \lb
    \large \color{redA} Professor, \lb
    \large \color{redA} Baylor College of Medicine}{Cigarette Smoke and DNA Cleavage Promote Lung Inflammation \& Emphysema}{Dr. Xuexian Yang}{12:00 PM - 1:00 PM}{\hssb}
    \vspace{.75cm}

     \talkdata{February 10, 2017}{%
    \textbf{Dr. Carolyn Coyne} \lb
    \large \color{redA}  Associate Professor, Microbiology and Molecular Genetics \lb
    \large \color{redA} University of Pittsburgh School of Medicine}{Antimicrobial signaling at the maternal-fetal interface}{Tione Buranda}{12:00 PM - 1:00 PM}{\fitztwo}
    \vspace{.75cm}

    \talkdata{February 17, 2017}{%
    \textbf{Dr. Mita Das} \lb
    \large \color{redA}  Professor of Pathology, \lb
    \large \color{redA}Burrell College of Osteopathic Medicine}{Role of Adventitial Cells in the Pathophysiology of Pulmonary Hypertension}{ Tom Resta}{12:00 PM - 1:00 PM}{\dom}
    \vspace{.75cm}


\end{center}
\begin{bottompar}
\scriptsize{The Cellular and Molecular Basis of Disease Seminar Series is sponsored by the UNM HSC \lb
School of Medicine, the Office of Research, the Departments of Pathology, Neurosciences,\lb
Molecular Genetics and Microbiology, Biochemistry and Molecular Biology, Cell Biology and \lb
Physiology, Preadtrics, and the Signature Programs.}
\end{bottompar} 
\end{document}

答案1

这是一个可能的启动器,使用一个\talkdata带有 6 个 (!) 参数的命令,按此顺序包含日期、发言人姓名、标题、主持人、时间和地点。

每个都设置在某个tabularx环境中,因此当然颜色设置可能会存在问题。

根据您的需要更改颜色/间距。

更复杂的方法是使用键值接口,但我现在没有时间了。

\documentclass[12pt]{article}
\usepackage{xcolor}
\usepackage{background}
\usepackage{geometry}
\usepackage{csquotes}
\usepackage{array}


%\usepackage{uarial}
\usepackage{tabularx}

\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}

\renewcommand{\familydefault}{\sfdefault}
\backgroundsetup{%
  scale=0.5,
  angle=0,
  opacity=0.5,  %% adjust
  contents={\includegraphics[width=\paperwidth,height=\paperheight]{ente}}
}

\definecolor{aqua}{rgb}{0.0, 1.0, 1.0}
\definecolor{cerulean}{rgb}{0.0, 0.48, 0.65}
\definecolor{redA}{rgb}{0.6, 0.2, 0}


\newcommand{\talkdate}[1]{\huge\textcolor{cerulean}{\textbf{\underline{#1}}}}

\newcommand{\talkauthor}[1]{%
 \color{redA}#1%
}
\newcommand{\talktitle}[1]{%
  \textcolor{blue}{\enquote{#1}}%  
}

\newcommand{\hostedby}[1]{%
  \large\bfseries Hosted by: #1%
}

\newcommand{\timeandlocation}[2]{%
  \textcolor{aqua}{\large\bfseries Time/Location: #1} \tabularnewline
  \textcolor{aqua}{\large\bfseries #2}
}


\newcommand{\talkdata}[6]{%
  \begingroup
  \renewcommand{\arraystretch}{0.9}
  \huge
  \begin{tabularx}{0.7\linewidth}{@{}C{0.7\linewidth}@{}}
    \talkdate{#1} \tabularnewline
    \talkauthor{#2} \tabularnewline
    \talktitle{#3} \tabularnewline
    \hostedby{#4} \tabularnewline
    \timeandlocation{#5}{#6}
    \tabularnewline
  \end{tabularx}
  \endgroup
}


\begin{document}
\pagestyle{empty}
\setlength{\parindent}{0em}
\begin{center}

  \talkdata{\today}{%
    \textbf{Jiandie D. Lin, PH.D.} \tabularnewline
    Associate Professor \tabularnewline
    Life Sciences}{Some interesting new ideas}{Some person}{15 pm}{Some place}

  \talkdata{Tomorrow}{%
    \textbf{Jiandie D. Lin, PH.D.} \tabularnewline
    Associate Professor \tabularnewline
    Life Sciences}{Some other interesting new ideas}{Some other person}{16 pm}{Right here!}
\end{center}
\end{document}

在此处输入图片描述

相关内容