1

I want to connect the blue parallel lines with two blue vertical lines. Is there are easy way out of this? Thanksenter image description here

\documentclass[oneside]{article}
\setlength{\oddsidemargin}{0.25 in}
\setlength{\evensidemargin}{-0.25 in}
\setlength{\topmargin}{-0.6 in}
\setlength{\textwidth}{6.5 in}
\setlength{\textheight}{8.5 in}
\setlength{\headsep}{0.75 in}
\setlength{\parindent}{0 in}
\setlength{\parskip}{0.1 in}

\usepackage{amsmath}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usepackage{titlesec}
\usepackage{enumitem}

\newcommand\titlebar{%
\tikz[baseline,trim left=3.1cm,trim right=3cm] {
     \draw [thick,blue] (2.5cm,3ex)--(\textwidth+3.1cm,3ex);
    %\fill [cyan!25] (2.5cm,-1ex) rectangle (\textwidth+3.1cm,2.5ex);
    \node [draw=blue,thick,
         %fill=cyan!20!white,
                shade, shading=axis, left color=blue!50!white, right color=green,
    shading angle=45, 
    anchor=base east,
    rectangle,minimum width=2.5cm,
    minimum height=4.5ex] at (3cm,0) {\color{white}{}
    \textbf{R.\thesection}%\textbf{\arabic{chapnum}.\thesection}
    };
  }%
}

 \titleformat{\section}{\bf \LARGE}{\titlebar}{0.1cm}{\color{blue}}

 \renewcommand*{\thesection}{\arabic{section}}

 \begin{document}

 \section{Graphs and Equations    }
 \begin{enumerate}
 \item[\color{Aquamarine}{$\bullet$}] Graph equations
 \item[\color{Aquamarine}{$\bullet$}] Use graphs as mathematical models to 
 make predictions.
 \item[\color{Aquamarine}{$\bullet$}] Carry out calculations involving 
 compound interest.
\end{enumerate}

\tikz[trim left=3.1cm,trim right=3cm] {
       \draw [thick,blue] (3cm,3ex)--(\textwidth+3.1cm,3ex);
         }

 \color{red}{{\bf \Large What is Calculus?}}        

 \end{document}
0

You can certainly do this but are you sure you want this?

\documentclass[oneside]{article}
\setlength{\oddsidemargin}{0.25 in}
\setlength{\evensidemargin}{-0.25 in}
\setlength{\topmargin}{-0.6 in}
\setlength{\textwidth}{6.5 in}
\setlength{\textheight}{8.5 in}
\setlength{\headsep}{0.75 in}
\setlength{\parindent}{0 in}
\setlength{\parskip}{0.1 in}

\usepackage{amsmath}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usepackage{titlesec}
\usepackage{enumitem}

\newcommand\titlebar{%
\tikz[baseline,trim left=3.1cm,trim right=3cm,remember picture] {
     \draw [thick,blue] (2.5cm,3ex)
     coordinate (TB\thesection-tl)--(\textwidth+3.1cm,3ex)
     coordinate (TB\thesection-tr);
    %\fill [cyan!25] (2.5cm,-1ex) rectangle (\textwidth+3.1cm,2.5ex);
    \node [draw=blue,thick,
         %fill=cyan!20!white,
                shade, shading=axis, left color=blue!50!white, right color=green,
    shading angle=45, 
    anchor=base east,
    rectangle,minimum width=2.5cm,
    minimum height=4.5ex] at (3cm,0) {\color{white}{}
    \textbf{R.\thesection}%\textbf{\arabic{chapnum}.\thesection}
    };
  }%
}

 \titleformat{\section}{\bf \LARGE}{\titlebar}{0.1cm}{\color{blue}}

 \renewcommand*{\thesection}{\arabic{section}}

 \begin{document}

 \section{Graphs and Equations    }
 \begin{enumerate}
 \item[\color{Aquamarine}{$\bullet$}] Graph equations
 \item[\color{Aquamarine}{$\bullet$}] Use graphs as mathematical models to 
 make predictions.
 \item[\color{Aquamarine}{$\bullet$}] Carry out calculations involving 
 compound interest.
\end{enumerate}

\tikz[trim left=3.1cm,trim right=3cm,remember picture] {
       \draw [thick,blue] (3cm,3ex) coordinate (auxL)
       --(\textwidth+3.1cm,3ex) coordinate (auxR);
         }
\tikz[overlay,remember picture]{
\draw[thick,blue] (TB\thesection-tl -| auxL) -- (auxL);
\draw[thick,blue] (TB\thesection-tr) -- (auxR);
}
\textcolor{red}{\Large\textbf{ What is Calculus?}}        

\end{document}

Or did I connect the wrong lines?

enter image description here

|improve this answer|||||
  • yes this is exactly what I was looking for. You use the coordinate command in tikz and thought maybe the tikzmarknode might help. Thanks for this solution – MathScholar Oct 1 '18 at 13:14
  • @MathScholar You already define the coordinates via tikz, so there is no need for tikzmarknode. – user121799 Oct 1 '18 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.