1

enter image description hereI am writing a bilingual pdf with texlive+vscode/xe->bib->xe->xe, and I wanted to insert two identical images in the parallel columns, which was achieved by the following codes, but unfortunately, their positions alway drift to the right side. I have tried \centering \raggedleft \flushleft but failed. Can anyone show me how to modify the codes?enter image description here

//recipes
      "latex-workshop.latex.recipes": [
        {
          "name": "xelatex",
          "tools": [
            "xelatex"
          ],


//tex
% paper layout
\documentclass[a4paper, 12pt]{article}
% margin
\usepackage[margin=2.54cm]{geometry}
% font
\usepackage{fontspec}
% graphicx
\usepackage{graphicx}
% line spacing
\usepackage{setspace}
% parallel text
\usepackage{parallel}
% Times New Roman
\setmainfont{Times New Roman}

\begin{document}
  \begin{Parallel}{75mm}{75mm}
    \singlespacing
    \Large\section{April 2017}
    \ParallelLText
    {
        \includegraphics[width=0.70\columnwidth]{E:/1.jpg}
    }
    \ParallelRText
    {
        \includegraphics[width=0.70\columnwidth]{E:/1.jpg}
    }
    \ParallelPar
  \end{Parallel}
\end{document}
4
  • 1
    Please create a minimal working example. But that matter aside, I would start by changing \textwidth to \columnwidth. – A.Ellett Jul 18 '20 at 14:16
  • Thank you for your advice, I put everything here now, and I tried '\columnwidth', not working – Yagues Cheung Jul 18 '20 at 15:03
  • Hi and welcome. Modify the code by providing sample images as indicated in the answers to this question: Example images in LaTeX? – AndréC Jul 18 '20 at 20:16
  • thank you too, the picture was provided – Yagues Cheung Jul 18 '20 at 20:44
2

There are extra blanks at both ends of the original picture, just clip it and delete the blanks, then scale by a suitable factor should resolve your issue. I have edited the picture and deleted the blanks as follows.

enter image description here

You may want to take a look at the paracol package. Once loaded, you can execute commands such as

\documentclass[UTF8, a4paper, 11pt]{article}

\usepackage{ctex}
\usepackage[margin=15mm]{geometry}
\usepackage{paracol}
\usepackage{graphicx}

\begin{document}

\begin{paracol}{2}[\section{Introduction}]
  The world's population is likely to peak at 9.7 billion in 2064, and then decline to about 8.8 billion by the end of the century, as women get better access to education and contraception, a new study has found.
    
  \switchcolumn
    一项新研究发现,随着女性有更多机会接受教育和采取避孕措施,世界人口可能会在 2064 年达到 97 亿的峰值,然后会在本世纪末降到约 88 亿。
    
  \switchcolumn*
    By 2100, 183 of 195 countries will not have fertility rates required to maintain the current population, with a projected 2.1 births per woman, researchers from the Institute for Health Metrics and Evaluation at the University of Washington's School of Medicine said.
    
  \switchcolumn
    华盛顿大学医学院健康指标与评估研究所的研究人员称,到 2100 年,195 个国家中有 183 个国家的生育率将不足以维持现有人口,预计平均每位女性生育 2.1 个孩子。
    
  \switchcolumn*
  \begin{center}
    \includegraphics[scale=0.5]{example-image-a}
  \end{center}

  \switchcolumn
  \begin{center}
    \includegraphics[scale=0.5]{example-image-b}
  \end{center}
\end{paracol}
\end{document}

enter image description here

1

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.