Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/RMarkdown/rticles/pnas_article/widetext.sty
Views: 1170
\NeedsTeXFormat{LaTeX2e}1\ProvidesPackage{widetext}23%% Mimics the widetext environment of revtex4 for any other class package4%% Eg: article.cls5%%6%% Compiled by: Anjishnu Sarkar7%%8%% Advantages:9%% *) Supports float (eg: figure) in two column format (Advantage over10%% multicol package)11%% *) One and twocolumn exist on the same page12%% *) Flow of text shown via rule13%% *) Equal height of text when in two column format14%%15%% Acknowledgment(s):16%% 1. Instead of re-inventing the wheel, two packages (flushend, cuted) of17%% the sttools bundle are used. The sttools bundle is available from CTAN.18%% Lisence of these packages rests with their corresponding author.19%% Any bug/problem with flushend and cuted should be forwarded to their20%% corresponding package authors.21%% 2. The idea of the rule came from the following latex community website22%% http://www.latex-community.org/forum/viewtopic.php?f=5&t=277023%%24%% This package just defines the widetext environment and the rules.25%%26%% Usage:27%% \documentclass[a4paper,12pt,twocolumn]{article}28%% \usepackage{widetext}29%%30%% \begin{document}31%%32%% Some text in twocolumn33%%34%% \begin{widetext}35%% Text in onecolumn format.36%% \end{widetext}37%%38%% Some more text in twocolumn39%%40%% \end{document}41%%%%%%%%%%%%%%%%%%%%4243%% Package required for equal height while in 2 columns format44\IfFileExists{flushend.sty}45{\RequirePackage{flushend}}46{\typeout{}47\typeout{Package widetext error: Install the flushend package which is48a part of sttools bundle. Available from CTAN.}49\typeout{}50\stop51}5253%% Package required for onecolumn and twocolumn to exist on the same page.54%% and also required for widetext environment.55\IfFileExists{cuted.sty}56{\RequirePackage{cuted}}57{\typeout{}58\typeout{Package widetext error: Install the cuted package which is59a part of sttools bundle. Available from CTAN.}60\typeout{}61\stop62}636465\newlength\@parindent66\setlength\@parindent{\parindent}6768\if@twocolumn69\newenvironment{widetext}70{%71\begin{strip}72\rule{\dimexpr(0.5\textwidth-0.5\columnsep-0.4pt)}{0.4pt}%73\rule{0.4pt}{6pt}74\par %\vspace{6pt}75\parindent \@parindent76}%77{%78\par79\hfill\rule[-6pt]{0.4pt}{6.4pt}%80\rule{\dimexpr(0.5\textwidth-0.5\columnsep-1pt)}{0.4pt}81\end{strip}82}83\else84\newenvironment{widetext}{}{}85\fi8687