Tikz 和几何包

Tikz 和几何包

我正在尝试修改这篇文章中的模板带有 Article Class 和 Tikz 的灰色侧边栏 但我对标题和蓝色区域有疑问。我无法进行相应的修改以使其更短或将标题左对齐或右对齐,而不能同时修改介绍段落和文本,如图所示:

在此处输入图片描述

因此,每次我通过更改顶部距离来修改代码时,都会很乱。我附上了上一篇文章中稍作修改的代码:

\documentclass[a4paper]{article}
\setcounter{secnumdepth}{0}
\usepackage[utf8]{inputenc}
\usepackage[math,light,condensed]{iwona}
\usepackage{xcolor}


 \title{\textcolor{white}{\textsc{\Huge{Report XXXXXX: XXXXXXXXXXxXXX}}}}
 \author{\textcolor{white}{\Large{Adrian Carter}}}
 \date{\textcolor{white}{\today}}
 \usepackage{titlesec}
 \usepackage{ulem}
 \usepackage{mdframed}
 \definecolor{myblue}{RGB}{13, 54, 145}
 \usepackage{tikz}
 \usetikzlibrary{calc}
 \usepackage{lipsum}
 \def\particulartemplate#1{
\thispagestyle{titlepage}
 \begin{tikzpicture}[overlay, remember picture]
\draw let \p1 = (current page.west), \p2 = (current page.east) in
  node[minimum width=\x2-\x1, minimum height=1in, draw, rectangle, fill=myblue, anchor=north west, align=left, text width=\x2-\x1] at ($(current page.north west)$) {\Large\bfseries \quad #1};
\end{tikzpicture}
}

\titleformat{\section}
 {\normalfont\Large\bfseries}{\thesection}{1em}{}[{\color{myblue}\titlerule[0.6pt]}]

 %%%%%%%%%%%%%%%% PAGE 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \usepackage{lastpage, fancyhdr, graphicx}
 \pagestyle{titlepage} %myheadings
 \pagestyle{fancy}
 \fancyhf{}
 \lhead{\date{February 8, 2017}}
 \usepackage[top=1.25in, left=.7in, footskip=1.10in]{geometry}

\fancypagestyle{contents} %%%%%%% PAGE 2 (CONTENTS) %%%%%%%%%%%
{
\newgeometry{top=1in, left=0.75in, right=1in, footskip=1.25in}
\renewcommand{\headrulewidth}{0pt}
\lhead{\date{February 1, 2017}}
\fancyhf{}
\rfoot{\thepage}
\fancyheadoffset[L]{0in}
\fancyfootoffset[L]{0in}
\lfoot{\copyright\ Adrian Carter}
\lhead{\date{04 August, 2017}}
\rhead{Germany}
 }
 %%%%%%%%%%%%%%%% PAGE 3 AND NEXT %%%%%%%%%%%%%%%%%
 \renewcommand{\headrulewidth}{0pt}
 \rfoot{\thepage}
 \fancyheadoffset[L]{1.75in}
 \fancyfootoffset[L]{1.75in}
 \lfoot{\copyright\ Adrian Carter}
\rhead{Germany}

\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
\let\endchangemargin=\endlist 

 \begin{document}

 \particulartemplate{\maketitle}
 \section{Introduction}

  \begin{minipage}[t]{4.5in} % Mini page taking up 30% of the actual page
   \subsubsection*{US economy will gain strength as 2013 progresses}
   The turbulent political environment that curtailed corporate risk-taking 
    in 2012 will end. Full fiscal cliff will be averted but taxes will rise   
   \newline
    \subsubsection*{Corporate fundamentals support continued profit cycle        expansion}
      We forecast S\&P 500 revenues rise by more than 4\% in 2013 and 2014,   margins hover at current levels (8.8\%-9.0\%), earnings climb by more than 6\% and the P/E multiple expands modestly from 13.2x to 13.8x at end 2013. 
     \newline
    \subsubsection*{Valuation: 12-month target of 1575 reflects 12\% potential   return}
     Our 3-month, 6-month, and 12-month forecasts are 1450, 1500, and 1575. We  use six valuation approaches including DDM, uncertainty-based P/E multiple,  cyclically-adjusted P/E multiple, price/book and ROE relationship. 
  \newline
  \subsubsection*{Strategies to capture growth: market, sectors, stocks}
   (1) Stocks will outperform Treasuries; (2) Equities will beat credit   returns, although not on a risk-adjusted basis; (3) Cyclical sectors will beat defensive sectors (Materials, Industrials, Information Technology will outperform Consumer Staples, Telecom, and Health Care); (4) Double Sharpe Ratio stocks offer both high risk-adjusted earnings growth and prospective returns (Bloomberg ticker: <GSTHEPSR>); and (6) Stocks with high BRICs sales exposure will beat domestic-facing firms (GSTHBRIC).
   \end{minipage} \hspace*{.25in}
     \begin{minipage}[t]{2.5in}
     \begin{mdframed}[style=sidebar,frametitle={ABDCDEF}] % Sidebar box
     sdfadfasdfasdfadsfasdfads
     \end{mdframed}
    \sidetemplate{\textcolor{blue}{Add notes; \copyright\ \ Adrian Carter, in a different color, light blue for instance}}  
    \end{minipage}
    \newpage
    \thispagestyle{contents}

     \tableofcontents

     %%%%%%%%%%%%%%%%%%%%%%%% FIRST SECTION %%%%%%%%%%%%%%%%%%%%%%
     \newgeometry{top=1in,left=2.5in,right=1in,footskip=0.75in}
     \newpage

    \begin{changemargin}{-1.75in}{0in}
    \section{First section}
    \end{changemargin}

    \subsection{Sub}


     This is the first section.

     Lorem  ipsum  dolor  sit  amet,  consectetuer  adipiscing  elit.   Etiam    lobortisfacilisis sem.  Nullam nec mi et  neque pharetra sollicitudin.  Praesent imperdietmi nec ante.  Donec ullamcorper, felis non sodales...

     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis    facilisissem.  Nullam nec mi et neque pharetra  sollicitudin.  Praesent imperdiet mi necante...

       \newpage
        %%%%%%%%%%%%%%%%%%%%%%%% SECOND SECTION %%%%%%%%%%%%%%%%%%%%%%
       \begin{changemargin}{-1.75in}{0in}
       \section{Second section}
       \end{changemargin}

       \subsection{Strategies}  Lorem ipsum dolor sit amet, consectetuer   adipiscing elit. Etiam lobortis facilisissem.  Nullam nec mi et neque pharetra 
   sollicitudin. Praesent imperdiet mi necante...

     \end{document}

提前感谢您的支持!

相关内容