定心Xcircuit 图

定心Xcircuit 图

嗨,我正在使用一个名为 xcircuit 的程序来制作电路图,但似乎无法使图形居中。我试过\begin{center}\centering。我试过弄乱它\flushleft,但它需要左对齐才能使单词在图中对齐(参见附图)当我使用这些命令时,\includegraphics.我知道这不是边界框问题。感谢您的帮助,这是代码:

\documentclass[]{article}
\usepackage{graphicx,epstopdf}
\usepackage{epsfig}
\usepackage{float}
\begin{document}
\begin{figure}[H]
\centering
 \input{hvdc}
 \caption{CIGR\'E Idealized Rectifier Station}
 \label{fig:hvdc}
\end{figure}

\begin{figure}[H]
\begin{center}
 \input{hvdc}
 \end{center}
 \caption{CIGR\'E Idealized Rectifier Station}
 \label{fig:hvdc}
\end{figure}
\end{document}

以下是 Xcircuit 为 hvdc.tex 生成的代码

\def\putbox#1#2#3{\makebox[0in][l]{\makebox[#1][l]{}\raisebox{\baselineskip}[0in][0in]{\raisebox{#2}[0in][0in]{#3}}}}
\def\rightbox#1{\makebox[0in][r]{#1}}
\def\centbox#1{\makebox[0in]{#1}}
\def\topbox#1{\raisebox{-\baselineskip}[0in][0in]{#1}}
\def\midbox#1{\raisebox{-0.5\baselineskip}[0in][0in]{#1}}
\begin{flushleft}
\epsfig{file=C:/Users/kasun/Desktop/center_pic/hvdc.eps}\\
% translate x=1222 y=-12 scale 0.38
\putbox{2.46in}{1.27in}{$1000 kV$}%
\putbox{0.42in}{1.08in}{$345 kV$}%
\putbox{0.42in}{0.91in}{$50 Hz$}%
\putbox{1.00in}{2.08in}{$345 kV:422 kV$}%
\putbox{0.25in}{0.49in}{$P_{ac}$}%
\putbox{1.17in}{1.24in}{$P_{6pulse}$}%
\putbox{1.17in}{0.24in}{$P_{6pulse}$}%
\putbox{2.34in}{0.08in}{$P_{dc}$}%
\end{flushleft}

在此处输入图片描述

答案1

将评论变成答案

注释掉\begin{flushleft}\end{flushleft}添加线条,hvdc.tex然后你可能会得到居中的图形。你最好使用电路图包裹。http://www.ctan.org/pkg/circuitikz

相关内容