从 \paracol 段落全局删除缩进

从 \paracol 段落全局删除缩进

我使用 \paracol 来对齐跨页面的列。但是,在右侧,每个段落开始之前总会有一些缩进。请帮我避免这种情况?以下是我的代码:

{\documentclass[11pt]{article} 
%\usepackage[usenames, dvipsnames]{color}
\usepackage[dvipsnames]{xcolor}
\usepackage{color}
\usepackage[hidelinks]{hyperref}
%\usepackage{layout}
\usepackage[T1]{fontenc}
\usepackage{titling}
\usepackage{blindtext,graphicx}
\usepackage[absolute]{textpos}
\usepackage{sectsty}
\usepackage{amsmath}
\usepackage{linegoal}
\usepackage[osf]{mathpazo}
\usepackage[scaled]{helvet}
\sectionfont{\fontsize{10}{18}\selectfont}
\usepackage[latin9]{inputenc}
\usepackage{titlesec}
%\usepackage{graphicx}
\usepackage{paracol}
%\usepackage{etoolbox}
%\AtBeginEnvironment{paracol}{\setlength{\parindent}{0pt}}
\usepackage{mdframed}
\usepackage{lipsum}
\usepackage{environ}
\usepackage{varwidth}
\usepackage{multicol}
\usepackage{boxedminipage}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{color}
%\pagenumbering{gobble}
%\usepackage{layout}
\usepackage[T1]{fontenc}
\usepackage{sectsty}
\usepackage{amsmath}
\usepackage{linegoal}
\usepackage[english]{babel}
\usepackage[autostyle]{csquotes}
%\usepackage[framemethod=tikz]{mdframed}
\usepackage{tikz}
%\usepackage{lipsum, showframe}
%\usepackage{showframe}
%\usepackage[usenames, dvipsnames]{color}

%\definecolor{Brown}{rgb}{0.3,0.3,0.9}

%\usepackage[usenames, dvipsnames]{color}

%\definecolor{Brown}{rgb}{0.3,0.3,0.9}
\usepackage[usestackEOL]{stackengine}
%\usepackage[margin=1in, paperwidth=8.5in, paperheight=11in]{geometry}
\usepackage{amsfonts}


\def\labelaxes{Remember to include your label}
 \usepackage[top=1.5cm, bottom=1.3cm, left=1cm, right=1.5cm]{geometry}



 \begin{document}

 \columnratio{.3}
 \begin{paracol}{2}
 \begin{leftcolumn}
 \begin{mdframed}[userdefinedwidth=3cm, linecolor=red]

 \raggedleft\textit{(15)\break
                    In preparation\break
                     \vspace{2pt}\break
                      (14)\break
                      In preparation\break
                      \vspace{0pt}\break
                      (13)\break
                      In preparation\break  
                     \vspace{12pt}\break
                      (12)\break
                      In preparation\break
                    \vspace{13pt}\break                         
                      (11)\break
                    In preparation\break
                    \vspace{13pt}\break  
                      (10)\break
                      In preparation\break
                      \vspace{2pt}\break  
                      (9)\break
                      In preparation\break
                    \vspace{-.5pt}\break                            
                      (8)\break
                      In preparation\break
                      \vspace{13pt}\break     
                      (7)\break
                      In preparation\break 
                       \vspace{28pt}\break     
                      (6)\break
                      In preparation\break 
                      \vspace{25pt}\break     
                      (5)\break
                      In preparation\break 
                      \vspace{30pt}\break     
                      (4)\break
                      In preparation\break 
                      \vspace{12pt}\break     
                      (3)\break
                      In preparation\break   
                       (2)\break
                    In preparation\break
                     \vspace{27pt}\break
                      (1)\break
                      In preparation\break }

  \end{mdframed}

  \end{leftcolumn}
 \begin{rightcolumn}
 \begin{mdframed}[userdefinedwidth=10cm, linecolor=red]

  \lipsum{1}


 \end{mdframed}

 \end{rightcolumn}
 \end{paracol}    

 \end{document}         

答案1

这是一个解决方案。myparacol定义并使用一个新环境,并将其内部parindent设置为 0。

\newenvironment{myparacol}[2][]{%
\begin{paracol}{#2}[#1]\setlength{\parindent}{0pt}}{%
\end{paracol}}

要使用的\begin{myparacol}{2}...\end{myparacol}

平均能量损失

\documentclass[11pt]{article} 
\usepackage{paracol}
\usepackage{mdframed}
\usepackage{lipsum}
\usepackage{tikz}

\def\labelaxes{Remember to include your label}
 \usepackage[top=1.5cm, bottom=1.3cm, left=1cm, right=1.5cm]{geometry}

\newenvironment{myparacol}[2][]{%
\begin{paracol}{#2}[#1]\setlength{\parindent}{0pt}}{%
\end{paracol}}

 \begin{document}

 \columnratio{.3}
 \begin{myparacol}{2}
 \begin{leftcolumn}
 \begin{mdframed}[userdefinedwidth=3cm, linecolor=red]

 \raggedleft\textit{(15)\break
                    In preparation\break
                     \vspace{2pt}\break
                      (14)\break
                      In preparation\break
                      \vspace{0pt}\break
                      (13)\break
                      In preparation\break  
                     \vspace{12pt}\break
                      (12)\break
                      In preparation\break
                    \vspace{13pt}\break                         
                      (11)\break
                    In preparation\break
                    \vspace{13pt}\break  
                      (10)\break
                      In preparation\break
                      \vspace{2pt}\break  
                      (9)\break
                      In preparation\break
                    \vspace{-.5pt}\break                            
                      (8)\break
                      In preparation\break
                      \vspace{13pt}\break     
                      (7)\break
                      In preparation\break 
                       \vspace{28pt}\break     
                      (6)\break
                      In preparation\break 
                      \vspace{25pt}\break     
                      (5)\break
                      In preparation\break 
                      \vspace{30pt}\break     
                      (4)\break
                      In preparation\break 
                      \vspace{12pt}\break     
                      (3)\break
                      In preparation\break   
                       (2)\break
                    In preparation\break
                     \vspace{27pt}\break
                      (1)\break
                      In preparation\break }

  \end{mdframed}

  \end{leftcolumn}
 \begin{rightcolumn}
 \begin{mdframed}[userdefinedwidth=10cm, linecolor=red]

  \lipsum{1}


 \end{mdframed}

 \end{rightcolumn}
 \end{myparacol}    

 \end{document}

答案2

或者通过使用etoolbox包:

\documentclass[11pt]{article}
    \usepackage{paracol}
    \usepackage{mdframed}
    \usepackage{lipsum}
    \usepackage{tikz}    
\def\labelaxes{Remember to include your label}    
    \usepackage[top=1.5cm, bottom=1.3cm, left=1cm, right=1.5cm]{geometry}

    \usepackage{etoolbox}% <--- added
\AtBeginEnvironment{paracol}{\setlength{\parindent}{0pt}}<--- added

\begin{document}
\columnratio{.3}
    \begin{paracol}{2}
.... 
    \end{paracol}
\end{document} 

相关内容